/* Layout adapted from the SDR homepage (net-for-four.de, sdr-repository/SDR/homepage
   src/assets/css/main.css): sidebar + content column, design tokens, dark mode.
   Colours are goaround's own: sky blue for links, the logo's red as accent. */

:root {
    --bg: #f3f6f9;
    --surface: #ffffff;
    --surface-alt: #e5ebf1;
    --text: #1b2430;
    --text-muted: #556275;
    --accent: #c8102e;
    --accent-2: #0b5cad;
    --accent-2-hover: #094a8c;
    --accent-ink: #ffffff;
    --border: #d5dde6;
    --radius: 6px;
    --sidebar-width: 264px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #10151c;
        --surface: #161d26;
        --surface-alt: #1f2833;
        --text: #e4e9ef;
        --text-muted: #97a4b4;
        --accent: #ff5c6c;
        --accent-2: #6cb4ff;
        --accent-2-hover: #94c8ff;
        --accent-ink: #10151c;
        --border: #2a3441;
    }
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: light dark;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent-2);
}

h1,
h2,
h3 {
    font-family: Iowan Old Style, Palatino Linotype, Georgia, "Times New Roman", serif;
    font-weight: 600;
    text-wrap: balance;
    color: var(--text);
}

h1 {
    font-size: 34px;
    line-height: 1.18;
    margin: 0 0 12px;
    letter-spacing: -0.01em;
}

h2 {
    font-size: 22px;
    margin: 40px 0 12px;
}

h3 {
    font-size: 17px;
    margin: 26px 0 8px;
}

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

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 40px 0;
}

code {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.92em;
    background: var(--surface-alt);
    padding: 1px 5px;
    border-radius: 3px;
}

/* ---- site shell ---- */
.site {
    display: flex;
    max-width: 1680px;
    margin: 0 auto;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    padding: 32px 20px 40px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.brand {
    display: block;
    text-decoration: none;
    margin: 0 8px 28px;
}

.brand-name {
    display: block;
    font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
    font-weight: 900;
    font-size: 22px;
    line-height: 1.1;
    letter-spacing: 0.02em;
    color: var(--text);
}

.brand-o {
    color: var(--accent);
}

.brand-domain {
    display: block;
    font-size: 12.5px;
    color: var(--text-muted);
}

nav.site-nav {
    font-size: 14px;
}

nav.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

nav.site-nav > ul > li {
    margin-bottom: 2px;
}

nav.site-nav .nav-row {
    display: flex;
    align-items: center;
}

nav.site-nav .nav-row a {
    flex: 1;
    min-width: 0;
}

nav.site-nav .nav-toggle {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 0;
    background: none;
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text-muted);
}

nav.site-nav .nav-toggle:hover {
    background: var(--surface-alt);
    color: var(--text);
}

nav.site-nav .nav-toggle .chevron {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.15s ease;
}

nav.site-nav li.has-children.open > .nav-row .nav-toggle .chevron {
    transform: rotate(45deg);
}

nav.site-nav .nav-children {
    display: none;
    padding-left: 14px;
    border-left: 1px solid var(--border);
    margin: 2px 0 8px 8px;
}

nav.site-nav li.has-children.open > .nav-children {
    display: block;
}

nav.site-nav a {
    display: block;
    padding: 6px 8px;
    border-radius: var(--radius);
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
}

nav.site-nav a:hover {
    color: var(--text);
    background: var(--surface-alt);
}

nav.site-nav a[aria-current="page"] {
    color: var(--text);
    background: var(--surface-alt);
    box-shadow: inset 2px 0 0 var(--accent);
}

/* language flags at the bottom of the sidebar */
.lang-switcher {
    display: flex;
    gap: 6px;
    margin: 28px 8px 0;
}

.lang-switcher a {
    font-size: 1.4rem;
    line-height: 1;
    text-decoration: none;
    padding: 4px 6px;
    border-radius: var(--radius);
    opacity: 0.5;
    filter: grayscale(30%);
    transition: opacity 0.15s ease;
}

.lang-switcher a:hover {
    opacity: 0.9;
}

.lang-switcher a.active {
    opacity: 1;
    filter: none;
    background: var(--surface-alt);
    pointer-events: none;
}

.menu-toggle {
    display: none;
}

.main-col {
    flex: 1;
    min-width: 0;
}

.page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 56px 28px 48px;
}

.page-banner {
    display: block;
    width: 100%;
    height: clamp(140px, 22vw, 320px);
    object-fit: cover;
    object-position: center 40%;
}

header.hero {
    margin-bottom: 8px;
}

.lede {
    font-size: 17px;
    color: var(--text-muted);
    max-width: 62ch;
    margin: 0 0 6px;
}

.site-footer {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 12.5px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.site-footer a {
    color: var(--text-muted);
}

.site-footer a:hover {
    color: var(--text);
}

/* ---- homepage cards ---- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin: 28px 0 36px;
}

.card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.card img {
    display: block;
    width: 100%;
    height: 160px;
    object-fit: contain;
    background: var(--surface-alt);
    border-radius: calc(var(--radius) - 2px);
    margin-bottom: 12px;
}

.card h3 {
    margin: 0 0 6px;
    font-size: 15.5px;
    font-family: -apple-system, "Segoe UI", sans-serif;
    font-weight: 700;
}

.card p {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--text-muted);
}

/* ---- content pages (legal, app info, help) ---- */
.legal-page {
    max-width: 760px;
}

.help-page {
    max-width: 1000px;
}

.help-page h2 {
    margin-top: 2.5em;
    padding-top: 0.5em;
    border-top: 1px solid var(--border);
    scroll-margin-top: 20px;
}

.help-page h2:first-of-type {
    margin-top: 1.5em;
}

.help-toc {
    columns: 2;
    column-gap: 40px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 30px;
    margin: 20px 0 40px;
}

.help-toc li {
    break-inside: avoid;
}

.help-page table {
    border-collapse: collapse;
    width: 100%;
    margin: 16px 0;
}

.help-page th,
.help-page td {
    border: 1px solid var(--border);
    padding: 6px 10px;
    text-align: left;
    font-size: 0.95em;
}

.help-page th {
    background: var(--surface-alt);
}

.help-back {
    display: inline-block;
    margin-top: 30px;
}

.help-shot {
    display: block;
    max-width: min(100%, 640px);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    margin: 16px 0;
    cursor: zoom-in;
}

/* Smartphone-Screenshots (hochkant) nebeneinander statt in voller Breite */
.help-shots {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start; /* sonst streckt Flexbox Bilder mit anderem Seitenverhältnis auf die Zeilenhöhe */
    gap: 16px;
    margin: 16px 0;
}

.help-shots .help-shot {
    max-width: min(100%, 260px);
    margin: 0;
}

/* Apple-Watch-Screenshots: kleiner, schwarzer Hintergrund mit runden Ecken wie das Display. */
.help-shots-watch .help-shot {
    max-width: min(100%, 200px);
    border-color: #333;
    border-radius: 28px;
}

.info-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 30px 0;
}

.info-actions .button {
    display: inline-block;
    padding: 12px 22px;
    background-color: var(--accent-2);
    color: var(--accent-ink);
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: bold;
}

.info-actions .button:hover {
    background-color: var(--accent-2-hover);
}

.info-actions .play-badge {
    height: 54px;
    width: auto;
    display: block;
}

/* ---- lightbox (help screenshots) ---- */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: rgba(0, 0, 0, 0.85);
    cursor: zoom-out;
}

.lightbox-overlay[hidden] {
    display: none;
}

.lightbox-overlay img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 28px;
    background: none;
    border: 0;
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
}

/* ---- mobile: sidebar becomes a slide-in drawer ---- */
@media (max-width: 860px) {
    .site {
        display: block;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: 260px;
        background: var(--bg);
        z-index: 40;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        overflow-y: auto;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 8px 0 24px rgba(0, 0, 0, 0.25);
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        position: sticky;
        top: 0;
        z-index: 30;
        background: var(--bg);
        border: none;
        border-bottom: 1px solid var(--border);
        color: var(--text);
        font: inherit;
        font-weight: 600;
        padding: 14px 20px;
        width: 100%;
        text-align: left;
        cursor: pointer;
    }

    .page {
        padding: 32px 16px 48px;
    }

    h1 {
        font-size: 27px;
    }

    .help-toc {
        columns: 1;
    }
}

/* ---- Navsim-Anleitung: Kästen für die Schulungsteile (Lernziel, Hinweise für Lehrer) ---- */
.help-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent-2);
    border-radius: var(--radius);
    padding: 10px 16px;
    margin: 16px 0;
}

.help-box > :first-child { margin-top: 0; }
.help-box > :last-child { margin-bottom: 0; }

.help-box-title {
    display: block;
    font-weight: 700;
    margin-bottom: 4px;
}

/* Hinweise für Fluglehrer: andere Randfarbe, damit sie beim Durchblättern auffallen */
.help-box.teacher {
    border-left-color: var(--accent);
    background: var(--surface-alt);
}
