/* ============================================================
           بارگذاری فونت از داخل CSS
           دلیل: هنگام درج این کد در وردپرس (قالب یا بلاک HTML)، تگ‌های
           <link> داخل <head> معمولاً حذف یا نادیده گرفته می‌شوند و فونت
           بارگذاری نمی‌شود. @import باید همیشه اولین دستور استایل باشد.
           ============================================================ */
        @import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap');

        /* ============================================================
           توکن‌های طراحی — تنها منبع رنگ در کل هدر
           هیچ رنگی خارج از این لیست در هیچ حالتی استفاده نمی‌شود
           ============================================================ */
        :root {
            --falat-bg-primary: #0c2327;
            --falat-bg-deep: #08171a;
            --falat-bg-secondary: #173a41;

            --falat-gold-primary: #c99932;
            --falat-gold-light: #e9c576;

            --falat-text-main: #f4efe4;
            --falat-text-muted: #9ab4b8;

            --falat-border-gold: rgba(201, 153, 50, 0.25);
            --falat-border-soft: rgba(201, 153, 50, 0.15);
            --falat-gold-tint: rgba(201, 153, 50, 0.12);

            --falat-glass: rgba(12, 35, 39, 0.85);
            --falat-glass-solid: rgba(12, 35, 39, 0.95);
            --falat-surface: rgba(23, 58, 65, 0.4);
            --falat-surface-hover: rgba(23, 58, 65, 0.9);

            --falat-h-topbar: 38px;
            --falat-h-header: 80px;

            --falat-font: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
            --falat-ease: cubic-bezier(0.4, 0, 0.2, 1);
            --falat-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        /* ============================================================
           ریست موضعی
           فقط روی عناصر خودِ هدر اعمال می‌شود تا با استایل قالب وردپرس
           تداخل نکند و بقیه صفحه دست‌نخورده بماند
           ============================================================ */
        .falat-topbar *,
        .falat-header *,
        .falat-drawer * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        /* تثبیت فونت در برابر قالب وردپرس (قالب‌ها معمولاً روی body فونت
           تعریف می‌کنند و بر ارث‌بری غلبه می‌کنند) — تگ‌های SVG مستثنا هستند */
        .falat-topbar,
        .falat-topbar *:not(svg):not(use):not(path),
        .falat-header,
        .falat-header *:not(svg):not(use):not(path),
        .falat-drawer,
        .falat-drawer *:not(svg):not(use):not(path) {
            font-family: var(--falat-font) !important;
        }

        /* حذف زیرخط و رنگ پیش‌فرض لینک‌های قالب در محدوده هدر */
        .falat-topbar a,
        .falat-header a,
        .falat-drawer a {
            text-decoration: none !important;
            box-shadow: none !important;
        }

        .falat-header ul,
        .falat-drawer ul {
            list-style: none !important;
        }

        /* حلقه فوکوس یکدست و هم‌رنگ قالب برای دسترس‌پذیری کیبورد */
        .falat-topbar :focus-visible,
        .falat-header :focus-visible,
        .falat-drawer :focus-visible {
            outline: 2px solid var(--falat-gold-light);
            outline-offset: 3px;
            border-radius: 4px;
        }

        /* ============================================================
           سیستم آیکون SVG — اسپرایت با <symbol> و فراخوانی با <use>
           رنگ از currentColor گرفته می‌شود تا با متن والد هماهنگ بماند
           ============================================================ */
        .falat-icon {
            display: inline-block;
            flex-shrink: 0;
            vertical-align: middle;
            width: 1em;
            height: 1em;
            fill: none;
            stroke: currentColor;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
            pointer-events: none;
        }

        /* ============================================================
           نوار بالایی (اطلاعات تماس)
           ============================================================ */
        .falat-topbar {
            position: relative;
            z-index: 1001;
            height: var(--falat-h-topbar);
            font-size: 0.82rem;
            color: var(--falat-text-muted);
            background: linear-gradient(90deg, var(--falat-bg-deep), var(--falat-bg-primary), var(--falat-bg-deep));
            border-bottom: 1px solid var(--falat-border-soft);
        }

        .falat-container {
            max-width: 1280px;
            height: 100%;
            margin: 0 auto;
            padding: 0 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .falat-topbar-contacts {
            display: flex;
            align-items: center;
            gap: 24px;
        }

        .falat-topbar-item {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            direction: ltr;
            color: var(--falat-text-muted);
            transition: var(--falat-transition);
        }

        .falat-topbar-item:hover,
        .falat-topbar-item:focus-visible {
            color: var(--falat-gold-light);
        }

        /* آیکون تماس همیشه طلایی می‌ماند و مستقل از رنگ متن است */
        .falat-topbar-item .falat-icon {
            width: 14px;
            height: 14px;
            color: var(--falat-gold-primary);
        }

        .falat-topbar-tagline {
            font-size: 0.78rem;
            letter-spacing: 0.5px;
            color: var(--falat-gold-light);
            opacity: 0.8;
        }

        /* ============================================================
           هدر اصلی (چسبان)
           ============================================================ */
        .falat-header {
            position: sticky;
            top: 0;
            z-index: 1000;
            height: var(--falat-h-header);
            background: var(--falat-glass);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border-bottom: 1px solid var(--falat-border-gold);
            transition: background 0.3s var(--falat-ease), box-shadow 0.3s var(--falat-ease);
        }

        .falat-header.is-scrolled {
            background: var(--falat-glass-solid);
            box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
        }

        .falat-nav-wrapper {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 20px;
            height: 100%;
        }

        /* ============================================================
           لوگو و نام برند
           ============================================================ */
        .falat-brand {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-shrink: 0;
        }

        .falat-brand-img {
            width: 48px !important;
            height: 48px !important;
            max-width: 48px !important;
            max-height: 48px !important;
            object-fit: contain !important;
            flex-shrink: 0;
            filter: drop-shadow(0 2px 8px var(--falat-border-gold));
            transition: transform 0.3s var(--falat-ease);
        }

        .falat-brand:hover .falat-brand-img {
            transform: scale(1.04);
        }

        .falat-brand-text {
            display: flex;
            flex-direction: column;
            line-height: 1.35;
        }

        .falat-brand-title {
            font-size: 1.15rem;
            font-weight: 800;
            letter-spacing: -0.5px;
            color: var(--falat-gold-light);
        }

        .falat-brand-subtitle {
            font-size: 0.68rem;
            letter-spacing: 1px;
            text-transform: uppercase;
            color: var(--falat-text-muted);
        }

        /* ============================================================
           منوی دسکتاپ
           ============================================================ */
        .falat-nav {
            display: flex;
            align-items: center;
            gap: 32px;
            height: 100%;
        }

        .falat-nav-item {
            position: relative;
            display: flex;
            align-items: center;
            height: 100%;
        }

        .falat-nav-link {
            position: relative;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 8px 4px;
            font-size: 0.95rem;
            font-weight: 500;
            color: var(--falat-text-main);
            transition: color 0.3s var(--falat-ease);
        }

        /* زیرخط انیمیشنی از راست به چپ (هماهنگ با جهت RTL) */
        .falat-nav-link::after {
            content: '';
            position: absolute;
            right: 0;
            bottom: 0;
            width: 0;
            height: 2px;
            background: linear-gradient(90deg, var(--falat-gold-light), var(--falat-gold-primary));
            transition: width 0.3s var(--falat-ease);
        }

        .falat-nav-link:hover,
        .falat-nav-link:focus-visible,
        .falat-nav-item:hover > .falat-nav-link,
        .falat-nav-link.is-active {
            color: var(--falat-gold-light);
        }

        .falat-nav-link:hover::after,
        .falat-nav-link:focus-visible::after,
        .falat-nav-item:hover > .falat-nav-link::after,
        .falat-nav-link.is-active::after {
            width: 100%;
        }

        .falat-arrow {
            width: 12px;
            height: 12px;
            color: var(--falat-gold-primary);
            transition: transform 0.3s var(--falat-ease);
        }

        .falat-nav-item:hover .falat-arrow,
        .falat-nav-item:focus-within .falat-arrow {
            transform: rotate(180deg);
        }

        /* ============================================================
           مگا منوی خدمات
           ============================================================ */
        .falat-mega {
            position: absolute;
            top: calc(100% - 4px);
            right: -20px;
            width: 640px;
            max-width: calc(100vw - 48px);
            padding: 20px;
            border: 1px solid var(--falat-border-gold);
            border-radius: 14px;
            background: linear-gradient(135deg, var(--falat-bg-primary), var(--falat-bg-secondary));
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 20px var(--falat-gold-tint);
            opacity: 0;
            visibility: hidden;
            transform: translateY(12px);
            pointer-events: none;
            transition: opacity 0.3s var(--falat-ease), transform 0.3s var(--falat-ease), visibility 0.3s;
        }

        /* باز شدن با هاور موس و همچنین با فوکوس کیبورد */
        .falat-nav-item:hover .falat-mega,
        .falat-nav-item:focus-within .falat-mega {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
            pointer-events: auto;
        }

        .falat-mega-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 14px;
        }

        .falat-service-card {
            display: flex;
            align-items: flex-start;
            gap: 14px;
            padding: 14px;
            border: 1px solid var(--falat-gold-tint);
            border-radius: 10px;
            background: var(--falat-surface);
            transition: var(--falat-transition);
        }

        .falat-service-card:hover,
        .falat-service-card:focus-visible {
            background: var(--falat-surface-hover);
            border-color: var(--falat-border-gold);
            transform: translateY(-2px);
        }

        .falat-service-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            width: 40px;
            height: 40px;
            border: 1px solid var(--falat-border-gold);
            border-radius: 8px;
            background: var(--falat-gold-tint);
            color: var(--falat-gold-light);
        }

        .falat-service-icon .falat-icon {
            width: 20px;
            height: 20px;
        }

        .falat-service-info h4 {
            margin-bottom: 4px;
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--falat-text-main);
            transition: color 0.3s var(--falat-ease);
        }

        .falat-service-card:hover .falat-service-info h4 {
            color: var(--falat-gold-light);
        }

        .falat-service-info p {
            font-size: 0.74rem;
            line-height: 1.5;
            color: var(--falat-text-muted);
        }

        /* ============================================================
           دکمه فراخوان (CTA)
           ============================================================ */
        .falat-cta-header {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            flex-shrink: 0;
            padding: 10px 22px;
            border: none;
            border-radius: 8px;
            font-size: 0.88rem;
            font-weight: 600;
            color: var(--falat-bg-primary);
            background: linear-gradient(135deg, var(--falat-gold-light), var(--falat-gold-primary));
            box-shadow: 0 4px 14px var(--falat-border-gold);
            cursor: pointer;
            transition: var(--falat-transition);
        }

        .falat-cta-header:hover,
        .falat-cta-header:focus-visible {
            color: var(--falat-bg-primary);
            box-shadow: 0 6px 20px rgba(201, 153, 50, 0.45);
            transform: translateY(-1px);
        }

        .falat-cta-header:active {
            transform: translateY(0);
        }

        .falat-cta-header .falat-icon {
            width: 15px;
            height: 15px;
        }

        /* ============================================================
           دکمه همبرگری
           رفع مشکل پس‌زمینه صورتی: مرورگر و قالب وردپرس هر دو می‌توانند
           روی <button> رنگ پس‌زمینه/های‌لایت اعمال کنند. این ریست تمام
           حالت‌ها را خنثی و فقط رنگ‌های قالب را جایگزین می‌کند
           ============================================================ */
        .falat-burger {
            display: none;
            flex-direction: column;
            justify-content: space-between;
            flex-shrink: 0;
            width: 44px;
            height: 44px;
            padding: 12px 8px;
            border-radius: 8px;
            cursor: pointer;
            z-index: 1100;
            -webkit-appearance: none;
            appearance: none;
            -webkit-tap-highlight-color: transparent;
            border: 1px solid transparent;
            background: transparent;
            transition: background-color 0.3s var(--falat-ease), border-color 0.3s var(--falat-ease);
        }

        /* خنثی‌سازی قطعی پس‌زمینه پیش‌فرض در همه حالت‌ها */
        .falat-burger,
        .falat-burger:hover,
        .falat-burger:focus,
        .falat-burger:active,
        .falat-burger.is-active {
            background-image: none !important;
            box-shadow: none !important;
            color: var(--falat-gold-light) !important;
            outline-color: var(--falat-gold-light);
        }

        .falat-burger:hover,
        .falat-burger:focus-visible,
        .falat-burger.is-active {
            background-color: var(--falat-gold-tint) !important;
            border-color: var(--falat-border-gold) !important;
        }

        .falat-burger:not(:hover):not(:focus-visible):not(.is-active) {
            background-color: transparent !important;
        }

        .falat-burger-bar {
            display: block;
            width: 100%;
            height: 2px;
            border-radius: 2px;
            background-color: var(--falat-gold-light);
            transition: transform 0.3s var(--falat-ease), opacity 0.2s var(--falat-ease);
        }

        /* تبدیل سه خط به ضربدر در حالت باز */
        .falat-burger.is-active .falat-burger-bar:nth-child(1) {
            transform: translateY(9px) rotate(45deg);
        }

        .falat-burger.is-active .falat-burger-bar:nth-child(2) {
            opacity: 0;
        }

        .falat-burger.is-active .falat-burger-bar:nth-child(3) {
            transform: translateY(-9px) rotate(-45deg);
        }

        /* ============================================================
           کشوی موبایل و پرده پشتی
           نکته: به‌جای right منفی از transform استفاده شده تا در هیچ
           مرورگری اسکرول افقی ناخواسته ایجاد نشود
           ============================================================ */
        .falat-backdrop {
            position: fixed;
            inset: 0;
            z-index: 1050;
            background: rgba(8, 23, 26, 0.7);
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s var(--falat-ease), visibility 0.3s;
        }

        .falat-backdrop.is-active {
            opacity: 1;
            visibility: visible;
        }

        .falat-drawer {
            position: fixed;
            top: 0;
            right: 0;
            z-index: 1060;
            display: flex;
            flex-direction: column;
            width: 300px;
            max-width: 88vw;
            height: 100vh;
            height: 100dvh;
            /* واحد dvh برای نوار آدرس متغیر موبایل */
            padding: 24px;
            overflow-y: auto;
            overscroll-behavior: contain;
            background: var(--falat-bg-primary);
            border-left: 1px solid var(--falat-border-gold);
            box-shadow: -10px 0 30px rgba(0, 0, 0, 0.6);
            transform: translateX(100%);
            visibility: hidden;
            transition: transform 0.4s var(--falat-ease), visibility 0.4s;
        }

        .falat-drawer.is-active {
            transform: translateX(0);
            visibility: visible;
        }

        .falat-drawer-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 24px;
            padding-bottom: 16px;
            border-bottom: 1px solid var(--falat-border-soft);
        }

        .falat-drawer-title {
            font-weight: 700;
            color: var(--falat-gold-light);
        }

        /* دکمه بستن کشو — با همان ریست دکمه همبرگری */
        .falat-drawer-close {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 34px;
            height: 34px;
            border-radius: 50%;
            cursor: pointer;
            -webkit-appearance: none;
            appearance: none;
            -webkit-tap-highlight-color: transparent;
            border: 1px solid var(--falat-border-gold);
            background: transparent !important;
            background-image: none !important;
            box-shadow: none !important;
            color: var(--falat-gold-light) !important;
            transition: var(--falat-transition);
        }

        .falat-drawer-close:hover,
        .falat-drawer-close:focus-visible {
            background: var(--falat-gold-tint) !important;
            transform: rotate(90deg);
        }

        .falat-drawer-close .falat-icon {
            width: 16px;
            height: 16px;
        }

        .falat-drawer-nav {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .falat-drawer-link {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            width: 100%;
            padding: 10px 12px;
            border: none;
            border-radius: 8px;
            font-size: 0.95rem;
            font-weight: 500;
            text-align: right;
            cursor: pointer;
            color: var(--falat-text-main);
            background: rgba(23, 58, 65, 0.2);
            -webkit-appearance: none;
            appearance: none;
            -webkit-tap-highlight-color: transparent;
            transition: var(--falat-transition);
        }

        .falat-drawer-link:hover,
        .falat-drawer-link:focus-visible,
        .falat-drawer-link.is-open,
        .falat-drawer-link.is-active {
            background: var(--falat-surface-hover);
            color: var(--falat-gold-light);
        }

        .falat-drawer-link .falat-arrow {
            width: 14px;
            height: 14px;
        }

        .falat-drawer-link.is-open .falat-arrow {
            transform: rotate(180deg);
        }

        /* زیرمنوی آکاردئونی با انیمیشن نرم grid */
        .falat-submenu {
            display: grid;
            grid-template-rows: 0fr;
            margin-top: 4px;
            border-radius: 8px;
            background: rgba(8, 23, 26, 0.5);
            transition: grid-template-rows 0.3s var(--falat-ease);
        }

        .falat-submenu.is-open {
            grid-template-rows: 1fr;
        }

        .falat-submenu-inner {
            overflow: hidden;
        }

        .falat-submenu-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
            padding: 8px 12px;
        }

        .falat-sub-link {
            display: block;
            padding: 6px 8px;
            border-radius: 6px;
            font-size: 0.85rem;
            color: var(--falat-text-muted);
            transition: var(--falat-transition);
        }

        .falat-sub-link:hover,
        .falat-sub-link:focus-visible {
            color: var(--falat-gold-light);
            padding-right: 12px;
        }

        /* دکمه فراخوان داخل کشو */
        .falat-drawer-cta {
            justify-content: center;
            width: 100%;
            margin-top: 20px;
        }

        .falat-drawer-contacts {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-top: auto;
            padding-top: 24px;
            border-top: 1px solid var(--falat-border-soft);
        }

        .falat-drawer-contact {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 10px;
            direction: ltr;
            font-size: 0.85rem;
            color: var(--falat-text-muted);
            transition: var(--falat-transition);
        }

        .falat-drawer-contact:hover,
        .falat-drawer-contact:focus-visible {
            color: var(--falat-gold-light);
        }

        .falat-drawer-contact .falat-icon {
            width: 16px;
            height: 16px;
            color: var(--falat-gold-primary);
        }

        /* ============================================================
           واکنش‌گرایی
           ============================================================ */

        /* تبلت و پایین‌تر: منوی دسکتاپ جای خود را به کشو می‌دهد */
        @media (max-width: 992px) {
            .falat-nav,
            .falat-header .falat-cta-header {
                display: none;
            }

            .falat-burger {
                display: flex;
            }

            .falat-topbar-tagline {
                display: none;
            }
        }

        /* موبایل بزرگ: فشرده‌سازی فاصله‌ها */
        @media (max-width: 576px) {
            .falat-topbar {
                display: none;
            }

            .falat-container {
                padding: 0 16px;
            }

            .falat-brand-img {
                width: 40px !important;
                height: 40px !important;
            }

            .falat-brand-title {
                font-size: 1rem;
            }
        }

        /* موبایل کوچک: پنهان‌سازی نام برند برای جلوگیری از شکستگی چیدمان */
        @media (max-width: 360px) {
            .falat-brand-text {
                display: none;
            }
        }

        /* احترام به تنظیم کاهش انیمیشن سیستم کاربر */
        @media (prefers-reduced-motion: reduce) {
            .falat-topbar *,
            .falat-header *,
            .falat-drawer,
            .falat-drawer * {
                transition-duration: 0.01ms !important;
                animation-duration: 0.01ms !important;
            }
        }