/* Header Styles */
.opco-header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
}

/* Scrolled State */
.opco-header.is-scrolled {
    background-color: rgba(255,255,255,0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(47,41,41,0.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.opco-header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.opco-header-logo img {
    height: 38px;
    width: auto;
    display: block;
}

/* Desktop Navigation */
.opco-header-nav {
    display: block;
}

.opco-header-nav ul {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.opco-header-nav a {
    position: relative;
    padding: 0.5rem 0.2rem;
    color: var(--opco-primary, #232b36);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
}

.opco-header-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--opco-accent, #3583f7);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s;
}

.opco-header-nav a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* --- Mobile Navigation --- */
.opco-header-nav-toggle {
    display: none; /* shown below for mobile */
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2001;
    font-size: 2.2rem;
    color: var(--opco-primary, #232b36);
    line-height: 1;
}

.opco-header-nav-toggle .fa-bars {
    font-size: 2.2rem;
    pointer-events: none;
}

.opco-mobile-nav {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: #fff;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.25,1,0.5,1), visibility 0s linear 0.3s;
    will-change: opacity, visibility;
}

.opco-mobile-nav.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.3s cubic-bezier(0.25,1,0.5,1), visibility 0s;
}

.opco-mobile-nav.is-animating {
    pointer-events: none;
}

/* Mobile nav header (top row) */
.opco-mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
    background: #fff;
}

.opco-mobile-nav-close {
    font-size: 2.2rem;
    line-height: 1;
    color: var(--opco-primary, #232b36);
    background: none;
    border: none;
    cursor: pointer;
}

.opco-mobile-nav-close .fa-xmark {
    font-size: 2.2rem;
    pointer-events: none;
}

/* Mobile nav links */
.opco-mobile-nav-links {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0 1.5rem;
}

.opco-mobile-nav-links ul {
    list-style: none;
    margin: 0;
    padding: 1.5rem 0;
}

.opco-mobile-nav-links a {
    display: block;
    padding: 1.25rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--opco-primary, #232b36);
    text-decoration: none;
    transition: color 0.2s;
    border-bottom: 1px solid #e9e9e9;
}

.opco-mobile-nav-links li:last-child a {
    border-bottom: none;
}

.opco-mobile-nav-links a:hover {
    color: var(--opco-accent, #3583f7);
}

/* Lock body scroll when nav is open */
body.mobile-nav-is-open {
    overflow: hidden;
    touch-action: none;
}

/* Responsive for mobile */
@media (max-width: 768px) {
    .opco-header-nav {
        display: none;
    }
    .opco-header-nav-toggle {
        display: block;
    }
    .opco-header-container {
        padding: 0 1.5rem;
    }
}
