/*
Theme Name: SPD CD Theme
Theme URI: https://example.org/spd-cd-theme
Author: Theme Team
Description: Ein responsives WordPress-Theme auf Basis der gestalterischen Grundsätze des SPD-CD-Manuals.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: spd-cd-theme
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: custom-logo, custom-menu, featured-images, translation-ready, accessibility-ready
*/

:root {
  --spd-red: #e3000f;
  --spd-black: #000;
  --spd-white: #fff;
  --spd-grey: #ededed;
  --content-width: 76rem;
  --space-1: clamp(.75rem, 1.4vw, 1rem);
  --space-2: clamp(1.25rem, 2.6vw, 2rem);
  --space-3: clamp(2rem, 5vw, 4.5rem);
  --shadow: 0 0.3rem 1.4rem rgba(0, 0, 0, .13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--spd-black); background: var(--spd-white); font-family: "Open Sans", Arial, sans-serif; font-size: 1rem; line-height: 1.6; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: .12em; text-underline-offset: .16em; }
a:hover, a:focus { color: var(--spd-red); }
button, input, textarea, select { font: inherit; }

.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { z-index: 100000; top: .5rem; left: .5rem; width: auto; height: auto; padding: .75rem 1rem; margin: 0; clip: auto; color: var(--spd-white); background: var(--spd-black); }

.site-header { position: relative; z-index: 3; color: var(--spd-white); background: var(--spd-red); }
.site-header__inner, .site-footer__inner, .site-main, .site-footer__bottom { width: min(calc(100% - 2rem), var(--content-width)); margin-inline: auto; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; min-height: 5rem; }
.site-branding { display: flex; align-items: center; min-width: 0; }
.custom-logo-link { display: block; line-height: 0; }
.custom-logo { width: auto; max-height: 3rem; }
.site-title { margin: 0; color: var(--spd-white); font-weight: 800; font-size: clamp(1.15rem, 2vw, 1.5rem); line-height: 1; text-decoration: none; }
.site-description { margin: .4rem 0 0; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.menu-toggle { display: none; padding: .65rem .9rem; color: var(--spd-white); border: 2px solid currentColor; background: transparent; font-weight: 800; cursor: pointer; }
.primary-menu, .footer-menu { display: flex; flex-wrap: wrap; gap: 1.2rem; padding: 0; margin: 0; list-style: none; }
.primary-menu a, .footer-menu a { color: inherit; font-size: .9rem; font-weight: 800; text-decoration: none; text-transform: uppercase; }
.primary-menu a:hover, .primary-menu a:focus, .footer-menu a:hover, .footer-menu a:focus { color: var(--spd-white); text-decoration: underline; }

.site-main { padding-block: var(--space-3); }
.entry-header { max-width: 58rem; margin-bottom: var(--space-2); }
.entry-title, .page-title, .hero-title, .widget-title { margin: 0; font-weight: 800; line-height: .98; letter-spacing: -.035em; text-transform: uppercase; }
.entry-title, .page-title { font-size: clamp(2.25rem, 6vw, 5rem); }
.entry-title a { text-decoration: none; }
.entry-meta { margin-top: .75rem; font-size: .875rem; font-weight: 700; }
.entry-meta a { color: var(--spd-red); }
.entry-content { max-width: 48rem; }
.entry-content > * + * { margin-top: 1.25em; }
.entry-content h2, .entry-content h3, .entry-content h4 { font-weight: 800; line-height: 1.12; text-transform: uppercase; }
.entry-content h2 { font-size: clamp(1.65rem, 4vw, 2.7rem); }
.entry-content blockquote { margin: 2.2rem 0; padding: 1.25rem 1.5rem; border-left: .55rem solid var(--spd-red); background: var(--spd-grey); font-size: clamp(1.25rem, 2vw, 1.65rem); font-weight: 800; line-height: 1.25; }
.entry-content blockquote p:last-child { margin-bottom: 0; }
.wp-post-image { display: block; width: 100%; margin: 0 0 var(--space-2); }

.hero { position: relative; display: grid; align-items: end; min-height: min(72vh, 48rem); padding: var(--space-3); color: var(--spd-white); background: var(--spd-red); overflow: hidden; }
.hero::before { position: absolute; z-index: 0; top: -24vw; right: -5vw; width: min(67vw, 54rem); height: min(67vw, 54rem); border: clamp(1.8rem, 5vw, 5rem) solid var(--spd-white); border-radius: 50%; content: ""; opacity: .96; }
.hero::after { position: absolute; z-index: 0; right: 16%; bottom: -11rem; width: 18rem; height: 24rem; background: var(--spd-black); content: ""; transform: rotate(10deg); }
.hero--image { background-position: center; background-size: cover; }
.hero--image::before { inset: 0; width: auto; height: auto; border: 0; border-radius: 0; background: linear-gradient(90deg, rgba(227, 0, 15, .94), rgba(227, 0, 15, .53)); }
.hero__content { position: relative; z-index: 1; width: min(100%, 57rem); }
.hero-kicker { margin: 0 0 .75rem; font-weight: 800; text-transform: uppercase; }
.hero-title { font-size: clamp(3rem, 10vw, 8.5rem); }
.hero-text { max-width: 43rem; margin: 1rem 0 0; font-size: clamp(1.1rem, 2vw, 1.5rem); font-weight: 700; }
.button, .wp-block-button__link { display: inline-block; padding: .85rem 1.15rem; margin-top: 1.4rem; color: var(--spd-white); border: 2px solid var(--spd-black); background: var(--spd-black); box-shadow: none; font-weight: 800; text-decoration: none; text-transform: uppercase; transition: transform .15s ease, background .15s ease; }
.button:hover, .button:focus, .wp-block-button__link:hover, .wp-block-button__link:focus { color: var(--spd-black); background: var(--spd-white); transform: translateY(-.15rem); }

.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
.post-card { border-top: .55rem solid var(--spd-red); }
.post-card__image { display: block; aspect-ratio: 16 / 9; margin-bottom: 1rem; background: var(--spd-grey); overflow: hidden; }
.post-card__image img { width: 100%; height: 100%; object-fit: cover; }
.post-card__title { margin: 0; font-size: clamp(1.35rem, 2.5vw, 2rem); font-weight: 800; line-height: 1.04; text-transform: uppercase; }
.post-card__title a { text-decoration: none; }
.post-card__excerpt { margin-bottom: 0; }
.notice { margin-block: var(--space-3); padding: var(--space-2); color: var(--spd-white); background: var(--spd-red); }
.notice h2 { margin-top: 0; font-size: clamp(1.75rem, 3vw, 2.75rem); font-weight: 800; line-height: 1; text-transform: uppercase; }
.notice p:last-child { margin-bottom: 0; }
.rotated-badge { display: inline-block; padding: .65rem .9rem; color: var(--spd-white); background: var(--spd-red); font-weight: 800; line-height: 1; text-transform: uppercase; transform: rotate(-10deg); }

.navigation.pagination { margin-top: var(--space-3); }
.nav-links { display: flex; flex-wrap: wrap; gap: .45rem; }
.page-numbers { min-width: 2.4rem; padding: .4rem .65rem; border: 2px solid var(--spd-black); font-weight: 800; text-align: center; text-decoration: none; }
.page-numbers.current, .page-numbers:hover { color: var(--spd-white); background: var(--spd-black); }
.post-navigation { display: flex; justify-content: space-between; gap: 1rem; padding-top: var(--space-2); margin-top: var(--space-3); border-top: 2px solid var(--spd-black); font-weight: 800; }

.site-footer { margin-top: var(--space-3); color: var(--spd-white); background: var(--spd-red); }
.site-footer__inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--space-3); padding-block: var(--space-3); }
.site-footer__claim { margin: 0; font-size: clamp(2.25rem, 5vw, 4.5rem); font-weight: 800; line-height: .95; letter-spacing: -.035em; text-transform: uppercase; }
.site-footer .widget { margin-bottom: 1.5rem; }
.site-footer .widget-title { font-size: 1.1rem; }
.site-footer .widget ul { padding-left: 1.1rem; }
.site-footer__bottom { padding-block: 1.1rem; border-top: 1px solid rgba(255,255,255,.55); font-size: .85rem; }

.alignwide { max-width: min(100%, 68rem); }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }
.wp-block-cover, .wp-block-group { margin-block: var(--space-2); }
.wp-block-separator { border: 0; border-top: .5rem solid var(--spd-red); }

@media (max-width: 46rem) {
  .site-header__inner { min-height: 4.5rem; }
  .menu-toggle { display: block; }
  .main-navigation { position: absolute; top: 100%; right: 0; left: 0; display: none; padding: 1.25rem 1rem; background: var(--spd-red); border-top: 1px solid rgba(255,255,255,.55); }
  .main-navigation.is-open { display: block; }
  .primary-menu { display: grid; gap: .75rem; }
  .hero { min-height: 32rem; padding: 1.5rem; }
  .posts-grid, .site-footer__inner { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
