/* Auto Final -valikon tyylit on rajattu vain teeman omaan headeriin. */
.af-aq-header {
    --af-aq-green: #04cf1f;
    --af-aq-font: "Manrope", "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    --af-aq-title: clamp(19px,1.65vw,24px);
    --af-aq-link: clamp(12px,.95vw,14px);
    --af-aq-small: 11px;
    --af-aq-accent-line: 148px;
    position: relative;
    isolation: isolate;
    width: 100%;
    margin: 0;
    padding: 0;
    color: #f5f7f5;
    background: #080a09;
    border: 0;
    border-bottom: 0;
    overflow: visible;
    font-family: var(--af-aq-font);
    font-weight: 500;
    font-style: normal;
    line-height: 1.2;
    letter-spacing: .15em;
    text-align: left;
}
.af-aq-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        linear-gradient(90deg,rgba(4,6,5,.92),rgba(7,9,8,.75) 30%,rgba(7,9,8,.66) 50%,rgba(7,9,8,.75) 70%,rgba(4,6,5,.92)),
        url("../menu/header.webp") center 50% / cover no-repeat;
}
.af-aq-header::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(circle at 50% 45%,rgba(4,207,31,.035),transparent 35%);
}
.af-aq-header, .af-aq-header * { box-sizing: border-box; }
.af-aq-header a,
.af-aq-header .af-aq-unset {
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: none;
}
.af-aq-header a::before,
.af-aq-header a::after { content: none; }
.af-aq-header a { transition: color .16s ease, opacity .16s ease; }
.af-aq-header a:hover,
.af-aq-header a[aria-current="page"] { color: var(--af-aq-green); }
.af-aq-header a:focus-visible {
    outline: 2px solid var(--af-aq-green);
    outline-offset: 4px;
}
.af-aq-header nav {
    position: static;
    float: none;
    width: auto;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    font: inherit;
}

/* Desktop: kaksi yhtä vahvaa palvelupuolta ja logo keskellä. */
.af-aq-header .af-aq-shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0,1fr) 272px minmax(0,1fr);
    grid-template-areas:
        "tires brand care"
        "main  main  main";
    align-items: center;
    column-gap: clamp(18px,2vw,28px);
    row-gap: 4px;
    width: min(100%,1280px);
    margin: 0 auto;
    padding: 14px 30px 7px;
}
.af-aq-header .af-aq-shell::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -28px;
    height: 32px;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(8,10,9,.9), rgba(8,10,9,0));
}
.af-aq-header .af-aq-wing {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 106px;
}
.af-aq-header .af-aq-wing--tires { grid-area: tires; align-items: center; text-align: center; }
.af-aq-header .af-aq-wing--care { grid-area: care; align-items: center; text-align: center; }
.af-aq-header .af-aq-service {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding-bottom: 8px;
    color: #fff;
    font-size: var(--af-aq-title);
    font-weight: 500;
    letter-spacing: .15em;
    line-height: 1;
    white-space: nowrap;
}
.af-aq-header .af-aq-service::after,
.af-aq-header .af-aq-unset.af-aq-service::after {
    content: "";
    position: absolute;
    bottom: 0;
    width: var(--af-aq-accent-line);
    height: 1px;
    background: linear-gradient(90deg, rgba(4,207,31,0), rgba(4,207,31,.28) 18%, rgba(4,207,31,.42) 50%, rgba(4,207,31,.28) 82%, rgba(4,207,31,0));
}
.af-aq-header .af-aq-wing--tires .af-aq-service::after { left: 50%; right: auto; transform: translateX(-50%); }
.af-aq-header .af-aq-wing--care .af-aq-service::after { left: 50%; right: auto; transform: translateX(-50%); }
.af-aq-header .af-aq-links {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0;
    margin-top: 8px;
    max-width: 100%;
}
.af-aq-header .af-aq-wing--tires .af-aq-links { justify-content: center; }
.af-aq-header .af-aq-wing--care .af-aq-links { justify-content: center; }
.af-aq-header .af-aq-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 6px 5px;
    color: #fff;
    font-size: var(--af-aq-link);
    font-weight: 500;
    letter-spacing: .15em;
    line-height: 1.15;
    white-space: nowrap;
}
.af-aq-header .af-aq-links > * + *::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 1px;
    height: 12px;
    transform: translateY(-50%);
    background: rgba(255,255,255,.18);
}
.af-aq-header .af-aq-wing--tires .af-aq-links > :last-child { padding-right: 0; }
.af-aq-header .af-aq-wing--care .af-aq-links > :first-child { padding-left: 0; }
.af-aq-header .af-aq-brand {
    grid-area: brand;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
}
.af-aq-header .af-aq-brandmark {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 300px;
    min-height: 102px;
    color: #ffffff;
    text-align: center;
    line-height: 1;
}
.af-aq-header .af-aq-symbol-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 2px;
}
.af-aq-header .af-aq-symbol {
    display: block;
    width: auto;
    height: 84px;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(4,207,31,.08));
}
.af-aq-header .af-aq-wordmark {
    display: block;
    width: min(100%, 196px);
    height: auto;
    margin-top: 1px;
}
.af-aq-header .af-aq-tagline {
    display: block;
    margin-top: 6px;
    color: #fff;
    font-size: 6px;
    margin-bottom: 5px;
    font-weight: 500;
    letter-spacing: .15em;
    white-space: nowrap;
}
.af-aq-header .af-aq-brandmark::after {
    content: "";
    display: block;
    width: var(--af-aq-accent-line);
    height: 1px;
    margin: 0 auto;
    background: linear-gradient(90deg, rgba(4,207,31,0), rgba(4,207,31,.28) 18%, rgba(4,207,31,.42) 50%, rgba(4,207,31,.28) 82%, rgba(4,207,31,0));
}
.af-aq-header .af-aq-main {
    grid-area: main;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding-top: 3px;
}
.af-aq-header .af-aq-main::before { content: none; }
.af-aq-header .af-aq-main-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: auto;
}
.af-aq-header .af-aq-sep {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 4px;
    color: rgba(244,247,244,.28);
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    pointer-events: none;
}
.af-aq-header .af-aq-main a,

.af-aq-header .af-aq-main .af-aq-unset {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 5px 14px;
    color: #fff;
    font-size: var(--af-aq-small);
    font-weight: 500;
    letter-spacing: .15em;
    white-space: nowrap;
}
.af-aq-header .af-aq-main a:hover,
.af-aq-header .af-aq-main a:focus-visible,
.af-aq-header .af-aq-main a[aria-current="page"] {
    color: var(--af-aq-green);
}
.af-aq-header .af-aq-unset { opacity: .48; cursor: not-allowed; }

@media (max-width: 1050px) and (min-width: 761px) {
    .af-aq-header { --af-aq-accent-line: 141px; }
    .af-aq-header .af-aq-shell {
        grid-template-columns: minmax(0,1fr) 235px minmax(0,1fr);
        column-gap: 14px;
        padding-left: 16px;
        padding-right: 16px;
    }
    .af-aq-header { --af-aq-link: 11.5px; }
    .af-aq-header .af-aq-link { padding-left: 5px; padding-right: 5px; letter-spacing: .15em; }
        .af-aq-header .af-aq-brandmark { max-width: 228px; min-height: 96px; }
    .af-aq-header .af-aq-symbol { height: 74px; }
    .af-aq-header .af-aq-wordmark { width: min(100%, 172px); }
    .af-aq-header .af-aq-tagline { font-size: 7px; }
}

/* Puhelin/tabletti: logo ja yleiset linkit ensin, palvelut sen jälkeen selkeinä kokonaisuuksina. */
@media (max-width: 760px) {
    .af-aq-header {
        --af-aq-title: 19px;
        --af-aq-link: 13px;
        --af-aq-small: 10px;
        --af-aq-accent-line: 136px;
    }
    .af-aq-header .af-aq-shell {
        grid-template-columns: minmax(0,1fr) minmax(0,1fr);
        grid-template-areas:
            "brand brand"
            "main main"
            "tires care";
        align-items: start;
        column-gap: 14px;
        row-gap: 1px;
        max-width: 680px;
        padding: 9px 14px 9px;
    }
        .af-aq-header .af-aq-brandmark { max-width: 220px; min-height: 84px; }
    .af-aq-header .af-aq-symbol { height: 69px; }
    .af-aq-header .af-aq-wordmark { width: min(100%, 158px); }
    .af-aq-header .af-aq-tagline { display: none; }
        .af-aq-header .af-aq-main { min-height: 22px; margin-top: -1px; padding-top: 4px; }
    .af-aq-header .af-aq-main::before { content: none; }
    .af-aq-header .af-aq-main-links {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-width: 0;
    }
    .af-aq-header .af-aq-main a,
    .af-aq-header .af-aq-main .af-aq-unset {
        min-height: 30px;
        padding: 3px 3px;
        font-size: 10px;
        letter-spacing: .15em;
        white-space: nowrap;
    }
    .af-aq-header .af-aq-sep {
        flex: 0 0 auto;
        margin: 0 4px;
        color: rgba(244,247,244,.30);
        font-size: 10px;
    }
    .af-aq-header .af-aq-wing {
        min-height: 0;
        align-self: start;
        align-items: center;
        justify-content: flex-start;
        padding-top: 9px;
        text-align: center;
    }
    .af-aq-header .af-aq-wing--tires {
        padding-right: 7px;
        border-right: 1px solid rgba(255,255,255,.08);
    }
    .af-aq-header .af-aq-wing--care { padding-left: 7px; }
    .af-aq-header .af-aq-service { justify-content: center; min-height: 36px; font-size: var(--af-aq-title); }
    .af-aq-header .af-aq-wing--tires .af-aq-service::after,
    .af-aq-header .af-aq-wing--care .af-aq-service::after { left: 50%; right: auto; transform: translateX(-50%); }
    .af-aq-header .af-aq-links,
    .af-aq-header .af-aq-wing--tires .af-aq-links,
    .af-aq-header .af-aq-wing--care .af-aq-links {
        display: grid;
        grid-template-columns: 1fr;
        justify-content: stretch;
        width: 100%;
        margin-top: 4px;
    }
    .af-aq-header .af-aq-link,
    .af-aq-header .af-aq-wing--tires .af-aq-links > :last-child,
    .af-aq-header .af-aq-wing--care .af-aq-links > :first-child {
        justify-content: center;
        width: 100%;
        min-height: 38px;
        padding: 6px 4px;
        text-align: center;
        white-space: normal;
    }
    .af-aq-header .af-aq-links > * + *::before {
        left: 20%;
        right: 20%;
        top: 0;
        width: auto;
        height: 1px;
        transform: none;
        background: rgba(255,255,255,.06);
    }
}

@media (max-width: 390px) {
    .af-aq-header { --af-aq-title: 17px; --af-aq-link: 12px; --af-aq-small: 9px; --af-aq-accent-line: 123px; }
    .af-aq-header .af-aq-brandmark { max-width: 198px; min-height: 76px; }
    .af-aq-header .af-aq-symbol { height: 64px; }
    .af-aq-header .af-aq-wordmark { width: min(100%, 148px); }
    .af-aq-header .af-aq-shell { column-gap: 8px; padding-left: 9px; padding-right: 9px; }
    .af-aq-header .af-aq-main a,
    .af-aq-header .af-aq-main .af-aq-unset {
        padding-left: 1px;
        padding-right: 1px;
        font-size: 9px;
        letter-spacing: .15em;
    }
    .af-aq-header .af-aq-sep { margin-left: 2px; margin-right: 2px; font-size: 9px; }
    .af-aq-header .af-aq-wing--tires { padding-right: 4px; }
    .af-aq-header .af-aq-wing--care { padding-left: 4px; }
}

@media (max-width: 330px) {
    .af-aq-header .af-aq-shell {
        grid-template-columns: 1fr;
        grid-template-areas: "brand" "main" "tires" "care";
    }
    .af-aq-header .af-aq-wing--tires { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.08); padding: 8px 0 10px; }
    .af-aq-header .af-aq-wing--care { padding: 8px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
    .af-aq-header a { transition: none; }
}

/* 0.3.4 — locked menu refinement: service heading accents exactly match brand accent. */
.af-aq-header .af-aq-wing--tires .af-aq-service::after,
.af-aq-header .af-aq-wing--care .af-aq-service::after,
.af-aq-header .af-aq-wing--tires .af-aq-unset.af-aq-service::after,
.af-aq-header .af-aq-wing--care .af-aq-unset.af-aq-service::after {
    content: "" !important;
    width: var(--af-aq-accent-line) !important;
    height: 1px !important;
    left: 50% !important;
    right: auto !important;
    bottom: 0 !important;
    transform: translateX(-50%) !important;
    background: linear-gradient(90deg,
        rgba(4,207,31,0),
        rgba(4,207,31,.28) 18%,
        rgba(4,207,31,.42) 50%,
        rgba(4,207,31,.28) 82%,
        rgba(4,207,31,0)
    ) !important;
}


/* 0.5.0 — locked Auto Final menu typography. */
.af-aq-header,
.af-aq-header a,
.af-aq-header .af-aq-unset,
.af-aq-header .af-aq-service,
.af-aq-header .af-aq-link,
.af-aq-header .af-aq-main a,
.af-aq-header .af-aq-main .af-aq-unset,
.af-aq-header .af-aq-tagline {
    font-family: "Manrope", "Segoe UI", Arial, sans-serif !important;
    font-weight: 500 !important;
    font-style: normal !important;
    text-transform: uppercase !important;
    letter-spacing: .15em !important;
}
.af-aq-header .af-aq-service,
.af-aq-header .af-aq-link,
.af-aq-header .af-aq-main a,
.af-aq-header .af-aq-main .af-aq-unset {
    color: #fff !important;
}
.af-aq-header a:hover,
.af-aq-header a:focus-visible,
.af-aq-header a[aria-current="page"] {
    color: #04CF1F !important;
}

/* 0.5.1 — final locked typography refinement. Geometry and logo stay unchanged. */
.af-aq-header {
    --af-aq-font: "Manrope", "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
}
/* Main service headings: Medium, uppercase, more air between letters. */
.af-aq-header .af-aq-service {
    font-family: "Manrope", "Segoe UI", Arial, sans-serif !important;
    font-weight: 500 !important;
    letter-spacing: .17em !important;
    color: #fff !important;
    text-transform: uppercase !important;
}
/* Service links below headings: Regular and a touch softer than pure white. */
.af-aq-header .af-aq-link {
    font-family: "Manrope", "Segoe UI", Arial, sans-serif !important;
    font-weight: 400 !important;
    letter-spacing: .15em !important;
    color: #c7ceca !important;
    text-transform: uppercase !important;
}
/* Center links: Regular, deliberately smaller than service links. */
.af-aq-header .af-aq-main a,
.af-aq-header .af-aq-main .af-aq-unset {
    font-family: "Manrope", "Segoe UI", Arial, sans-serif !important;
    font-weight: 400 !important;
    font-size: var(--af-aq-small) !important;
    letter-spacing: .15em !important;
    color: #c7ceca !important;
    text-transform: uppercase !important;
}
/* Keep brand tagline in Manrope without altering logo assets or logo geometry. */
.af-aq-header .af-aq-tagline {
    font-family: "Manrope", "Segoe UI", Arial, sans-serif !important;
    font-weight: 400 !important;
}
/* Active and hover state always uses Auto Final green. */
.af-aq-header .af-aq-link:hover,
.af-aq-header .af-aq-link:focus-visible,
.af-aq-header .af-aq-link[aria-current="page"],
.af-aq-header .af-aq-main a:hover,
.af-aq-header .af-aq-main a:focus-visible,
.af-aq-header .af-aq-main a[aria-current="page"],
.af-aq-header .af-aq-service:hover,
.af-aq-header .af-aq-service:focus-visible,
.af-aq-header .af-aq-service[aria-current="page"] {
    color: #04CF1F !important;
}

/* 0.5.5 — mobile symmetry lock. Desktop remains untouched. */
@media (max-width: 760px) {
    .af-aq-header {
        /* Match the desktop accent length also on mobile. */
        --af-aq-accent-line: 148px;
    }

    .af-aq-header .af-aq-shell {
        width: 100% !important;
        max-width: none !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
        column-gap: 0 !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        grid-template-areas:
            "brand brand"
            "main main"
            "tires care" !important;
    }

    /* Brand, wordmark and center links share the exact viewport center axis. */
    .af-aq-header .af-aq-brand {
        width: 100% !important;
        justify-self: stretch !important;
        align-self: center !important;
        display: flex !important;
        justify-content: center !important;
    }
    .af-aq-header .af-aq-brandmark {
        width: 220px !important;
        max-width: calc(100vw - 32px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        align-items: center !important;
        text-align: center !important;
    }
    .af-aq-header .af-aq-symbol-wrap,
    .af-aq-header .af-aq-symbol,
    .af-aq-header .af-aq-wordmark {
        margin-left: auto !important;
        margin-right: auto !important;
    }
    .af-aq-header .af-aq-wordmark {
        align-self: center !important;
    }

    /* Make the brand accent clearly visible and identical in geometry to desktop. */
    .af-aq-header .af-aq-brandmark::after {
        content: "" !important;
        display: block !important;
        flex: 0 0 auto !important;
        width: var(--af-aq-accent-line) !important;
        height: 1px !important;
        margin: 7px auto 0 !important;
        opacity: 1 !important;
        background: linear-gradient(90deg,
            rgba(4,207,31,0),
            rgba(4,207,31,.28) 18%,
            rgba(4,207,31,.42) 50%,
            rgba(4,207,31,.28) 82%,
            rgba(4,207,31,0)
        ) !important;
    }

    .af-aq-header .af-aq-main {
        width: 100% !important;
        justify-self: stretch !important;
    }
    .af-aq-header .af-aq-main-links {
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        justify-content: center !important;
        text-align: center !important;
    }

    /* Exactly 50/50 service columns; the divider sits on the true center line. */
    .af-aq-header .af-aq-wing {
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        align-items: center !important;
        text-align: center !important;
    }
    .af-aq-header .af-aq-wing--tires {
        padding-left: 0 !important;
        padding-right: 12px !important;
        border-right: 1px solid rgba(255,255,255,.08) !important;
    }
    .af-aq-header .af-aq-wing--care {
        padding-left: 12px !important;
        padding-right: 0 !important;
    }
    .af-aq-header .af-aq-service,
    .af-aq-header .af-aq-links,
    .af-aq-header .af-aq-link {
        margin-left: auto !important;
        margin-right: auto !important;
    }
    .af-aq-header .af-aq-links,
    .af-aq-header .af-aq-wing--tires .af-aq-links,
    .af-aq-header .af-aq-wing--care .af-aq-links {
        width: 100% !important;
    }
}

@media (max-width: 390px) {
    .af-aq-header .af-aq-shell {
        padding-left: 9px !important;
        padding-right: 9px !important;
        column-gap: 0 !important;
    }
    .af-aq-header .af-aq-wing--tires { padding-right: 9px !important; }
    .af-aq-header .af-aq-wing--care { padding-left: 9px !important; }
}
