:root { /* Farver */
    --sx-bg: #ffffff;
    --sx-page-bg: #E6E8EB;
    --sx-text: #1A1A1A;
    --sx-muted: #6b7280;
    --sx-primary: #1A1446;
    --sx-primary-ink: #ffffff;
    --sx-border: #e5e7eb;
    --sx-nav-bg: #fff; /* ikke gennemsigtig */
    --sx-footer-bg: #ffffff;
    --sx-footer-hero-bg: #E9ECF0;
    --sx-link: #1A1446;
}
/* Grundlayout */

html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: 'Open Sans', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    background: var(--sx-page-bg);
    color: var(--sx-text);
    line-height: 1.4;
    font-size: 14px;
}

.site-frame {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: #fff;
    width: min(100%, 1200px);
    margin-inline: auto;
    box-shadow: 0 2px 6px rgba(0,0,0,.06), 0 0 0 1px var(--sx-border);
}

.container {
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: clamp(12px, 3vw, 24px);
}
/* Header */

.sx-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--sx-nav-bg);
    border-bottom: 1px solid var(--sx-border);
    transition: box-shadow .15s ease, border-color .15s ease;
}

    .sx-header.is-scrolled {
        box-shadow: 0 2px 6px rgba(0,0,0,.06);
        border-bottom-color: rgba(0,0,0,.08);
    }
    /* Header layout */

    .sx-header .container {
        display: flex;
        flex-wrap: nowrap;
        align-items: flex-end;
        justify-content: space-between;
        gap: 16px;
        padding: 22px 24px 10px;
        position: relative;
    }

    .sx-header .brand {
        order: 1;
        display: flex;
        align-items: flex-end;
    }

    .sx-header .main-nav {
        order: 2;
        width: auto;
        flex: 0 1 auto;
    }
/* Logo */

.sexsus-logo,
.sexus-logo {
    display: block;
    height: auto;
    width: auto;
    max-height: 72px;
}

@media (max-width: 1200px) {
    .sexus-logo {
        max-height: 64px;
    }
}

@media (max-width: 992px) {
    .sexus-logo {
        max-height: 56px;
    }
}

@media (max-width: 768px) {
    .sexus-logo {
        max-height: 44px;
    }
}
/* Navigation layout */

.sx-header .main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
    align-items: flex-end;
    flex-wrap: wrap;
}
/* --- Navigation styling --- */

.main-nav a {
    position: relative;
    text-decoration: none;
    color: #000;
    padding: 0.4rem 0.8rem;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease-in-out;
}
    /* Bundstreg-animation */
    .main-nav a::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: 0;
        height: 3px;
        width: 0%;
        background-color: #1b144d;
        transition: width 0.25s ease-in-out;
    }
    /* Hover og fokus */
    .main-nav a:hover,
    .main-nav a:focus {
        color: #1b144d;
    }

        .main-nav a:hover::after,
        .main-nav a:focus::after {
            width: 100%;
        }
    /* Aktiv side */
    .main-nav a.active {
        color: #1b144d;
    }

        .main-nav a.active::after {
            width: 100%;
            background-color: #1b144d;
        }
/* Burger-knap */

.nav-toggle {
    display: none;
    border: 0;
    background: transparent;
    padding: 6px;
    border-radius: 8px;
    line-height: 0;
    position: absolute;
    right: 24px;
    bottom: 12px;
}

    .nav-toggle:hover, .nav-toggle:focus {
        background: rgba(0,0,0,.06);
    }
/* Burger-tilstand */

.sx-header.show-burger .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sx-header.show-burger .container {
    flex-wrap: wrap;
}

.sx-header.show-burger .main-nav {
    order: 4;
    width: 100%;
    overflow: hidden;
    max-height: 0;
    margin-top: 0;
    border-top: 0;
    transition: max-height .25s ease;
}

    .sx-header.show-burger .main-nav[data-open="true"] {
        max-height: 420px;
        margin-top: 10px;
        border-top: 1px solid var(--sx-border);
    }

    .sx-header.show-burger .main-nav ul {
        display: block;
        padding: 8px 0;
    }

    .sx-header.show-burger .main-nav a {
        display: block;
        padding: 12px 10px;
        font-size: 1rem;
        line-height: 1.2;
        border-radius: 8px;
    }

/* --- Burger/X ikon-swap --- */
.nav-toggle .icon-close {
    display: none;
}

.sx-header.show-burger .nav-toggle[aria-expanded="true"] .icon-burger {
    display: none;
}

.sx-header.show-burger .nav-toggle[aria-expanded="true"] .icon-close {
    display: inline;
}

.sx-header.show-burger .nav-toggle[aria-expanded="false"] .icon-burger {
    display: inline;
}

.sx-header.show-burger .nav-toggle[aria-expanded="false"] .icon-close {
    display: none;
}

/* --- Burger-tilstand: kun venstre accent, ingen underline/baggrund --- */
.sx-header.show-burger .main-nav a::after {
    display: none;
}

.sx-header.show-burger .main-nav a:hover,
.sx-header.show-burger .main-nav a:focus {
    color: #1A1446;
}

.sx-header.show-burger .main-nav a.active,
.sx-header.show-burger .main-nav a[aria-current="page"] {
    font-weight: 700;
    color: #1A1446;
    position: relative;
    background: none;
}

    .sx-header.show-burger .main-nav a.active::before,
    .sx-header.show-burger .main-nav a[aria-current="page"]::before {
        content: "";
        position: absolute;
        left: 0;
        top: 8px;
        bottom: 8px;
        width: 4px;
        border-radius: 2px;
        background: #1A1446;
    }

/* Main */

.sx-main {
    flex: 1;
    padding: 16px 0 16px;
}
/* Kort / formularer */

.card {
    background: #fff;
    border: 1px solid var(--sx-border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
/* Formularjustering – venstrestillet */

.sx-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 1rem;
    padding: 0;
    max-width: 100%;
}

    .sx-form fieldset {
        border: 1px solid #e0e0e0;
        border-radius: 4px;
        /*padding: 1rem 1.2rem;*/
        margin-left: 0;
    }

    .sx-form label {
        display: block;
        font-weight: 500;
        margin-bottom: 0.4rem;
    }

    .sx-form textarea {
        width: 100%;
        box-sizing: border-box;
        border: 1px solid #d8d8d8;
        border-radius: 6px;
        padding: 0.6rem;
        font-size: 0.95rem;
        resize: vertical;
        margin-left: 0;
    }

    .sx-form input[type="checkbox"] {
        margin-right: 0.4rem;
    }

    /* Knap */
    .sx-form button {
        align-self: flex-start;
        margin-top: 0.5rem;
        background-color: #1b144d;
        color: white;
        border: none;
        border-radius: 20px;
        padding: 0.4rem 1.2rem;
        font-weight: 600;
        font-size: 0.9rem;
        cursor: pointer;
        transition: all 0.2s ease-in-out;
    }

        .sx-form button:hover {
            background-color: #2a2170;
            transform: translateY(-1px);
            box-shadow: 0 2px 4px rgba(0,0,0,0.15);
        }

/* Footer */

.sx-footer {
    background: var(--sx-footer-bg);
    border-top: 1px solid var(--sx-border);
    margin-top: auto;
}

.sx-footer-hero {
    background: var(--sx-footer-hero-bg);
}

    .sx-footer-hero .hero-stripes {
        display: grid;
        grid-template-columns: repeat(3,1fr);
    }

    .sx-footer-hero .stripe {
        height: 56px;
    }

    .sx-footer-hero .stripe-purple {
        background: #1A1446;
    }

    .sx-footer-hero .stripe-silver {
        background: #C9CED6;
    }

    .sx-footer-hero .stripe-slate {
        background: #737B8C;
    }

.sx-footer .main {
    display: none;
}

/* >>> Strammet footer-spacing (ENESTE aktive .legal-regler) <<< */
.sx-footer .legal {
    border-top: 1px solid var(--sx-border);
    padding: 10px 0 6px; /* mindre vertikal padding */
    text-align: center;
}

    .sx-footer .legal ul {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: baseline; /* telefon/e-mail på samme linjehøjde */
        column-gap: 14px; /* tættere vandret afstand */
        row-gap: 6px; /* tættere lodret afstand */
        line-height: 1.25; /* kompakt linjeafstand */
        color: #444; /* lidt lysere end body */
        font-size: 0.85rem; /* en smule mindre type */
    }

        .sx-footer .legal ul li {
            margin: 0;
            padding: 0;
        }
/* <<< */

.sx-footer a.link {
    text-decoration: none;
    color: var(--sx-link);
    font-weight: 600;
}

    .sx-footer a.link:hover {
        text-decoration: underline;
    }

/* Tilgængelighed – diskret men tydelig */
.sx-footer .policy-line a.link {
    font-size: 0.8rem;
    color: #1A1446;
    font-weight: 500;
}

    .sx-footer .policy-line a.link:hover {
        text-decoration: underline;
    }

/* Typografi */

img, video {
    max-width: 100%;
    height: auto;
}

/* Brødtekst og labels */
p, label, li {
    font-size: 14px;
    line-height: 1.5;
}
/* Mindre elementer som knapper, formulartekst osv. */
button, input, textarea {
    font-size: 14px;
    line-height: 1.4;
}

h1 {
    font-size: clamp(1.4rem, 1.0rem + 1.2vw, 1.9rem);
    line-height: 1.3;
    font-weight: 700;
    margin-bottom: 0.6rem; /* mindre afstand over formular */
}

h2 {
    font-size: clamp(1.2rem, 0.95rem + 0.8vw, 1.5rem);
    line-height: 1.35;
    font-weight: 600;
}

h3 {
    font-size: clamp(1.05rem, 0.9rem + 0.4vw, 1.25rem);
    line-height: 1.4;
    font-weight: 600;
}

/* Responsivitet */

@media (max-width: 992px) {
    .sx-header .container {
        padding: 18px 20px 10px;
    }

    .sx-header .main-nav ul {
        gap: 22px;
    }
}

@media (max-width: 768px) {
    .sx-header .container {
        flex-wrap: wrap;
        gap: 10px;
        padding: 14px 16px 10px;
    }

    .sx-header .brand {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .sx-footer-hero .stripe {
        height: 40px;
    }
    /* behold footer spacing også på mobil – ingen modstridende regler her */
}

.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid #1A1446;
    outline-offset: 2px;
}

/* Mindre top/bund padding i kortet */
.card {
    padding-top: 16px;
    padding-bottom: 16px;
}

    .card p {
        margin-top: 0.3rem;
        margin-bottom: 0.7rem;
    }

.sx-form legend {
    margin-bottom: 0.3rem;
}

/* Badges/hints */
.badge {
    display: inline-block;
    font-size: .75rem;
    line-height: 1;
    padding: .25rem .45rem;
    border-radius: 999px;
    margin-left: .4rem;
    vertical-align: middle;
    transform: translateY(-1px);
}

.badge-muted {
    background: #f3f4f6;
    color: #374151;
}

.badge-outline {
    border: 1px solid #C9CED6;
    color: #1A1446;
    background: #fff;
}

.form-hint {
    color: #555;
    font-size: .9rem;
    margin: .35rem 0 .6rem;
}

/* Notices */
.text-danger {
    color: #c00;
    font-weight: 600;
}

.notice {
    padding: .6rem .8rem;
    border-left: 4px solid transparent;
    background: transparent;
    color: var(--sx-text);
    margin-top: 1.2rem;
    margin-bottom: 1.0rem;
}

.notice--info {
    border-left-color: #2b6cb0;
    background: color-mix(in srgb,#2b6cb0 8%,white);
    color: #143f6b;
}

.notice--error {
    border-left-color: #c53030;
    background: color-mix(in srgb,#c53030 8%,white);
    color: #7a1f1f;
}

.notice--success {
    border-left-color: #2f855a;
    background: color-mix(in srgb,#2f855a 8%,white);
    color: #1f503a;
}

.notice__title {
    font-weight: 700;
    margin: 0 0 .2rem;
    line-height: 1.35;
}

.notice p {
    margin: 0;
}

@media (prefers-contrast: more) {
    .notice--info, .notice--error, .notice--success {
        background: transparent;
    }
}

/* Skærmlæser/live-update */
[role="status"], [role="alert"] {
    aria-atomic: true;
}

/* ---------- Page loader (tilføjet) ---------- */

.page-loader {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, rgba(255,255,255,0.85) 85%, white);
    z-index: 9999;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    transition: opacity 180ms ease, visibility 180ms ease;
    opacity: 1;
    visibility: visible;
}

.page-loader[aria-hidden="true"] {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Indre container */
.page-loader__inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

/* Spinner */
.page-loader .spinner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 4px solid rgba(26,20,70,0.12);
    border-top-color: #1A1446;
    animation: sx-spin 0.9s linear infinite;
}

/* Tekst */
.page-loader__text {
    color: #1A1446;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Keyframes */
@keyframes sx-spin {
    to { transform: rotate(360deg); }
}

/* Mindre på mobil */
@media (max-width: 480px) {
    .page-loader .spinner {
        width: 36px;
        height: 36px;
        border-width: 3px;
    }
}
