/* =========================================================
   MACWISSEN – SYSTEMWERKSTATT
   Datei: terminal.css

   Eigenständige Gestaltung für die Terminal-Referenz.
   Farbkonzept passend zum Wiki:
   Creme, Beige, Gold und dunkle Schrift.

   Alle Klassen verwenden das Präfix "terminal-".
   Bestehende Blog-, Galerie- und Artikelklassen bleiben
   unverändert.
   ========================================================= */


/* ---------------------------------------------------------
   1. GRUNDSTRUKTUR
   --------------------------------------------------------- */

.terminal-seite {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 0px 30px;
    box-sizing: border-box;

    color: #302b24;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.7;

    overflow-wrap: anywhere;
}

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

.terminal-seite section {
    margin: 0 0 25px;
}

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

/* =========================================================
   BLOG – POSTER
   Großes Aufmacherbild für Blog-Artikel
   ========================================================= */

.terminal-poster {
    width: 100%;
    max-width: none;
    margin: 0 0 30px 0;
    padding: 0;
    text-align: center;
    box-sizing: border-box;
}

/* Kleine Leiste über dem Poster */

.terminal-poster-label {
    display: inline-block;

    margin: 0 0 10px 0;
    padding: 5px 18px;

    color: #6f5a22;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.82rem;
    font-weight: bold;

    letter-spacing: 3px;
    text-transform: uppercase;

    border: 1px solid rgba(105, 82, 35, 0.45);
    border-radius: 5px;

    background: rgba(194, 171, 89, 0.16);

    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Poster-Link */

.terminal-poster-link {
    display: block;

    width: 100%;
    margin: 0;
    padding: 0;

    border: 0;
    border-radius: 8px;

    background: transparent;

    text-decoration: none;

    box-shadow: none;
}

/* Posterbild */

.terminal-poster img {
    display: block;
    width: 30%;
    max-width: none;
    height: auto;

    margin: 0 auto;
    padding: 0;

    object-fit: cover;

    border: 0px solid rgba(105, 82, 35, 0.55);
    border-radius: 8px;

    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.20);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
        
    box-shadow: none;
}

.terminal-poster-link:hover img {
    transform: scale(1.015);

    border-color: rgba(194, 171, 89, 0.95);

    box-shadow:
        0 7px 20px rgba(0, 0, 0, 0.28);
        
    box-shadow: none;    
}


/* =========================================================
   BLOG – POSTER MOBILE
   ========================================================= */

@media (max-width: 860px) {

    .terminal-poster {
        max-width: 100%;
        margin: 0 auto 25px auto;
    }

    .terminal-poster img {
        max-width: 100%;
    }
}


@media (max-width: 600px) {

    .terminal-poster {
        width: 100%;
        margin: 0 auto 20px auto;
    }

    .terminal-poster-label {
        margin-bottom: 8px;
        padding: 4px 13px;

        font-size: 0.72rem;
        letter-spacing: 2px;
    }

    .terminal-poster img {
        width: 100%;
        height: auto;

        border-radius: 6px;

        box-shadow:
            0 3px 10px rgba(0, 0, 0, 0.18);
            
        box-shadow: none;
    }

    .terminal-poster-link:hover img {
        transform: none;
    }
}

/* ---------------------------------------------------------
   2. KOPFBEREICH
   --------------------------------------------------------- */

.terminal-kopf {
    margin: 0 0 28px;
    padding: 24px 20px;

    text-align: center;

    color: #302b24;
    background: linear-gradient(
        135deg,
        #fffdf7 0%,
        #f7f0df 100%
    );

    border: 1px solid #b9a477;
    border-radius: 9px;

    box-shadow: 0 3px 9px rgba(70, 55, 30, 0.12);
}

.terminal-label {
    display: inline-block;
    margin: 0 0 12px;
    padding: 5px 13px;

    color: #72581e;
    background: #f1e7cf;

    border: 1px solid #c6b184;
    border-radius: 4px;

    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.terminal-seite h1 {
    margin: 0 0 12px;

    color: #29251f;
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    line-height: 1.25;
    font-weight: 700;
}

.terminal-untertitel {
    max-width: 900px;
    margin: 0 auto;
    padding-top: 12px;

    color: #62543e;
    font-size: 1.05rem;

    border-top: 2px solid #a58a4b;
}


/* ---------------------------------------------------------
   3. INHALTSBEREICHE
   --------------------------------------------------------- */

.terminal-bereich {
    margin-bottom: 25px;
    padding: 22px;

    color: #302b24;
    background: rgba(255, 253, 247, 0.94);

    border: 1px solid #d0c2a1;
    border-radius: 8px;

    box-shadow: 0 2px 6px rgba(70, 55, 30, 0.07);
}

.terminal-haupttext {
    border-left: 4px solid #b59a5b;
}

.terminal-seite h2 {
    margin: 0 0 16px;
    padding-bottom: 10px;

    color: #393024;
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    line-height: 1.35;

    border-bottom: 1px solid #b9a477;
}

.terminal-seite h3 {
    margin: 24px 0 10px;

    color: #655027;
    font-size: 1.2rem;
    line-height: 1.4;
}

.terminal-seite h4 {
    margin: 18px 0 8px;

    color: #51432d;
    font-size: 1.05rem;
}

.terminal-seite p {
    margin: 0 0 16px;
}

.terminal-seite p:last-child {
    margin-bottom: 0;
}

.terminal-seite strong {
    color: #393024;
}


/* ---------------------------------------------------------
   4. INHALTSÜBERSICHT UND NAVIGATION
   --------------------------------------------------------- */

.terminal-inhaltsverzeichnis {
    display: grid;

    /* Überschrift und Linkliste untereinander anordnen */
    grid-template-columns: 1fr;

    gap: 12px;
    margin: 20px 0;
}

.terminal-inhaltslink {
    display: block;
    min-width: 0;
    padding: 13px 15px;

    color: #393024;
    text-decoration: none;

    background: #f8f2e5;
    border: 1px solid #c9b88f;
    border-radius: 6px;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.terminal-inhaltslink:hover,
.terminal-inhaltslink:focus {
    color: #2f281c;
    text-decoration: none;

    background: #efe2c4;
    border-color: #a98a43;
}

.terminal-inhaltslink:focus-visible {
    outline: 2px solid #9c7b34;
    outline-offset: 3px;
}

.terminal-buchstabe {
    display: inline-block;
    min-width: 30px;
    margin-right: 8px;

    color: #806323;
    font-weight: 700;
}


/* ---------------------------------------------------------
   5. BEFEHLSBLÖCKE
   --------------------------------------------------------- */

.terminal-befehlsblock {
    min-width: 0;
    margin: 22px 0;

    overflow: hidden;

    color: #302b24;
    background: #fffdf8;

    border: 1px solid #c9b88f;
    border-radius: 7px;

    box-shadow: 0 2px 5px rgba(70, 55, 30, 0.06);
}

.terminal-befehlskopf {
    padding: 13px 17px;

    background: #f0e5cb;
    border-bottom: 1px solid #c9b88f;
}

.terminal-befehlsname {
    display: block;
    margin-bottom: 4px;

    color: #5d481e;
    font-size: 1.08rem;
    font-weight: 700;
}

.terminal-befehlszweck {
    display: block;

    color: #5c5140;
    font-size: 0.93rem;
}

.terminal-befehlsinhalt {
    min-width: 0;
    padding: 17px;
    background: #fffdf8;
}

.terminal-befehlsinhalt > :last-child {
    margin-bottom: 0;
}


/* ---------------------------------------------------------
   6. TERMINAL-BEFEHLE UND CODE
   --------------------------------------------------------- */

.terminal-code {
    display: block;
    max-width: 100%;
    margin: 12px 0 16px;
    padding: 15px;

    overflow-x: auto;

    color: #f8f1df;
    background: #37342e;

    border: 1px solid #625746;
    border-left: 4px solid #c2a15b;
    border-radius: 5px;

    font-family: Menlo, Monaco, Consolas, monospace;
    font-size: 0.92rem;
    line-height: 1.65;

    white-space: pre;
    overflow-wrap: normal;

    -webkit-overflow-scrolling: touch;
}

.terminal-code code {
    padding: 0;

    color: inherit;
    background: transparent;
    border: 0;

    font: inherit;
    white-space: inherit;
}

.terminal-inlinecode {
    display: inline;
    padding: 2px 5px;

    color: #493a20;
    background: #f1e7d2;

    border: 1px solid #ded0b1;
    border-radius: 3px;

    font-family: Menlo, Monaco, Consolas, monospace;
    font-size: 0.9em;

    overflow-wrap: anywhere;
}

.terminal-codehinweis {
    margin-top: -7px;

    color: #655943;
    font-size: 0.9rem;
}


/* ---------------------------------------------------------
   7. BEISPIELAUSGABEN
   --------------------------------------------------------- */

.terminal-ausgabe {
    margin: 12px 0 18px;
    padding: 15px;

    overflow-x: auto;

    color: #39352d;
    background: #f1ede3;

    border: 1px solid #d2c7b1;
    border-radius: 5px;

    font-family: Menlo, Monaco, Consolas, monospace;
    font-size: 0.88rem;
    line-height: 1.6;

    white-space: pre;
    -webkit-overflow-scrolling: touch;
}

.terminal-ausgabe-titel {
    display: block;
    margin-bottom: 8px;

    color: #715824;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
}


/* ---------------------------------------------------------
   8. HINWEISE UND RISIKOKENNZEICHNUNGEN
   --------------------------------------------------------- */

.terminal-hinweis {
    margin: 18px 0;
    padding: 15px 17px;

    color: #302b24;
    border: 1px solid;
    border-radius: 6px;
}

.terminal-hinweis-titel {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
}


/* Diagnose: dezentes Blau */

.terminal-diagnose {
    background: #edf3f7;
    border-color: #9db8ca;
}

.terminal-diagnose .terminal-hinweis-titel {
    color: #315b77;
}


/* Wartung: dezentes Grün */

.terminal-wartung {
    background: #edf4e9;
    border-color: #a8c29a;
}

.terminal-wartung .terminal-hinweis-titel {
    color: #426b36;
}


/* Reparatur: Gold und Beige */

.terminal-reparatur {
    background: #f7f0df;
    border-color: #c8ad70;
}

.terminal-reparatur .terminal-hinweis-titel {
    color: #76591c;
}


/* Vorsicht: dezentes Rot */

.terminal-vorsicht {
    background: #fbefeb;
    border-color: #d5a39a;
}

.terminal-vorsicht .terminal-hinweis-titel {
    color: #963e32;
}


/* ---------------------------------------------------------
   9. LISTEN
   --------------------------------------------------------- */

.terminal-seite ul,
.terminal-seite ol {
    margin: 12px 0 20px;
    padding-left: 25px;
}

.terminal-seite li {
    margin-bottom: 8px;
    padding-left: 3px;
}

.terminal-seite li:last-child {
    margin-bottom: 0;
}


/* Nummerierte Schritt-für-Schritt-Anleitungen */

.terminal-schritte {
    padding-left: 0 !important;
    list-style: none;
    counter-reset: terminal-schritt;
}

.terminal-schritte li {
    position: relative;
    min-height: 38px;
    margin: 0 0 15px;
    padding: 5px 0 5px 48px;

    counter-increment: terminal-schritt;
}

.terminal-schritte li::before {
    content: counter(terminal-schritt);

    position: absolute;
    top: 0;
    left: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    color: #fffdf7;
    background: #8e743d;
    border: 1px solid #79612f;
    border-radius: 50%;

    font-weight: 700;
}


/* ---------------------------------------------------------
   10. TABELLEN
   --------------------------------------------------------- */

.terminal-tabellenrahmen {
    width: 100%;
    margin: 18px 0 24px;

    overflow-x: auto;

    border: 1px solid #c9b88f;
    border-radius: 6px;

    -webkit-overflow-scrolling: touch;
}

.terminal-tabelle {
    width: 100%;
    min-width: 420px;

    border-collapse: collapse;

    color: #302b24;
    background: #fffdf8;
}

.terminal-tabelle th,
.terminal-tabelle td {
    padding: 11px 13px;

    text-align: left;
    vertical-align: top;

    border-bottom: 1px solid #e0d5bd;
}

.terminal-tabelle th {
    color: #51401f;
    background: #eee2c7;
}

.terminal-tabelle tr:last-child td {
    border-bottom: 0;
}

.terminal-tabelle code {
    color: #493a20;
    font-family: Menlo, Monaco, Consolas, monospace;
    overflow-wrap: anywhere;
}


/* ---------------------------------------------------------
   11. LINKS UND WEITERFÜHRENDE THEMEN
   --------------------------------------------------------- */

.terminal-seite a {
    color: #76591c;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.terminal-seite a:hover {
    color: #443316;
}

.terminal-seite a:focus-visible {
    outline: 2px solid #9c7b34;
    outline-offset: 3px;
}

.terminal-weiterfuehrend {
    margin-top: 25px;
    padding: 18px;

    color: #302b24;
    background: #f8f2e5;

    border: 1px dashed #b9a477;
    border-radius: 7px;
}

.terminal-weiterfuehrend h3 {
    margin-top: 0;
}


/* ---------------------------------------------------------
   12. ABSCHLUSSBEREICH
   --------------------------------------------------------- */

.terminal-abschluss {
    margin-top: 30px;
    padding: 20px;

    color: #302b24;
    text-align: center;

    background: #f4ecd9;

    border-top: 2px solid #a58a4b;
    border-bottom: 1px solid #d0c2a1;
    border-radius: 6px;
}

.terminal-abschluss strong {
    color: #5d481e;
}

/* ======================================================
   FREI PLATZIERBARE SEITENNAVIGATION
   ====================================================== */

.terminal-seiten-navigation {
    width: 100%;
    margin: 28px 0;
    box-sizing: border-box;
}

.terminal-seiten-navigation-top {
    margin-top: 0;
    margin-bottom: 28px;
}

.terminal-seiten-navigation-bottom {
    margin-top: 36px;
    margin-bottom: 10px;
}

.terminal-seiten-navigation-gruppe {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.8fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 12px;
    width: 100%;
}

.terminal-seiten-navigation-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 64px;
    padding: 12px 15px;
    box-sizing: border-box;

    color: #30271c;
    background: #f7f0e3;
    border: 1px solid #d7bd85;
    border-radius: 6px;

    text-decoration: none;
    overflow-wrap: anywhere;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.terminal-seiten-navigation-link:hover {
    color: #21180e;
    background: #efe0c3;
    border-color: #b99650;
    box-shadow: 0 2px 7px rgba(70, 48, 15, 0.12);
    text-decoration: none;
}

.terminal-seiten-navigation-link:focus-visible {
    outline: 2px solid #8f6b2c;
    outline-offset: 3px;
}

.terminal-seiten-navigation-zurueck {
    justify-content: flex-start;
    text-align: left;
}

.terminal-seiten-navigation-weiter {
    justify-content: flex-end;
    text-align: right;
}

.terminal-seiten-navigation-kategorie {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    background: #eee2c8;
    border-color: #c5a567;
}

.terminal-seiten-navigation-kategorie:hover {
    background: #e5d3ad;
}

.terminal-seiten-navigation-pfeil {
    flex: 0 0 auto;
    color: #8b682c;
    font-size: 1.35rem;
    line-height: 1;
}

.terminal-seiten-navigation-inhalt {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.terminal-seiten-navigation-text {
    color: #765622;
    font-size: 0.82rem;
    font-weight: 700;
}

.terminal-seiten-navigation-titel {
    display: block;
    min-width: 0;
    font-size: 0.92rem;
    line-height: 1.35;
}

.terminal-seiten-navigation-kategorie-label {
    color: #765622;
    font-size: 0.82rem;
    font-weight: 700;
}

.terminal-seiten-navigation-kategorie-name {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.terminal-seiten-navigation-platzhalter {
    display: block;
    min-width: 0;
}


/* Smartphone-Darstellung */

@media (max-width: 700px) {

    .terminal-seiten-navigation {
        margin-top: 22px;
        margin-bottom: 22px;
    }

    .terminal-seiten-navigation-gruppe {
        grid-template-columns: minmax(0, 1fr);
        gap: 9px;
    }

    .terminal-seiten-navigation-link {
        min-height: 54px;
        padding: 11px 13px;
    }

    .terminal-seiten-navigation-zurueck {
        justify-content: flex-start;
        text-align: left;
    }

    .terminal-seiten-navigation-kategorie {
        grid-row: auto;
    }

    .terminal-seiten-navigation-weiter {
        justify-content: flex-end;
        text-align: right;
    }

    .terminal-seiten-navigation-platzhalter {
        display: none;
    }
}


/* ---------------------------------------------------------
   13. MOBILE DARSTELLUNG
   --------------------------------------------------------- */

@media (max-width: 768px) {

    .terminal-seite {
        padding: 0 5px 20px;
        font-size: 0.97rem;
        line-height: 1.65;
    }

    .terminal-kopf {
        padding: 19px 13px;
        margin-bottom: 20px;
    }

    .terminal-label {
        font-size: 0.75rem;
        letter-spacing: 1.5px;
    }

    .terminal-untertitel {
        font-size: 0.96rem;
    }

    .terminal-bereich {
        padding: 15px 12px;
        margin-bottom: 18px;
    }

    .terminal-seite h2 {
        margin-bottom: 13px;
    }

    .terminal-seite h3 {
        font-size: 1.1rem;
    }

    .terminal-inhaltsverzeichnis {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .terminal-inhaltslink {
        padding: 11px 12px;
    }

    .terminal-befehlsblock {
        margin: 18px 0;
    }

    .terminal-befehlskopf,
    .terminal-befehlsinhalt {
        padding: 12px;
    }

    .terminal-code,
    .terminal-ausgabe {
        padding: 12px;
        font-size: 0.82rem;
    }

    .terminal-hinweis {
        padding: 12px;
    }

    .terminal-schritte li {
        padding-left: 42px;
    }

    .terminal-schritte li::before {
        width: 30px;
        height: 30px;
    }

    .terminal-abschluss {
        padding: 15px 12px;
    }
}


/* ---------------------------------------------------------
   14. KLEINE SMARTPHONES
   --------------------------------------------------------- */

@media (max-width: 380px) {

    .terminal-seite {
        padding-right: 2px;
        padding-left: 2px;
        font-size: 0.94rem;
    }

    .terminal-kopf {
        padding: 16px 10px;
    }

    .terminal-bereich {
        padding: 12px 9px;
    }

    .terminal-befehlskopf,
    .terminal-befehlsinhalt {
        padding: 10px;
    }

    .terminal-code,
    .terminal-ausgabe {
        padding: 10px;
        font-size: 0.77rem;
    }
}


/* ---------------------------------------------------------
   15. BEWEGUNGSREDUZIERUNG
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    .terminal-inhaltslink {
        transition: none;
    }
}