/* ========================================
   UNIFIED HEADER & NAVIGATION STYLES
   Complete header component for all pages
   ======================================== */

/* ===== BASE HEADER STYLES ===== */
.header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

.header.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12);
    padding: 0.3rem 0;
}

.navbar {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

/* ===== LOGO STYLES ===== */
.logo {
    flex-shrink: 0;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-icon {
    display: flex;
    align-items: center;
}

.logo-image {
    height: 60px;
    width: auto;
    transition: all 0.3s ease;
}

.header.scrolled .logo-image {
    height: 50px;
}

/* ===== NAVIGATION MENU ===== */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    justify-content: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 0.8rem;
    color: #1C2951;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.nav-link:hover {
    color: #D4AF37;
    background: rgba(212, 175, 55, 0.08);
}

.nav-link i {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.nav-item.has-dropdown:hover .nav-link i {
    transform: rotate(180deg);
}

/* ===== MEGA DROPDOWN BASE STYLES ===== */
.mega-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-top: 1rem;
    z-index: 1000;
    min-width: 850px;
    max-width: 900px;
}

.nav-item.has-dropdown:hover .mega-dropdown {
    opacity: 1;
    visibility: visible;
    margin-top: 0.5rem;
}

.dropdown-grid-simple {
    display: grid;
    grid-template-columns: 320px 1fr;
    width: 100%;
}

/* ===== DROPDOWN CATEGORIES LIST ===== */
.dropdown-categories-list {
    border-right: 1px solid #e2e8f0;
    overflow-y: auto;
    max-height: 70vh;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    padding: 0.5rem 0;
}

.dropdown-category {
    margin-bottom: 0.25rem;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #1e293b;
    font-size: 0.9rem;
    font-weight: 500;
}

.category-header:hover {
    background: rgba(212, 175, 55, 0.05);
}

.category-header i:first-child {
    color: #64748b;
    font-size: 1rem;
    width: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.category-header span {
    flex: 1;
}

.category-header .expand-icon {
    color: #94a3b8;
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.dropdown-category.active .category-header {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.08) 0%, rgba(212, 175, 55, 0.03) 100%);
    border-left: 3px solid #D4AF37;
}

.dropdown-category.active .category-header span {
    color: #D4AF37;
    font-weight: 600;
}

.dropdown-category.active .category-header i:first-child {
    color: #D4AF37;
    transform: scale(1.1);
}

/* Category Items (Hidden on Desktop) */
.category-items {
    display: none;
    padding: 0.5rem 1.25rem 0.5rem 2.75rem;
}

.category-items a {
    display: block;
    padding: 0.5rem 0;
    color: #64748b;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.category-items a:hover {
    color: #D4AF37;
    padding-left: 0.5rem;
}

/* ===== SERVICES PANEL (Right Side) ===== */
.category-services-panel {
    background: linear-gradient(135deg, #fafbfc 0%, #f8f9fa 100%);
    padding: 1.5rem;
    overflow-y: auto;
    max-height: 70vh;
    position: relative;
}

.service-items-display {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.service-items-display a {
    display: block;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 8px;
    color: #1e293b;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.service-items-display a:hover {
    background: #1C2951;
    color: white;
    border-color: #1C2951;
    transform: translateX(5px);
}

/* ===== HAMBURGER MENU ===== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    border: none;
    background: transparent;
    padding: 0;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 3px;
    background-color: #1C2951;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== EMERGENCY MOBILE BACKUP STYLES ===== */
@media (max-width: 1200px) {
    .hamburger { 
        display: flex !important; 
        visibility: visible !important; 
        opacity: 1 !important; 
        width: 40px !important; 
        height: 40px !important; 
        flex-direction: column !important; 
        justify-content: center !important; 
        gap: 4px !important; 
    }
    .hamburger span { 
        display: block !important; 
        width: 24px !important; 
        height: 3px !important; 
        background-color: #1C2951 !important; 
    }
    .nav-container { 
        display: flex !important; 
        justify-content: space-between !important; 
        align-items: center !important; 
        width: 100% !important; 
    }
    .logo { 
        order: 1 !important; 
        margin-right: auto !important; 
    }
    .hamburger { 
        order: 999 !important; 
        margin-left: auto !important; 
    }
    .nav-menu { 
        position: fixed !important; 
        left: -100% !important; 
        top: 80px !important; 
        width: 100vw !important; 
        height: calc(100vh - 80px) !important; 
        background: rgba(255,255,255,0.98) !important; 
        transition: left 0.3s ease !important; 
        flex-direction: column !important; 
        padding: 2rem !important; 
    }
    .nav-menu.active { 
        left: 0 !important; 
    }
}

/* MEGA DROPDOWN - SIDE BY SIDE LAYOUT */
@media (min-width: 1024px) {
    .mega-dropdown {
        min-width: 850px !important;
        max-width: 900px !important;
    }

    .dropdown-grid-simple {
        display: grid !important;
        grid-template-columns: 320px 1fr !important;
        width: 100% !important;
    }

    .dropdown-categories-list {
        border-right: 1px solid #e2e8f0;
        overflow-y: auto;
        max-height: 70vh;
        background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    }

    .category-services-panel {
        background: linear-gradient(135deg, #fafbfc 0%, #f8f9fa 100%);
        padding: 1.5rem;
        overflow-y: auto;
        max-height: 70vh;
        position: relative;
        display: block !important;
    }

    /* Hide category items in left panel on desktop */
    .dropdown-category .category-items {
        display: none !important;
    }

    /* Show services in right panel on desktop */
    .category-services-panel .service-items-display {
        display: block !important;
    }

    .category-header {
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .dropdown-category.active .category-header {
        background: linear-gradient(90deg, rgba(212, 175, 55, 0.08) 0%, rgba(212, 175, 55, 0.03) 100%);
        border-left: 3px solid #D4AF37;
    }

    .dropdown-category.active .category-header span {
        color: #D4AF37;
        font-weight: 600;
    }

    .dropdown-category.active .category-header i:first-child {
        color: #D4AF37;
        transform: scale(1.1);
    }
}

/* CTA BUTTON STYLES */
.nav-cta {
    position: relative;
    margin-left: 1rem;
}

.cta-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background: linear-gradient(135deg, #D4AF37 0%, #C9A02D 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(212, 175, 55, 0.4);
    background: linear-gradient(135deg, #E0BD47 0%, #D4AF37 100%);
}

.cta-btn i.fa-chevron-down {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.cta-btn.active i.fa-chevron-down {
    transform: rotate(180deg);
}

.cta-dropdown {
    position: absolute;
    top: calc(100% + 1rem);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.cta-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cta-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: #1C2951;
    transition: all 0.3s ease;
}

.cta-option:hover {
    background: #f8fafc;
    transform: translateX(5px);
}

.cta-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #1C2951;
    flex-shrink: 0;
}

.cta-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cta-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1C2951;
}

.cta-number {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

/* Mobile CTA Styles */
@media (max-width: 1200px) {
    .nav-cta {
        display: none;
    }
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */

/* Tablet Styles (768px - 1200px) */
@media (max-width: 1200px) and (min-width: 769px) {
    .navbar {
        padding: 0 1.5rem;
    }
    
    .nav-menu {
        gap: 1.5rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
        padding: 0.5rem 0.6rem;
    }
    
    .mega-dropdown {
        min-width: 750px;
    }
    
    .dropdown-grid-simple {
        grid-template-columns: 280px 1fr;
    }
}

/* Mobile Styles (< 768px) */
@media (max-width: 768px) {
    .navbar {
        padding: 0 1rem;
    }
    
    .logo-image {
        height: 50px;
    }
    
    .header.scrolled .logo-image {
        height: 45px;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100vw;
        height: calc(100vh - 70px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 2rem;
        gap: 0;
        overflow-y: auto;
        transition: left 0.3s ease;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        width: 100%;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .nav-link {
        width: 100%;
        padding: 1rem;
        justify-content: space-between;
    }
    
    /* Mobile Mega Dropdown */
    .mega-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        margin: 0;
        min-width: auto;
        max-width: none;
        border-radius: 0;
        display: none;
    }
    
    .nav-item.has-dropdown.active .mega-dropdown {
        display: block;
    }
    
    .dropdown-grid-simple {
        display: block;
    }
    
    .dropdown-categories-list {
        border-right: none;
        max-height: none;
        background: transparent;
        padding: 0;
    }
    
    .category-services-panel {
        display: none !important;
    }
    
    .category-items {
        display: block;
        padding: 0.5rem 0 0.5rem 2rem;
    }
    
    .category-items a {
        padding: 0.75rem 0;
        font-size: 0.9rem;
    }
    
    .category-header {
        padding: 1rem;
    }
    
    .dropdown-category.active .category-items {
        display: block;
    }
}

/* Small Mobile (< 480px) */
@media (max-width: 480px) {
    .navbar {
        padding: 0 0.75rem;
    }
    
    .logo-image {
        height: 45px;
    }
    
    .header.scrolled .logo-image {
        height: 40px;
    }
    
    .nav-menu {
        padding: 1.5rem;
        top: 65px;
        height: calc(100vh - 65px);
    }
    
    .nav-link {
        padding: 0.875rem;
        font-size: 0.9rem;
    }
    
    .category-header {
        padding: 0.875rem;
        font-size: 0.875rem;
    }
    
    .category-items a {
        padding: 0.65rem 0;
        font-size: 0.85rem;
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

/* Print Styles */
@media print {
    .header {
        position: static;
        box-shadow: none;
    }
    
    .hamburger,
    .nav-cta {
        display: none;
    }
}
