/* ========== GLOBAL CSS ========== */

/* Tokens */
:root {
    --nav: #2c3e50;
    --brand: #046080;
    --brand-d: #023b50;
    --brand2: #b8860b;
    --brand2-hover: #9c740a;
    --brand2-rgb: 184, 134, 11;
    --text: #0f1b2a;
    --bg: #ffffff;

    --surface: #ffffff;
    --surface-2: #f6f8fb;
    --border: rgba(0, 0, 0, 0.08);
    --focus: #0380a0;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .04);

    --radius: 14px;
    --container: 1320px;
    --nav-h: 64px;
    --notice-h: 0px;
    --underline-h: 4px;
    /* Dicke der Hover-Linie */
}

/* Basis */
* {
    box-sizing: border-box;
}

html {
    font-size: 18px;
    overflow-x: hidden;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 1rem/1.7 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    padding-top: calc(var(--nav-h) + var(--notice-h));
    overflow-x: hidden;
}

body.has-global-notice {
    --notice-h: 48px;
}

body.has-global-notice .global-notice {
    margin-top: 0;
}

.global-notice {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    z-index: 980;
    background: color-mix(in srgb, var(--focus) 10%, #fff);
    border-bottom: 1px solid var(--border);
}

.global-notice__inner {
    margin: 0 auto;
    width: min(var(--container), 92%);
    padding: 6px 12px;
    color: #0f1b2a;
    font-weight: 600;
    text-align: center;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--brand);
    text-decoration: none;
}

h1,
h2 {
    font-weight: 800;
}

h1 {
    margin: .2rem 0 .7rem;
    font-size: clamp(1.6rem, 1.1rem + 1.5vw, 2.2rem);
    line-height: 1.2;
}

h2 {
    margin: .2rem 0 .6rem;
    font-size: clamp(1.2rem, 1rem + 1vw, 1.6rem);
}

/* Layout-Helfer */
.container {
    width: min(var(--container), 92%);
    margin-inline: auto;
}

/* Rechtstexte */
.legal-container {
    max-width: var(--container);
    margin: 24px auto;
    padding: 16px;
}

.section {
    padding: 28px 0;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.text-right {
    text-align: right;
}

@media (max-width: 900px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 2px);
    box-shadow: var(--shadow-1);
    padding: 20px;
    margin: 24px auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    padding: .85rem 1.1rem;
    transition: transform .04s ease, background .15s ease;
}

.btn:hover {
    background: var(--brand-d);
}

.btn:active {
    transform: translateY(1px);
}

.btn:focus-visible {
    outline: 4px solid var(--focus);
    outline-offset: 2px;
}

.btn-outline {
    background: transparent;
    color: var(--brand);
    border: 2px solid var(--brand);
    border-radius: 999px;
    padding: .75rem 1.05rem;
}

.btn-outline:hover {
    background: color-mix(in srgb, var(--brand) 10%, transparent);
}

.btn-ghost {
    background: transparent;
    color: var(--brand);
    border: 0;
    border-radius: 999px;
    padding: .6rem .8rem;
}

.btn-ghost:hover {
    background: color-mix(in srgb, var(--brand) 10%, transparent);
}

/* Formulare */
.form {
    display: grid;
    gap: 12px;
}

.field {
    display: block;
}

.field>span,
legend {
    display: block;
    font-weight: 600;
    margin: 0 0 .35rem;
}

input,
select,
textarea {
    width: 100%;
    font: inherit;
    color: inherit;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: .8rem 1rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}

textarea {
    min-height: 7rem;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--brand);
    outline: 0;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 20%, transparent);
}

fieldset {
    border: 0;
    padding: 0;
    margin: 8px 0;
}

.option {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin: .25rem 0;
}

input[type="checkbox"],
input[type="radio"] {
    width: 1.15em;
    height: 1.15em;
    accent-color: var(--brand);
}

.field.consent {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .6rem;
}

.field.consent input {
    margin-top: .25rem;
}

.field.consent a {
    text-decoration: underline;
}

.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 900px) {
    .row {
        grid-template-columns: 1fr;
    }
}

.actions {
    margin-top: 10px;
}

.section.alt {
    background: var(--surface-2);
    border-block: 1px solid var(--border);
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}

.muted {
    color: #506070;
    font-size: .95rem;
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    inset: 0 0 auto 0;
    /* top:0; left:0; right:0 */
    height: var(--nav-h);
    background: rgba(44, 62, 80, 0.55);
    backdrop-filter: blur(8px) saturate(140%);
    -webkit-backdrop-filter: blur(8px) saturate(140%);
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    z-index: 1000;
    /* unter Panel, über Backdrop */
}

.navbar-inner {
    height: 100%;
    width: 100%;
    padding: 0 32px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    /* links | MITTE | rechts */
    align-items: center;
}

.logo {
    justify-self: start;
}

.nav-links {
    justify-self: center;
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-sub {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Navbar-Links + Unterstreichung */
.navbar a {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 100%;
    padding: 0 .6rem;
    transition: color .2s ease;
}

.navbar a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: var(--underline-h, 4px);
    background: var(--focus);
    transform: scaleX(0);
    transform-origin: left bottom;
    transition: transform .25s ease;
    pointer-events: none;
}

.navbar a:hover::after,
.navbar a[aria-current="page"]::after {
    transform: scaleX(1);
}

.navbar a:hover,
.navbar a[aria-current="page"] {
    color: var(--focus);
}

.logo a {
    font-size: 1.25rem;
    font-weight: 800;
}

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

/* Shared listing layout for offers & wishes */
.offers,
.wishes {
    width: min(var(--container), 92%);
    max-width: none;
    margin: 32px auto;
    padding: 0 20px;
}

.offers h3,
.wishes h3 {
    text-align: center;
    margin: 10px 0 18px;
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.2;
}

.offers .card-list,
.offers .list,
.wishes .card-list,
.wishes .list {
    display: grid;
    gap: 22px;
    grid-template-columns: 1fr;
}

/* Einheitliche "Weitere ..." Sektion */
.related-section {
    width: min(var(--container), 92%);
    max-width: none;
    margin: 36px auto 18px;
    padding: 24px 20px 0;
    border-top: 1px solid #e2e9ee;
}
.related-section h3 {
    text-align: center;
    margin: 10px 0 18px;
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.2;
}
.related-section .card-list,
.related-section .list {
    display: grid;
    gap: 22px;
    grid-template-columns: 1fr;
}

/* ===== Unified offer/wish cards ===== */
:root {
    --offer-img-w: 200px;
    --offer-img-h: 140px;
    --wish-img: 140px;
}

.offer-card,
.wish-card {
    display: grid;
    grid-template-columns: 200px 1fr 160px;
    gap: 16px;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
    position: relative;
    cursor: pointer;
}

.offer-card { border: 2px solid var(--brand); }
.wish-card  { border: 2px solid var(--brand2); }

.offer-card .avatar,
.offer-card .avatar img {
    width: var(--offer-img-w);
    height: var(--offer-img-h);
    border-radius: 12px;
    overflow: hidden;
    object-fit: cover;
    display: block;
    border: 0;
    background: #f2f7fa;
}

.wish-card .avatar,
.wish-card .avatar img {
    width: var(--wish-img);
    height: var(--wish-img);
    border-radius: 999px;
    overflow: hidden;
    object-fit: cover;
    display: block;
    border: 0;
    background: #fff;
}

.offer-card h4,
.wish-card h4,
.wish-card .title {
    margin: 0 0 6px;
    font-size: 1.1rem;
}

.offer-card .card-body,
.wish-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.offer-card .card-body .card-line,
.wish-card .card-body .card-line {
    margin: 2px 0;
}

.offer-card .card-meta,
.wish-card .card-meta {
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    text-align: right;
}

.offer-card .offer-price,
.offer-card .card-price,
.offer-card .card-meta {
    font-weight: 700;
    color: var(--brand);
}

.wish-card .wish-price,
.wish-card .card-price,
.wish-card .card-meta {
    font-weight: 700;
    color: var(--brand2);
}

.stretched-link {
    position: absolute;
    inset: 0;
    z-index: 2;
    text-indent: -9999px;
}

/* Anbieterkarte */
.provider-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e2e9ee;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    margin: 14px 0 22px;
}
.provider-card .provider-logo {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background: #f3f8fb;
    border: 1px solid #dbe7ee;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.provider-card .provider-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}
.provider-card .provider-meta {
    display: grid;
    gap: 2px;
}
.provider-card .provider-meta .name {
    font-weight: 800;
    font-size: 1.05rem;
    color: #0f1b2a;
}
.provider-card .provider-meta .meta-line {
    color: #415065;
    font-size: 0.95rem;
}
.provider-card .provider-meta .link a {
    color: var(--brand);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
}
.provider-card .provider-meta .link a:hover {
    text-decoration: underline;
}
.provider-card .grow {
    flex: 1;
}
.provider-card .provider-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--brand);
    background: #eaf6fb;
    border: 1px solid #cfe7f0;
    border-radius: 9999px;
    padding: 0.2rem 0.6rem;
}

.offer-card:hover,
.wish-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

@media (max-width: 900px) {
    .offer-card,
    .wish-card {
        grid-template-columns: 1fr;
        grid-template-areas:
            "image"
            "body"
            "meta";
    }

    .offer-card .avatar,
    .wish-card .avatar { grid-area: image; }
    .offer-card .card-body,
    .wish-card .card-body { grid-area: body; }
    .offer-card .card-meta,
    .wish-card .card-meta { grid-area: meta; }

    :root {
        --offer-img-w: 100%;
        --offer-img-h: 180px;
        --wish-img: 120px;
    }

    .offer-card .avatar,
    .offer-card .avatar img {
        width: 100%;
        height: var(--offer-img-h);
    }

    .wish-card .avatar,
    .wish-card .avatar img {
        width: var(--wish-img);
        height: var(--wish-img);
        margin-inline: auto;
    }

    .offer-card .card-price,
    .offer-card .card-meta,
    .wish-card .card-price,
    .wish-card .card-meta {
        justify-self: start;
        text-align: left;
    }
}
@media (max-width: 600px) {
    :root {
        --nav-h: 56px;
        --offer-img-h: 160px;
        --wish-img: 110px;
    }

    body.has-global-notice {
        --notice-h: 64px;
    }

    .navbar-inner {
        padding: 0 16px;
    }

    .global-notice__inner {
        padding: 10px 14px;
        font-size: 0.98rem;
        line-height: 1.35;
    }

    .offer-card,
    .wish-card {
        padding: 12px;
    }

    .provider-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .provider-card .provider-logo {
        width: 48px;
        height: 48px;
    }
}

/* =================== Burger / Mobile Panel =================== */

/* Burger-Button (neutral & pixelgenau) */
.burger-menu {
    display: none;
    /* Desktop: ausblenden */
    position: relative;
    width: 44px;
    height: 36px;
    padding: 0;
    margin-left: 12px;
    border: 0;
    background: transparent !important;
    /* keine farbige Pill */
    box-shadow: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    z-index: 1002;
    /* über Panel/Backdrop */
}

/* Drei Linien ? absolut zentriert */
.burger-line {
    position: absolute;
    left: 50%;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transform: translateX(-50%);
    transition: transform .2s ease, opacity .2s ease, top .2s ease;
}

/* vertikale Positionen (geschlossen) */
.burger-line:nth-child(1) {
    top: 9px;
}

.burger-line:nth-child(2) {
    top: 17px;
}

.burger-line:nth-child(3) {
    top: 25px;
}

/* Offen: X in der Mitte */
body.menu-open .burger-line:nth-child(1) {
    top: 17px;
    transform: translateX(-50%) rotate(45deg);
}

body.menu-open .burger-line:nth-child(2) {
    opacity: 0;
}

body.menu-open .burger-line:nth-child(3) {
    top: 17px;
    transform: translateX(-50%) rotate(-45deg);
}

/* Backdrop ? nur klickbar wenn sichtbar */
.mobile-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s step-end;
    z-index: 999;
    /* unter Navbar (1000) und Panel (1001) */
}

body.menu-open .mobile-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity .2s ease, visibility .2s step-start;
}

/* Off-Canvas Panel */
.mobile-panel {
    position: fixed;
    right: 0;
    top: var(--nav-h);
    bottom: 0;
    width: min(85vw, 360px);
    background: var(--surface);
    border-left: 1px solid var(--border);
    box-shadow: var(--shadow-1);
    transform: translateX(100%);
    transition: transform .25s ease;
    z-index: 1001;
    display: flex;
    flex-direction: column;
}

.mobile-panel-inner {
    padding: 18px;
    display: grid;
    gap: 12px;
}

.mobile-panel a {
    color: var(--text) !important;
    font-weight: 700;
    padding: .6rem .2rem;
    border-radius: 10px;
}

.mobile-panel a:hover {
    background: var(--surface-2);
}

/* Wenn geöffnet */
body.menu-open .mobile-panel {
    transform: translateX(0%);
}

/* Scrollen im Hintergrund verhindern */
body.menu-open {
    overflow: hidden;
}

/* ===== FOOTER ===== */
.site-footer {
    margin-top: 48px;
    background: var(--surface-2);
    border-top: 1px solid var(--border);
    padding: 32px 0 20px;
}

.footer-inner {
    width: min(var(--container), 92%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr);
    gap: 28px;
    align-items: start;
}

.footer-brand {
    display: grid;
    gap: 6px;
}

.footer-logo {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
}

.footer-logo:hover {
    color: var(--brand);
}

.footer-tagline {
    margin: 0;
    color: #526171;
    font-size: .95rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.footer-col h4 {
    margin: 0 0 8px;
    font-size: .85rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #4b5a6a;
}

.footer-col a {
    display: block;
    color: var(--text);
    font-weight: 600;
    font-size: .9rem;
    opacity: .75;
    margin: 4px 0;
}

.footer-col a:hover {
    color: var(--brand);
    opacity: 1;
}

.footer-bottom {
    width: min(var(--container), 92%);
    margin: 18px auto 0;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: .9rem;
    color: #5a6a7a;
}

.footer-top {
    color: var(--brand);
    font-weight: 600;
}

.footer-top:hover {
    color: var(--brand-d);
}

@media (max-width: 900px) {
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .footer-links {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Mobil-Umschaltung */
@media (max-width: 900px) {

    .nav-links,
    .nav-sub {
        display: none;
    }

    .burger-menu {
        display: inline-flex;
        justify-self: end;
    }

    .navbar-inner {
        grid-template-columns: 1fr auto;
    }
}

/* ===== Framework-Overrides: Burger nie wie ein Button darstellen ===== */
header.navbar .burger-menu,
header.navbar .burger-menu:hover,
header.navbar .burger-menu:active,
header.navbar .burger-menu:focus,
header.navbar .burger-menu:focus-visible {
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    outline: none;
    /* Wenn du Keyboard-Fokus sichtbar willst, aktiviere den Block unten */
}

/* Pflichtfeld-Stern */
.req-field::after { content: " *"; color: #0095c5; }
