/* ==========================================================================
   Erich Kästner-Schule – Theme-Stylesheet
   Grundlage: Figma „Landingpage“ (1920px) und „Landingpage mobil“ (390px)
   ========================================================================== */

/* Fonts (selbst gehostet, keine Verbindung zu Google) */
@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/poppins-400.woff2") format("woff2");
}

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/poppins-700.woff2") format("woff2");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/inter-700.woff2") format("woff2");
}

:root {
    --eks-red: #951010;
    --eks-text: #000;
    --eks-bg: #fff;
    --eks-font: "Poppins", system-ui, sans-serif;
    --eks-font-heading: "Inter", "Poppins", system-ui, sans-serif;
    --eks-container: 1150px;
    --eks-gutter: 45px;
}

/* Basis
   ========================================================================== */

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

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

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--eks-font);
    font-size: 16px;
    line-height: 28px;
    color: var(--eks-text);
    background-color: var(--eks-bg);
    /* Dekorative Bäume links und rechts (Figma: Mask group, 5 % Deckkraft) */
    background-image: url("../img/bg-baum-links.png"), url("../img/bg-baum-rechts.png");
    background-repeat: no-repeat, no-repeat;
    background-position: left 0 top 96px, right 0 top 96px;
    background-size: min(529px, 27.6vw) auto, min(529px, 27.6vw) auto;
}

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

a {
    color: inherit;
    text-decoration: none;
}

a:hover,
a:focus-visible {
    color: var(--eks-red);
    text-decoration: underline;
    text-underline-offset: 3px;
}

a:focus-visible {
    outline: 2px solid var(--eks-red);
    outline-offset: 2px;
}

.page-wrapper {
    width: 100%;
    max-width: calc(var(--eks-container) + 2 * var(--eks-gutter));
    margin: 0 auto;
    padding: 0 var(--eks-gutter);
}

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

/* Hauptbereich: Logo + Überschrift
   ========================================================================== */

.page-main {
    padding-top: 59px;
    text-align: center;
}

.page-main figure {
    margin: 0;
}

.page-main .content-image img {
    display: block;
    width: 819px;
    margin: 0 auto;
}

.page-main h1 {
    margin: 16px 0 0;
    font-family: var(--eks-font);
    font-weight: 700;
    font-size: 34px;
    line-height: 1.5;
    color: var(--eks-red);
}

/* Unterseiten (Impressum, Datenschutz) */
.page-main .content-text {
    max-width: 800px;
    margin: 40px auto 0;
    text-align: left;
}

.page-main h2 {
    font-family: var(--eks-font-heading);
    font-size: 20px;
    color: var(--eks-red);
}

/* Footer: drei Spalten
   ========================================================================== */

.page-footer {
    padding: 69px 0 112px;
}

/* Spaltenbreite nach Inhalt, freier Platz verteilt sich gleichmäßig auf beide Zwischenräume */
.footer-grid {
    display: grid;
    grid-template-columns: max-content minmax(0, 331px) max-content;
    justify-content: space-between;
    gap: 40px 60px;
}

.footer-col h2 {
    margin: 0 0 18px;
    font-family: var(--eks-font-heading);
    font-weight: 700;
    font-size: 20px;
    line-height: 24px;
    color: var(--eks-red);
}

.footer-col p {
    margin: 0;
}

.footer-col strong {
    font-weight: 700;
}

.footer-col ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Kontakt: Telefon / E-Mail mit Icon */
.contact-list {
    margin-top: 5px !important;
}

.contact-list li {
    position: relative;
    padding-left: 23px;
}

/* Telefon- und E-Mail-Link: nur unterstrichen, Farbe bleibt */
.contact-list a,
.contact-list a:hover,
.contact-list a:focus-visible {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.contact-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    background-repeat: no-repeat;
    background-size: contain;
    transform: translateY(-50%);
}

.contact-list .contact-phone::before {
    width: 14px;
    height: 14px;
    background-image: url("../img/icon-telefon.svg");
}

.contact-list .contact-mail::before {
    width: 14px;
    height: 10px;
    background-image: url("../img/icon-mail.svg");
}

.label-short {
    display: none;
}

/* Wichtige Links: Pfeil-Icon */
.link-list li {
    position: relative;
    padding-left: 24px;
}

.link-list li + li {
    margin-top: 17px;
}

.link-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 14px;
    height: 9px;
    background: url("../img/icon-pfeil.svg") no-repeat center / contain;
    transform: translateY(-50%);
}

/* Responsive
   ========================================================================== */

/* Tablet: zwei Spalten, dritte Spalte darunter */
@media (max-width: 1099px) {
    /* Tablet und mobil: 24px Seitenabstand links und rechts */
    :root {
        --eks-gutter: 24px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 43px 60px;
    }

    .footer-col:last-child {
        grid-column: 1 / -1;
    }
}

/* Mobil (Figma: 390px) */
@media (max-width: 767px) {
    body {
        /* Nur ein Baum rechts unten neben dem Footer */
        background-image: url("../img/bg-baum-rechts.png");
        background-position: right 0 top 503px;
        background-size: 289px auto;
    }

    .page-main {
        padding-top: 31px;
    }

    .page-main .content-image img {
        width: 299px;
    }

    .page-main h1 {
        margin-top: 36px;
        font-size: 26px;
    }

    .page-footer {
        padding: 50px 0 80px;
    }

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

    .label-long {
        display: none;
    }

    .label-short {
        display: inline;
    }
}

@media (max-width: 359px) {
    .contact-list .contact-mail {
        word-break: break-word;
    }
}
