/* ==========================================================
   MUKUBI – Enfants du Kasaï · Stylesheet
   Stand: Oktober 2026
   ========================================================== */

/* ---------- Schrift Ubuntu (selbst gehostet, kein Google-Server) ---------- */
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/ubuntu-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/ubuntu-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/ubuntu-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Ubuntu'; font-style: italic; font-weight: 500; font-display: swap; src: url('fonts/ubuntu-latin-500-italic.woff2') format('woff2'); }
@font-face { font-family: 'Ubuntu'; font-style: italic; font-weight: 700; font-display: swap; src: url('fonts/ubuntu-latin-700-italic.woff2') format('woff2'); }

/* ---------- Farben ----------
   --primary-color  #38B6FF  nur für Rahmen und Dekoration (Kontrast zu Weiss 2.3:1)
   --accent-text    #0069A6  für Text, Links, Icons (Kontrast zu Weiss 5.9:1, zu #d6f0ff 5.0:1) */
:root {
    --primary-color: #38B6FF;
    --accent-text: #0069A6;
    --accent-red: #B02A26;
    --border-width: 3pt;
    --border-radius: 20pt;
    --text-color: #333333;
    --muted-text: #595959;
    --bg-color: #f8f9fa;
    --footer-bg: #d6f0ff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html {
    font-size: 16px;
    scroll-padding-top: 130px; /* fokussierte Elemente nicht unter dem Sticky-Header verstecken */
}

body {
    font-family: 'Ubuntu', system-ui, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    line-height: 1.6;
}

/* ---------- Barrierefreiheit ---------- */
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: -999px; top: 0;
    background: #ffffff; color: var(--accent-text);
    padding: 10px 16px; z-index: 2000;
    border-radius: 0 0 8px 0; font-weight: 700;
}
.skip-link:focus { left: 0; }

button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--accent-text);
    outline-offset: 2px;
    border-radius: 4px;
}

button { font: inherit; color: inherit; }

/* ---------- Container ---------- */
.app-container {
    width: 100%;
    max-width: 430px;
    background-color: #ffffff;
    border: var(--border-width) solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: relative;
}

/* ---------- Sticky Header ---------- */
.header {
    position: sticky; top: 0;
    background-color: #ffffff;
    text-align: center;
    padding: 10px 44px;
    margin: -15px -15px 15px -15px;
    border-top-left-radius: calc(var(--border-radius) - var(--border-width));
    border-top-right-radius: calc(var(--border-radius) - var(--border-width));
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.header img.logo { max-width: 100%; height: auto; display: block; margin: 0 auto; }

/* Play/Pause aller Animationen (diskret) */
.motion-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; padding: 0;
    background: none; border: none; border-radius: 50%;
    color: var(--muted-text); cursor: pointer;
}
.motion-toggle:hover { background: #eef8ff; color: var(--accent-text); }
.motion-toggle svg { width: 24px; height: 24px; display: block; }
.motion-toggle .icon-play { display: none; }
.motion-toggle[aria-pressed="true"] .icon-play { display: block; }
.motion-toggle[aria-pressed="true"] .icon-pause { display: none; }
.header .motion-toggle { position: absolute; top: 6px; right: 6px; }

/* Infobulle (Tooltip) für Icon-Buttons */
.has-tip { position: relative; }
.has-tip .tip {
    position: absolute; top: calc(100% + 6px); right: 0;
    background: #333; color: #fff;
    font-size: 0.75rem; line-height: 1.3; font-weight: 400; font-style: normal;
    white-space: nowrap; padding: 4px 8px; border-radius: 6px;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.15s;
    z-index: 10;
}
.has-tip:hover .tip,
.has-tip:focus-visible .tip { opacity: 1; visibility: visible; }

.slogan {
    color: var(--accent-text);
    font-style: italic; font-weight: 500;
    text-align: center;
    margin: 15px 0;
    font-size: 1.1rem;
}

/* ---------- Layout ---------- */
.main-layout { display: flex; flex-direction: column; gap: 20px; }
.content-area { width: 100%; }
.sidebar-area { width: 100%; display: none; }
.donation-inline { display: block; }

.hero-img {
    width: 100%; height: auto;
    border-radius: 10px; display: block; margin-bottom: 20px;
}

/* ---------- Spendenblock ---------- */
.twint-block {
    text-align: center;
    margin: 20px 0;
    background: #f0f9ff;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #cceeff;
}
.twint-link { text-decoration: none; display: block; }
.twint-hint {
    font-size: 0.8rem; color: var(--accent-text);
    margin-top: -4px; margin-bottom: 8px; font-weight: 500;
}
.twint-img {
    width: 100%; max-width: 280px; height: auto;
    display: block; margin: 0 auto 8px auto;
}

.iban-row {
    display: flex; align-items: center; justify-content: center;
    flex-wrap: wrap; gap: 4px;
}
.iban-text { color: var(--accent-text); font-size: 0.9rem; font-weight: 500; }
.iban-copy {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; padding: 0;
    background: none; border: none; border-radius: 50%;
    color: var(--accent-text); cursor: pointer;
}
.iban-copy:hover { background: #e2f3ff; }
.iban-copy svg { width: 18px; height: 18px; display: block; }
.iban-copy .tip { right: 50%; transform: translateX(50%); }
.iban-copy.is-copied .tip { opacity: 1; visibility: visible; }

.thank-you-title {
    color: var(--accent-text);
    font-style: italic; font-weight: 700;
    font-size: 1.2rem; margin-top: 5px;
}

/* ---------- Inhalte ---------- */
.section-title {
    font-size: 1.3rem; color: #444;
    margin-top: 25px; margin-bottom: 8px; font-weight: 700;
}
#en-savoir-plus-section { scroll-margin-top: 130px; }

.ol-list {
    padding-left: 20px; margin: 10px 0;
    color: var(--accent-red); font-weight: 500;
}
.ol-list li span { color: var(--text-color); font-weight: 400; }

.label-accent { color: var(--accent-text); font-weight: 700; }

.text-link { color: var(--accent-text); text-decoration: underline; }

.tshiluba-text { color: var(--accent-text); font-weight: 500; margin-bottom: 10px; }

/* ---------- Akkordeon ---------- */
.toggle-btn {
    color: var(--accent-text);
    font-size: 1.4rem; font-weight: 700;
    cursor: pointer; user-select: none;
    display: inline-block; line-height: 1; vertical-align: middle;
}

button.item-header {
    background: none; border: none;
    width: 100%; text-align: left;
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; font-weight: 500; color: #555;
    padding: 4px 0;
}
.item-header .toggle-btn { width: 2rem; text-align: center; margin-left: 5px; }

button.toggle-btn-standalone {
    background: none; border: none;
    width: 2rem; height: 2rem;
    margin-left: 4px;
    font-style: normal;
}

.close-bottom-btn {
    display: block; width: 2.2rem; height: 2.2rem;
    margin: 10px 0 0 auto; padding: 0;
    background: none; border: none;
    text-align: center;
    color: var(--accent-text);
    font-size: 1.4rem; font-weight: 700;
    cursor: pointer; user-select: none; line-height: 1;
}

.toggle-content {
    display: none;
    text-align: left;
    margin-top: 10px; margin-bottom: 15px;
    font-size: 1rem; line-height: 1.6;
    color: var(--text-color);
}
.toggle-content.active { display: block; }

.en-savoir-plus-list { list-style: none; padding: 0; }
.en-savoir-plus-item { border-bottom: 1px dashed #ccc; padding: 10px 0; }
.en-savoir-plus-item:last-child { border-bottom: none; }

/* ---------- Medien ---------- */
.world-map-img {
    width: 40%; max-width: 250px; height: auto;
    display: block; margin: 15px 0;
}

/* Karte erst nach Einwilligung laden */
.map-consent {
    position: relative;
    width: 100%;
    padding-top: 43.478%;
    border-radius: 8px; overflow: hidden;
    margin-bottom: 15px;
    background: #e8e8e8;
}
.map-consent.is-loaded { background: transparent; }
.map-consent-preview {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.map-consent-overlay {
    position: absolute; inset: 0;
    background: rgba(255, 255, 255, 0.78);
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 10px 12px;
}
.map-consent-text {
    text-align: left; font-size: 0.78rem; line-height: 1.35;
    color: #2c2c2c; max-width: 90%;
}
.map-consent-btn {
    align-self: flex-start;
    display: inline-flex; align-items: center; gap: 8px;
    background: #ffffff;
    border: 1px solid #cccccc; border-radius: 20px;
    padding: 6px 14px 6px 8px;
    cursor: pointer;
    font-size: 0.85rem; color: #333333;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.map-consent-btn:hover { background: #f5f5f5; }
.map-consent-btn img { width: 20px; height: 20px; display: block; }
.map-consent iframe {
    position: absolute; inset: 0;
    width: 100%; height: 100%; border: none;
}

/* ---------- Galerien ---------- */
.gallery-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; margin: 22px 0 10px 0;
}
.gallery-title { font-size: 1.1rem; font-weight: 700; color: #444; }

.view-toggle {
    flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 4px;
    background: none; border: none; border-radius: 6px;
    color: #1f1f1f; cursor: pointer; line-height: 0;
}
.view-toggle:hover { background: #eef8ff; }
.view-toggle svg { width: 28px; height: 28px; }
.view-toggle .icon-tiles { display: none; }
[data-view="carousel"] .view-toggle .icon-tiles { display: inline; }
[data-view="carousel"] .view-toggle .icon-display { display: none; }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 10px;
    align-items: start;
    margin-bottom: 10px;
}
[data-view="carousel"] .gallery-grid { display: none; }

.gallery-item img {
    width: 100%; height: auto;
    aspect-ratio: 1 / 1; object-fit: cover;
    border-radius: 10px; display: block;
}
.gallery-item figcaption {
    margin-top: 6px; font-size: 0.85rem; line-height: 1.35; color: #555;
}

/* Vorschau im geschlossenen Zustand */
.preview-grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 10px; margin-top: 12px;
}
.item-header[aria-expanded="true"] + .preview-grid { display: none; }
.pv-tile {
    position: relative; aspect-ratio: 1 / 1;
    border-radius: 10px; overflow: hidden; background: #eef3f6;
}
.pv-tile:nth-child(n+3) { display: none; }
.pv-tile img {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: cover;
    opacity: 0; transition: opacity 0.9s ease;
}
.pv-tile img.is-on { opacity: 1; }

/* Karussell */
.carousel { display: none; max-width: 560px; margin: 0 auto 10px auto; }
[data-view="carousel"] .carousel { display: block; }
.carousel-viewport {
    overflow: hidden; border-radius: 12px;
    touch-action: pan-y; user-select: none; -webkit-user-select: none;
    cursor: grab;
}
.carousel-viewport:active { cursor: grabbing; }
.carousel-track { display: flex; will-change: transform; }
.carousel-slide { flex: 0 0 100%; min-width: 0; }
.carousel-slide img {
    width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover;
    display: block; -webkit-user-drag: none; pointer-events: none;
}
.carousel-slide figcaption {
    padding: 8px 2px 0; font-size: 0.95rem; line-height: 1.4;
    color: #555; text-align: center;
}
.carousel-controls {
    display: flex; align-items: center; justify-content: center;
    gap: 6px; margin-top: 10px;
}
.carousel-arrow {
    background: none; border: none;
    min-width: 36px; height: 36px; padding: 0 8px;
    font-size: 1.6rem; line-height: 1;
    color: var(--accent-text); cursor: pointer;
}
.carousel-dots { display: flex; flex-wrap: wrap; justify-content: center; }
.carousel-dot {
    background: none; border: none;
    padding: 8px 5px; cursor: pointer; line-height: 0;
}
.carousel-dot::before {
    content: ""; display: inline-block;
    width: 9px; height: 9px; border-radius: 50%;
    background: #ffffff; border: 1.5px solid var(--accent-text);
}
.carousel-dot[aria-current="true"]::before { background: var(--accent-text); }

/* ---------- Partner ---------- */
.partners-list { list-style: disc; padding-left: 20px; margin-top: 8px; }
.partners-list li { margin-bottom: 10px; }
.partners-subtitle { font-weight: 700; margin-top: 10px; color: #555; }
.partners-subtitle--spaced { margin-top: 15px; }
.partner-logo-val { width: 140px; height: auto; display: inline-block; vertical-align: top; }

/* ---------- Footer im Rahmen ---------- */
.footer-box {
    background-color: var(--footer-bg);
    margin: 25px -15px -15px -15px;
    padding: 20px 14px;
    border-bottom-left-radius: calc(var(--border-radius) - var(--border-width));
    border-bottom-right-radius: calc(var(--border-radius) - var(--border-width));
    font-size: 0.9rem;
}
.footer-columns { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.footer-col h2 { color: #444; margin-bottom: 8px; font-size: 1rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; display: flex; align-items: center; }

.contact-icon {
    width: 24px; height: auto; max-height: 24px; object-fit: contain;
    margin-right: 8px; display: inline-block; vertical-align: middle;
}
.contact-link { color: var(--text-color); text-decoration: none; line-height: 24px; display: inline-block; }
.contact-link:hover { text-decoration: underline; }
.download-link { color: #444; text-decoration: underline; }
.download-soon { color: var(--muted-text); }

/* ---------- Rechtszeile: Impressum · Confidentialité · Légal ---------- */
.legal-bar {
    border-top: 1px solid #a9d8f7;
    padding-top: 10px;
}
.legal-row {
    display: flex; flex-wrap: nowrap; align-items: center;
    justify-content: flex-start;
    gap: 8px;
    list-style: none;
    white-space: nowrap;
}
.legal-btn {
    display: inline-flex; align-items: center; gap: 4px;
    background: none; border: none; padding: 4px 0;
    color: #2b2b2b; cursor: pointer;
    font-size: clamp(0.72rem, 3.5vw, 0.9rem);
    font-weight: 500;
}
.legal-btn:hover .legal-label { text-decoration: underline; }
.legal-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.35em; height: 1.35em; flex: 0 0 auto;
    border-radius: 50%;
    background: var(--accent-text); color: #ffffff;
    transition: transform 0.2s ease;
}
.legal-icon svg { width: 1.05em; height: 1.05em; display: block; }
.legal-btn[aria-expanded="true"] .legal-icon { transform: rotate(180deg); }

.legal-panel {
    margin-top: 8px;
    background: #ffffff;
    border: 1px solid #a9d8f7;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.85rem;
    line-height: 1.45;
    max-height: calc(10 * 1.45em + 20px); /* ca. 10 Zeilen */
    overflow-y: auto;
    color: var(--text-color);
}
.legal-panel h3 { font-size: 0.9rem; color: #333; margin-bottom: 4px; }
.legal-panel p { margin-bottom: 6px; }
.legal-panel p:last-child { margin-bottom: 0; }
.legal-panel strong { color: #333; }
.legal-panel a { color: var(--accent-text); }

/* ---------- Footer ausserhalb des Rahmens ---------- */
.external-footer {
    width: 100%; max-width: 430px;
    margin-top: 15px;
    font-size: 0.8rem; color: var(--muted-text);
    text-align: left; padding: 0 5px; line-height: 1.5;
}
.external-footer a { color: var(--accent-text); text-decoration: none; }
.external-footer a:hover { text-decoration: underline; }
.external-footer .webmaster-icon {
    height: 1.15em; width: auto;
    vertical-align: -0.2em; margin-right: 0.35em;
}

/* ---------- Weniger Bewegung, falls im System eingestellt ---------- */
@media (prefers-reduced-motion: reduce) {
    .pv-tile img, .legal-icon { transition: none; }
}

/* ==========================================================
   LAPTOP & DESKTOP (ab 1024px)
   ========================================================== */
@media (min-width: 1024px) {
    html { font-size: 18px; }
    body { padding: 30px; }

    .app-container { max-width: 1100px; padding: 30px; }

    .header { margin: -30px -30px 20px -30px; padding: 20px 60px; }
    .header img.logo { max-width: 450px; }
    .header .motion-toggle { top: 12px; right: 14px; }

    .main-layout {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 40px;
        align-items: start;
    }
    .sidebar-area { display: block; position: sticky; top: 140px; }
    .donation-inline { display: none; }

    .gallery-grid { grid-template-columns: repeat(4, 1fr); gap: 16px 12px; }
    .preview-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
    .pv-tile:nth-child(n+3) { display: block; }

    .footer-box { margin: 40px -30px -30px -30px; padding: 30px; }
    .footer-columns { justify-content: flex-start; gap: 80px; }
    .legal-row { gap: 24px; }
    .legal-btn { font-size: 0.85rem; }
    .legal-panel { max-width: 720px; }

    .external-footer {
        max-width: 1100px;
        display: flex; justify-content: space-between; gap: 20px;
    }
}
