/* Shared Dev: page frame (skip link, header, menu, footer) and the consent choice. */

.sd-skip {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 100;
    padding: 0.6rem 1rem;
    border-radius: var(--sd-radius);
    background: var(--sd-ink);
    color: #fff;
    font-weight: 650;
}

.sd-skip:focus { top: 0.75rem; }

/* ---- Header ---- */

.sd-header { position: relative; z-index: 50; }

.sd-header-inner {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding-block: 1.25rem;
}

.sd-brand { display: block; flex: none; }

.sd-logo {
    display: block;
    width: 14rem;
    height: auto;
    aspect-ratio: 702 / 220;
}

.sd-nav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    margin-left: auto;
}

.sd-nav-list {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sd-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    font-weight: 550;
    text-decoration: none;
}

.sd-nav-link:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
    text-decoration-color: var(--sd-tone);
}

.sd-nav-link[aria-current="page"] {
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 8px;
    text-decoration-color: var(--sd-tone);
}

.sd-nav-mark {
    display: block;
    flex: none;
    width: 1.1rem;
    height: 1.1rem;
}

/* Each menu item's mark has the colour of its page; the slugs are fixed (see the manage-website skill). */
.sd-nav-link[href$="/samen-bouwen.html"] .sd-nav-mark,
.sd-nav-link[href$="/building-together.html"] .sd-nav-mark { --sd-tone: var(--sd-geel); }
.sd-nav-link[href$="/producten.html"] .sd-nav-mark,
.sd-nav-link[href$="/products.html"] .sd-nav-mark { --sd-tone: var(--sd-mint); }
.sd-nav-link[href$="/over-ons.html"] .sd-nav-mark,
.sd-nav-link[href$="/about.html"] .sd-nav-mark { --sd-tone: var(--sd-paars); }
.sd-nav-link[href$="/contact.html"] .sd-nav-mark { --sd-tone: var(--sd-groen); }

.site-language-switcher { display: flex; gap: 0.5rem; }

.site-language-link {
    padding: 0.15rem 0.6rem;
    border: 2px solid var(--sd-line);
    border-radius: 999px;
    color: var(--sd-graphite);
    font-size: 0.85rem;
    font-weight: 650;
    text-decoration: none;
}

.site-language-link:hover { border-color: var(--sd-ink); color: var(--sd-ink); }

/* Menu toggle for narrow screens: a checkbox, so it works without JavaScript. */
.sd-menu-toggle {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.sd-menu-button { display: none; }

@media (max-width: 860px) {
    .sd-logo { width: 11rem; }

    .sd-menu-button {
        display: inline-flex;
        align-items: center;
        gap: 0.6rem;
        margin-left: auto;
        padding: 0.45rem 0.9rem;
        border: 2px solid var(--sd-line);
        border-radius: 999px;
        font-weight: 650;
        font-size: 1rem;
        cursor: pointer;
    }

    .sd-menu-icon,
    .sd-menu-icon::before {
        display: block;
        width: 1rem;
        height: 2px;
        border-radius: 2px;
        background: currentColor;
    }

    .sd-menu-icon { position: relative; transform: translateY(-3px); }

    .sd-menu-icon::before {
        content: "";
        position: absolute;
        top: 6px;
    }

    .sd-menu-toggle:focus-visible + .sd-menu-button {
        outline: 3px solid var(--sd-tone-deep);
        outline-offset: 3px;
    }

    .sd-menu-toggle:checked + .sd-menu-button .sd-menu-icon { transform: rotate(45deg); }
    .sd-menu-toggle:checked + .sd-menu-button .sd-menu-icon::before { transform: translateY(-6px) rotate(-90deg); }

    .sd-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem var(--sd-gutter) 1.5rem;
        background: var(--sd-paper);
        border-bottom: 4px solid var(--sd-tone);
    }

    .sd-menu-toggle:checked ~ .sd-nav { display: flex; }

    .sd-nav-list { flex-direction: column; align-items: stretch; gap: 0.25rem; }
    .sd-nav-link { padding: 0.6rem 0; font-size: 1.15rem; }
}

/* ---- Footer ---- */

.sd-footer {
    padding-block: 2.5rem;
    color: var(--sd-graphite);
    font-size: 0.95rem;
}

.sd-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
}

.sd-footer .sd-logo { width: 8rem; }

.sd-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sd-footer-links a { text-underline-offset: 4px; }
.sd-footer-links a:hover { color: var(--sd-ink); }

/* ---- Consent choice for the analytics cookie (shown by js/page-view.js) ---- */

.sd-consent {
    position: fixed;
    left: 1.25rem;
    bottom: 1.25rem;
    z-index: 80;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    width: min(21rem, 100% - 2.5rem);
    padding: 1.1rem 1.2rem 1.2rem;
    border-radius: 0.9rem;
    background: var(--sd-ink);
    color: #fff;
    box-shadow: 0 1rem 2rem -1rem rgba(0, 0, 0, 0.45);
}

.sd-consent p { margin: 0; font-size: 0.92rem; line-height: 1.45; }
.sd-consent a { color: #fff; text-decoration-color: var(--sd-tone); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.sd-consent :focus-visible { outline-color: #fff; }

.sd-consent-actions { display: flex; gap: 0.5rem; }
.sd-consent-actions > * { flex: 1; }

/* Both answers look the same: accepting is no easier than declining. */
.sd-consent-button {
    min-height: 2.25rem;
    padding: 0.4rem 0.8rem;
    border: 2px solid #fff;
    border-radius: var(--sd-radius);
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 650;
    cursor: pointer;
}

.sd-consent-button:hover { background: #fff; color: var(--sd-ink); }

@media (max-width: 640px) {
    .sd-consent { left: 0.75rem; right: 0.75rem; bottom: 0.75rem; width: auto; }
}
