/* ========================================
   🌟 MAIN HEADER - شناور و زیبا
======================================== */
.main-header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 15px 20px;
    transition: all 0.4s ease;
}

.main-header.scrolled {
    padding: 8px 15px;
}

/* ========================================
   📞 PRE-HEADER - نوار بالایی
======================================== */
.pre-header {
    background: linear-gradient(135deg, #2c5e3a 0%, #1a3d24 100%);
    color: #fff;
    font-size: 13px;
    padding: 10px 25px;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(44, 94, 58, 0.25);
    margin-bottom: 12px;
    max-width: 1300px;
    margin-left: auto;
    margin-right: auto;
    transition: all 0.4s ease;
}

.main-header.scrolled .pre-header {
    opacity: 0;
    max-height: 0;
    padding: 0 25px;
    margin-bottom: 0;
    overflow: hidden;
}

.pre-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.pre-header-left,
.pre-header-right {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    align-items: center;
}

.pre-link {
    color: #fff !important;
    text-decoration: none !important;
    transition: opacity 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pre-link:hover {
    opacity: 0.75;
    color: #d4f1d8 !important;
}

.pre-link i {
    font-size: 12px;
}

.user-greeting {
    color: #fff !important;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ========================================
   🎯 MAIN NAV - نوار اصلی شناور
======================================== */
.main-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.5);
    max-width: 1300px;
    margin: 0 auto;
    position: relative;
    transition: all 0.4s ease;
}

.main-header.scrolled .main-nav {
    padding: 10px 25px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.main-nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
}

/* ========================================
   🏷️ LOGO
======================================== */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none !important;
    color: #2c5e3a !important;
    font-size: 22px;
    font-weight: 800;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo i {
    font-size: 32px;
    color: #3a8b45;
    background: linear-gradient(135deg, #3a8b45, #6cc070);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text {
    background: linear-gradient(135deg, #2c5e3a, #3a8b45);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   📋 MAIN MENU - دسکتاپ
======================================== */
.main-menu {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 1;
    justify-content: center;
}

.menu-item {
    position: relative;
}

.menu-item > a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    color: #333 !important;
    text-decoration: none !important;
    font-size: 15px;
    font-weight: 600;
    border-radius: 30px;
    transition: all 0.3s ease;
    position: relative;
}

.menu-item > a::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #3a8b45, #6cc070);
    transition: all 0.3s ease;
    border-radius: 3px;
}

.menu-item > a:hover {
    color: #3a8b45 !important;
    background: rgba(58, 139, 69, 0.08);
}

.menu-item > a:hover::before {
    width: 50%;
    right: 25%;
}

.menu-item i {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.has-dropdown:hover > a i {
    transform: rotate(180deg);
}

/* ========================================
   📂 DROPDOWN - زیرمنو دسکتاپ
======================================== */
.has-dropdown .dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    min-width: 240px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    border-radius: 18px;
    list-style: none;
    padding: 12px;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s ease;
    z-index: 100;
    border: 1px solid rgba(58, 139, 69, 0.1);
}

.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li {
    list-style: none;
}

.dropdown li a {
    display: block;
    padding: 12px 18px;
    color: #444 !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.25s ease;
    position: relative;
}

.dropdown li a:hover {
    background: linear-gradient(135deg, #3a8b45, #2c5e3a);
    color: #fff !important;
    padding-right: 25px;
    transform: translateX(-3px);
}

/* ========================================
   🎬 HEADER ACTIONS
======================================== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-btn {
    background: rgba(58, 139, 69, 0.1);
    border: none;
    color: #2c5e3a;
    font-size: 16px;
    cursor: pointer;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: linear-gradient(135deg, #3a8b45, #2c5e3a);
    color: #fff;
    transform: rotate(90deg);
}

.btn-reserve {
    background: linear-gradient(135deg, #3a8b45, #2c5e3a);
    color: #fff !important;
    padding: 12px 26px;
    border-radius: 30px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 8px 20px rgba(58, 139, 69, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-reserve::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2c5e3a, #1a3d24);
    transition: right 0.4s ease;
    z-index: 0;
}

.btn-reserve span,
.btn-reserve i {
    position: relative;
    z-index: 1;
}

.btn-reserve:hover::before {
    right: 0;
}

.btn-reserve:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(58, 139, 69, 0.5);
}

.menu-toggle {
    display: none;
    background: rgba(58, 139, 69, 0.1);
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #2c5e3a;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: linear-gradient(135deg, #3a8b45, #2c5e3a);
    color: #fff;
}

/* ========================================
   👤 USER MENU BUTTON - دکمه کاربر
======================================== */
.user-menu-wrapper {
    position: relative;
    display: inline-block;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #3a8b45, #2c5e3a) !important;
    border: 2px solid #2c5e3a;
    color: white !important;
    padding: 5px 14px 5px 6px;
    border-radius: 30px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(58, 139, 69, 0.3);
}

.user-menu-btn:hover {
    background: linear-gradient(135deg, #2c5e3a, #1a3d24) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(58, 139, 69, 0.5);
}

.user-menu-btn span {
    color: white !important;
}

.user-menu-btn i {
    color: white !important;
}

.user-menu-btn .user-avatar {
    width: 30px;
    height: 30px;
    background: white !important;
    color: #2c5e3a !important;
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

/* ========================================
   👤 USER DROPDOWN - منوی کشویی کاربر
======================================== */
.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: white;
    border-radius: 14px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    z-index: 1001;
    overflow: hidden;
    border: 1px solid #e8eaf0;
}

.user-dropdown.show {
    display: block;
    animation: dropdownFade 0.25s ease;
}

@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-dropdown .dropdown-header {
    padding: 14px 16px;
    background: linear-gradient(135deg, #2c5e3a, #3a8b45);
    color: white;
}

.user-dropdown .dropdown-header strong {
    display: block;
    font-size: 14px;
    margin-bottom: 3px;
    color: white;
}

.user-dropdown .dropdown-header small {
    opacity: 0.85;
    font-size: 11px;
    color: white;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    color: #333 !important;
    text-decoration: none !important;
    font-size: 13px;
    transition: background 0.2s;
    border: none;
}

.user-dropdown a:hover {
    background: #f5f5f5;
    color: #2c5e3a !important;
}

.user-dropdown a i {
    width: 18px;
    color: #2c5e3a;
}

.user-dropdown a.danger {
    color: #c62828 !important;
    border-top: 1px solid #f0f0f0;
}

.user-dropdown a.danger i {
    color: #c62828;
}

.user-dropdown a.danger:hover {
    background: #ffebee;
}

.user-dropdown a.admin-link {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: white !important;
    font-weight: 600;
}

.user-dropdown a.admin-link i {
    color: white;
}

.user-dropdown a.admin-link:hover {
    background: linear-gradient(135deg, #ff9800, #f57c00);
}

/* ========================================
   🔍 SEARCH BOX
======================================== */
.search-box {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    margin-top: 0;
}

.search-box.open {
    max-height: 100px;
    margin-top: 12px;
}

.search-box .container {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 18px 25px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 1300px;
    margin: 0 auto;
}

.search-form {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-form input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.search-form input:focus {
    border-color: #3a8b45;
    box-shadow: 0 0 0 4px rgba(58, 139, 69, 0.1);
}

.search-form button {
    background: linear-gradient(135deg, #3a8b45, #2c5e3a);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(58, 139, 69, 0.4);
}

/* ========================================
   🛡️ FIX - فاصله از بالا
======================================== */
body {
    padding-top: 140px;
}

.hero {
    margin-top: -140px;
    padding-top: 200px !important;
}

/* ========================================
   🌫️ MENU OVERLAY - پس‌زمینه تار موبایل
======================================== */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.show {
    display: block;
    opacity: 1;
}

/* ========================================
   ❌ MENU CLOSE - دکمه بستن موبایل
======================================== */
.menu-close {
    display: none;
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #3a8b45, #2c5e3a);
    color: white;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(58, 139, 69, 0.3);
    transition: all 0.3s;
}

.menu-close:hover {
    transform: rotate(90deg) scale(1.1);
}

/* ========================================
   📱 RESPONSIVE - تبلت و موبایل (تا 1024px)
======================================== */
@media (max-width: 1024px) {
    /* تبدیل منو به سایدبار */
    .main-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        max-width: 85%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: stretch;
        overflow-y: auto;
        transition: right 0.4s ease;
        border-radius: 0;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
        padding: 70px 20px 30px;
        z-index: 9999;
        justify-content: flex-start;
        gap: 0;
        max-height: none;
    }

    .main-menu.open {
        right: 0;
    }

    .menu-item {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
        margin-bottom: 0;
    }

    .menu-item:last-child {
        border-bottom: none;
    }

    .menu-item > a {
        padding: 14px 15px;
        border-radius: 0;
        justify-content: space-between;
        font-size: 15px;
        width: 100%;
    }

    .menu-item > a::before {
        display: none;
    }

    .menu-item > a:hover {
        background: rgba(58, 139, 69, 0.05);
    }

    /* ⚠️ زیرمنو در موبایل - مخفی به طور پیش‌فرض */
    .has-dropdown .dropdown {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none;
        background: rgba(58, 139, 69, 0.05);
        padding: 0 !important;
        margin: 0;
        border-radius: 0;
        border: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        min-width: auto;
    }

    /* فقط با کلاس active باز میشه */
    .has-dropdown.active .dropdown {
        max-height: 500px;
        padding: 8px !important;
        margin: 5px 0;
        border-radius: 10px;
    }

    /* غیرفعال کردن hover روی موبایل */
    .has-dropdown:hover .dropdown {
        max-height: 0;
        padding: 0 !important;
    }

    .has-dropdown.active:hover .dropdown,
    .has-dropdown.active .dropdown {
        max-height: 500px !important;
        padding: 8px !important;
    }

    .dropdown li a {
        padding: 11px 15px;
        font-size: 14px;
        border-radius: 8px;
    }

    .dropdown li a:hover {
        background: rgba(58, 139, 69, 0.1);
        color: #2c5e3a !important;
        padding-right: 20px;
        transform: none;
    }

    /* چرخش فلش */
    .has-dropdown > a i {
        transition: transform 0.3s ease;
    }

    .has-dropdown.active > a i {
        transform: rotate(180deg);
    }

    .has-dropdown:hover > a i {
        transform: none;
    }

    .has-dropdown.active:hover > a i {
        transform: rotate(180deg);
    }

    /* دکمه همبرگری */
    .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    /* دکمه بستن منو */
    .menu-close {
        display: flex !important;
    }

    /* جلوگیری از اسکرول صفحه */
    body.menu-open {
        overflow: hidden;
    }
}

/* مخفی کردن دکمه بستن در دسکتاپ */
@media (min-width: 1025px) {
    .menu-close {
        display: none !important;
    }

    .menu-overlay {
        display: none !important;
    }
}

/* ========================================
   📱 RESPONSIVE - موبایل (تا 768px)
======================================== */
@media (max-width: 768px) {
    .main-header {
        padding: 10px 12px;
    }

    .pre-header {
        font-size: 11px;
        padding: 8px 18px;
        border-radius: 30px;
    }

    .pre-header-left,
    .pre-header-right {
        gap: 12px;
    }

    .main-nav {
        padding: 10px 18px;
        border-radius: 30px;
    }

    .logo-text {
        font-size: 16px;
    }

    .logo i {
        font-size: 26px;
    }

    .btn-reserve {
        display: none;
    }

    /* مخفی کردن نام کاربر در موبایل */
    .user-menu-btn span:not(.user-avatar) {
        display: none;
    }

    .user-menu-btn {
        padding: 3px !important;
        gap: 0;
    }

    .user-menu-btn i.fa-chevron-down {
        display: none;
    }

    body {
        padding-top: 130px;
    }

    .hero {
        margin-top: -130px;
        padding-top: 180px !important;
    }
}

/* ========================================
   📱 RESPONSIVE - موبایل کوچیک (تا 480px)
======================================== */
@media (max-width: 480px) {
    .pre-header {
        padding: 6px 12px;
    }

    .pre-header-right .pre-link,
    .pre-header-right .user-greeting {
        font-size: 10px;
        gap: 4px;
    }

    .pre-header-right {
        gap: 8px;
    }

    .pre-header-left .pre-link {
        font-size: 10px;
    }

    .pre-header-left {
        gap: 8px;
    }

    .header-actions {
        gap: 6px;
    }

    .search-btn {
        width: 36px;
        height: 36px;
    }

    .menu-toggle {
        width: 36px;
        height: 36px;
    }
}