/* =============================================================================
 * Bienek Legal-Center — gemeinsames Stylesheet
 * Domain: agb.bienek.net
 * Stand: Mai 2026
 * ========================================================================== */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bienek-50:  #e8f0fa;
    --bienek-100: #d1e1f5;
    --bienek-200: #a3c3eb;
    --bienek-400: #4787d7;
    --bienek-500: #0064b4;
    --bienek-600: #004e9a;
    --bienek-700: #003d7a;
    --bienek-800: #002c5a;
    --bienek-900: #001b3a;
    --text:       #1a1a2e;
    --muted:      #5a6a85;
    --border:     rgba(0, 78, 154, 0.12);
    --bg:         linear-gradient(135deg, var(--bienek-50) 0%, #ffffff 40%, var(--bienek-100) 100%);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* ============================================================================
 * HEADER mit Tab-Navigation
 * ========================================================================== */
.agb-header {
    background: linear-gradient(135deg, var(--bienek-600) 0%, var(--bienek-500) 100%);
    box-shadow: 0 4px 20px rgba(0, 78, 154, 0.25);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.header-logo { height: 28px; width: auto; }

.header-brand-text {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.85);
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    padding-left: 0.85rem;
    line-height: 1.1;
}

.header-nav {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.header-nav a {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    transition: all 0.18s;
    white-space: nowrap;
}

.header-nav a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.header-nav a.active {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

@media (max-width: 760px) {
    .header-inner { padding: 0.75rem 1rem; gap: 0.75rem; }
    .header-brand-text { display: none; }
    .header-nav { width: 100%; gap: 0.15rem; overflow-x: auto; padding-bottom: 0.25rem; }
    .header-nav a { font-size: 0.78rem; padding: 0.35rem 0.6rem; }
}

/* ============================================================================
 * MAIN-Layout
 * ========================================================================== */
main { max-width: 880px; margin: 0 auto; padding: 3rem 1.5rem 4rem; }

.doc-card {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 78, 154, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    padding: 3rem 2.75rem;
}

.doc-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--bienek-500);
    margin-bottom: 0.75rem;
}

.doc-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--bienek-800);
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.doc-subtitle {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
}

/* ============================================================================
 * Inhaltsverzeichnis
 * ========================================================================== */
.toc {
    background: var(--bienek-50);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 3rem;
}

.toc-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--bienek-700);
    margin-bottom: 0.75rem;
}

.toc-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.4rem 1.5rem;
}

.toc-list a {
    color: var(--bienek-600);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.2rem 0;
    display: inline-block;
    transition: color 0.15s;
}

.toc-list a:hover { color: var(--bienek-800); text-decoration: underline; }

/* ============================================================================
 * Klauseln
 * ========================================================================== */
section.clause { margin-bottom: 2.5rem; scroll-margin-top: 5rem; }
section.clause:last-of-type { margin-bottom: 0; }

.clause-heading {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--bienek-800);
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.clause-num {
    font-variant-numeric: tabular-nums;
    color: var(--bienek-500);
    font-weight: 700;
    font-size: 1.1rem;
    min-width: 1.8em;
}

.clause-body p { color: var(--text); font-size: 0.97rem; margin-bottom: 0.85rem; }
.clause-body p:last-child { margin-bottom: 0; }
.clause-body strong { color: var(--bienek-800); }
.clause-body ul, .clause-body ol { margin: 0.5rem 0 0.85rem 1.5rem; }
.clause-body li { margin-bottom: 0.35rem; font-size: 0.97rem; }
.clause-body a { color: var(--bienek-600); }

/* Hinweis-Box (z.B. Widerruf-Box) */
.notice-box {
    background: var(--bienek-50);
    border-left: 4px solid var(--bienek-500);
    padding: 1.25rem 1.5rem;
    border-radius: 8px;
    margin: 1rem 0 1.5rem;
}

.notice-box.warning { background: #fff7e6; border-left-color: #d97706; }

/* ============================================================================
 * HUB-Layout (Übersichtsseite)
 * ========================================================================== */
.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-top: 2.5rem;
}

.hub-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 12px rgba(0, 78, 154, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-height: 168px;
}

.hub-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 78, 154, 0.16);
    border-color: var(--bienek-400);
}

.hub-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--bienek-50);
    color: var(--bienek-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 0.4rem;
}

.hub-card h3 {
    font-size: 1.05rem;
    color: var(--bienek-800);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.hub-card p {
    color: var(--muted);
    font-size: 0.875rem;
    line-height: 1.55;
    flex: 1;
}

.hub-card-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bienek-500);
    margin-top: auto;
}

/* ============================================================================
 * FOOTER
 * ========================================================================== */
footer.legal-footer {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.6;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border);
}

.footer-grid strong {
    color: var(--bienek-700);
    font-weight: 600;
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
}

.footer-grid a { color: var(--bienek-500); text-decoration: none; }
.footer-grid a:hover { text-decoration: underline; }

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    font-size: 0.75rem;
    border-top: 1px solid var(--border);
}

.footer-bottom a { color: var(--bienek-500); text-decoration: none; margin: 0 0.4rem; }
.footer-bottom a:hover { text-decoration: underline; }

/* ============================================================================
 * Cookie-Hinweis (minimal, nur essentielle Cookies → kein Consent erforderlich)
 * ========================================================================== */
.cookie-bar {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    max-width: 540px;
    margin: 0 auto;
    background: var(--bienek-800);
    color: rgba(255, 255, 255, 0.95);
    padding: 0.85rem 1rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    font-size: 0.82rem;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    z-index: 200;
}

.cookie-bar a { color: var(--bienek-200); }
.cookie-bar button {
    background: #fff;
    color: var(--bienek-800);
    border: none;
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    flex-shrink: 0;
}

.cookie-bar.hidden { display: none; }

/* ============================================================================
 * RESPONSIVE
 * ========================================================================== */
@media (max-width: 640px) {
    main { padding: 1.5rem 1rem 2.5rem; }
    .doc-card { padding: 1.75rem 1.25rem; }
    .doc-title { font-size: 1.55rem; }
    .clause-heading { font-size: 1.1rem; }
    .hub-grid { grid-template-columns: 1fr; }
}

/* ============================================================================
 * PRINT
 * ========================================================================== */
@media print {
    body { background: #fff; color: #000; }
    .agb-header { background: #fff; color: #000; box-shadow: none; border-bottom: 2px solid #000; padding: 0.5cm 0; position: static; }
    .header-nav, .cookie-bar { display: none; }
    .header-logo path { fill: #000 !important; }
    main { padding: 0.5cm 0; max-width: 100%; }
    .doc-card { background: #fff; border: none; box-shadow: none; padding: 0; }
    .toc { display: none; }
    .doc-title { font-size: 1.5rem; }
    section.clause { page-break-inside: avoid; margin-bottom: 1rem; }
    footer.legal-footer { padding: 0; border-top: 1px solid #000; margin-top: 1rem; }
    a { color: #000; text-decoration: none; }
}
