/* ================================================== */
/* Modern Header Styles */
/* ================================================== */

/* Header Container */
.modern-header {
    width: 100%;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 1001;
    background: transparent;
    transition: all 0.3s ease;
}

/* Ensure header stays on top when sticky */
.modern-header.sticky {
    z-index: 9999;
}

/* Prevent content from going under sticky header */
body:has(.modern-header.sticky) #content {
    padding-top: 90px;
}

/* Alternative for browsers that don't support :has() */
.modern-header.sticky ~ * #content,
.modern-header.sticky + * {
    margin-top: 0;
}

.modern-header.sticky {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: rgba(var(--bg-dark-1-rgb), 0.98) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modern-header.sticky .topbar-modern {
    display: none;
}

/* Top Bar Styles */
.topbar-modern {
    background: rgba(var(--bg-dark-1-rgb), 0.9);
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.topbar-left {
    gap: 20px;
}

.topbar-item {
    display: flex;
    align-items: center;
}

.topbar-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    padding: 5px 0;
}

.topbar-link:hover {
    color: var(--primary-color, #fff);
    transform: translateY(-2px);
}

.topbar-link i {
    font-size: 16px;
    color: var(--primary-color, #fff);
}

/* Social Icons Modern */
.social-icons-modern {
    display: flex;
    gap: 12px;
    align-items: center;
}

.social-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.social-icon:hover {
    background: var(--primary-color, #fff);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Main Header Section */
.main-header {
    padding: 15px 0;
    background: transparent;
    transition: all 0.3s ease;
}

.modern-header.sticky .main-header {
    padding: 8px 0;
}

.navbar-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* Logo Section */
.navbar-brand-section {
    flex-shrink: 0;
}

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

.logo-link {
    display: block;
    transition: all 0.3s ease;
}

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

.logo-main,
.logo-mobile {
    max-height: 100px;
    width: auto;
    transition: all 0.3s ease;
}

.modern-header.sticky .logo-main,
.modern-header.sticky .logo-mobile {
    max-height: 50px;
}

/* Navigation Menu */
.navbar-menu-section {
    flex: 1;
    display: flex;
    justify-content: center;
}

.main-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
    align-items: center;
}

.menu-item-wrapper {
    position: relative;
}

.menu-item {
    display: block;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.modern-header.sticky .menu-item {
    padding: 10px 18px;
    font-size: 15px;
}

.menu-item::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color, #fff);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.menu-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.menu-item:hover::before {
    width: 80%;
}

/* Submenu */
.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(var(--bg-dark-1-rgb), 0.98);
    backdrop-filter: blur(10px);
    min-width: 220px;
    list-style: none;
    margin: 0;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.menu-item-wrapper:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu li {
    margin: 0;
}

.submenu a {
    display: block;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s ease;
}

.submenu a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    padding-right: 25px;
}

/* Action Buttons */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.menu_side_area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-contact-modern {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    background: var(--primary-color, #fff);
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid transparent;
}

.modern-header.sticky .btn-contact-modern {
    padding: 10px 24px;
    font-size: 14px;
}

.btn-contact-modern:hover {
    background: transparent;
    border-color: var(--primary-color, #fff);
    color: var(--primary-color, #fff);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    width: 40px;
    height: 40px;
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

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

.mobile-menu-toggle::before,
.mobile-menu-toggle::after {
    content: '';
    display: block;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle::before {
    width: 100%;
}

.mobile-menu-toggle::after {
    width: 80%;
    margin-left: auto;
}

/* Extra Menu Toggle */
.extra-menu-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

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

.extra-menu-toggle span {
    display: block;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.extra-menu-toggle span:nth-child(1) {
    width: 100%;
}

.extra-menu-toggle span:nth-child(2) {
    width: 80%;
    margin-left: auto;
}

.extra-menu-toggle span:nth-child(3) {
    width: 60%;
    margin-left: auto;
}

/* Responsive Design */
@media (max-width: 991px) {
    .topbar-left {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .topbar-right {
        justify-content: flex-start !important;
        margin-top: 10px;
    }

    .navbar-modern {
        flex-wrap: wrap;
    }

    .navbar-menu-section {
        order: 3;
        width: 100%;
        display: none;
    }

    .navbar-menu-section.active {
        display: block;
    }

    .main-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .menu-item {
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(255, 255, 255, 0.05);
        box-shadow: none;
        margin-top: 0;
        border-radius: 0;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .navbar-brand-section {
        flex: 1;
    }

    .modern-header.sticky .main-header {
        padding: 6px 0;
    }

    .modern-header.sticky .logo-main,
    .modern-header.sticky .logo-mobile {
        max-height: 45px;
    }
}

@media (max-width: 767px) {
    .topbar-modern {
        padding: 8px 0;
    }

    .topbar-link {
        font-size: 12px;
    }

    .topbar-link i {
        font-size: 14px;
    }

    .social-icon {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .main-header {
        padding: 12px 0;
    }

    .logo-main,
    .logo-mobile {
        max-height: 50px;
    }

    .btn-contact-modern {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* RTL Support */
[dir="rtl"] .topbar-right {
    justify-content: flex-start;
}

[dir="rtl"] .submenu {
    left: auto;
    right: 0;
}

[dir="rtl"] .submenu a:hover {
    padding-right: 20px;
    padding-left: 25px;
}

[dir="rtl"] .extra-menu-toggle span:nth-child(2),
[dir="rtl"] .extra-menu-toggle span:nth-child(3) {
    margin-left: 0;
    margin-right: auto;
}

