/* ═══════════════════════════════════════════════════════════════
   سامانه خدمات — استایل نهایی
   ═══════════════════════════════════════════════════════════════ */

/* ─────── متغیرها ─────── */
:root {
    --navy: #0A1128;
    --navy-light: #162447;
    --green: #1B4332;
    --gold: #D4AF37;
    --gold-dark: #B8941F;
    --gold-light: #F3E5AB;
    --cream: #FDFBF7;
    --white: #FFFFFF;
    --gray-bg: #F8F9FA;
    --gray-light: #EEF0F3;
    --text: #2C2C2C;
    --gray-text: #6C757D;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-xl: 28px;
    --shadow-soft: 0 10px 40px rgba(10,17,40,0.06);
    --shadow-hover: 0 20px 50px rgba(10,17,40,0.14);
    --nav-h: 72px;
}

/* ─────── ریست ─────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, Tahoma, sans-serif;
}
html { scroll-behavior: smooth; }
body {
    background: var(--cream);
    color: var(--text);
    line-height: 1.8;
    padding-top: var(--nav-h);
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.skip-link {
    position: absolute; top: -100px; right: 10px;
    background: var(--gold); color: var(--navy);
    padding: 10px 16px; border-radius: var(--radius-sm);
    z-index: 99999; font-weight: 800;
}
.skip-link:focus { top: 10px; }

/* ─────── Container ─────── */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ═══════════════════════════════════════════════════════════════
   NAVBAR — قلب ماجرا
   ═══════════════════════════════════════════════════════════════ */
.navbar {
    position: fixed;
    top: 0; right: 0; left: 0;
    height: var(--nav-h);
    background: var(--white);
    border-bottom: 1px solid rgba(212,175,55,0.2);
    box-shadow: 0 2px 12px rgba(10,17,40,0.05);
    z-index: 9999;
}

.navbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    position: relative;          /* 👈 کلید حل مشکل منو */
}

.navbar__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.navbar__logo { height: 42px; width: auto; max-width: 130px; object-fit: contain; }
.navbar__logo-box {
    width: 42px; height: 42px;
    background: var(--navy); color: var(--gold);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}
.navbar__brand-text {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--navy);
    white-space: nowrap;
}

.navbar__toggle {
    display: none;                /* پیش‌فرض مخفی */
    font-size: 1.8rem;
    color: var(--navy);
    padding: 4px 8px;
    line-height: 1;
    z-index: 2;
}

/* ─── منو: دسکتاپ ─── */
.navbar__menu {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: flex-end;
}

.navbar__links {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}
.navbar__links a {
    display: block;
    color: var(--navy);
    font-weight: 700;
    font-size: 15px;
    padding: 8px 14px;
    border-radius: 8px;
    white-space: nowrap;
    transition: color 0.2s;
}
.navbar__links a:hover,
.navbar__links a.is-active { color: var(--gold); }

.navbar__user {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ─── دکمه‌ها ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 22px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: 0.2s;
    white-space: nowrap;
    border: 2px solid transparent;
}
.btn--outline { border-color: var(--navy); color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: var(--white); }
.btn--primary { background: var(--navy); color: var(--white); }
.btn--primary:hover { background: var(--navy-light); }
.btn--gold { background: var(--gold); color: var(--navy); }
.btn--gold:hover { background: var(--gold-dark); }
.btn--glass {
    background: rgba(255,255,255,0.15);
    color: var(--white);
    border-color: rgba(255,255,255,0.4);
}
.btn--glass:hover { background: var(--white); color: var(--navy); }
.btn--lg { padding: 13px 30px; font-size: 1rem; }
.btn--sm { padding: 6px 16px; font-size: 0.82rem; }

/* ─── منوی کاربر (دسکتاپ) ─── */
.user-menu { position: relative; }
.user-menu__dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--white);
    min-width: 220px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-hover);
    padding: 8px;
    border: 1px solid var(--gray-light);
    z-index: 1000;
}
.user-menu__dropdown.is-open { display: block; }
.user-menu__header {
    font-weight: 800;
    font-size: 14px;
    padding: 10px 12px;
    color: var(--navy);
    border-bottom: 1px dashed var(--gray-light);
    margin-bottom: 6px;
}
.user-menu__dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--text);
    border-radius: 8px;
    font-size: 14px;
}
.user-menu__dropdown a:hover { background: var(--gray-bg); color: var(--gold); }
.user-menu__dropdown a.is-danger { color: #B91C1C; }

/* ─── موبایل / تبلت ─── */
@media (max-width: 991px) {
    .navbar__toggle { display: block; }

    .navbar__menu {
        display: none;                       /* پیش‌فرض بسته */
        position: absolute;
        top: 100%;                           /* 👈 دقیقاً زیر navbar */
        right: 0;
        left: 0;
        background: var(--white);
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        border-bottom: 1px solid var(--gray-light);
        box-shadow: 0 10px 20px rgba(0,0,0,0.08);
        max-height: calc(100vh - var(--nav-h));
        overflow-y: auto;
        gap: 0;
    }
    .navbar__menu.is-open { display: flex; }  /* 👈 کلاس باز شدن */

    .navbar__links {
        flex-direction: column;
        width: 100%;
        margin: 0 0 12px 0;
        gap: 2px;
    }
    .navbar__links a {
        padding: 12px 10px;
        text-align: right;
        border-radius: 8px;
    }
    .navbar__links a:hover { background: var(--gray-bg); }

    .navbar__user {
        flex-wrap: wrap;
        width: 100%;
        gap: 8px;
        padding-top: 14px;
        border-top: 1px solid var(--gray-light);
    }
    .navbar__user > .btn { flex: 1; }

    .user-menu { width: 100%; }
    .user-menu > .btn { width: 100%; }
    .user-menu__dropdown {
        position: static;
        width: 100%;
        margin-top: 8px;
        box-shadow: none;
        border: 1px solid var(--gray-light);
    }
}

@media (max-width: 480px) {
    :root { --nav-h: 62px; }
    .navbar__brand-text { font-size: 1.05rem; }
    .navbar__logo { height: 36px; }
    .navbar__logo-box { width: 36px; height: 36px; font-size: 18px; }
}

/* ═══════════════════════════════════════════════════════════════
   اسلایدر
   ═══════════════════════════════════════════════════════════════ */
.hero {
    position: relative;
    height: 80vh;
    min-height: 480px;
    background: var(--navy);
    overflow: hidden;
}
.hero__slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s;
    display: flex;
    align-items: center;
}
.hero__slide.is-active { opacity: 1; visibility: visible; z-index: 2; }
.hero__overlay {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(10,17,40,0.9) 0%, rgba(10,17,40,0.6) 50%, rgba(10,17,40,0.3) 100%);
    z-index: 1;
}
.hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    text-align: center;
}
.hero__text { max-width: 750px; margin: 0 auto; }
.hero__badge {
    display: inline-block;
    background: rgba(212,175,55,0.2);
    color: var(--gold);
    border: 1px solid var(--gold);
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 13px;
    margin-bottom: 14px;
}
.hero__title {
    font-size: clamp(1.8rem, 4.5vw, 3.2rem);
    color: var(--white);
    line-height: 1.3;
    font-weight: 800;
    margin-bottom: 16px;
}
.hero__desc {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: rgba(255,255,255,0.85);
    margin-bottom: 26px;
}
.hero__buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: var(--white);
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}
.hero__nav:hover { background: var(--gold); color: var(--navy); }
.hero__nav--prev { right: 16px; }
.hero__nav--next { left: 16px; }
.hero__dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}
.hero__dots button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    transition: 0.2s;
    padding: 0;
}
.hero__dots button.is-active { background: var(--gold); width: 28px; border-radius: 8px; }

@media (min-width: 992px) {
    .hero__content { text-align: right; }
    .hero__text { margin: 0; }
    .hero__buttons { justify-content: flex-start; }
}

@media (max-width: 767px) {
    .hero { height: 70vh; min-height: 420px; }
    .hero__nav { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   Section
   ═══════════════════════════════════════════════════════════════ */
.section { padding: 70px 0; }
.section--gray { background: var(--gray-bg); }
.section__head { text-align: center; margin-bottom: 44px; }
.section__title {
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    color: var(--navy);
    font-weight: 800;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}
.section__title::after {
    content: '';
    position: absolute;
    bottom: 0; right: 50%;
    transform: translateX(50%);
    width: 55px; height: 3px;
    background: var(--gold);
    border-radius: 3px;
}
.section__subtitle { color: var(--gray-text); font-size: 0.98rem; margin-top: 8px; }

.section__head-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(212,175,55,0.25);
    margin-bottom: 28px;
}
.section__head-row .section__title { padding-bottom: 6px; }
.section__head-row .section__title::after { right: 0; transform: none; }

@media (max-width: 767px) {
    .section { padding: 50px 0; }
    .section__head-row { flex-direction: column; align-items: flex-start; }
}

/* ═══════════════════════════════════════════════════════════════
   Grid ساده
   ═══════════════════════════════════════════════════════════════ */
.grid {
    display: grid;
    gap: 20px;
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 991px) {
    .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575px) {
    .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   کارت‌ها (Card generic)
   ═══════════════════════════════════════════════════════════════ */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(212,175,55,0.12);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: 0.3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); border-color: var(--gold); }
.card__media { height: 200px; position: relative; overflow: hidden; background: var(--navy-light); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.card:hover .card__media img { transform: scale(1.05); }
.card__media-fallback {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: var(--gold); font-size: 48px;
}
.card__badge {
    position: absolute;
    top: 12px; right: 12px;
    background: var(--gold);
    color: var(--navy);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
}
.card__body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.card__title { font-size: 1.1rem; color: var(--navy); font-weight: 800; margin-bottom: 10px; }
.card__desc { color: var(--gray-text); font-size: 0.9rem; margin-bottom: 14px; }
.card__footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px dashed rgba(212,175,55,0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 575px) {
    .card__media { height: 170px; }
}

/* ═══════════════════════════════════════════════════════════════
   Features
   ═══════════════════════════════════════════════════════════════ */
.feature {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 24px 20px;
    border: 1px solid rgba(212,175,55,0.18);
    box-shadow: var(--shadow-soft);
    transition: 0.3s;
    height: 100%;
}
.feature:hover { border-color: var(--gold); transform: translateY(-4px); }
.feature__icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    background: rgba(212,175,55,0.12);
    color: var(--gold);
    font-size: 24px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px;
}
.feature__title { font-size: 1rem; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.feature__desc { color: var(--gray-text); font-size: 0.87rem; }

/* ═══════════════════════════════════════════════════════════════
   Stats
   ═══════════════════════════════════════════════════════════════ */
.stats { background: var(--green); padding: 60px 0; }
.stat {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(212,175,55,0.28);
    border-radius: var(--radius-md);
    padding: 24px 16px;
    text-align: center;
    transition: 0.2s;
}
.stat:hover { border-color: var(--gold); transform: translateY(-3px); }
.stat__icon { font-size: 1.6rem; color: var(--gold); margin-bottom: 6px; }
.stat__value { font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--gold); font-weight: 800; }
.stat__label { color: rgba(255,255,255,0.85); font-size: 0.9rem; margin-top: 4px; }

/* ═══════════════════════════════════════════════════════════════
   Testimonials
   ═══════════════════════════════════════════════════════════════ */
.testimonials {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 12px;
}
.testimonials::-webkit-scrollbar { height: 5px; }
.testimonials::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }
.testimonial {
    flex: 0 0 calc(33.333% - 12px);
    scroll-snap-align: start;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 26px 22px;
    border: 1px solid rgba(212,175,55,0.18);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    min-width: 260px;
}
.testimonial__quote { color: var(--gold); font-size: 1.8rem; opacity: 0.5; margin-bottom: 8px; }
.testimonial__content { font-size: 0.93rem; flex: 1; margin-bottom: 14px; }
.testimonial__stars { color: var(--gold); margin-bottom: 12px; }
.testimonial__author {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(212,175,55,0.2);
}
.testimonial__author img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.testimonial__avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--gray-light);
    color: var(--gray-text);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
}

@media (max-width: 991px) {
    .testimonial { flex: 0 0 calc(50% - 9px); }
}
@media (max-width: 575px) {
    .testimonial { flex: 0 0 85%; min-width: 0; }
}

/* ═══════════════════════════════════════════════════════════════
   FAQ
   ═══════════════════════════════════════════════════════════════ */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq__item {
    background: var(--white);
    border: 1px solid rgba(212,175,55,0.18);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.faq__btn {
    width: 100%;
    text-align: right;
    padding: 16px 18px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.2s;
}
.faq__btn[aria-expanded="true"] {
    background: rgba(212,175,55,0.06);
    color: var(--gold-dark);
}
.faq__num {
    width: 30px; height: 30px;
    background: rgba(212,175,55,0.12);
    color: var(--gold-dark);
    font-size: 0.8rem;
    font-weight: 800;
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.faq__btn[aria-expanded="true"] .faq__num { background: var(--gold); color: var(--navy); }
.faq__icon { margin-right: auto; color: var(--gold); transition: transform 0.3s; }
.faq__btn[aria-expanded="true"] .faq__icon { transform: rotate(180deg); }
.faq__body {
    display: none;
    padding: 0 18px 16px;
    color: var(--gray-text);
    font-size: 0.9rem;
}
.faq__item.is-open .faq__body { display: block; }

/* ═══════════════════════════════════════════════════════════════
   CTA
   ═══════════════════════════════════════════════════════════════ */
.cta {
    background: var(--green);
    border-radius: var(--radius-xl);
    padding: 60px 30px;
    text-align: center;
    border: 2px solid rgba(212,175,55,0.4);
    color: var(--white);
}
.cta__title { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; margin-bottom: 14px; }
.cta__desc { font-size: 1rem; opacity: 0.85; margin-bottom: 26px; }
.cta__buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 575px) {
    .cta { padding: 40px 18px; }
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
.footer {
    background: var(--navy);
    color: var(--white);
    padding-top: 55px;
    margin-top: 60px;
    border-top: 4px solid var(--gold);
}
.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 30px;
}
.footer__brand { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer__brand img { height: 44px; filter: brightness(0) invert(1); }
.footer__brand h4 { font-size: 1.3rem; font-weight: 800; color: var(--white); }
.footer__logo-box {
    width: 44px; height: 44px;
    background: var(--gold); color: var(--navy);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}
.footer__desc { color: rgba(255,255,255,0.6); font-size: 0.88rem; margin-bottom: 20px; text-align: justify; }
.footer__socials { display: flex; gap: 8px; }
.footer__socials a {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
    transition: 0.2s;
}
.footer__socials a:hover { background: var(--gold); color: var(--navy); transform: translateY(-3px); }

.footer__title {
    font-size: 1.02rem;
    font-weight: 800;
    margin-bottom: 16px;
    padding-bottom: 8px;
    position: relative;
}
.footer__title::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 26px; height: 2px;
    background: var(--gold);
}
.footer__links li { margin-bottom: 10px; }
.footer__links a { color: rgba(255,255,255,0.65); font-size: 0.9rem; }
.footer__links a:hover { color: var(--gold); }
.footer__contact li {
    display: flex;
    gap: 10px;
    color: rgba(255,255,255,0.65);
    font-size: 0.9rem;
    margin-bottom: 12px;
    align-items: flex-start;
}
.footer__contact i { color: var(--gold); margin-top: 5px; flex-shrink: 0; }

.footer__bottom {
    background: rgba(0,0,0,0.3);
    padding: 18px 0;
    margin-top: 45px;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.footer__bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.5);
}
.footer__bottom i { color: #dc3545; }

@media (max-width: 991px) {
    .footer__grid { grid-template-columns: 1fr 1fr; gap: 30px; }
    .footer__col--brand { grid-column: 1 / -1; }
}
@media (max-width: 575px) {
    .footer__grid { grid-template-columns: 1fr; text-align: center; }
    .footer__brand { justify-content: center; }
    .footer__desc { text-align: center; }
    .footer__socials { justify-content: center; }
    .footer__title::after { right: 50%; transform: translateX(50%); }
    .footer__contact li { justify-content: center; text-align: right; }
    .footer__bottom .container { flex-direction: column; text-align: center; }
}

/* ═══════════════════════════════════════════════════════════════
   Messages
   ═══════════════════════════════════════════════════════════════ */
.messages-container {
    position: fixed;
    top: calc(var(--nav-h) + 12px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 9998;
    width: calc(100% - 24px);
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.alert-toast {
    padding: 12px 18px;
    border-radius: var(--radius-md);
    background: var(--navy);
    color: var(--white);
    box-shadow: var(--shadow-hover);
    font-size: 0.9rem;
    border-right: 4px solid var(--gold);
}
.alert-success { border-right-color: #22c55e; }
.alert-error, .alert-danger { border-right-color: #ef4444; }
.alert-warning { border-right-color: #f59e0b; }

/* ═══════════════════════════════════════════════════════════════
   Utilities
   ═══════════════════════════════════════════════════════════════ */
.text-gold { color: var(--gold); }
.text-muted { color: var(--gray-text); }