/* ===== Colors ===== */

:root {

    --primary: #3B6E4D;

    --primary-light: #24a180;

    --primary-dark: #055943;

    --gold: #f3c74a;

    /* برای hover قبلی که تعریف نشده بود */

}



/* ===== Header Top ===== */

header {

    margin: 0 auto;

    border-bottom: 0.01px solid var(--primary);

    box-shadow: 0 12px 30px rgba(0, 0, 0, .07);

    background: #fff;

}



.header-top {

    background: var(--primary);

    color: #fff;

    font-size: .9rem;

    height: 40px;

    padding: 0 4%;

    display: flex;

    justify-content: space-between;

    align-items: center;

    overflow: visible;

    /* اجازه باز شدن منوی زبان روی نوار */

}

.lang-menu li a{

    color: #222;

}

.header-top ul {

    margin: 0;

    padding: 0;

    list-style: none;

    display: flex;

    gap: 20px;

}



.header-top>.top-right>ul,

.header-top>.top-left>ul {

    display: flex;

    gap: 20px;

}



.header-top a {

    color: #fff;

    text-decoration: none;

    display: flex;

    align-items: center;

    gap: 6px;

    transition: .3s;

}



.header-top a:hover {

    color: var(--gold);

}



/* Language switcher */

.lang-switch {

    position: relative;

}



.lang-btn {

    display: inline-flex;

    align-items: center;

    gap: 8px;

    background: transparent;

    color: #fff;

    border: 1px solid #ffffff33;

    padding: 4px 10px;

    border-radius: 8px;

    cursor: pointer;

    transition: .2s;

    line-height: 1;

}



.lang-btn:hover {

    background: #ffffff1a;

}



.lang-btn .chevron {

    font-size: .8rem;

    opacity: .9;

}



.lang-switch .fa-globe,

.lang-switch .chevron {

    color: #fff;

}



.lang-menu {

    position: absolute;

    inset: 110% 0 auto auto;

    min-width: 180px;

    background: #fff;

    color: #222;

    border: 1px solid #e5e8ec;

    border-radius: 10px;

    box-shadow: 0 14px 40px rgba(0, 0, 0, .12);

    list-style: none;

    margin: 0;

    padding: 6px;

    display: none !important;

    flex-direction: column;

    z-index: 1500;

}



.lang-menu.show {

    display: block !important;

}



.lang-menu li {

    padding: 8px 10px;

    border-radius: 8px;

    cursor: pointer;

    transition: .15s;

}



.lang-menu li:hover {

    background: #f2f6f9;

}



/* موبایل: جمع‌وجور شدن متن‌ها */

@media (max-width:640px) {

    .header-top {

        font-size: .82rem;

        padding: 0 3%;

    }



    .header-top a {

        margin-top: 5px;

    }



    .header-top .top-right .label {

        display: none;

    }



    .lang-btn {

        padding: 4px 8px;

    }



    .lang-menu {

        inset-inline-end: 0;

    }



    /* چسبیده به راست */

}



/* ===== Header Bottom ===== */

.header-bottom {

    position: sticky;

    top: 0;

    z-index: 1000;

    height: 70px;

}



.header-bottom .container {

    padding: 15px 10px;

    display: flex;

    justify-content: space-between;

    align-items: center;

    flex-wrap: wrap;

}



.logo a {

    font-size: 1.6rem;

    font-weight: bold;

    color: var(--primary);

    text-decoration: none;

}



/* ===== Navigation ===== */

.main-nav ul {

    display: flex;

    gap: 25px;

    list-style: none;

    padding: 0;

    margin: 0;

}



.main-nav ul li a {

    color: #333;

    text-decoration: none;

    position: relative;

    padding-bottom: 4px;

    transition: .3s;

}



.main-nav ul li a::after {

    content: "";

    position: absolute;

    right: 0;

    bottom: 0;

    height: 2px;

    width: 0;

    background: var(--primary);

    transition: width .3s;

}



.main-nav ul li a:hover::after {

    width: 100%;

}



/* ===== Header Actions ===== */

.header-actions {

    display: flex;

    align-items: center;

    gap: 12px;

    position: relative;

}



/* ===== Buttons & Search ===== */

.search-form input {

    padding: 6px 10px;

    border: 1px solid #ccc;

    border-radius: 4px;

    font-size: .9rem;

    transition: .3s;

}



.search-form input:focus {

    border-color: var(--primary);

    outline: 0;

}



.search-form button {

    padding: 5px 10px;

    border: 0;

    background: var(--primary);

    color: #fff;

    cursor: pointer;

    border-radius: 4px;

}



.auth-buttons {

    display: flex;

    gap: 8px;

}



.auth-buttons a {

    padding: 6px 12px;

    border-radius: 5px;

    font-size: .9rem;

    text-decoration: none;

    display: flex;

    align-items: center;

    gap: 6px;

    transition: .3s;

}



.auth-buttons .login-btn {

    color: var(--primary);

    border: 1px solid var(--primary);

}



.auth-buttons .login-btn:hover {

    background: var(--primary-light);

    color: #fff;

}



.auth-buttons .signup-btn {

    background: var(--primary);

    color: #fff;

}



.auth-buttons .signup-btn:hover {

    background: var(--primary-dark);

}



/* ===== Hamburger ===== */

.hamburger {

    cursor: pointer;

    display: none;

    order: 1;

    z-index: 1001;

}



.hamburger input {

    display: none;

}



.hamburger svg {

    height: 3em;

    transition: transform .6s cubic-bezier(.4, 0, .2, 1);

}



.line {

    fill: none;

    stroke: var(--primary);

    stroke-linecap: round;

    stroke-linejoin: round;

    stroke-width: 2;

    transition: stroke-dasharray .6s cubic-bezier(.4, 0, .2, 1), stroke-dashoffset .6s cubic-bezier(.4, 0, .2, 1);

}



.line-top-bottom {

    stroke-dasharray: 12 63;

}



.hamburger input:checked+svg {

    transform: rotate(-45deg);

}



.hamburger input:checked+svg .line-top-bottom {

    stroke-dasharray: 20 300;

    stroke-dashoffset: -32.42;

}

[id^="footer"] { scroll-margin-top: 70px; } /* ارتفاع هدر به پیکسل */



/* ===== Mobile ===== */

@media (max-width:992px) {

    .hamburger {

        display: flex;

    }



    /* پنل ناوبری موبایل (یک‌بار تعریف شد) */

    .main-nav ul {

        display: none;

        flex-direction: column;

        position: fixed;

        top: 0;

        right: -100%;

        width: 80%;

        max-width: 320px;

        height: 100vh;

        background: rgba(255, 255, 255, .85);

        backdrop-filter: blur(10px);

        box-shadow: -4px 0 25px rgba(0, 0, 0, .25);

        padding: 0;

        transition: right .4s ease;

    }



    .main-nav.mobile-active ul {

        display: flex;

    }



    .main-nav.mobile-active ul.show {

        right: 0;

        top: 41px;

    }



    .main-nav ul::before {

        content: "مدرسة الرسول الأعظم";

        display: block;

        font-size: 1.3rem;

        font-weight: bold;

        color: var(--primary);

        padding: 20px;

        border-bottom: 1px solid rgba(0, 0, 0, .1);

        user-select: none;

        text-align: end;

    }



    .main-nav ul li {

        border-bottom: 1px solid rgba(0, 0, 0, .1);

        opacity: 0;

        transform: translateX(20px);

        animation: fadeSlide .4s forwards;

    }



    .main-nav ul li:nth-child(1) {

        animation-delay: .1s;

    }



    .main-nav ul li:nth-child(2) {

        animation-delay: .2s;

    }



    .main-nav ul li:nth-child(3) {

        animation-delay: .3s;

    }



    .main-nav ul li:nth-child(4) {

        animation-delay: .4s;

    }



    .main-nav ul li:nth-child(5) {

        animation-delay: .5s;

    }



    .main-nav ul li:nth-child(6) {

        animation-delay: .6s;

    }



    @keyframes fadeSlide {

        to {

            opacity: 1;

            transform: translateX(0);

        }

    }



    .main-nav ul li a {

        display: flex;

        align-items: center;

        gap: 12px;

        font-size: 1rem;

        font-weight: 500;

        padding: 14px 20px;

        color: #333;

        text-decoration: none;

        transition: all .3s;

    }



    .main-nav ul li a:hover {

        background: var(--primary);

        color: #fff;

    }



    .logo {

        display: none;

    }



    .header-actions {

        display: flex;

        gap: 10px;

        order: 2;

        width: 100%;

        justify-content: space-between;

    }



    .hamburger {

        order: 1;

    }



    /* همبرگر داخل پنل، بالای راست */

    .main-nav.mobile-active+.header-actions .hamburger,

    .main-nav.mobile-active~.header-actions .hamburger {

        position: fixed;

        top: 56px;

        right: 8px;

        left: auto;

        z-index: 1001;

    }



    /* سرچ موبایل: پاپ‌آپ زیر هدر */

    .search-toggle {

        display: inline-flex;

        align-items: center;

        background: transparent;

        border: 0;

        font-size: 1.2rem;

        cursor: pointer;

        padding: 6px;

        color: var(--primary);

    }



    .search-form {

        position: absolute;

        top: 60px;

        right: 10px;

        left: 10px;

        background: #fff;

        padding: 8px;

        border-radius: 10px;

        box-shadow: 0 10px 30px rgba(0, 0, 0, .12);

        display: none;

        z-index: 1002;

        gap: 5px;

    }



    .search-form.show {

        display: flex;

        gap: 8px;

    }



    .search-form input {

        width: 100%;

    }



    .search-form button[type="submit"] {

        display: none;

    }



    /* فقط Enter */

}



/* دسکتاپ: فرم ثابت و آیکن مخفی */

@media (min-width:993px) {

    .search-toggle {

        display: none;

    }



    .search-form {

        position: static;

        display: flex;

        gap: 5px;

    }

}



.div-h {

    display: flex;

    gap: 10px;

}



/* Small screens tweaks */

@media (max-width:576px) {

    .header-top {

        font-size: .8rem;

        padding: 0 5%;

    }



    .search-form input {

        width: 100%;

    }



    .auth-buttons a {

        font-size: .8rem;

        padding: 7px 8px;

    }

}



/* Overlay */

.mobile-overlay {

    position: fixed;

    inset: 0;

    background: rgba(0, 0, 0, .3);

    opacity: 0;

    pointer-events: none;

    transition: opacity .3s ease;

    z-index: 998;

}



.mobile-overlay.active {

    opacity: 1;

    pointer-events: auto;

}



/* Smart sticky header: hide on scroll down, show on scroll up */

.site-header {

    position: sticky;

    /* قبلاً هم sticky بود؛ اینجا برای اطمینان */

    top: 0;

    z-index: 1000;

    /* بالاتر از بقیه */

    will-change: transform;

    transition: transform .28s ease;

    /* حرکت نرم */

}



/* حالت‌ها */

.site-header.headroom--pinned{ transform: none; }  /* دیگه stacking context نسازه */





.site-header.headroom--unpinned {

    transform: translateY(-100%);

}



/* وقتی از بالای صفحه کمی رد شدیم، سایه ملایم بده */

.site-header.head-scrolled .header-bottom {

    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);

    border-bottom-color: transparent;

}



/* احترام به کاهش انیمیشن سیستم */

@media (prefers-reduced-motion: reduce) {

    .site-header {

        transition: none;

    }

}



مطمئن شو زِه‌ها درستن .mobile-overlay {

    z-index: 998;

}



.main-nav ul {

    z-index: 999;

}



.hamburger {

    z-index: 1001;

}



.search-form.show {

    z-index: 1002;

}

.status-pill {
    display:inline-flex; align-items:center; gap:6px;
    padding:6px 10px; border-radius:999px; font-size:12px; font-weight:600;
    border:1px solid transparent;
  }
  .status-pill.pending { background:#fff7ed; color:#b45309; border-color:#fed7aa;}
  .status-pill.ok      { background:#f0fdf4; color:#14532d; border-color:#bbf7d0;}
  .status-pill.bad     { background:#fef2f2; color:#991b1b; border-color:#fecaca;}
  .status-actions { display:flex; gap:8px; align-items:center; }
  .status-actions .btn-small {
    display:inline-flex; align-items:center; gap:6px; padding:8px 12px;
    border-radius:10px; text-decoration:none; font-size:13px; font-weight:600;
    background:#265E49; color:#fff;
  }
  .status-actions .btn-ghost {
    background:#eef4f1; color:#214b37; text-decoration:none; padding:8px 12px; border-radius:10px; font-weight:600;
  }
  