/* ========================================================
   استایل نوار ناوبری لوکس و مدرن (Premium Navbar)
   ======================================================== */

.main-header {
    background-color: rgba(15, 23, 42, 0.88) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

/* انیمیشن و استایل بخش لوگو و برند */
.navbar-brand {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    z-index: 1001;
    flex-shrink: 0;
}

.logo-container {
    display: flex;
    align-items: center;
}

.header-logo {
    height:50px;
    width: auto;
    object-fit: contain;
    mix-blend-mode: screen; 
    filter: brightness(1.15) contrast(1.1); 
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* افکت بزرگنمایی لوگو هنگام هاور */
.navbar-brand:hover .header-logo {
    transform: scale(1.08) rotate(3deg);
}

.brand-text {
    font-size: 1.25rem;
    color: var(--white, #ffffff);
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
    text-align: right;
    transition: color 0.3s ease;
}

.brand-text span {
    color: var(--accent-color, #d9386c);
    position: relative;
}

/* کانتینر ابزارهای سمت چپ هدر */
.header-left-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 1001;
}

/* دکمه پیش‌ثبت‌نام آنلاین با استایل گرادیان درخشان */
.header-cta-btn {
    background: linear-gradient(135deg, var(--accent-color, #d9386c), var(--accent-hover, #be2552));
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 8px 16px rgba(217, 56, 108, 0.2);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.header-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 22px rgba(217, 56, 108, 0.35);
}

/* --- دکمه همبرگری موبایل با انیمیشن مدرن لاین‌ها --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    width: 44px;
    height: 44px;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    z-index: 1002;
    transition: all 0.3s ease;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--white, #ffffff);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* انیمیشن تبدیل همبرگر به ضربدر زمان باز شدن منو */
.menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background-color: var(--accent-color, #d9386c);
}

.menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background-color: var(--accent-color, #d9386c);
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* منوی اصلی در دسکتاپ */
.nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--white, #ffffff);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    opacity: 0.85;
    padding: 8px 0;
    position: relative;
    transition: all 0.3s ease;
}

/* افکت خط متحرک زیرین پیوندی (Sliding underline) */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color, #d9386c);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover {
    opacity: 1;
    color: var(--accent-color, #d9386c);
}

.nav-link:hover::after, 
.nav-link.active::after {
    width: 100%;
    left: 0;
}

.nav-link.active {
    opacity: 1;
    color: var(--accent-color, #d9386c);
}

/* تراز وسط قرار گرفتن ناوبری دسکتاپ */
@media (min-width: 993px) {
    .navbar-menu-container {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* ========================================================
   استایل‌های بخش واکنش‌گرایی موبایل و تبلت هدر (اصلاح کامل)
   ======================================================== */

@media (max-width: 992px) {
    .main-header {
        padding: 10px 0;
    }

    .menu-toggle {
        display: flex; /* نمایش دکمه همبرگری در موبایل */
    }

    .header-logo {
        height: 36px;
    }

    .brand-text {
        font-size: 1.05rem;
    }

    .header-cta-btn {
        display: none; /* پنهان کردن دکمه پیش‌ثبت‌نام دسکتاپ در موبایل */
    }

    /* بازطراحی کامل پنل کشویی منوی موبایل */
    .navbar-menu-container {
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: 0;
        background: rgba(15, 23, 42, 0.96);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        border-radius: 20px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-bottom: 3px solid var(--accent-color, #d9386c);
        z-index: 999;
        max-height: 0;
        opacity: 0;
        visibility: hidden;
        overflow: hidden;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
        transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                    opacity 0.3s ease,
                    padding 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                    visibility 0.4s ease;
    }

    /* حالت باز شده منوی موبایل */
    .navbar-menu-container.active {
        max-height: 480px; /* فضای کافی برای تمام لینک‌ها */
        opacity: 1;
        visibility: visible;
        padding: 20px;
    }

    .nav-list {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
        width: 100%;
    }

    .nav-list li {
        width: 100%;
    }

    /* استایل لمسی و عالی برای لینک‌های موبایل */
    .navbar-menu-container .nav-link {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 12px 16px;
        border-radius: 12px;
        font-size: 0.95rem;
        background-color: rgba(255, 255, 255, 0.02);
        border: 1px solid rgba(255, 255, 255, 0.04);
        opacity: 0;
        transform: translateY(-8px);
        transition: all 0.3s ease;
    }

    .navbar-menu-container .nav-link::after {
        display: none; /* حذف خط زیرین در موبایل */
    }

    .navbar-menu-container.active .nav-link {
        opacity: 0.9;
        transform: translateY(0);
    }

    .navbar-menu-container.active .nav-link:hover,
    .navbar-menu-container.active .nav-link.active {
        opacity: 1;
        background-color: rgba(217, 56, 108, 0.12);
        border-color: rgba(217, 56, 108, 0.3);
        color: var(--accent-color, #d9386c);
    }
}

/* ========================================================
   استایل اختصاصی پاپ‌آپ اطلاعات تماس (LTH Contact Modal)
   ======================================================== */

.contact-modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    background-color: rgba(15, 23, 42, 0.45) !important;
    backdrop-filter: blur(16px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(140%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 2500 !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 20px;
    box-sizing: border-box;
}

.contact-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* کارت اصلی پاپ‌آپ اطلاعات تماس */
.contact-modal-card {
    background: linear-gradient(180deg, var(--secondary-color) 0%, var(--primary-color) 100%) !important;
    border-radius: 32px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    width: 100%;
    max-width: 960px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5) !important;
    position: relative;
    overflow: hidden;
    transform: translateY(40px) scale(0.96);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-modal-overlay.active .contact-modal-card {
    transform: translateY(0) scale(1);
}

/* دکمه بستن چرخشی */
.contact-modal-close {
    position: absolute !important;
    top: 24px !important;
    left: 24px !important;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 50% !important;
    color: var(--white) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
}

.contact-modal-close:hover {
    background-color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    transform: rotate(90deg);
}

/* گرید دو ستونه مودال */
.contact-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
}

/* بخش نقشه (Neshan Map) سمت چپ */
.contact-modal-map-box {
    position: relative;
    background-color: var(--primary-color);
    overflow: hidden;
    padding: 24px;
    box-sizing: border-box;
}

.contact-map-iframe {
    width: 100% !important;
    height: 100% !important;
    min-height: 380px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    display: block;
}

.contact-map-placeholder {
    width: 100%;
    height: 100%;
    min-height: 380px;
    background-color: var(--primary-color);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

/* بخش اطلاعات متنی سمت راست */
.contact-modal-info {
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-pre {
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: block;
}

.contact-title {
    font-size: 1.6rem;
    font-weight: 850;
    color: var(--white);
    margin: 0 0 35px 0;
}

.contact-info-deck {
    display: grid;
    gap: 25px;
}

/* ردیف‌های متادیتا اطلاعات کپسولی متمایل به راست */
.contact-info-row {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 16px;
    text-align: right;
}

.info-row-content {
    flex-grow: 1;
}

.info-row-content h4 {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--accent-color);
    margin: 0 0 6px 0;
}

.info-row-content p {
    font-size: 0.88rem;
    line-height: 1.7;
    color: #cbd5e1;
    margin: 0;
}

/* آیکون کپسولی با حاشیه و هاله صورتی */
.info-row-icon {
    width: 44px;
    height: 44px;
    background-color: rgba(217, 56, 108, 0.08);
    border: 1.5px solid rgba(217, 56, 108, 0.25);
    color: var(--accent-color);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(217, 56, 108, 0.1);
}

/* ================= واکنش‌گرایی موبایل ================= */
@media (max-width: 992px) {
    .main-header {
        padding: 10px 0;
    }

    .menu-toggle {
        display: flex !important; /* اجبار به نمایش دکمه در موبایل*/
    }

    .header-logo {
        height: 40px;
    }

    .brand-text {
        font-size: 1.05rem;
    }

    .header-cta-btn {
        display: none !important;
    }

    /* پنل کشویی منوی موبایل*/
    .navbar-menu-container {
        position: absolute !important;
        top: calc(100% + 8px) !important;
        left: 15px !important;
        right: 15px !important;
        background: rgba(15, 23, 42, 0.98) !important;
        backdrop-filter: blur(25px) !important;
        -webkit-backdrop-filter: blur(25px) !important;
        border-radius: 20px !important;
        border: 1px solid rgba(255, 255, 255, 0.12) !important;
        border-bottom: 3px solid var(--accent-color, #d9386c) !important;
        z-index: 9999 !important;
        max-height: 0 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        overflow: hidden !important;
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5) !important;
    }

    /* باز شدن قطعی منو هنگام کلیک*/
    .navbar-menu-container.active {
        max-height: 500px !important;
        opacity: 1 !important;
        visibility: visible !important;
        padding: 20px !important;
    }

    .nav-list {
        flex-direction: column !important;
        gap: 8px !important;
        align-items: stretch !important;
        width: 100% !important;
    }

    .nav-list li {
        width: 100% !important;
    }

    .navbar-menu-container .nav-link {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        padding: 12px 16px !important;
        border-radius: 12px !important;
        font-size: 0.95rem !important;
        background-color: rgba(255, 255, 255, 0.03) !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
        color: #ffffff !important;
    }

    .navbar-menu-container .nav-link::after {
        display: none !important;
    }

    .navbar-menu-container.active .nav-link:hover,
    .navbar-menu-container.active .nav-link.active {
        background-color: rgba(217, 56, 108, 0.15) !important;
        border-color: rgba(217, 56, 108, 0.35) !important;
        color: var(--accent-color, #d9386c) !important;
    }
}
