/* ============================================================
   layout-shell.css — بازطراحی پوستهٔ اصلی سایت
   هدف: تمام‌عرض کردن فوتر و گسترده‌تر کردن هدر
   این فایل پس از style.css بارگذاری می‌شود و قوانین مربوطه را
   بازنویسی می‌کند تا فوتر از حالت کارتی خارج شده و کل عرض صفحه
   را در پایین فرا بگیرد و هدر نیز فاصلهٔ کمتری از لبه‌های صفحه
   داشته باشد.
   ============================================================ */

/* ---------- ۱. پوستهٔ اصلی (Site Shell) ---------- */
.site-shell {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100dvh;
}

/* ---------- ۲. کانتینر محتوا (Content Container) ---------- */
.page {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-block: 0 40px;
    padding-inline: max(20px, calc(20px + var(--safe-left))) max(20px, calc(20px + var(--safe-right)));
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* ---------- ۳. هدر (تاپبار) — گسترده‌تر و نزدیک‌تر به لبه‌ها ---------- */
.topbar {
    position: sticky;
    top: 12px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 28px;
    width: calc(100% - 24px);
    max-width: 1400px;
    margin-block: 12px 36px;
    margin-inline: auto;
    border-radius: 24px;
    background: linear-gradient(160deg, oklch(1 0 0 / .93), oklch(.985 .008 60 / .88));
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid oklch(1 0 0 / .85);
    box-shadow:
        0 8px 28px oklch(.28 .05 290 / .10),
        0 2px 6px oklch(.28 .05 290 / .05),
        inset 0 1px 0 oklch(1 0 0 / .95);
}

/* ---------- ۴. فوتر — تمام‌عرض، بدون حالت کارتی ---------- */
.footer {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-top: 1px solid oklch(.88 .02 290 / .7);
    border-radius: 0;
    background:
        radial-gradient(1200px 380px at 50% -140px, oklch(.84 .13 45 / .13), transparent 70%),
        linear-gradient(180deg, oklch(.995 .005 300) 0%, oklch(.965 .015 60) 100%);
    box-shadow: 0 -10px 36px oklch(.28 .05 290 / .05);
    position: relative;
    isolation: isolate;
}

.footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding-block: 52px 24px;
    padding-inline: max(20px, calc(20px + var(--safe-left))) max(20px, calc(20px + var(--safe-right)));
}

/* ---------- ۵. اصلاحات جزئی داخل فوتر برای هارمونی بیشتر ---------- */
.footer .footer__title {
    font-size: .95rem;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 14px;
    position: relative;
    padding-bottom: 10px;
}
.footer .footer__title::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--peach), var(--plum));
}

.footer .footer__bottom {
    padding-top: 24px;
    margin-top: 8px;
    border-top: .5px solid oklch(.88 .02 290 / .55);
}

/* ---------- ۶. تنظیمات ریسپانسیو ---------- */

@media (max-width: 720px) {
    .topbar {
        top: 8px;
        padding: 10px 16px;
        width: calc(100% - 16px);
        margin-block: 8px 24px;
        border-radius: 18px;
        gap: 10px;
    }

    .page {
        padding-block: 0 28px;
        padding-inline: max(16px, calc(16px + var(--safe-left))) max(16px, calc(16px + var(--safe-right)));
    }

    .footer__inner {
        padding-block: 40px 20px;
        padding-inline: max(20px, calc(20px + var(--safe-left))) max(20px, calc(20px + var(--safe-right)));
    }

    .footer .footer__title { font-size: .9rem; margin-bottom: 10px; }
}

@media (max-width: 480px) {
    .topbar {
        top: 6px;
        padding: 9px 14px;
        width: calc(100% - 12px);
        margin-block: 6px 20px;
        border-radius: 16px;
    }

    .page {
        padding-block: 0 24px;
        padding-inline: max(14px, calc(14px + var(--safe-left))) max(14px, calc(14px + var(--safe-right)));
    }

    .footer__inner {
        padding-block: 32px 16px;
    }
}

@media (max-width: 360px) {
    .topbar {
        padding: 8px 12px;
        width: calc(100% - 10px);
    }

    .page {
        padding-inline: max(12px, calc(12px + var(--safe-left))) max(12px, calc(12px + var(--safe-right)));
    }
}

@media (min-width: 1440px) {
    /* روی مانیتورهای بزرگ، هدر از کشیده شدن بیش از حد محدود می‌شود */
    .topbar {
        max-width: 1400px;
    }
}