/*
Theme Name: Mittelgrob & Wunderlich
Template: primarium-wpcom
Description: Child-Theme für Mittelgrob & Wunderlich – Atelier und Werkstatt in Kiel
Version: 1.2
Author: Clemens Wunderlich
Text Domain: mittelgrob-wunderlich
*/

/* =============================================
   SCHRIFTARTEN
   WOFF2 (ca. 80 % kleiner) zuerst, TTF als
   Fallback für sehr alte Browser.
   font-display: swap → Text ist sofort lesbar,
   die Schrift wird nachgeladen.
   ============================================= */
@font-face {
    font-family: 'EuroScript';
    src: url('assets/fonts/EuroScript.woff2') format('woff2'),
         url('assets/fonts/EuroScript.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'BienchemSAS';
    src: url('assets/fonts/BienchemSAS.woff2') format('woff2'),
         url('assets/fonts/BienchemSAS.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Jost (SIL OFL, Lizenz: assets/fonts/OFL-Jost.txt)
   Variabler Font: eine Datei deckt alle Gewichte 100–900 ab,
   d. h. auch echtes Fett für <b>/<strong>. */
@font-face {
    font-family: 'Jost';
    src: url('assets/fonts/Jost.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* =============================================
   RESET & BASIS
   ============================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background: #ffffff;
    color: #1a1a1a;
    font-family: 'Jost', 'Century Gothic', Futura, Arial, sans-serif;
    font-weight: 300;                /* Jost Light */
    -webkit-font-smoothing: antialiased;
}

/* Sichtbarer Tastatur-Fokus (Maus-Klicks bleiben unverändert) */
a:focus-visible,
button:focus-visible {
    outline: 3px solid #153C8B;
    outline-offset: 2px;
    border-radius: 4px;
}

body.page-ueber :focus-visible,
body.page-kontakt :focus-visible,
.mw-lightbox :focus-visible {
    outline-color: #fff;
}

/* Skip-Link: erscheint nur bei Tastatur-Navigation */
.mw-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: #153C8B;
    color: #fff;
    padding: 0.6em 1.2em;
    border-radius: 0 0 8px 0;
    text-decoration: none;
    z-index: 10001;
}

.mw-skip-link:focus {
    left: 0;
}

/* =============================================
   HEADER / LOGO
   ============================================= */
.mw-header {
    text-align: center;
    padding: 2rem 1rem 1rem;
    background: #fff;
}

.mw-logo {
    max-width: 600px;
    width: 92%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* =============================================
   NAVIGATION – zwei Icons nebeneinander
   ============================================= */
.mw-nav {
    display: flex;
    justify-content: center;
    gap: clamp(1rem, 4vw, 3rem);
    padding: 1.2rem 1rem;
    background: transparent;
}

.mw-nav a {
    font-family: 'BienchemSAS', 'EuroScript', cursive;
    font-size: clamp(1.9rem, 4vw, 2.4rem);
    color: #555;
    text-decoration: none;
    background: #fafafa;
    border: 1px solid #ccc;
    border-radius: 30px;
    padding: 0.1em 0.5em;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
    line-height: 1;
}

.mw-nav a:hover,
.mw-nav a.active {
    background: #f0f0f0;
    color: #1a1a1a;
    border-color: #999;
}

/* =============================================
   BESCHREIBUNGSTEXT (Hauptseite)
   ============================================= */
.mw-description {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.4rem clamp(1rem, 5vw, 2.5rem);
    font-family: 'Jost', 'Century Gothic', Futura, Arial, sans-serif;
    font-size: clamp(1.2rem, 3.3vw, 1.5rem);
    line-height: 1.75;
    color: #333;
    text-align: center;
}

/* =============================================
   LADENFOTO – seitenbreit
   ============================================= */
.mw-hero {
    display: block;
    line-height: 0;
    max-width: 1200px;        /* ← maximale Breite in Pixel, nach Wunsch anpassen */
    margin: 0 auto;          /* ← zentriert das Bild auf der Seite */
    padding: 0 1rem;         /* ← kleiner Abstand links/rechts auf dem Handy */
}

.mw-hero img {
    width: 100%;             /* ← bleibt responsiv innerhalb des Rahmens */
    height: auto;
    display: block;
    object-fit: cover;
}

/* =============================================
   IMPRESSUM BLOCK
   ============================================= */
.mw-impressum {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem clamp(1rem, 5vw, 2.5rem);
    font-family: 'Jost', 'Century Gothic', Futura, Arial, sans-serif;
    font-size: clamp(1.6rem, 4vw, 1.9rem);
    line-height: 1.85;
    color: #444;
}

.mw-impressum h2 {
    font-family: 'BienchemSAS', cursive;
    font-size: clamp(2rem, 6vw, 2.8rem);
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.mw-impressum a {
    color: #2255aa;
    text-decoration: none;
}

.mw-impressum a:hover {
    text-decoration: underline;
}

/* =============================================
   FOOTER
   ============================================= */
.mw-footer {
    background: #f4f4f4;
    border-top: 1px solid #ddd;
    text-align: center;
    padding: 1rem;
    font-size: 0.8rem;
    color: #666;
    font-family: 'Jost', 'Century Gothic', Futura, Arial, sans-serif;
}

.mw-footer a {
    color: #2255aa;
    text-decoration: none;
}

.mw-footer a:hover {
    text-decoration: underline;
}

/* =============================================
   GALERIE – Kachelansicht
   ============================================= */
.mw-galerie {
    padding: 2rem clamp(0.5rem, 3vw, 2rem);
    max-width: 900px;        /* ← Gesamtbreite der Kachelansicht begrenzen */
    margin: 0 auto;          /* ← zentrieren */
}

.mw-galerie h1 {
    font-family: 'BienchemSAS', cursive;
    font-size: clamp(2rem, 7vw, 3.5rem);
    text-align: center;
    margin-bottom: 1.5rem;
    color: #153C8B;
}

.mw-galerie-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(6px, 1.5vw, 16px);  /* ← etwas mehr Abstand zwischen den Kacheln */
}

@media (max-width: 640px) {
    .mw-galerie-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Kacheln sind jetzt <button>, damit die Lightbox
   auch per Tastatur (Enter/Leertaste) erreichbar ist */
.mw-galerie-item {
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 2 / 3;
    background: #eee;
    border-radius: 20px;     /* ← abgerundete Ecken */
    border: 0;
    padding: 0;
    display: block;
    width: 100%;
}

.mw-galerie-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.mw-galerie-item:hover img {
    transform: scale(1.04);
}

/* =============================================
   LIGHTBOX
   ============================================= */
.mw-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.mw-lightbox.open {
    display: flex;
}

.mw-lightbox img {
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
    border: 2px solid rgba(255,255,255,0.15);
}

/* Bedienelemente: mind. 44×44 px Tippfläche,
   dezente Hinterlegung für Sichtbarkeit auf hellen Bildern */
.mw-lightbox-close,
.mw-lightbox-prev,
.mw-lightbox-next {
    position: fixed;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    background: rgba(0,0,0,0.35);
    border: none;
    border-radius: 50%;
    padding: 0;
    z-index: 10000;
}

.mw-lightbox-close {
    top: 1rem;
    right: 1.2rem;
    font-size: 2rem;
}

.mw-lightbox-prev,
.mw-lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    opacity: 0.75;
}

.mw-lightbox-prev { left: 0.7rem; }
.mw-lightbox-next { right: 0.7rem; }
.mw-lightbox-prev:hover, .mw-lightbox-next:hover { opacity: 1; }

/* =============================================
   DUNKLE SEITEN (Über uns & Kontakt)
   Gemeinsame Stile, vorher doppelt inline gepflegt
   ============================================= */
body.page-ueber,
body.page-kontakt {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #07111e;
    background-attachment: fixed;
    min-height: 100vh;
}

body.page-ueber {
    background-image: url('assets/images/Hintergrund_About.jpg');
}

body.page-kontakt {
    background-image: url('assets/images/Hintergrund_Kontakt.jpg');
}

@media (max-width: 1024px) {
    body.page-ueber,
    body.page-kontakt {
        background-attachment: scroll;   /* fixed funktioniert auf Mobil/Tablet oft nicht */
    }
}

body.page-ueber::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(6, 14, 28, 0.42);
    pointer-events: none;
    z-index: 0;
}

body.page-ueber .mw-header,
body.page-ueber .mw-nav,
body.page-kontakt .mw-header,
body.page-kontakt .mw-nav {
    background: transparent;
    position: relative;
    z-index: 2;
}

body.page-ueber .mw-logo,
body.page-kontakt .mw-logo {
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.6));
}

body.page-ueber .mw-nav a,
body.page-kontakt .mw-nav a {
    background: rgba(15, 25, 45, 0.75);
    border-color: rgba(255,255,255,0.3);
    color: #fff;
    backdrop-filter: blur(4px);
}

body.page-ueber .mw-nav a:hover,
body.page-ueber .mw-nav a.active,
body.page-kontakt .mw-nav a:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

body.page-ueber .mw-content,
body.page-kontakt .mw-content {
    position: relative;
    z-index: 2;
}

body.page-ueber .mw-footer,
body.page-kontakt .mw-footer {
    background: rgba(6, 14, 28, 0.8);
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    position: relative;
    z-index: 2;
}

body.page-ueber .mw-footer a,
body.page-kontakt .mw-footer a {
    color: rgba(180,210,255,0.85);
}

/* =============================================
   ÜBER UNS SEITE – Intro
   ============================================= */
.mw-ueber {
    max-width: 760px;
    margin: 0 auto;
    padding: 2rem clamp(1rem, 5vw, 2.5rem) 1rem;
}

.mw-ueber h1 {
    font-family: 'BienchemSAS', cursive;
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    text-align: center;
    margin-bottom: 1.5rem;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

.mw-ueber-intro {
    font-family: 'Jost', 'Century Gothic', Futura, Arial, sans-serif;
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    line-height: 1.75;
    color: rgba(255,255,255,0.85);
    margin-bottom: 1rem;
    text-shadow: 0 1px 6px rgba(0,0,0,0.5);
    text-align: center;
}

/* =============================================
   DIALOG-SZENE
   ============================================= */
.mw-dialog-scene {
    width: 100%;
    padding: clamp(1.5rem, 4vw, 3.5rem) clamp(1rem, 4vw, 3rem) clamp(3rem, 6vw, 5rem);
}

.mw-chat {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-width: 640px;
    margin: 0 auto;
}

.mw-chat-spacer {
    height: 0.9rem;
}

.mw-chat-links {
    display: flex;
    justify-content: flex-start;
}

.mw-chat-rechts {
    display: flex;
    justify-content: flex-end;
}

/* =============================================
   SPRECHBLASEN – Chat-Style
   ============================================= */
.mw-bubble {
    display: inline-block;
    position: relative;
    color: #ffffff;
    font-size: clamp(1.3rem, 2.9vw, 1.65rem);    /* +30% */
    line-height: 1.55;
    padding: 0.7em 1.4em;                          /* +30% */
    max-width: 82%;
    backdrop-filter: blur(5px);
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.mw-bubble--links {
    font-family: 'Jost', 'Century Gothic', Futura, Arial, sans-serif;
    background: rgba(15, 25, 48, 0.88);
    border: 1.5px solid rgba(80, 140, 220, 0.35);
    border-radius: 18px 18px 18px 4px;
}

.mw-bubble--rechts {
    font-family: 'EuroScript', cursive;
    background: rgba(30, 15, 50, 0.88);
    border: 1.5px solid rgba(180, 100, 220, 0.35);
    border-radius: 18px 18px 4px 18px;
}

.mw-sprecher-name {
    display: block;
    font-family: 'Jost', 'Century Gothic', Futura, Arial, sans-serif;
    font-size: 0.62em;
    opacity: 0.45;
    margin-bottom: 0.2em;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-style: normal;
}

.mw-regie {
    opacity: 0.5;
    font-size: 0.85em;
    font-style: italic;
}

/* =============================================
   SEITENLAYOUT – Wrapper
   ============================================= */
.mw-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.mw-content {
    flex: 1;
}

/* Fallback-Template (index.php) */
.mw-fallback {
    max-width: 720px;
    margin: 3rem auto;
    padding: 1rem;
}

/* =============================================
   DATENSCHUTZ SEITE
   ============================================= */
.mw-datenschutz {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem clamp(1rem, 5vw, 2.5rem) 4rem;
    font-family: 'Jost', 'Century Gothic', Futura, Arial, sans-serif;
    font-size: clamp(1.05rem, 2.3vw, 1.25rem);
    line-height: 1.85;
    color: #333;
}

.mw-datenschutz h1 {
    font-family: 'Jost', 'Century Gothic', Futura, Arial, sans-serif;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    margin-bottom: 1.5rem;
    color: #1a1a1a;
}

.mw-datenschutz h2 {
    font-family: 'Jost', 'Century Gothic', Futura, Arial, sans-serif;
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.mw-datenschutz p,
.mw-datenschutz li {
    font-family: 'Jost', 'Century Gothic', Futura, Arial, sans-serif;
    font-size: clamp(1.05rem, 2.3vw, 1.25rem);
}

.mw-datenschutz ul {
    padding-left: 1.5rem;
    margin: 0.5rem 0 1rem;
}

.mw-datenschutz a {
    color: #2255aa;
    text-decoration: none;
}

.mw-datenschutz a:hover {
    text-decoration: underline;
}
.mw-datenschutz p b {
    margin-right: 0.4em;
}

/* =============================================
   KONTAKT SEITE
   ============================================= */
.mw-kontakt {
    max-width: 580px;
    margin: 0 auto;
    padding: 3rem clamp(1rem, 5vw, 2.5rem) 5rem;
    font-family: 'Jost', 'Century Gothic', Futura, Arial, sans-serif;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.mw-kontakt h1 {
    font-family: 'BienchemSAS', cursive;
    font-size: clamp(2.25rem, 7.5vw, 3.75rem);
    text-align: center;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
    text-shadow: none;
    font-style: normal;
}

.mw-kontakt-intro {
    text-align: center;
    font-size: clamp(1.43rem, 3.3vw, 1.65rem);
    color: #1a1a1a;
    margin-bottom: 2.5rem;
    text-shadow: none;
    font-style: normal;
}

.mw-kontakt-form {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.mw-feld {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.mw-feld label {
    font-family: 'BienchemSAS', cursive;
    font-size: clamp(1.8rem, 4vw, 2rem);
    color: #1a1a1a;
    letter-spacing: 0.03em;
    font-style: normal;
}

.mw-feld input,
.mw-feld textarea {
    font-family: 'Jost', 'Century Gothic', Futura, Arial, sans-serif;
    font-weight: 300;
    font-size: clamp(1.43rem, 3.3vw, 1.58rem);
    color: #1a1a1a;
    background: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 0.65em 0.9em;
    width: 100%;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    outline: none;
    resize: vertical;
    font-style: normal;
}

.mw-feld input:focus,
.mw-feld textarea:focus {
    border-color: #153C8B;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(21, 60, 139, 0.25);
}

/* Honeypot-Feld: für Menschen unsichtbar, Bots füllen es aus */
.mw-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.mw-senden {
    font-family: 'Jost', 'Century Gothic', Futura, Arial, sans-serif;
    font-weight: 400;
    font-size: clamp(1.3rem, 3vw, 1.6rem);
    color: #fff;
    background: #153C8B;
    border: none;
    border-radius: 30px;
    padding: 0.5em 2.5em;
    cursor: pointer;
    align-self: center;
    transition: background 0.2s, transform 0.1s;
    letter-spacing: 0.03em;
}

.mw-senden:hover {
    background: #0f2d6b;
    transform: translateY(-1px);
}

.mw-senden:active {
    transform: translateY(0);
}

.mw-kontakt-erfolg {
    background: #ffffff;
    border: 1px solid #a8d5a8;
    border-radius: 10px;
    padding: 1.2em 1.5em;
    color: #1a1a1a;
    font-size: clamp(1.43rem, 3.3vw, 1.65rem);
    font-family: 'Jost', 'Century Gothic', Futura, Arial, sans-serif;
    font-style: normal;
    text-align: center;
    margin-top: 1rem;
}

.mw-kontakt-fehler {
    background: #fdecea;
    border: 1px solid #f0a8a8;
    border-radius: 10px;
    padding: 1em 1.5em;
    color: #7a2020;
    font-size: clamp(0.9rem, 2vw, 1rem);
    margin-bottom: 1rem;
}

/* Kontakt: Feinabstimmung Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .mw-kontakt {
        max-width: 680px;
        padding: 2rem clamp(1.5rem, 4vw, 3rem) 4rem;
    }
    .mw-kontakt h1 {
        font-size: clamp(1.8rem, 4vw, 2.8rem);
    }
    .mw-kontakt-intro {
        font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    }
    .mw-feld input,
    .mw-feld textarea {
        font-size: clamp(1.2rem, 2.5vw, 1.4rem);
        padding: 0.7em 1em;
    }
    .mw-feld label {
        font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    }
    .mw-senden {
        font-size: clamp(1.2rem, 2.5vw, 1.5rem);
        padding: 0.5em 2em;
    }
}

/* =============================================
   NOTIZBLOCK-HINTERGRUND – Startseite & Galerie
   ============================================= */
body.home,
body.page-galerie {
    background-color: #ffffff;
    background-image:
        linear-gradient(to right, transparent 18px, #f0a0a0 18px, #f0a0a0 19px, transparent 19px),
        url('assets/images/notizblock-linie.png');
    background-repeat: repeat;
    background-size: 100% clamp(38px, 5vw, 52px);
    background-attachment: local;
}

body.home .mw-header,
body.home .mw-nav,
body.home .mw-content,
body.home .mw-footer,
body.page-galerie .mw-header,
body.page-galerie .mw-nav,
body.page-galerie .mw-content,
body.page-galerie .mw-footer {
    background: transparent;
}

@media (max-width: 600px) {
    body.home .mw-page,
    body.page-galerie .mw-page {
        border-left: none;
        margin-left: 0;
    }

    body.home,
    body.page-galerie {
        background-color: #fafafa;
        background-image: url('assets/images/notizblock-linie.png');
        background-repeat: repeat;
        background-size: 100% 38px;
        background-attachment: scroll;
    }
}

/* =============================================
   REDUZIERTE BEWEGUNG (Systemeinstellung)
   ============================================= */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
    .mw-galerie-item:hover img {
        transform: none;
    }
}
