/* ============================================================
   RTL‑optimized stylesheet for the Persian‑translated page
   (Navigation bar removed)
   ============================================================ */
:root {
    --black: #020617;
    --black-2: #07111f;
    --panel: rgba(8, 18, 34, 0.82);
    --panel-2: rgba(15, 23, 42, 0.68);
    --blue: #38bdf8;
    --blue-2: #7dd3fc;
    --blue-3: #0284c7;
    --text: #f5f5ff;                /* matched to menu card title */
    --muted: #a1a1a9;              /* matched to menu card description */
    --line: rgba(0, 170, 255, 0.705); /* new border colour from menu card */
    --radius: 28px;
    --shadow: 0 8px 20px rgba(0, 0, 0, 0.5); /* from menu card */
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background-color: #000000;
    color: var(--text);
    font-family: "Vazirmatn", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.planner-content-layer {
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
}

/* ----- اصلی‌ترین تغییر: راست‌چین کردن کل صفحه ----- */
.download-page {
    position: relative;
    isolation: isolate;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 40px 0 24px;
    direction: rtl;   /* راست‌چین */
}

.download-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -3;
    opacity: 0.22;
    pointer-events: none;
    background-image:
            linear-gradient(rgba(125, 211, 252, 0.18) 1px, transparent 1px),
            linear-gradient(90deg, rgba(125, 211, 252, 0.18) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(circle at top, black 0%, transparent 72%);
}

a {
    color: inherit;
    text-decoration: none;
}

/* -----------------------------------------------------------------
   Card glass effect & Transparent Cards
------------------------------------------------------------------ */

/* افکت شیشه‌ای فقط برای پس‌زمینه بخش‌ها (sections) نگه داشته شد */
.glass,
.final-cta {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* اعمال پس‌زمینه شفاف و استروک آبی برای تمام کارت‌ها */
.feature,
.step,
.faq,
.release {
    background: transparent;
    border: 1px solid var(--line);
    box-shadow: none;
}

/* -----------------------------------------------------------------
   Icons – gradient and glow now identical to the menu card icon
------------------------------------------------------------------ */
.icon,
.step::before {
    background: linear-gradient(145deg, #00aaff, #008ecc); /* menu icon gradient */
    box-shadow: 0 4px 15px rgba(0, 170, 255, 0.3);         /* menu icon glow */
    color: #ffffff;
}

/* -----------------------------------------------------------------
   Small decorative element inside feature cards – colour matched
------------------------------------------------------------------ */
.feature::after {
    background: rgba(0, 170, 255, 0.15);   /* was rgba(56,189,248,0.15) */
}

/* -----------------------------------------------------------------
   Rest of the layout (no colour/transparency changes)
------------------------------------------------------------------ */

.hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    align-items: center;
}

.hero-copy {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.hero-copy h1,
.hero-copy .lead {
    margin-left: auto;
    margin-right: auto;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 760px;
    margin-bottom: 24px;
    font-size: clamp(2.2rem, 4.5vw, 4rem);
    line-height: 0.94;
    letter-spacing: -0.08em;
}

h1 span,
.gradient-text {
    color: #ffffff;
    background: none;
    text-shadow: 0 0 15px #00aaff;
}

.lead {
    max-width: 640px;
    margin-bottom: 0;
    color: #c6d7e8;
    font-size: clamp(1rem, 2vw, 1.18rem);
    line-height: 1.85;
}

/* ===== Section head – centered for the features section ===== */
.section-head {
    display: flex;
    align-items: center;
    justify-content: center;          /* center the whole head block */
    gap: 18px;
    margin-bottom: 22px;
    text-align: center;               /* center inner text */
}

.section-head h2,
.final-cta h2 {
    margin-bottom: 8px;
    font-size: clamp(1.55rem, 3vw, 2.25rem);
    line-height: 1.12;
    letter-spacing: -0.045em;
}

.section-head p,
.feature p,
.step p,
.faq p,
.release li,
.final-cta p {
    color: var(--muted);
    line-height: 1.75;
}

.features,
.steps,
.faqs,
.details {
    display: grid;
    gap: 14px;
}

.section {
    margin-top: 28px;
    padding: 28px;
    border-radius: 26px;
}

.features {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature,
.step,
.faq {
    border-radius: 22px;
    padding: 22px;
}

/* Feature cards – text centered */
.feature {
    position: relative;
    overflow: hidden;
    min-height: 194px;
    text-align: center;               /* center all text inside */
}

/* Step cards – content centered (heading + paragraph) */
.step {
    text-align: center;               /* <-- ADDED: centers text inside step */
}

.icon,
.step::before {
    display: flex;
    align-items: center;
    justify-content: center;
    place-items: center;
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem auto;
    border-radius: 50%;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.icon i,
.step::before {
    font-size: 2rem;
}

.feature:hover .card-icon,
.step:hover::before {
    transform: scale(1.1);
}

.feature h3,
.step h3,
.faq h3 {
    margin-bottom: 10px;
    font-size: 1.06rem;
}

.details {
    grid-template-columns: 1fr 1fr;
}

.detail-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.detail-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 16px;
    border: 1px solid rgba(125, 211, 252, 0.14);
    border-radius: 16px;
    background: rgba(125, 211, 252, 0.05);
}

.detail-list span {
    color: var(--muted);
}

.detail-list strong {
    text-align: end;
}

.steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.step {
    min-height: 178px;
}

.step:nth-child(1)::before { content: "\f019"; font-family: "Font Awesome 7 Free"; font-weight: 900; }
.step:nth-child(2)::before { content: "\f144"; font-family: "Font Awesome 7 Free"; font-weight: 900; }
.step:nth-child(3)::before { content: "\f135"; font-family: "Font Awesome 7 Free"; font-weight: 900; }

.release {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 18px;
    align-items: start;
    border-radius: 22px;
    padding: 22px;
}

.release-badge {
    display: grid;
    place-items: center;
    min-height: 132px;
    border-radius: 20px;
    color: #02111d;
    font-weight: 950;
    text-align: center;
    background: linear-gradient(135deg, #e0f2fe, var(--blue));
}

.release ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.release li {
    position: relative;
    padding-right: 22px;
}

.release li::before {
    content: "";
    position: absolute;
    right: 0;
    top: 0.72em;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--blue);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.55);
}

.faqs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.final-cta {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 22px;
    align-items: center;
    margin-top: 28px;
    padding: 30px;
    border-radius: var(--radius);
    background: radial-gradient(circle at 80% 30%, rgba(56, 189, 248, 0.24), transparent 20rem),
    linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(2, 6, 23, 0.70));
}

.footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 28px 2px 8px;
    color: var(--muted);
    font-size: 0.92rem;
}

/* ==================== واکنش‌گرایی ==================== */
@media (max-width: 980px) {
    .hero,
    .features,
    .steps,
    .details,
    .faqs,
    .final-cta {
        grid-template-columns: 1fr;
    }

    .hero-copy,
    .final-cta {
        text-align: center;
    }

    .lead {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 640px) {
    .download-page {
        width: min(100% - 20px, 1180px);
        padding-top: 18px;
    }

    h1 {
        letter-spacing: -0.055em;
    }

    .section,
    .final-cta {
        padding: 18px;
    }

    .release {
        grid-template-columns: 1fr;
    }

    .title-row,
    .section-head {
        flex-direction: column;
    }

    .release-badge {
        min-height: 96px;
    }

    .detail-list li {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .detail-list strong {
        text-align: start;
    }
}

/* ============================================================
   Prayer Modal Styles
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.48); /* هماهنگ با رنگ پس زمینه سایت */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.modal-content {
    background: rgba(4, 0, 0, 0.45);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 35px 25px;
    max-width: 600px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.modal-overlay.hidden .modal-content {
    transform: translateY(20px);
}

.modal-title {
    color: var(--blue-2);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.modal-desc {
    color: var(--text);
    margin-bottom: 20px;
}

.prayer-text {
    font-size: 1.25rem;
    line-height: 2.2;
    color: #ffffff;
    margin: 20px 0;
    padding: 25px;
    background: rgba(56, 189, 248, 0.1);
    border-radius: 16px;
    border: 1px dashed var(--blue);
    text-shadow: 0 0 10px rgba(0, 170, 255, 0.3);
}

.prayer-count {
    margin: -4px 0 0;
    color: var(--blue-2);
    font-size: 1rem;
    line-height: 1.8;
    text-align: center;
}

#prayer-count-number {
    color: #ffffff;
    font-weight: 700;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
}

#countdown-text {
    color: var(--blue-2);
    font-weight: bold;
    margin-bottom: 10px;
}

#timer {
    font-size: 1.3rem;
    color: #ffffff;
}

/* استایل دکمه غیرفعال */
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(100%);
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    text-decoration: underline;
    margin-top: 10px;
    transition: color 0.2s;
}

.btn-close:hover {
    color: var(--text);
}

/* ============================================================
   Prayer Modal Styles
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.48);
    display: flex;
    flex-direction: column; /* چیدمان عمودی برای قرار گرفتن دکمه در زیر باکس */
    align-items: center;
    justify-content: center;
    gap: 20px;               /* فاصله بین مستطیل اصلی و دکمه انصراف */
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* استایل دکمه انصراف (مشابه دکمه خروج) */
.exit-btn {
    background-color: transparent;
    border: 1px solid #e74c3c;
    color: #e74c3c;
    padding: 0.7rem 2.5rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 9999px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.exit-btn:hover {
    background-color: rgba(231, 76, 60, 0.15);
    color: #ffffff;
    border-color: #e74c3c;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}
