/*
Theme Name: Christine Walz - Online Kommunikation
Theme URI: https://haudegen-webdesign.de
Author: Haudegen Webdesign
Author URI: https://haudegen-webdesign.de
Description: Custom-Theme fuer Christine Walz - Online Kommunikation (ACF + Contact Form 7, kein Page Builder).
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: haudegen-theme
*/

/* ============================================================
   VARIABLEN
============================================================ */
:root {
    --black: #1a1b22;
    --white: #ffffff;
    --grey: #f8f4f1;
    --accent: #c0c5be;
    --contrast: #202133;

    /* projektspezifisch: Oliv aus den Icons - Datum, Slider-Pfeile */
    --olive: #637221;
}

/* ============================================================
   FONTS
   PF Marlet Display Black = Ueberschriften
   Conduit ITC Extra Light = Fliesstext
============================================================ */
@font-face {
    font-family: 'Marlet Display';
    src: url('fonts/PFMarletDisplay-Black.woff2') format('woff2'),
         url('fonts/PFMarletDisplay-Black.woff') format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Conduit';
    src: url('fonts/ConduitITCExtraLight.woff2') format('woff2'),
         url('fonts/ConduitITCExtraLight.woff') format('woff');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

/* ============================================================
   RESET / BASIS
============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Conduit', sans-serif;
    font-weight: 200;
    color: var(--black);
    background: var(--white);
    line-height: 1.8;
    font-size: 1.29rem; /* 19px + 0.1rem */
    overflow-x: hidden;
}

/* Scroll-Lock, wenn Popup-Menue offen ist */
body.fixed {
    overflow: hidden;
}

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

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

/* ============================================================
   TYPOGRAFIE
============================================================ */
h1, h2, h3, h4 {
    font-family: 'Marlet Display', serif;
    font-weight: 900;
    line-height: 1.1;
}

h1 { font-size: clamp(3rem, 7vw, 6.5rem); }
h2 { font-size: clamp(2.2rem, 4vw, 3.4rem); }
h3 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
h4 { font-size: clamp(1.1rem, 1.6vw, 1.3rem); }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* Fliesstext-Listen (Herausforderung, Folge) */
.liste {
    list-style: disc;
    padding-left: 1.4em;
}
.liste li {
    margin-bottom: .8em;
}
.liste li:last-child {
    margin-bottom: 0;
}

/* Liste ohne Punkte - Leistungs-Cluster */
.liste-blank {
    list-style: none;
}
.liste-blank li {
    margin-bottom: .5em;
}

/* ============================================================
   FARB- UND HINTERGRUND-KLASSEN
============================================================ */
.black { color: var(--black); }
.white { color: var(--white); }
.accent { color: var(--accent); }
.grey { color: var(--grey); }
.contrast { color: var(--contrast); }

.black-bg { background: var(--black); color: var(--white); }
.white-bg { background: var(--white); color: var(--black); }
.grey-bg { background: var(--grey); color: var(--black); }
.accent-bg { background: var(--accent); color: var(--white); }
.contrast-bg { background: var(--contrast); color: var(--white); }

/* ============================================================
   LAYOUT-UTILITIES
============================================================ */
.flex {
    display: flex;
    flex-direction: column;
}
.flex-horizontal {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}
.flex-start { align-items: flex-start; }
.flex-end { align-items: flex-end; }

.gap-5 { gap: 5px; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }
.gap-40 { gap: 40px; }

.section-padding {
    padding: 100px 5vw;
}

.double-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.triple-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.max-width {
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}
.max-width-1100 {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}
.max-width-1400 {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* ============================================================
   ABSTAENDE
============================================================ */
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }

/* ============================================================
   BUTTONS
============================================================ */
.button {
    display: inline-block;
    padding: 10px 34px;
    background: var(--contrast);
    color: var(--white);
    border-radius: 6px;
    font-size: 1rem;
    letter-spacing: .02em;
    transition: transform .25s ease, opacity .25s ease;
}
.button:hover {
    transform: translateY(-2px);
    opacity: .9;
}
.button-outline {
    background: transparent;
    border: 1px solid var(--contrast);
    color: var(--contrast);
}

/* ============================================================
   HEADER
============================================================ */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 5vw;
    background: var(--white);
}

/* Wortmarke - reine Typo, kein Bild-Logo */
header .logo {
    line-height: 1.15;
}
header .logo .logo-oben {
    display: block;
    font-size: .95rem;
    letter-spacing: .18em;
    color: #6a6a72;
}
header .logo .logo-unten {
    display: block;
    font-size: 1.2rem;
    letter-spacing: .06em;
    color: var(--black);
}

/* Grosse Navigation ab 1200px */
#navi-big {
    display: none;
}
#navi-big ul {
    display: flex;
    flex-direction: row;
    gap: 34px;
    list-style: none;
    align-items: center;
}
#navi-big a {
    font-size: 1rem;
}
#navi-big a:hover {
    color: var(--olive);
}

/* Burger-Icon */
.burger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
}
.burger span {
    display: block;
    width: 28px;
    height: 1px;
    background: var(--black);
}

/* Popup-Menue (mobil) */
#navi-small {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 320px;
    max-width: 85vw;
    background: var(--contrast);
    color: var(--white);
    z-index: 200;
    transform: translateX(100%);
    transition: transform .35s ease;
    padding: 100px 40px 40px;
    overflow-y: auto;
}
#navi-small.aktiv {
    transform: translateX(0);
}
#navi-small ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
#navi-small a {
    font-size: 1.4rem;
}
#navi-small a:hover {
    color: var(--accent);
}

/* Schliessen-Kreuz im Popup */
#navi-small .close {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

/* Overlay hinter dem Popup */
.body-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease;
}
.body-overlay.aktiv {
    opacity: 1;
    visibility: visible;
}

/* ============================================================
   MAIN
   <main> wird in header.php geoeffnet, in footer.php geschlossen.
============================================================ */
main {
    padding-top: 84px;
}

/* ============================================================
   HERO (Startseite)
============================================================ */
.hero {
    position: relative;
}
.hero > img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.hero-inhalt {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 25px;
    /* rechte Bildhaelfte - Christine steht links im Bild */
    padding: 0 5vw 0 48%;
}
.hero-inhalt h1 {
    color: var(--accent);
}
.hero-inhalt p {
    color: var(--white);
    font-size: clamp(1.1rem, 1.7vw, 1.6rem);
    max-width: 700px;
    margin: 0;
}

/* ============================================================
   HERAUSFORDERUNG / FOLGE - zwei Haelften ohne Abstand
============================================================ */
.problem-folge {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* ============================================================
   BOTSCHAFTEN - Textspalte mit blassem Hintergrundbild
============================================================ */
/* Mobil bewusst ohne Hintergrundbild und in Weiss - das mobile Bild ist
   freigestellt und laeuft selbst in Weiss aus. Das breite Hintergrundbild
   kommt erst ab 901px, per --bg aus dem Template. */
.botschaften {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    background: var(--white);
}

.botschaften-text {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 30px;
    padding: 100px 6vw;
    overflow: hidden;
}
/* Mobil deckendes Weiss. Ab 901px halbtransparentes Beige, damit die Bank
   dahinter durchscheint. Als ::before, damit nur die Flaeche blasser wird
   und nicht der Text. */
.botschaften-text::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--white);
}
.botschaften-text > * {
    position: relative;
    z-index: 1;
}

/* Bildspalte - mobil das freigestellte Bild in Originalhoehe,
   ab 901px das breite Bild formatfuellend. */
.botschaften picture {
    display: block;
}
.botschaften > img,
.botschaften picture img {
    width: 100%;
}

@media (min-width: 901px) {
    .botschaften {
        background-image: var(--bg);
        background-size: cover;
        background-position: right center;
    }
    .botschaften-text::before {
        background: var(--grey);
        opacity: .8;
    }
    .botschaften picture,
    .botschaften > img,
    .botschaften picture img {
        height: 100%;
        object-fit: cover;
    }
}

/* ============================================================
   LEISTUNGEN - drei Cluster mit Icon
============================================================ */
.leistung {
    text-align: center;
}
.leistung img {
    width: 80px;
    height: auto;
    margin: 0 auto 35px;
    mix-blend-mode: multiply;
}
.leistung h3 {
    font-family: 'Conduit', sans-serif;
    font-weight: 200;
    margin-bottom: 25px;
}

/* ============================================================
   FOOTER
============================================================ */
footer {
    background: var(--contrast);
    color: var(--white);
    padding: 80px 5vw 40px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}
footer a:hover {
    color: var(--accent);
}
footer ul {
    list-style: none;
}
.footer-bottom {
    max-width: 1400px;
    margin: 50px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, .2);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 15px;
    font-size: .9rem;
}

/* ============================================================
   FAQ
============================================================ */
.faq-item {
    border-bottom: 1px solid var(--accent);
}
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 25px 0;
    cursor: pointer;
}
.faq-icon {
    flex-shrink: 0;
    transition: transform .3s ease;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--olive);
}
.faq-icon.aktiv {
    transform: rotate(45deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
}
.faq-answer.aktiv {
    max-height: 600px;
}
.faq-answer-inner {
    padding-bottom: 25px;
}

/* ============================================================
   EINBLENDEN BEIM SCROLLEN
   .content + IntersectionObserver setzt .aktiv.
============================================================ */
.content {
    opacity: 0;
    transition: opacity .8s ease, transform .8s ease;
}
.content.aktiv {
    opacity: 1;
    transform: translate(0, 0);
}
.transform.transform-small { transform: translateY(30px); }
.transform.transform-middle { transform: translateY(60px); }
.transform.transform-big { transform: translateY(120px); }

/* ============================================================
   SCHRIFT-ANIMATION
   Wort fuer Wort aus einer Maske nach oben, leicht gekippt und
   zeitlich versetzt. schriftAnimation() in script.js baut die
   .wort-Spans, der bestehende .content-Observer setzt .aktiv.

   Markup: <h2 class="content schrift-animation">...</h2>
============================================================ */
/* Die Ueberschrift selbst bleibt sichtbar - es bewegen sich die Woerter. */
.content.schrift-animation {
    opacity: 1;
}
.schrift-animation .wort {
    display: inline-block;
    overflow: hidden;
    /* Platz fuer Unterlaengen, ohne die Zeile zu verschieben */
    padding-bottom: .14em;
    margin-bottom: -.14em;
    vertical-align: bottom;
}
.schrift-animation .wort span {
    display: inline-block;
    transform: translateY(110%) rotate(4deg);
    transform-origin: left top;
    transition: transform 1s cubic-bezier(.22, 1, .36, 1);
    transition-delay: calc(var(--i) * 80ms);
}
.schrift-animation.aktiv .wort span {
    transform: translateY(0) rotate(0);
}

/* Fliesstext wird zart nachgezogen */
.schrift-nachzieher {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease .4s, transform 1s ease .4s;
}
.schrift-nachzieher.aktiv {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .content,
    .schrift-nachzieher,
    .schrift-animation .wort span {
        transition: none;
        transform: none;
        opacity: 1;
    }
}

/* ============================================================
   BEITRAG / SEITE (single, page)
============================================================ */
.entry-content {
    max-width: 800px;
    margin: 0 auto;
}
.entry-content h2,
.entry-content h3 { margin: 40px 0 15px; }
.entry-content ul,
.entry-content ol { margin: 0 0 20px 20px; }
.entry-content img { margin: 30px 0; }

.post-meta {
    color: var(--olive);
    font-size: .9rem;
    margin-bottom: 10px;
}

/* Beitragsraster (archive, blog) */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}
.post-card img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    margin-bottom: 15px;
}
.post-card h3 {
    font-family: 'Conduit', sans-serif;
    font-weight: 200;
    margin-bottom: 10px;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 60px;
    flex-wrap: wrap;
}
.pagination .page-numbers {
    padding: 10px 16px;
    background: var(--grey);
}
.pagination .page-numbers.current {
    background: var(--contrast);
    color: var(--white);
}

/* ============================================================
   KONTAKTFORMULAR (CF7)
============================================================ */
.hidden-fields-container {
    visibility: hidden !important;
}
.wpcf7-form p {
    margin-bottom: 20px;
}
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--accent);
    background: var(--white);
    font-family: 'Conduit', sans-serif;
    font-weight: 200;
    font-size: 1rem;
}
.wpcf7-form textarea {
    min-height: 160px;
    resize: vertical;
}
.wpcf7-form input[type="submit"] {
    display: inline-block;
    padding: 12px 34px;
    background: var(--contrast);
    color: var(--white);
    border: 0;
    border-radius: 6px;
    font-family: 'Conduit', sans-serif;
    font-size: 1rem;
    cursor: pointer;
}

/* ============================================================
   SWIPER-BASIS
============================================================ */
.swiper {
    width: 100%;
    overflow: hidden;
}
.swiper-pagination-bullet {
    background: var(--accent);
    opacity: 1;
}
.swiper-pagination-bullet-active {
    background: var(--olive);
}
.swiper-button-next,
.swiper-button-prev {
    color: var(--olive);
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (min-width: 1200px) {
    #navi-big { display: block; }
    .burger { display: none; }
}

@media (max-width: 900px) {
    .double-grid,
    .triple-grid,
    .footer-grid,
    .post-grid,
    .problem-folge,
    .botschaften {
        grid-template-columns: 1fr;
    }
    .section-padding {
        padding: 60px 5vw;
    }
    .botschaften-text {
        padding: 60px 5vw;
    }
    .hero > img {
        aspect-ratio: 4 / 5;
    }
    .hero-inhalt {
        padding: 0 5vw 40px;
        justify-content: flex-end;
    }
}
