/*
Theme Name: Sausebrausmaus
Description: Nachbau von www.sausebrausmaus.de (Nicky's Reisewelt) – responsiv, Optik wie das Dreamweaver-Original.
Version: 0.4.1
Requires PHP: 8.4
Text Domain: sausebrausmaus
*/

/* ---- Farben & Schrift aus css_styles.css des Originals ---------------------- */
:root {
    --sbm-blau: #0C7DBF;      /* Ueberschriften, Links in Listen */
    --sbm-text: #000066;      /* Fliesstext */
    --sbm-orange: #FF6600;    /* "mit Kind bereist", Startseiten-Titel */
    --sbm-rahmen: #FF9900;    /* Teile-Box */
    --sbm-fuss: #FDF6E6;      /* Fussbereich */
    --sbm-breite: 1280px;     /* Gesamtbreite wie bisher */
    --sbm-spalte: 712px;      /* Textspalte wie bisher */
    --sbm-schrift: Arial, Helvetica, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: #fff;
    color: var(--sbm-text);
    font-family: var(--sbm-schrift);
    font-size: 15px;
    line-height: 1.35;
}

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

a { color: var(--sbm-text); }
a:hover { color: var(--sbm-blau); }

hr {
    border: 0;
    border-top: 1px solid #b4b4b4;
    margin: 16px 0;
}

/* ---- Seitenrahmen --------------------------------------------------------- */
.sbm-seite {
    max-width: var(--sbm-breite);
    margin: 0 auto;
    padding: 8px;
}

/* ---- Kopf: Banner, Kopfbilder, Bild-Navigation ---------------------------- */
.sbm-logo img,
.sbm-kopflinie {
    display: block;
    width: 100%;
}
.sbm-kopflinie { height: 12px; object-fit: cover; }

.sbm-kopfbilder {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 12px 8px 0;
}
.sbm-kopfbilder img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    display: block;
}

.sbm-nav {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    justify-items: center;
    gap: 8px;
    padding: 18px 8px 8px;
}
.sbm-nav a { display: block; line-height: 0; }
.sbm-nav img { width: 100px; height: 16px; }

/* ---- Titelbereich ---------------------------------------------------------- */
.sbm-titel {
    text-align: center;
    margin: 8px auto 24px;
}
.sbm-titel h1 {
    color: var(--sbm-blau);
    font-size: 32px;
    font-weight: bold;
    margin: 0;
    line-height: 1.2;
}
.sbm-titel .untertitel {
    color: var(--sbm-blau);
    font-size: 15px;
    font-weight: bold;
    margin: 2px 0 0;
}
.sbm-titel .linie {
    width: 60%;
    margin: 8px auto 0;
}
.sbm-titel-orange h1 {
    color: var(--sbm-orange);
    font-size: 30px;
    margin-bottom: 12px;
}

/* ---- Textspalte ------------------------------------------------------------ */
.sbm-text {
    max-width: var(--sbm-spalte);
    margin: 0 auto;
}
.sbm-text-breit { max-width: 880px; }

.sbm-text p { margin: 0 0 14px; }
.sbm-text h2,
.sbm-teil-ueberschrift {
    color: var(--sbm-blau);
    font-size: 15px;
    font-weight: bold;
    margin: 24px 0 10px;
}
.sbm-text h3 {
    color: var(--sbm-blau);
    font-size: 15px;
    font-weight: bold;
    margin: 18px 0 8px;
}
.sbm-text h2.gross { font-size: 20px; }
.sbm-start .sbm-text h2 { text-align: center; }
.sbm-start .sbm-text h2.gross { font-size: 22px; margin-top: 28px; }
.sbm-text .orange,
.sbm-text a.orange { color: var(--sbm-orange); }
.sbm-text .blau { color: var(--sbm-blau); }
.sbm-text .mitte { text-align: center; }
.sbm-text .klein { font-size: 11px; }

/* Bilder neben dem Text wie in den alten Tabellen-Layouts */
.sbm-bild { margin: 0 0 12px; max-width: 100%; }
.sbm-bild img { display: block; }
.sbm-bild.alignleft  { float: left;  margin-right: 16px; max-width: 50%; }
.sbm-bild.alignright { float: right; margin-left: 16px;  max-width: 50%; }
.sbm-bild.aligncenter { margin-left: auto; margin-right: auto; text-align: center; }
.sbm-absatz::after { content: ""; display: table; clear: both; }
.sbm-absatz { margin-bottom: 10px; }

/* Bilderreihe (mehrere Bilder nebeneinander) */
.sbm-reihe {
    display: grid;
    grid-template-columns: repeat(var(--spalten, 4), 1fr);
    gap: 4px;
    margin: 0 0 18px;
}
.sbm-reihe img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Ziele-Liste der Kontinent-Seiten */
.sbm-ziele {
    border-collapse: separate;
    border-spacing: 2px;
    margin: 0 auto 24px;
    min-width: 420px;
}
.sbm-ziele td {
    border: 1px solid #ddd;
    padding: 2px 4px;
    vertical-align: top;
}
.sbm-ziele td.land {
    text-align: right;
    font-weight: bold;
    color: var(--sbm-blau);
    width: 50%;
}
.sbm-ziele tr.neues-land td { border-top-color: #bbb; }
.sbm-ziele a.orange { color: var(--sbm-orange); }
.sbm-ziele .neu { color: var(--sbm-orange); font-weight: bold; }

/* ---- Mehrteilige Berichte ---------------------------------------------------- */
.sbm-blaettern {
    max-width: var(--sbm-spalte);
    margin: 24px auto 8px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-weight: bold;
}
.sbm-blaettern a { color: var(--sbm-blau); }
.sbm-blaettern .weiter { margin-left: auto; text-align: right; }

.sbm-teile {
    max-width: 380px;
    margin: 24px auto 8px;
    border: 2px solid var(--sbm-rahmen);
    padding: 2px;
}
.sbm-teile ul { list-style: none; margin: 0; padding: 0; }
.sbm-teile li {
    border: 1px solid var(--sbm-rahmen);
    margin: 2px;
    padding: 1px 3px;
}
.sbm-teile a { color: #00f; }
.sbm-teile li.aktuell a { font-weight: bold; color: var(--sbm-text); text-decoration: none; }

/* ---- Fuss --------------------------------------------------------------- */
.sbm-fuss { margin-top: 32px; }
.sbm-fuss-box {
    background: var(--sbm-fuss);
    text-align: center;
    padding: 16px 8px;
    font-size: 11px;
}
.sbm-fuss-box p { margin: 8px 0; }
.sbm-fuss-box .links { font-size: 11px; }

/* ---- Fotoalben (Galerie-Block + Lightbox) ----------------------------------- */
.sbm-text .wp-block-gallery {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px 10px;
    align-items: end;
    margin: 0 0 24px;
    padding: 0;
}
.sbm-text .wp-block-gallery .wp-block-image {
    margin: 0;
    text-align: center;
    width: auto !important;
}
.sbm-text .wp-block-gallery img {
    display: block;
    margin: 0 auto;
    max-height: 140px;
    width: auto;
    border: 1px solid #ccc;
}
.sbm-text .wp-block-gallery figcaption {
    position: static !important;
    background: none !important;
    color: var(--sbm-text) !important;
    font-size: 12px;
    padding: 4px 0 0 !important;
    text-shadow: none !important;
    max-height: none !important;
    overflow: visible !important;
}
.sbm-lb-offen { overflow: hidden; }
.sbm-lightbox {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0, 0, 40, .92);
    display: flex; align-items: center; justify-content: center;
}
.sbm-lightbox figure { margin: 0; text-align: center; max-width: 92vw; }
.sbm-lightbox img { max-width: 92vw; max-height: 80vh; border: 3px solid #fff; display: block; margin: 0 auto; }
.sbm-lightbox figcaption { color: #fff; font-size: 15px; margin-top: 10px; }
.sbm-lightbox button {
    position: absolute; background: none; border: 0; color: #fff; cursor: pointer;
    font-size: 48px; line-height: 1; padding: 8px 14px;
}
.sbm-lb-zu { top: 8px; right: 12px; }
.sbm-lb-zurueck { left: 8px; top: 50%; transform: translateY(-50%); }
.sbm-lb-weiter { right: 8px; top: 50%; transform: translateY(-50%); }
.sbm-lb-zaehler { position: absolute; bottom: 12px; color: #ccc; font-size: 13px; }

/* ---- WordPress-Standards ---------------------------------------------------- */
.alignleft { float: left; margin-right: 16px; }
.alignright { float: right; margin-left: 16px; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.screen-reader-text { position: absolute; left: -9999px; }
.sbm-liste { padding-left: 18px; }

/* ---- Mobil ------------------------------------------------------------------ */
@media (max-width: 900px) {
    .sbm-kopfbilder { gap: 8px; }
    .sbm-text .wp-block-gallery { grid-template-columns: repeat(3, 1fr); }
    .sbm-nav { grid-template-columns: repeat(4, 1fr); row-gap: 12px; }
}

@media (max-width: 600px) {
    .sbm-seite { padding: 0 0 8px; }
    .sbm-kopfbilder { grid-template-columns: repeat(2, 1fr); gap: 4px; padding: 6px 4px 0; }
    .sbm-inhalt, .sbm-fuss { padding: 0 16px; }
    .sbm-titel h1 { font-size: 26px; }
    .sbm-titel .linie { width: 90%; }
    .sbm-bild.alignleft,
    .sbm-bild.alignright {
        float: none;
        max-width: 100%;
        margin: 0 auto 12px;
    }
    .sbm-bild img { margin: 0 auto; }
    .sbm-reihe { grid-template-columns: repeat(2, 1fr); }
    .sbm-text .wp-block-gallery { grid-template-columns: repeat(2, 1fr); }
    .sbm-text .wp-block-gallery img { max-height: none; width: 100%; }
    .sbm-lightbox button { font-size: 36px; }
    .sbm-ziele { min-width: 0; width: 100%; }
    .sbm-ziele td.land { width: 40%; }
}

/* ---- Fotoalben-Uebersichten (Kacheln wie im Original) ------------------------- */
.sbm-alben {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    max-width: 692px;
    margin: 0 auto 24px;
}
.sbm-album {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    border: 1px solid #bbb;
    padding: 10px 6px;
    text-decoration: none;
    text-align: center;
}
.sbm-album img { width: 150px; height: 112px; object-fit: cover; order: 2; }
.sbm-album .titel { color: var(--sbm-blau); font-weight: bold; font-size: 13px; order: 1; }
.sbm-album .jahr { color: var(--sbm-text); font-size: 12px; order: 3; }
.sbm-album:hover { border-color: var(--sbm-blau); }
@media (max-width: 600px) {
    .sbm-alben { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .sbm-album img { width: 100%; height: auto; aspect-ratio: 4 / 3; }
}

/* Zwischenueberschriften in den Kontinent-Menues (z. B. "Nahost", "Fernost") */
.sbm-ziele tr.bereich td {
    border: 0;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    color: var(--sbm-orange);
    padding: 14px 4px 6px;
}
