/* ===================================
   HEADER STYLES - Standalone Component
   =================================== */

/* Top Bar */
.top-bar {
    background-color: var(--navy-dark);
    color: var(--white);
    padding: 12px 0;
    font-size: 0.9rem;
}

.top-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.top-links a {
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.3s ease;
}

.top-links a:hover {
    color: var(--accent-gold);
}

/* Trust Badges Bar */
.trust-badges-bar {
    background: linear-gradient(90deg, #1e3a8a, #1f2937);
    padding: 0.6rem 0;
    border-bottom: 2px solid var(--accent-gold);
    overflow-x: auto;
    /* Allow horizontal scroll on small screens */
    white-space: nowrap;
}

.trust-badges-group {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    /* Prevent wrapping to save vertical space */
    width: 100%;
    /* Ensure it doesn't crush */
    padding: 0 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.trust-badge:hover {
    transform: translateY(-2px);
    color: #ffffff;
}

/* Main Header */
.main-header {
    background: linear-gradient(90deg, var(--navy-dark), #0d3b66);
    color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 3px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 51, 102, 0.1);
}

.header-scrolled {
    box-shadow: 0 8px 24px rgba(0, 51, 102, 0.15);
    padding: 0.7rem 0;
}

/* Header Container - Flexbox Layout */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: nowrap;
}

/* Logo */
.logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.logo img {
    height: auto;
    width: auto;
    max-height: 50px;
    max-width: 100%;
}

@media (max-width: 768px) {
    .logo img {
        max-height: 40px;
        /* Ensure it fits but remains visible */
        max-width: 150px;
    }
}

/* Main Navigation - Center */
.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-list {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: nowrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
    flex-shrink: 0;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: #ffffff;
    transition: all 0.3s ease;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    display: block;
    white-space: nowrap;
}

/* Active State */
.nav-link.active {
    color: var(--accent-gold);
    background-color: rgba(212, 175, 55, 0.15);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.nav-link:hover {
    color: var(--accent-gold);
    background-color: rgba(212, 175, 55, 0.1);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Dropdown Indicator */
.has-dropdown>.nav-link::after {
    content: '▼';
    font-size: 0.65rem;
    margin-left: 0.4rem;
    opacity: 0.7;
    transition: transform 0.3s ease;
    display: inline-block;
}

.has-dropdown:hover>.nav-link::after {
    transform: rotate(180deg);
}

/* Dropdown Menu - CSS-based Hover */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    background: #ffffff;
    border: 2px solid var(--accent-gold);
    border-radius: 8px;
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
    z-index: 999;
    box-shadow: 0 10px 30px rgba(0, 51, 102, 0.2);
    overflow: hidden;
    list-style: none;
    margin: 0;
    padding: 0;
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 14px 18px;
    color: var(--navy-dark);
    font-size: 0.9rem;
    text-transform: capitalize;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    font-weight: 500;
}

.dropdown-menu li:last-child a {
    border-bottom: none;
}

.dropdown-menu a:hover {
    color: var(--accent-gold);
    background-color: #f9f5f0;
    padding-left: 22px;
    font-weight: 600;
}

/* Header Right Section - Contact & Actions */
.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0;
    margin-left: auto;
}

.header-contact {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    align-items: flex-end;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.contact-item i {
    color: var(--accent-gold);
    font-size: 0.8rem;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Mobile Toggle Button */
.mobile-toggle,
.mobile-quick-mode {
    display: none;
    background: transparent;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
    z-index: 10001;
    /* Ensure above overlay */
}

.mobile-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--white);
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-quick-mode i {
    font-size: 1.2rem;
}

.mobile-toggle:hover,
.mobile-quick-mode:hover {
    color: var(--accent-gold);
}

.mobile-toggle:hover span {
    background: var(--accent-gold);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(13, 18, 29, 0.98);
    /* Less transparent navigation background */
    backdrop-filter: blur(10px);
    z-index: 10000;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mobile-menu.active {
    right: 0;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
}

.mobile-menu-inner {
    padding: 6rem 2rem 4rem 2rem;
    /* More padding top for close button */
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    flex: 1;
}

.mobile-menu-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    width: 44px;
    /* Touch friendly */
    height: 44px;
    /* Touch friendly */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    background: rgba(212, 175, 55, 0.2);
    color: var(--accent-gold);
    transform: rotate(90deg);
}

.mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.mobile-nav-list li {
    margin: 0;
    width: 100%;
    text-align: center;
}

.mobile-nav-list a {
    display: block;
    padding: 1rem;
    color: var(--white);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.25rem;
    letter-spacing: 1px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.mobile-nav-list a:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--accent-gold);
    border-color: rgba(212, 175, 55, 0.3);
    transform: translateX(5px);
}

/* Highlight "Home" or Active Link */
.mobile-nav-list a.active {
    color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--accent-gold);
}

.mobile-cta {
    margin-top: auto;
    /* Push to bottom */
    width: 100%;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-quick {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    width: 100%;
}

/* Mobile CTA Button (Request Quote) */
.mobile-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 300px;
    padding: 1rem;
    background-color: var(--accent-gold);
    color: var(--navy-dark);
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 50px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.mobile-quick-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 200px;
    justify-content: center;
}

.mobile-quick-link:hover {
    background: rgba(212, 175, 55, 0.15);
    color: var(--accent-gold);
}

/* Mobile Quick Overlay */
.mobile-quick-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
}

.mobile-quick-overlay.active {
    display: flex;
}

.mobile-quick-inner {
    background: var(--navy-dark);
    padding: 2rem;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    position: relative;
}

.mobile-quick-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 2.5rem;
    /* Larger close button */
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
    /* Ensure above everything */
}

.mobile-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quick-action {
    display: block;
    padding: 1rem;
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    border-radius: 8px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.quick-action:hover {
    background: var(--accent-gold);
    color: var(--navy-dark);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .header-contact {
        display: none;
    }

    .nav-list {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }
}

@media (max-width: 992px) {
    .main-nav {
        display: none;
    }

    .header-right {
        gap: 0.75rem;
    }

    .mobile-toggle,
    .mobile-quick-mode {
        display: block;
    }
}

@media (max-width: 768px) {
    .top-links {
        gap: 1rem;
        font-size: 0.8rem;
    }

    .trust-badges-bar {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Hide scrollbar for cleaner look */
    }

    .trust-badges-bar::-webkit-scrollbar {
        display: none;
    }

    .trust-badges-group {
        gap: 1rem;
        min-width: 100%;
        /* Allow it to be full width */
        width: auto;
        justify-content: flex-start;
        /* Start from left on scroll */
        padding: 0 1rem;
        flex-wrap: nowrap;
    }

    .trust-badge {
        font-size: 0.75rem;
        flex-shrink: 0;
        white-space: nowrap;
    }

    .header-container {
        gap: 1rem;
    }

    .logo img {
        height: 40px;
    }

    /* Fix Mobile Menu top spacing */
    .mobile-menu {
        justify-content: flex-start;
        /* Ensure standard flow */
    }

    .mobile-menu-inner {
        padding-top: 6rem;
        /* Ensure space for close button */
        padding-bottom: 2rem;
        justify-content: flex-start;
        /* Don't center vertically */
        height: auto;
        /* Allow growth */
        min-height: 100%;
    }

    .mobile-nav-list {
        margin-top: 0;
        justify-content: flex-start;
    }
}