/* Standardized Header Styles from index.html */

/* Prevent white flash during navigation */
html {
    background-color: #0e2240;
}

body {
    transition: opacity 0.15s ease-in-out;
}

body.page-transitioning {
    opacity: 0;
}

/* Prevent header flash on page load */
#header-placeholder {
    min-height: 110px;
    background: #0e2240;
}

header {
    background: #0e2240;
    view-transition-name: header;
    /* Keep header static during page transitions */
    /* Sentient navy */
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Standardized Container for Header */
header .container {
    max-width: 1450px;
    /* Match services.html width */
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

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

.logo img {
    height: 70px;
}

nav {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
    justify-content: center;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0 20px;
    position: relative;
    line-height: 1.2;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

nav a:not(:last-child)::after,
nav .nav-dropdown:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 1px;
    background: rgba(212, 165, 116, 0.3);
}

nav a:hover {
    color: #c5a065;
}

nav a.active {
    color: #c5a065;
}

/* Dropdown Navigation */
.nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-dropdown-toggle {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0 20px;
    position: relative;
    cursor: pointer;
    line-height: 1.2;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.nav-dropdown-toggle::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 1px;
    background: rgba(212, 165, 116, 0.3);
}

.nav-dropdown-toggle:hover {
    color: #c5a065;
}

.nav-dropdown-toggle.active {
    color: #c5a065;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-top: 2px solid #c5a065;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 1001;
    display: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.active .nav-dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: #0e2240;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
    border-bottom: 1px solid #f8f9fa;
}

.nav-dropdown-menu a::after {
    display: none;
}

.nav-dropdown-menu a:last-child {
    border-bottom: none;
}

.nav-dropdown-menu a:hover {
    background-color: #f8f9fa;
    color: #c5a065;
}

/* Header Right Side */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-contact,
.header-link {
    color: #c5a065;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s ease;
    white-space: nowrap;
    font-size: 16px;
    /* Explicitly set to match nav */
    font-weight: 500;
    /* Ensure weight matches */
}

.header-contact:hover,
.header-link:hover {
    color: white;
}

.header-divider {
    color: rgba(212, 165, 116, 0.3);
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
}

@media (max-width: 1200px) {
    nav {
        gap: 0;
    }

    nav a,
    .nav-dropdown-toggle {
        padding: 0 15px;
    }

    .header-right {
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
    }

    nav {
        display: none;
        order: 3;
        width: 100%;
        flex-direction: column;
        background: #0e2240;
        padding: 20px 0;
        border-top: 1px solid rgba(212, 165, 116, 0.2);
        margin-top: 15px;
    }

    nav.mobile-open {
        display: flex;
    }

    nav a {
        padding: 15px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
        justify-content: flex-start;
    }

    nav a::after,
    nav a:not(:last-child)::after {
        display: none;
    }

    /* Mobile dropdown styling */
    .nav-dropdown {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-dropdown-toggle {
        padding: 15px 0;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-dropdown-toggle::after {
        display: none;
    }

    .nav-dropdown-menu {
        position: static;
        background: rgba(255, 255, 255, 0.05);
        border-top: none;
        box-shadow: none;
        width: 100%;
        border-radius: 0;
        margin-top: 0;
    }

    .nav-dropdown-menu a {
        padding: 12px 20px;
        color: rgba(255, 255, 255, 0.8);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-dropdown-menu a:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #c5a065;
    }

    .header-right {
        display: none;
        order: 4;
        width: 100%;
        flex-direction: column;
        gap: 15px;
        padding: 20px 0;
        border-top: 1px solid rgba(212, 165, 116, 0.2);
    }

    .header-right.mobile-open {
        display: flex;
    }

    .header-divider {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
        font-size: 24px;
        padding: 5px 10px;
    }

    header {
        padding: 15px 0;
    }

    .logo img {
        height: 50px;
    }
}