/**
 * Service page "Unser Service für Sie" (CMS "service", de 25 / en 26, layout "Page -- Full Width").
 * Loaded only via Magento_Cms/layout/cms_page_view_id_service.xml, after the shared kz-brand.css.
 * In the style of the Partnerringe / Atelier / Pre-Owned pages, with its own layouts: services as an index of rows,
 * a centred band, a centred brand wall and the boutiques (the shared CMS block "kruzik-boutiquen", styled by
 * kz-boutiques.css - opening hours are maintained only there).
 *
 * Content is native Page Builder. Styling hooks are the row CSS classes set in Page Builder
 * (full-bleed rows: on the row, contained rows: on its inner element):
 * kz-sv + kz-sv-opener | kz-sv-services | kz-sv-piercing | kz-sv-brands, kz-sv-contact (boutique block row),
 * column classes kz-sv-sketch (boutique drawing), kz-sv-more (link column), text class kz-sv-kicker.
 * Ivory and #111 are row background colours set in Page Builder; gold only on #111 and for lines, dashes and dots
 * (gold text on ivory/white would be below 4.5:1).
 */

.kz-sv {
    --kz-muted: #595959; /* secondary text on white and ivory, >= 6.5:1 */
    --kz-gold: #b39b5f;
    line-height: 1.7;

    & p {
        margin: 0 0 1rem;
        color: var(--kz-muted);
    }

    & p:last-child {
        margin-bottom: 0;
    }

    & h2 {
        margin: 0 0 1rem;
        font-size: clamp(1.75rem, 3vw, 2.5rem);
        font-weight: 400;
        line-height: 1.2;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        text-wrap: balance;
    }

    & h3 {
        margin: 0 0 0.75rem;
        font-size: 0.8125rem;
        font-weight: 600;
        letter-spacing: 0.15em;
        text-transform: uppercase;
    }

    & a:not([class*="pagebuilder-button"]) {
        color: #111;
        text-decoration: underline;
        text-underline-offset: 0.25em;
    }

    & [data-content-type="buttons"] {
        margin-top: 1.75rem;
    }

    /* lists with short gold dashes */
    & ul {
        display: grid;
        gap: 0.5rem;
        margin: 0;
        padding: 0;
        list-style: none;
        color: var(--kz-muted);
    }

    & li {
        display: grid;
        grid-template-columns: 1.25rem minmax(0, 1fr);
        line-height: 1.5;

        &::before {
            content: "";
            width: 0.6rem;
            height: 1px;
            margin-top: 0.75em;
            background: var(--kz-gold);
        }
    }
}

/* Small uppercase line above a heading */
.kz-sv .kz-sv-kicker p {
    margin-bottom: 1rem;
    color: #111;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* ---- Personal shopping: boutique drawing + text on ivory ---- */
.kz-sv-opener {
    & .kz-sv-sketch {
        align-items: center;
        padding: 2rem var(--kz-edge) 0;
    }

    /* the drawing's white paper takes the ivory: pushed to white, then multiplied */
    & .kz-sv-sketch figure {
        width: min(100%, 22rem);
        margin: 0;
    }

    /* no display here: Hyvä shows/hides the desktop and mobile image of the Image element by display */
    & .kz-sv-sketch img {
        width: 100%;
        vertical-align: bottom;
        mix-blend-mode: multiply;
        filter: brightness(1.08) contrast(1.1);
    }

    & .pagebuilder-column:not(.kz-sv-sketch) {
        padding: 2.5rem var(--kz-edge) 3rem;
    }

    & .kz-sv-kicker::before {
        content: "";
        display: block;
        width: 3rem;
        height: 1px;
        margin-bottom: 1rem;
        background: var(--kz-gold);
    }
}

/* Phones: the drawing stays at the top of the screen while the text block slides up over it.
   The header is not sticky on phones (kz-header.css), so top: 0. */
@media (max-width: 47.999rem) and (prefers-reduced-motion: no-preference) {
    .kz-sv-opener {
        & .kz-sv-sketch {
            position: sticky;
            top: 0;
            z-index: 0;
        }

        & .pagebuilder-column:not(.kz-sv-sketch) {
            position: relative;
            z-index: 1;
            background-color: #f6f3ed; /* the row's ivory, so the text block covers the drawing */
            box-shadow: 0 -1px 0 #e2dfd8;
        }
    }
}

/* ---- Services: one row per service (name | details | link), hairlines between ---- */
[data-content-type="row"][data-appearance="contained"]:has(> .kz-sv-services) {
    margin-block: 0;
    padding-block: 2.5rem;
}

.kz-sv-services {
    & > h2 {
        margin-bottom: 1.5rem;
    }

    & > .pagebuilder-column-group {
        padding-block: 1.75rem;
        border-top: 1px solid #e5e5e5;
    }

    & > .pagebuilder-column-group:last-child {
        border-bottom: 1px solid #e5e5e5;
    }

    & .pagebuilder-column-line {
        gap: 0.75rem;
    }

    & h3 {
        margin: 0;
        font-size: 1.25rem;
        font-weight: 400;
        line-height: 1.3;
        letter-spacing: 0.08em;
    }

    & .kz-sv-more a {
        font-size: 0.75rem;
        letter-spacing: 0.15em;
        text-transform: uppercase;
        text-underline-offset: 0.5em;
    }
}

/* ---- Ear piercing: dark band, centred ---- */
.kz-sv-piercing {
    align-items: center;
    padding: 3.5rem var(--kz-edge);
    color: #fff;
    text-align: center;

    & p {
        max-width: 38rem;
        color: #c9c9c9;
    }

    & .kz-sv-kicker p {
        color: var(--kz-gold);
    }

    & [data-content-type="buttons"] {
        justify-content: center;
    }

    & .pagebuilder-button-primary {
        --btn-stroke: #fff;
        --btn-bg: #fff;
        --btn-color: #111;
        --btn-hover-stroke: #fff;
        --btn-hover-bg: transparent;
        --btn-hover-color: #fff;
    }

    & a:focus-visible {
        outline: 2px solid #fff;
        outline-offset: 3px;
    }
}

/* ---- Brands: centred brand wall on ivory, names in one flowing uppercase line per group ---- */
.kz-sv-brands {
    padding: 3rem var(--kz-edge);
    text-align: center;

    & > h2 {
        margin-bottom: 2rem;
    }

    & [data-content-type="text"] {
        max-width: 60rem;
        margin-inline: auto;
    }

    & h3 {
        margin-bottom: 0.5rem;
        font-weight: 400;
        letter-spacing: 0.2em;
    }

    & ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0;
        margin-bottom: 2rem;
        color: #111;
        font-size: 0.9375rem;
        line-height: 2;
        letter-spacing: 0.12em;
        text-transform: uppercase;
    }

    & ul:last-child {
        margin-bottom: 0;
    }

    & li {
        display: block;

        &::before {
            content: none;
        }

        /* separator dot, not read out by screen readers */
        &:not(:last-child)::after {
            content: "·";
            content: "·" / ""; /* browsers without alt text for content keep the line above */
            margin-inline: 0.75em;
            color: var(--kz-gold);
        }
    }
}

/* ---- Boutiques: the shared CMS block "kruzik-boutiquen" (own styles in kz-boutiques.css), only the row spacing here ---- */
[data-content-type="row"][data-appearance="contained"]:has(> .kz-sv-contact) {
    margin-block: 0;
    padding-block: 3rem;
}

/* heading above the block, like "Unsere Marken" */
.kz-sv-contact > h2 {
    margin: 0 0 2rem;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
}

@media (min-width: 48rem) {
    /* drawing left, text right */
    .kz-sv-opener {
        & .kz-sv-sketch {
            padding: 3rem 3rem 0 var(--kz-edge);
        }

        & .kz-sv-sketch figure {
            width: min(100%, 26rem);
        }

        & .pagebuilder-column:not(.kz-sv-sketch) {
            padding: 4rem var(--kz-edge) 4rem 5rem;

            & > * {
                max-width: 32rem;
            }
        }
    }

    [data-content-type="row"][data-appearance="contained"]:has(> .kz-sv-services) {
        padding-block: 4rem;
    }

    .kz-sv-services {
        & > .pagebuilder-column-group {
            padding-block: 2.25rem;
        }

        & .pagebuilder-column-line {
            gap: 3rem;
        }

        & .kz-sv-more {
            align-items: flex-end;
        }
    }

    .kz-sv-piercing {
        padding-block: 4.5rem;
    }

    .kz-sv-brands {
        padding-block: 4.5rem;
    }

    [data-content-type="row"][data-appearance="contained"]:has(> .kz-sv-contact) {
        padding-block: 4.5rem;
    }
}
