/*
 * LimageCMS v0.2 — F2 Header / Navigation
 *
 * Header/navigation layer only.
 * Search UI is intentionally not added here until F14 Search.
 */

.site-header__inner {
    position: relative;
}

.site-nav {
    align-items: center;
}

.site-nav a {
    transition: background-color .15s ease, color .15s ease;
}

.site-nav a.is-active {
    background: #eef2f7;
    color: var(--text);
    font-weight: 600;
}

.site-nav-toggle {
    display: none;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: 8px;
    padding: 8px 11px;
    font: inherit;
    cursor: pointer;
}

.site-nav-toggle__icon {
    display: inline-block;
    width: 18px;
    height: 2px;
    background: currentColor;
    position: relative;
    vertical-align: middle;
}

.site-nav-toggle__icon::before,
.site-nav-toggle__icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: currentColor;
}

.site-nav-toggle__icon::before { top: -6px; }
.site-nav-toggle__icon::after { top: 6px; }

@media (max-width: 720px) {
    .site-header__inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .site-nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .site-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 2px;
        padding-top: 8px;
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        display: block;
        width: 100%;
        padding: 10px 12px;
    }

    .site-header__inner {
        flex-wrap: wrap;
    }
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* F2 mobile override: F1 makes the nav visible; F2 owns mobile navigation. */
@media (max-width: 720px) {
    .site-header__inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 10px;
    }

    .site-nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
    }

    .site-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 2px;
        padding-top: 8px;
    }

    .site-nav.is-open {
        display: flex;
    }
}

/* ============================================================
   LimageCMS v0.6 — Header / menu plaque / banner / logo
   ============================================================ */

.site-header__brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    flex-wrap: wrap;
}

.site-brand__name {
    color: var(--text);
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
}

.site-brand__name:hover {
    color: var(--accent);
}

.site-logo {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-width: 0;
    max-width: 100%;
}

.site-logo__image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

.site-logo__text {
    color: var(--text);
    font-size: 1.45rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Logo shape: bounding box only — proportions are preserved, no cropping. */
.site-logo--square .site-logo__image {
    max-width: 96px;
    max-height: 96px;
}

.site-logo--rectangle .site-logo__image {
    max-width: 300px;
    max-height: 80px;
}

/* Logo size. */
.site-logo--small.site-logo--square .site-logo__image {
    max-width: 64px;
    max-height: 64px;
}

.site-logo--large.site-logo--square .site-logo__image {
    max-width: 128px;
    max-height: 128px;
}

.site-logo--small.site-logo--rectangle .site-logo__image {
    max-width: 200px;
    max-height: 60px;
}

.site-logo--large.site-logo--rectangle .site-logo__image {
    max-width: 400px;
    max-height: 120px;
}

.site-logo--small .site-logo__text {
    font-size: 1.1rem;
}

.site-logo--medium .site-logo__text {
    font-size: 1.45rem;
}

.site-logo--large .site-logo__text {
    font-size: 1.8rem;
}

.site-nav--pill {
    background: #f1f4f8;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 6px 8px;
}

.site-nav--simple {
    background: transparent;
    border: 0;
    padding: 0;
    border-radius: 0;
}

.site-nav--pill a,
.site-nav--pill .site-nav__category-toggle {
    border-radius: 9px;
}

.site-nav--pill a:hover,
.site-nav--pill .site-nav__category-toggle:hover {
    background: #ffffff;
    color: var(--text);
}

.site-nav--pill a.is-active,
.site-nav--pill .site-nav__categories.is-active .site-nav__category-toggle {
    background: #ffffff;
    color: var(--text);
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(20, 31, 45, 0.14);
}

/* Banner */
.site-banner {
    flex: 0 0 100%;
    width: 100%;
    background: #e9edf2;
}

.site-banner__inner {
    padding: 0;
}

.site-banner__image {
    display: block;
    width: 100%;
    object-fit: cover;
    object-position: center;
}

.site-banner--small .site-banner__image { height: 140px; }
.site-banner--medium .site-banner__image { height: 260px; }
.site-banner--large .site-banner__image { height: 420px; }

@media (min-width: 721px) {
    .site-header__inner {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 12px;
        min-height: 0;
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .site-header__brand {
        flex: 0 0 100%;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 16px;
    }

    .site-header__brand > .site-logo {
        grid-column: 1;
    }

    .site-header__brand > .site-logo--text {
        grid-column: 2;
        justify-self: start;
    }

    .site-header__brand > .site-brand__name {
        grid-column: 2;
        justify-self: start;
    }

    .site-header__brand > .search-header-form {
        grid-column: 3;
        width: 300px;
        max-width: 300px;
    }

    .site-header__brand--align-center > .site-brand__name,
    .site-header__brand--align-center > .site-logo--text {
        justify-self: center;
    }

    .site-header__brand--align-right > .site-brand__name,
    .site-header__brand--align-right > .site-logo--text {
        justify-self: end;
    }

    .site-nav {
        flex: 0 0 100%;
        justify-content: flex-start;
    }

    .site-nav--align-left { justify-content: flex-start; }
    .site-nav--align-center { justify-content: center; }
    .site-nav--align-right { justify-content: flex-end; }
}

@media (max-width: 720px) {
    .site-header__brand {
        flex: 1 1 100%;
        gap: 10px;
    }

    .site-nav-toggle {
        margin-left: auto;
    }

    .site-logo__image {
        max-width: 200px !important;
        max-height: 48px !important;
    }

    .site-logo__text,
    .site-brand__name {
        font-size: 1.25rem !important;
    }

    .site-nav--pill {
        border-radius: 10px;
        padding: 4px;
    }

    .site-banner--small .site-banner__image { height: 110px; }
    .site-banner--medium .site-banner__image { height: 180px; }
    .site-banner--large .site-banner__image { height: 260px; }
}

