/* ═══════════════════════════════════════════
   Glücksspielsurvey 2024 – Shared Styles
   ═══════════════════════════════════════════ */

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

:root {
    --black: #1a1a1a;
    --dark-gray: #333;
    --medium-gray: #666;
    --light-gray: #f5f5f5;
    --border-gray: #e0e0e0;
    --red: #cc0000;
    --gold: #f0c000;
    --white: #fff;
    --max-width: 960px;
    --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    color: var(--dark-gray);
    background: var(--white);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* ── Header ──────────────────────────────── */
header {
    border-bottom: 1px solid var(--border-gray);
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

nav {
    display: flex;
    gap: 28px;
}

nav a {
    text-decoration: none;
    color: var(--dark-gray);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--red);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--dark-gray);
    margin: 5px 0;
    transition: 0.2s;
}

/* ── Hero ────────────────────────────────── */
.hero {
    background: var(--light-gray);
    border-bottom: 3px solid var(--black);
}

.hero-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 72px 24px 64px;
}

.hero-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--medium-gray);
    margin-bottom: 16px;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--black);
    margin-bottom: 24px;
    max-width: 720px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--medium-gray);
    max-width: 640px;
    line-height: 1.65;
}

.flag-bar {
    display: flex;
    height: 4px;
    margin-top: 40px;
    max-width: 280px;
}

.flag-bar span { flex: 1; }
.flag-bar .fb-black { background: var(--black); }
.flag-bar .fb-red { background: var(--red); }
.flag-bar .fb-gold { background: var(--gold); }

/* ── Page Hero (sub-pages) ───────────────── */
.page-hero {
    background: var(--light-gray);
    border-bottom: 3px solid var(--black);
}

.page-hero-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 56px 24px 48px;
}

.page-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--black);
}

/* ── Sections ────────────────────────────── */
section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 64px 24px;
}

section + section {
    border-top: 1px solid var(--border-gray);
}

.section-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--red);
    margin-bottom: 12px;
}

h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 20px;
    line-height: 1.3;
}

h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 12px;
    line-height: 1.35;
}

h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 8px;
}

p {
    margin-bottom: 16px;
    color: var(--dark-gray);
}

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

a {
    color: var(--red);
}

/* ── Key Figures ─────────────────────────── */
.key-figures {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin: 40px 0;
}

.key-figure {
    text-align: center;
    padding: 32px 16px;
    background: var(--light-gray);
    border-top: 3px solid var(--black);
}

.key-figure .number {
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--black);
    line-height: 1;
    margin-bottom: 8px;
}

.key-figure .unit {
    font-size: 0.85rem;
    color: var(--medium-gray);
    line-height: 1.4;
}

/* ── Findings ────────────────────────────── */
.findings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 32px;
}

.finding-card {
    padding: 28px;
    border: 1px solid var(--border-gray);
    border-left: 3px solid var(--red);
}

.finding-card h3 {
    font-size: 1rem;
    margin-bottom: 10px;
}

.finding-card p {
    font-size: 0.925rem;
    color: var(--medium-gray);
    line-height: 1.6;
}

/* ── Study Info ──────────────────────────── */
.study-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 40px;
    margin-top: 24px;
}

.study-info-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-gray);
}

.study-info-item dt {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--medium-gray);
    margin-bottom: 4px;
}

.study-info-item dd {
    font-size: 0.95rem;
    color: var(--dark-gray);
}

/* ── SOGS Table ──────────────────────────── */
.sogs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 24px;
    font-size: 0.875rem;
}

.sogs-table th,
.sogs-table td {
    padding: 10px 14px;
    text-align: right;
    border-bottom: 1px solid var(--border-gray);
}

.sogs-table th {
    font-weight: 600;
    color: var(--medium-gray);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--light-gray);
}

.sogs-table td:first-child,
.sogs-table th:first-child {
    text-align: left;
}

.sogs-table tr:last-child td {
    font-weight: 600;
    color: var(--black);
}

.sogs-table tbody tr:hover {
    background: #fafafa;
}

/* ── Downloads ───────────────────────────── */
.downloads {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 32px;
}

.download-card {
    display: block;
    padding: 32px;
    background: var(--light-gray);
    border: 1px solid var(--border-gray);
    text-decoration: none;
    color: var(--dark-gray);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.download-card:hover {
    border-color: var(--red);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.download-card .dl-icon {
    font-size: 1.5rem;
    margin-bottom: 12px;
    display: block;
}

.download-card .dl-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--black);
    margin-bottom: 8px;
}

.download-card .dl-desc {
    font-size: 0.875rem;
    color: var(--medium-gray);
    line-height: 1.5;
}

.download-card .dl-link {
    display: inline-block;
    margin-top: 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--red);
}

/* ── Highlight Box ───────────────────────── */
.highlight-box {
    background: var(--light-gray);
    border-left: 4px solid var(--red);
    padding: 28px 32px;
    margin: 32px 0;
}

.highlight-box p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--dark-gray);
}

.highlight-box .highlight-source {
    font-size: 0.85rem;
    color: var(--medium-gray);
    margin-top: 12px;
    font-style: italic;
}

/* ── Legal Content (Impressum, Datenschutz) ─ */
.legal-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 48px 24px 72px;
}

.legal-content h2 {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border-gray);
}

.legal-content h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.legal-content h3 {
    margin-top: 24px;
}

.legal-content h4 {
    margin-top: 20px;
}

.legal-content ul {
    margin: 0 0 16px 24px;
    color: var(--dark-gray);
    line-height: 1.7;
}

.legal-content li {
    margin-bottom: 4px;
}

/* ── Footer ──────────────────────────────── */
footer {
    background: var(--black);
    color: #ccc;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 48px 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

footer h4 {
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
}

footer p,
footer a {
    font-size: 0.875rem;
    color: #aaa;
    line-height: 1.6;
}

footer a {
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    color: var(--white);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 6px;
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px 24px;
    border-top: 1px solid #333;
    font-size: 0.8rem;
    color: #666;
    text-align: center;
}

/* ── Cookie Consent Banner ───────────────── */
#consent-overlay {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    top: 0;
    display: flex;
    align-items: flex-end;
    transition: opacity 0.3s;
}

#consent-overlay.consent-hidden {
    opacity: 0;
    pointer-events: none;
}

#consent-banner {
    width: 100%;
    background: var(--white);
    padding: 28px 32px;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 32px;
    max-width: 960px;
    margin: 0 auto;
}

.consent-text {
    flex: 1;
}

.consent-text strong {
    display: block;
    font-size: 1rem;
    color: var(--black);
    margin-bottom: 6px;
}

.consent-text p {
    font-size: 0.85rem;
    color: var(--medium-gray);
    line-height: 1.55;
    margin-bottom: 0;
}

.consent-text a {
    color: var(--red);
    text-decoration: underline;
}

.consent-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.consent-btn {
    padding: 12px 22px;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font);
    transition: background 0.2s;
}

.consent-btn-accept {
    background: var(--black);
    color: var(--white);
}

.consent-btn-accept:hover {
    background: #333;
}

.consent-btn-reject {
    background: var(--light-gray);
    color: var(--dark-gray);
    border: 1px solid var(--border-gray);
}

.consent-btn-reject:hover {
    background: #eaeaea;
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .key-figures {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .findings-grid,
    .downloads,
    .study-info-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 16px 24px;
        border-bottom: 1px solid var(--border-gray);
        gap: 12px;
    }

    nav.open {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

    .sogs-table {
        font-size: 0.78rem;
    }

    .sogs-table th,
    .sogs-table td {
        padding: 8px 8px;
    }

    #consent-banner {
        flex-direction: column;
        gap: 16px;
        padding: 24px 20px;
    }

    .consent-actions {
        width: 100%;
    }

    .consent-btn {
        flex: 1;
    }
}
