/*
Theme Name: mo2000
Description: Block-Theme passend zum Logo: Element-Kachel (Mo, 42) in gebürstetem Metall auf Schwarz, rote Marker-Akzente.
Version: 1.3.4
Requires at least: 6.4
Requires PHP: 7.4
Author: Emminghaus IT
License: GPL-2.0-or-later
Text Domain: mo2000
*/

/* ---------- Grund: dunkle, leicht gebürstete Fläche wie im Logo ---------- */
html, body { overflow-x: clip; }
body {
  background-color: #0b0b0c;
  background-image:
    radial-gradient(ellipse at 50% -10%, rgba(255, 255, 255, .06), transparent 60%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .012) 0 1px, transparent 1px 3px);
  background-attachment: fixed;
}
::selection { background: #c8212c; color: #fff; }

/* Überschriften erster Ordnung in Metall-Optik */
h1.wp-block-heading, .wp-block-post-title.mo-metall, .mo-metall {
  background: linear-gradient(180deg, #f4f5f6 0%, #c9ccd0 42%, #8a8d92 58%, #dfe1e4 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* ---------- Kopf ---------- */
/* Sticky muss am Template-Teil <header> haengen: die Gruppe darin ist nur so hoch wie sie selbst
   und koennte innerhalb ihres Elternelements gar nicht kleben bleiben. */
.wp-site-blocks > header.wp-block-template-part { position: sticky; top: 0; z-index: 100; }
.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) { .admin-bar .wp-site-blocks > header.wp-block-template-part { top: 46px; } }
@media (max-width: 600px) { .admin-bar .wp-site-blocks > header.wp-block-template-part { top: 0; } }
.mo-kopf { background: rgba(11, 11, 12, .88); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid #2a2c30; }
.mo-kopf img { display: block; transition: transform .3s ease, filter .3s ease; }
.mo-kopf a:hover img { transform: rotate(-4deg); filter: drop-shadow(0 0 6px rgba(200, 33, 44, .7)); }
.mo-kopf .wp-block-site-title a { text-decoration: none; }
.mo-kopf .wp-block-navigation a { text-decoration: none; }
.mo-kopf .wp-block-navigation a:hover { color: #c8212c; }
.wp-block-navigation__responsive-container.is-menu-open { background: #0b0b0c !important; color: #d4d6d9 !important; }

/* ---------- Element-Kachel (wie im Logo) ---------- */
.mo-kachel {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 1.1rem 1.2rem !important;
  background: linear-gradient(160deg, #1d1e21, #0b0b0c 75%);
  border: 3px solid #b9bcc1;
  outline: 1px solid #45484d; outline-offset: -9px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .04);
  display: flex; flex-direction: column; justify-content: space-between;
  transition: transform .3s ease, border-color .3s ease;
}
.mo-kachel:hover { transform: translateY(-6px); border-color: #f4f5f6; }
.mo-kachel > * { margin: 0 !important; }
.mo-nummer { font-size: 1.5rem; font-weight: 700; color: #c9ccd0; line-height: 1; }
.mo-symbol { font-size: clamp(3rem, 8vw, 4.6rem); font-weight: 800; line-height: 1; text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #cfd2d6 45%, #9b9ea3 60%, #e6e8ea 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.mo-name { font-size: 1.1rem; font-weight: 700; text-align: center; color: #c9ccd0; }
.mo-wert { text-align: center; font-size: .9rem; color: #8d9095; }
.mo-kacheln { gap: 1.4rem !important; }
/* Drei Kacheln nicht ganz so riesig; "meine" Generation rot markiert */
.mo-kacheln-drei { max-width: 900px; }
.mo-kachel-ich { border-color: #c8212c; box-shadow: 0 18px 40px rgba(0, 0, 0, .55), 0 0 0 4px rgba(200, 33, 44, .25); }
.mo-kachel-ich .mo-wert { color: #e8e9eb; }

/* ---------- Roter Marker ---------- */
.mo-marker, .is-style-mo-marker {
  font-family: "Permanent Marker", "Comic Sans MS", cursive !important;
  color: #c8212c !important; font-weight: 400 !important;
  display: inline-block; transform: rotate(-3deg); letter-spacing: .02em;
  background: none !important; -webkit-background-clip: border-box !important;
}
/* Durchgestrichen mit schrägem roten Strich, wie "95.95" im Logo */
.mo-durch, .is-style-mo-durch { position: relative; display: inline-block; color: #8d9095; }
.mo-durch::after, .is-style-mo-durch::after {
  content: ""; position: absolute; left: -4%; right: -4%; top: 52%;
  height: .14em; min-height: 3px; background: #c8212c; border-radius: 3px;
  transform: rotate(-3deg); box-shadow: 0 0 2px rgba(200, 33, 44, .6);
}
/* Unterstreichung in Marker-Rot für Abschnittsüberschriften */
/* block statt inline-block, sonst greift die Ausrichtung an der Inhaltsspalte nicht */
.is-style-mo-unterstrichen { position: relative; padding-bottom: .25em; }
.is-style-mo-unterstrichen::after { content: ""; position: absolute; left: 0; bottom: 0; width: 3.2em; height: 5px;
  background: #c8212c; border-radius: 3px; transform: rotate(-1.5deg); }

/* ---------- Hero ---------- */
/* Gefahrenhinweis "hochreaktiv" im Stil eines Warnetiketts */
.mo-gefahr { display: flex; gap: 1rem; align-items: flex-start; margin: 1.5rem 0 !important; padding: 1rem 1.2rem;
  border: 2px solid #c8212c; background: repeating-linear-gradient(-45deg, rgba(200, 33, 44, .08) 0 12px, transparent 12px 24px), #121315; }
.mo-gefahr p { margin: 0; font-size: .98rem; line-height: 1.55; }
.mo-gefahr-zeichen { flex: 0 0 auto; animation: mo-zucken 4s ease-in-out infinite; }
@keyframes mo-zucken { 0%, 92%, 100% { transform: none; } 94% { transform: rotate(-8deg); } 96% { transform: rotate(8deg); } 98% { transform: rotate(-4deg); } }
.mo-hero { position: relative; }
/* Logo ist ausserhalb des Rahmens transparent: Schatten per drop-shadow, nicht als Kasten */
.mo-hero-logo img { width: 100%; height: auto; display: block;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .75));
  animation: mo-glanz 8s ease-in-out infinite; }
@keyframes mo-glanz { 0%, 100% { filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .75)) brightness(1); } 50% { filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .75)) brightness(1.12); } }
.mo-dachzeile { text-transform: uppercase; letter-spacing: .22em; font-size: .85rem; font-weight: 700; color: #8d9095; }

/* ---------- Beitragsliste als Kacheln ---------- */
.mo-beitraege { counter-reset: mo-element 41; }
.mo-beitraege .wp-block-post { counter-increment: mo-element; }
.mo-beitrag { position: relative; height: 100%; padding: 2.6rem 1.3rem 1.3rem !important;
  background: linear-gradient(160deg, #1d1e21, #0f1011 75%); border: 2px solid #3a3c40;
  transition: border-color .3s ease, transform .3s ease; }
.mo-beitrag::before { content: counter(mo-element); position: absolute; top: .7rem; left: 1rem;
  font-weight: 800; font-size: 1.1rem; color: #8d9095; }
.mo-beitrag:hover { border-color: #c8212c; transform: translateY(-4px); }
.mo-beitrag .wp-block-post-title a { text-decoration: none; }
.mo-beitrag .wp-block-post-title a:hover { color: #c8212c; }

/* ---------- Blog ---------- */
.mo-meta { gap: .3rem 1rem !important; font-size: .85rem; color: #8d9095; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.mo-meta > * { margin: 0 !important; font-size: inherit !important; }
.mo-meta .wp-block-post-terms a { color: #c8212c; text-decoration: none; }
.mo-meta .wp-block-post-terms a:hover { color: #f4f5f6; }
.mo-artikelbild { margin: 0 0 1rem !important; }
.mo-artikelbild img { border: 1px solid #2a2c30; transition: transform .4s ease, filter .4s ease; }
.mo-artikelbild { overflow: hidden; }
.mo-beitrag:hover .mo-artikelbild img, .mo-artikel-aufmacher:hover .mo-artikelbild img { transform: scale(1.03); filter: brightness(1.08); }
.mo-beitrag .mo-artikelbild { margin: -1.3rem -1.3rem 1rem !important; }
.mo-beitrag { padding-top: 1.3rem !important; display: flex; flex-direction: column; }
.mo-beitrag::before { z-index: 2; top: .6rem; left: .8rem; background: rgba(11, 11, 12, .8); padding: .1rem .45rem; border: 1px solid #3a3c40; }
.mo-artikel-gross { margin-bottom: 2.5rem; }
.mo-artikel-aufmacher .wp-block-post-title a { text-decoration: none; }
.mo-artikel-aufmacher .wp-block-post-title a:hover { color: #c8212c; }
.wp-block-post-excerpt__more-link { color: #c8212c; font-weight: 700; text-decoration: none; }

/* Ersatz fuer fehlende Beitragsbilder: eine Element-Kachel aus dem Titel */
.mo-ersatzbild { aspect-ratio: 16 / 10; margin: 0 0 1rem !important; position: relative; overflow: hidden;
  background: url("assets/img/periodensystem.webp") center / cover, #0b0b0c; border: 1px solid #2a2c30; }
.mo-ersatzbild::before { content: ""; position: absolute; inset: 0; background: rgba(11, 11, 12, .72); }
.mo-ersatzbild a, .mo-ersatzbild > span { text-decoration: none; }
.mo-ersatzbild a { position: absolute; inset: 0; }
.mo-ersatzbild .mo-nummer, .mo-ersatzbild .mo-symbol { position: absolute; z-index: 1; }
.mo-ersatzbild .mo-nummer { display: none; }
.mo-ersatzbild .mo-symbol { left: 50%; top: 50%; transform: translate(-50%, -50%); width: 34%; aspect-ratio: 1 / 1;
  display: grid; place-items: center; font-size: clamp(2rem, 5vw, 3.6rem);
  border: 3px solid #b9bcc1; outline: 1px solid #45484d; outline-offset: -8px; background-color: #121315; }
.mo-beitrag .mo-ersatzbild { margin: -1.3rem -1.3rem 1rem !important; }
.mo-beitrag:hover .mo-ersatzbild .mo-symbol { border-color: #c8212c; }
.mo-artikelbild-kopf.mo-ersatzbild { display: none; }

/* Kategorien als Schilder */
.mo-kategorien { list-style: none; padding: 0; margin: 0 0 2rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.mo-kategorien li a { display: inline-block; padding: .3rem .8rem; border: 1px solid #3a3c40; text-decoration: none;
  font-size: .85rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #d4d6d9; }
.mo-kategorien li a:hover, .mo-kategorien li.current-cat a { border-color: #c8212c; color: #c8212c; }

/* Artikeltext */
.mo-artikeltext { font-size: 1.12rem; }
.mo-artikeltext a { color: #f4f5f6; text-decoration-color: #c8212c; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.mo-artikeltext a:hover { color: #c8212c; }
.mo-artikeltext h2, .mo-artikeltext h3 { margin-top: 2.2em; }
.mo-artikeltext img { border: 1px solid #2a2c30; }
.mo-schlagwoerter { font-size: .9rem; color: #8d9095; margin-top: 2rem !important; }
.mo-schlagwoerter a { color: #d4d6d9; }
.mo-blaettern a { text-decoration: none; font-weight: 700; }
.mo-blaettern a:hover { color: #c8212c; }
.mo-mehr { background: #101113; border-top: 1px solid #2a2c30; }
.mo-mehr:not(:has(.wp-block-post)) { display: none; }

/* Suche */
.mo-suche .wp-block-search__input { background: #18191b; border: 1px solid #3a3c40; color: #f4f5f6; padding: .7rem 1rem; }
.mo-suche .wp-block-search__button { background: #c8212c; color: #fff; border: 0; font-weight: 700; }
.mo-kopf .wp-block-search__button { background: transparent; color: #d4d6d9; border: 1px solid #3a3c40; padding: .35rem; width: 2.4rem; height: 2.4rem; display: grid; place-items: center; }
.mo-kopf .wp-block-search__button svg { width: 1.3rem; height: 1.3rem; fill: currentColor; }
.mo-kopf .wp-block-search__button:hover { color: #c8212c; border-color: #c8212c; }
.mo-kopf .wp-block-search__input { background: #18191b; color: #f4f5f6; border: 1px solid #3a3c40; }
.wp-block-query-pagination a { text-decoration: none; }
.wp-block-query-pagination .current { color: #c8212c; font-weight: 800; }

/* ---------- Knöpfe ---------- */
.wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; color: #f4f5f6; border: 2px solid #b9bcc1; }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { border-color: #c8212c; color: #c8212c; background: transparent; }
.wp-block-button__link { transition: background .25s ease, color .25s ease, transform .25s ease; }
.wp-block-button__link:hover { transform: translateY(-2px); }

/* ---------- Fuss ---------- */
.mo-fuss { border-top: 1px solid #2a2c30; }
.mo-fuss a { color: #8d9095; }
.mo-fuss a:hover { color: #c8212c; }

/* ---------- Parallax wie bei Twenty Seventeen ----------
   Das Hintergrundbild steht (background-attachment: fixed), der Inhalt gleitet darüber.
   Auf Touch-Geräten (iOS kann fixed nicht) scrollt das Bild normal mit. */
.wp-site-blocks > main { margin-block-start: 0; }
.wp-site-blocks > footer { margin-block-start: 0; }
.mo-parallax {
  position: relative;
  display: flex; flex-direction: column; justify-content: center;
  min-height: 55vh;
  background-color: #0b0b0c;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  margin-block: 0 !important;
  border-top: 1px solid #2a2c30; border-bottom: 1px solid #2a2c30;
}
.mo-parallax::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(11, 11, 12, .55) 0%, rgba(11, 11, 12, .15) 45%, rgba(11, 11, 12, .75) 100%);
}
.mo-parallax > * { position: relative; z-index: 1; }
/* Flex-Spalte: Kinder volle Breite, sonst schrumpfen sie durch margin:auto auf Textbreite */
.mo-parallax > .mo-parallax-inhalt { width: 100%; }
.mo-bild-periodensystem { background-image: url("assets/img/periodensystem.webp"); }
.mo-bild-metall { background-image: url("assets/img/metall.webp"); }
@media (min-width: 782px) and (hover: hover) {
  .mo-parallax { background-attachment: fixed; }
}

/* Bildschirmhoher Kopf, Titel unten links */
.mo-parallax-voll { min-height: calc(100vh - 77px); min-height: calc(100svh - 77px); justify-content: flex-end; padding-bottom: 4.5rem !important; border-top: 0; }
.admin-bar .mo-parallax-voll { min-height: calc(100vh - 109px); }
.mo-parallax-voll::before { background: linear-gradient(180deg, rgba(11, 11, 12, .2) 0%, rgba(11, 11, 12, .1) 40%, rgba(11, 11, 12, .92) 100%); }
.mo-riesentitel { font-size: clamp(3.4rem, 12vw, 9rem) !important; font-weight: 800; line-height: .95; letter-spacing: -0.03em; margin: .2rem 0 .6rem !important; }
.mo-parallax-inhalt > * { margin-block: .3rem; }
.mo-runter { position: absolute !important; left: 50%; bottom: 1.2rem; transform: translateX(-50%); color: #d4d6d9;
  width: 52px; height: 52px; display: grid; place-items: center; border: 2px solid #8d9095; border-radius: 50%;
  animation: mo-wippen 2.4s ease-in-out infinite; }
.mo-runter:hover { color: #c8212c; border-color: #c8212c; }
@keyframes mo-wippen { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }

/* Bänder */
.mo-parallax-schmal { min-height: 34vh; }
.mo-mitte { text-align: center; }
.mo-zitat { font-size: clamp(1.6rem, 4vw, 2.8rem); font-weight: 800; color: #f4f5f6; line-height: 1.3; max-width: 900px; margin-inline: auto !important; }
.mo-parallax-schmal .mo-dachzeile { font-size: 1rem; color: #d4d6d9; }

/* ---------- Bilder ---------- */
.wp-block-image img { border: 1px solid #2a2c30; }

@media (prefers-reduced-motion: reduce) {
  .mo-hero-logo img { animation: none; }
  .mo-gefahr-zeichen { animation: none; }
  .mo-parallax { background-attachment: scroll !important; }
  .mo-runter { animation: none; }
  html { scroll-behavior: auto; }
  .mo-kachel, .mo-kachel:hover, .mo-beitrag:hover, .wp-block-button__link:hover, .mo-kopf a:hover img { transform: none; transition: none; }
}
/* Handy und Tablet: Kacheln im 2x2-Raster statt riesig untereinander */
@media (max-width: 781px) {
  .mo-kacheln { display: grid !important; grid-template-columns: 1fr 1fr; }
  .mo-kacheln-drei { grid-template-columns: 1fr 1fr 1fr; gap: .7rem !important; }
  .mo-artikel-aufmacher { gap: 1rem !important; }
  .mo-kacheln > .wp-block-column { flex-basis: auto !important; }
  .mo-hero-logo { max-width: 420px; margin: 0 auto; }
}
@media (max-width: 600px) {
  .mo-kopf .wp-block-site-title { font-size: 1.1rem !important; }
  .mo-kachel { padding: .7rem .8rem !important; outline-offset: -7px; }
  .mo-nummer { font-size: 1.1rem; }
  .mo-name { font-size: .95rem; }
  .mo-wert { font-size: .78rem; }
}
