/* =====================================================
   C2CIMS Dealership Header
   ===================================================== */

.c2cims-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

/* --- Top bar --- */
.c2cims-header-topbar {
    background: var(--c2cims-darker-bg);
    color: var(--c2cims-muted-on-dark);
}

.c2cims-header-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 6px 24px;
}

.c2cims-header-phone {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--c2cims-muted-on-dark);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.15s ease;
}

.c2cims-header-phone:hover {
    color: var(--c2cims-accent);
}

.c2cims-header-cta {
    display: inline-block;
    background: var(--c2cims-accent);
    color: var(--c2cims-dark-bg);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    text-decoration: none;
    padding: 5px 14px;
    border-radius: 3px;
    transition: background 0.15s ease, color 0.15s ease;
}

.c2cims-header-cta:hover {
    background: var(--c2cims-accent);
    color: var(--c2cims-dark-bg);
    opacity: 0.85;
}

/* --- Main header --- */
.c2cims-header-main {
    background: var(--c2cims-dark-bg);
    border-bottom: 3px solid var(--c2cims-accent);
}

.c2cims-header-main-inner {
    display: flex;
    align-items: center;
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    min-height: 64px;
}

/* --- Brand / logo --- */
.c2cims-header-brand {
    text-decoration: none;
    flex-shrink: 0;
}

.c2cims-header-logo {
    display: block;
    max-height: 48px;
    width: auto;
}

.c2cims-header-site-name {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.c2cims-header-site-name > :first-child {
    font-size: 20px;
    font-weight: 700;
    color: var(--c2cims-text-on-dark);
    letter-spacing: -0.3px;
}

.c2cims-header-tagline {
    font-size: 11px;
    color: var(--c2cims-accent);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 2px;
}

/* --- Desktop nav --- */
.c2cims-header-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}

.c2cims-header-nav-link {
    color: var(--c2cims-muted-on-dark);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s ease, background 0.15s ease;
    white-space: nowrap;
}

.c2cims-header-nav-link:hover {
    color: var(--c2cims-text-on-dark);
    background: rgba(255,255,255,0.07);
}

.c2cims-header-nav-link--active {
    color: var(--c2cims-accent);
}

.c2cims-header-nav-link--active:hover {
    color: var(--c2cims-accent);
}

/* --- Hamburger button --- */
.c2cims-header-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 4px;
    width: 36px;
}

.c2cims-header-hamburger span {
    display: block;
    height: 2px;
    background: var(--c2cims-muted-on-dark);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.c2cims-header-hamburger--open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.c2cims-header-hamburger--open span:nth-child(2) {
    opacity: 0;
}
.c2cims-header-hamburger--open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --- Mobile nav drawer --- */
.c2cims-header-mobile-nav {
    background: #222;
    border-top: 1px solid #333;
    display: none; /* shown only when [hidden] is removed by JS */
    flex-direction: column;
}

.c2cims-header-mobile-nav:not([hidden]) {
    display: flex;
}

.c2cims-header-mobile-link {
    color: var(--c2cims-muted-on-dark);
    text-decoration: none;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 500;
    border-bottom: 1px solid #2e2e2e;
    transition: color 0.15s ease, background 0.15s ease;
}

.c2cims-header-mobile-link:hover {
    color: var(--c2cims-text-on-dark);
    background: rgba(255,255,255,0.05);
}

.c2cims-header-mobile-cta {
    margin: 16px 24px 20px;
    text-align: center;
    border-radius: 4px;
    padding: 10px 14px;
    font-size: 14px;
}

/* --- Spacer to prevent content hiding under fixed header --- */
.c2cims-header-spacer {
    /* Topbar ~30px + main ~67px + border 3px = ~100px */
    height: 100px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .c2cims-header-nav {
        display: none;
    }
    .c2cims-header-hamburger {
        display: flex;
    }
    .c2cims-header-spacer {
        height: 100px;
    }
}

/* WordPress admin bar offset */
.admin-bar .c2cims-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .c2cims-header {
        top: 46px;
    }
}
