/* ==========================================================================
   Glatzenfreund — zentrales Stylesheet
   Farb-/Type-System: Retro-Barbershop, warmes Off-White, Messing + Stahlblau
   ========================================================================== */

:root {
  /* Farben */
  --color-bg: #FAF9F5;
  --color-bg-box: #F1EEE7;
  --color-bg-box-hover: #E9E5DA;
  --color-dark: #1C1A18;
  --color-dark-soft: #2A2724;
  --color-text: #1F1E1D;
  --color-text-muted: #6B6660;
  --color-brass: #B8863A;
  --color-brass-dark: #8F6A2C;
  --color-steel: #3A5A6B;
  --color-steel-dark: #2A4250;
  --color-white: #FFFFFF;

  /* Typografie */
  --font-display: 'BebasNeueLocal', Impact, 'Arial Narrow', sans-serif;
  --font-body: 'InterLocal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Layout-Breiten */
  --width-hero-max: 1920px;
  --width-grid-max: 1280px;
  --width-article-max: 740px;

  /* Radius */
  --radius-box: 12px;
  --radius-btn: 6px;
}

/* Self-hosted Fonts (DSGVO-konform, keine externen Requests an Google o.ä.) */
/* Dateien müssen unter /assets/fonts/ abgelegt werden, siehe README.md.        */
/* Solange die Dateien fehlen, greift automatisch der Fallback aus var(--font-*) */

@font-face {
  font-family: 'BebasNeueLocal';
  src: url('../fonts/BebasNeue-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'InterLocal';
  src: url('../fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'InterLocal';
  src: url('../fonts/Inter-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'InterLocal';
  src: url('../fonts/Inter-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  /* Sicherheitsnetz: verhindert, dass ein zu breites Element (siehe Logo-
     Wortmark im mobilen Header) die Seite horizontal verschiebbar macht. */
  overflow-x: hidden;
}

h1, h2, h3, .logo, .display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--color-text);
  line-height: 1.1;
}

h1 { font-size: 42px; }
h2 { font-size: 30px; }
h3 { font-size: 22px; }

a {
  color: var(--color-steel-dark);
  text-decoration: none;
}
a:hover { color: var(--color-brass-dark); }

/* ---------- Links im Fließtext deutlicher hervorheben ---------- */

.container-article p a,
.article-closing p a,
.faq-item p a,
.intro-copy a {
  border-bottom: 1px dotted var(--color-brass-dark);
  padding-bottom: 1px;
}

.container-article p a:hover,
.article-closing p a:hover,
.faq-item p a:hover,
.intro-copy a:hover {
  border-bottom-style: solid;
}

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

/* ---------- Header-Shell: fasst Hero, Logo und Navigation zusammen ---------- */
/* Der äußere Rahmen ist hell (Seitenhintergrund), der innere, auf 1920px      */
/* gedeckelte Block ist dunkel — dadurch bleibt der dunkle Bereich auch auf    */
/* sehr breiten Monitoren proportional statt über die volle Breite zu laufen. */

.page-header-shell {
  background: var(--color-bg);
}

.page-header-shell__inner {
  max-width: var(--width-hero-max);
  margin: 0 auto;
  background: var(--color-dark);
}

/* ---------- Hero-Bild (nur Startseite, Teil der Header-Shell) ---------- */

.hero__media {
  position: relative;
  width: 100%;
  height: 520px;
  overflow: hidden;
  background: var(--color-dark-soft);
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}

.hero__logo-block {
  text-align: center;
  padding: 28px 24px 34px;
}

.hero__logo-block .logo {
  color: var(--color-white);
  font-size: 60px;
  letter-spacing: 0.09em;
  margin: 0;
}

.hero__tagline {
  color: var(--color-brass);
  font-family: var(--font-body);
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 10px 0 0;
}

.logo-rule--center {
  height: 2px;
  width: 70px;
  background: var(--color-brass);
  margin: 12px auto 0;
}

/* ---------- Schlanker Logo-Bereich (Unterseiten, Teil der Header-Shell) ---------- */

.site-header__inner {
  padding: 22px 24px;
  text-align: center;
}

.logo-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.logo-lockup .logo-icon {
  height: 40px;
  width: 40px;
  flex-shrink: 0;
}

.logo-lockup .logo {
  color: var(--color-white);
  font-size: 40px;
  letter-spacing: 0.08em;
  margin: 0;
}

.logo-lockup .logo-rule {
  display: none;
}

.hero__logo-icon {
  height: 52px;
  width: 52px;
  margin: 0 auto 6px;
  display: block;
}

/* ---------- Navigation (Teil der Header-Shell) ---------- */

.site-nav__bar {
  position: relative;
  display: flex;
  justify-content: center;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.site-nav__inner {
  padding: 0 24px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.site-nav a {
  display: block;
  padding: 14px 18px;
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--color-brass);
}

/* ---------- Hamburger-Menü (reines CSS, keine Abhängigkeit von JavaScript) ---------- */
/* Funktioniert über eine versteckte Checkbox + <label>: Klick auf das Label   */
/* schaltet die Checkbox um, der :checked-Zustand steuert per CSS-Selektoren   */
/* (~ / +) das Icon und das Einblenden von .site-nav__inner. Auf Desktop-      */
/* Breiten bleiben Checkbox und Button per visibility:hidden komplett aus dem  */
/* Layout und aus der Tab-Reihenfolge draußen. */

.nav-toggle-checkbox {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.nav-toggle-btn {
  display: none;
}

@media (max-width: 640px) {

  .site-nav__bar {
    justify-content: flex-end;
    padding: 0 20px;
  }

  .nav-toggle-checkbox {
    visibility: visible;
    pointer-events: auto;
  }

  .nav-toggle-btn {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    cursor: pointer;
  }

  .nav-toggle-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-brass);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
  }

  .nav-toggle-checkbox:checked + .nav-toggle-btn span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle-checkbox:checked + .nav-toggle-btn span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle-checkbox:checked + .nav-toggle-btn span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-nav__inner {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding: 0;
    background: var(--color-dark);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 12px 20px rgba(0,0,0,0.25);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: max-height 0.3s ease, opacity 0.2s ease, transform 0.2s ease;
  }

  .nav-toggle-checkbox:checked ~ .site-nav__inner {
    max-height: 420px;
    opacity: 1;
    transform: translateY(0);
  }

  .site-nav a {
    width: 100%;
    padding: 16px 24px;
    border-top: 1px solid rgba(255,255,255,0.06);
    border-left: 3px solid transparent;
  }

  .site-nav__inner a:first-child {
    border-top: none;
  }

  .site-nav a:hover,
  .site-nav a.is-active {
    background: rgba(255,255,255,0.05);
    border-left-color: var(--color-brass);
  }
}

/* Verhindert Scrollen im Hintergrund, während das mobile Menü offen ist.     */
/* :has() wird von allen aktuellen Browsern unterstützt; ohne :has()-Support  */
/* bleibt der Hintergrund einfach scrollbar, kein Fehlerfall. */
body:has(.nav-toggle-checkbox:checked) {
  overflow: hidden;
}

/* ---------- Layout-Container ---------- */

.container-grid {
  max-width: var(--width-grid-max);
  margin: 0 auto;
  padding: 0 24px;
}

.container-article {
  max-width: var(--width-article-max);
  margin: 0 auto;
  padding: 0 24px;
}

.article-featured-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-box);
  margin: 20px 0 28px;
  display: block;
}

.breadcrumb {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 18px 0 4px;
}

.breadcrumb a {
  color: var(--color-steel-dark);
}

.breadcrumb .sep {
  margin: 0 6px;
  color: var(--color-text-muted);
}

.breadcrumb {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 20px 0 8px;
}

.breadcrumb a {
  color: var(--color-text-muted);
}

.breadcrumb a:hover {
  color: var(--color-brass-dark);
}

.breadcrumb-sep {
  margin: 0 6px;
  color: var(--color-text-muted);
}

.breadcrumb-current {
  color: var(--color-text);
  font-weight: 500;
}

section {
  padding: 48px 0;
}

/* ---------- Boxen-Grid (Startseite / Kategorie-Übersichten) ---------- */

.section-heading {
  text-align: center;
  margin-bottom: 8px;
}

.section-sub {
  text-align: center;
  color: var(--color-text-muted);
  margin: 0 0 32px;
  font-size: 16px;
}

.box-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

/* ---------- Meistgelesen: kompaktes 5er-Grid, 2 Reihen ---------- */

.box-grid--compact {
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

@media (max-width: 900px) {
  .box-grid--compact {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .box-grid--compact {
    grid-template-columns: repeat(2, 1fr);
  }
}

.box-card {
  background: var(--color-bg-box);
  border-radius: var(--radius-box);
  padding: 24px;
  transition: background 0.15s ease;
}

.box-card:hover {
  background: var(--color-bg-box-hover);
}

.box-card__eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-steel-dark);
  font-weight: 600;
  margin-bottom: 10px;
}

.box-card h3 {
  margin: 0 0 10px;
}

.box-card p {
  color: var(--color-text-muted);
  font-size: 15px;
  margin: 0 0 14px;
}

.box-card__link {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-brass-dark);
}

/* ---------- Artikel-Boxen mit Hintergrundbild (Meistgelesen etc.) ---------- */

.box-card--photo {
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-box);
  overflow: hidden;
  padding: 0;
  background: var(--color-dark-soft);
}

.box-card--photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.25s ease, transform 0.35s ease;
}

.box-card--photo:hover img {
  filter: grayscale(0%);
  transform: scale(1.04);
}

.box-card--photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.15) 55%, rgba(0,0,0,0) 75%);
  pointer-events: none;
}

.box-card--photo__content {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 16px;
  z-index: 1;
}

.box-card--photo__content .box-card__eyebrow {
  color: var(--color-brass);
  margin-bottom: 4px;
}

.box-card--photo__content h3 {
  color: var(--color-white);
  font-size: 17px;
  margin: 0;
}

/* ---------- Kleinere Variante der Foto-Kacheln (Meistgelesen, 10er-Grid) ---------- */

.box-card--photo--sm {
  max-width: 235px;
  margin: 0 auto;
  width: 100%;
}

.box-card--photo--sm .box-card--photo__content {
  padding: 8px;
}

.box-card--photo--sm .box-card--photo__content h3 {
  font-size: 14px;
  line-height: 1.25;
}

.box-card--photo--sm .box-card--photo__content .box-card__eyebrow {
  font-size: 10px;
  margin-bottom: 2px;
}


/* ---------- Pillar-Bereich (4 Hauptbereiche, jetzt mit Bild) ---------- */

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.pillar-card {
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-box);
  overflow: hidden;
  color: var(--color-white);
  background: var(--color-dark-soft);
}

.pillar-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.pillar-card:hover img {
  transform: scale(1.04);
}

.pillar-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.25) 55%, rgba(0,0,0,0.05) 80%);
  pointer-events: none;
}

.pillar-card__content {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 20px;
  z-index: 1;
}

.pillar-card__content .box-card__eyebrow {
  color: var(--color-brass);
}

.pillar-card__content h3 {
  color: var(--color-white);
  margin: 6px 0 6px;
}

.pillar-card__content p {
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  margin: 0;
}

/* ---------- FAQ-Akkordeon ---------- */

.faq-accordion {
  margin-top: 8px;
}

.faq-item {
  border-bottom: 1px solid var(--color-bg-box);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 4px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  color: var(--color-text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--color-brass);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  padding: 0 4px 18px;
  margin: 0;
  color: var(--color-text-muted);
  font-size: 15px;
}

/* ---------- Abschlusstext nach dem FAQ ---------- */

.article-closing {
  margin-top: 40px;
  padding: 24px;
  background: var(--color-bg-box);
  border-radius: var(--radius-box);
}

.article-closing p {
  margin: 0;
  font-size: 15px;
}

/* ---------- "Andere Leser haben auch das hier gelesen" (unter jedem Artikel) ---------- */

.related-articles {
  margin-top: 48px;
  padding-top: 8px;
}

.related-articles .section-heading {
  font-size: 26px;
  margin-bottom: 24px;
}

/* 4 statt 5 Spalten, dadurch größere Kacheln als im kompakten 5er-Grid.
   minmax(0, 1fr) statt nur "1fr": verhindert, dass der Browser den Spalten
   eine inhaltsbasierte Mindestbreite gibt, die zum Umbruch in 2 Zeilen führt. */
/* 4 statt 5 Spalten, dadurch größere Kacheln als im kompakten 5er-Grid.
   minmax(0, 1fr) statt nur "1fr": verhindert, dass der Browser den Spalten
   eine inhaltsbasierte Mindestbreite gibt, die zum Umbruch in 2 Zeilen führt. */
.box-grid--related {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 480px) {
  .box-grid--related {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.box-card--photo--related {
  min-width: 0;
  max-width: 150px;
  margin: 0 auto;
  width: 100%;
}

.box-card--photo--related .box-card--photo__content {
  padding: 8px;
}

.box-card--photo--related .box-card--photo__content h3 {
  font-size: 13px;
  line-height: 1.25;
}

.box-card--photo--related .box-card--photo__content .box-card__eyebrow {
  font-size: 9px;
  margin-bottom: 2px;
}

/* ---------- Kontaktformular ---------- */

.contact-form-wrap {
  margin-top: 40px;
  padding: 32px;
  border: 1px solid var(--color-bg-box-hover);
  border-radius: var(--radius-box);
}

.contact-form-wrap h2 {
  margin-bottom: 6px;
}

.contact-form-wrap .form-sub {
  color: var(--color-text-muted);
  font-size: 14px;
  margin: 0 0 20px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-bg-box);
  border-radius: var(--radius-btn);
  background: var(--color-white);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--color-text);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-steel);
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-form .consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.contact-form .consent-row input {
  margin-top: 3px;
}

.contact-form .consent-row a {
  color: var(--color-steel-dark);
}

.contact-form button {
  align-self: flex-start;
  background: var(--color-dark);
  color: var(--color-white);
  border: none;
  padding: 13px 28px;
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}

.contact-form button:hover {
  background: var(--color-brass-dark);
}

.contact-form-message {
  padding: 14px 16px;
  border-radius: var(--radius-btn);
  font-size: 14px;
  margin-bottom: 16px;
}

.contact-form-message--success {
  background: #E4EFE7;
  color: #2C5F3D;
}

.contact-form-message--error {
  background: #F5E4E0;
  color: #8A3B2A;
}

/* honeypot-Feld, für Menschen unsichtbar, für Bots eine Falle */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Footer (professioneller, mehrspaltig) ---------- */

.site-footer {
  background: var(--color-dark);
  color: rgba(255,255,255,0.6);
  margin-top: 40px;
}

.site-footer__inner {
  max-width: var(--width-grid-max);
  margin: 0 auto;
  padding: 48px 24px 24px;
}

.site-footer__columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-bottom: 32px;
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.site-footer__brand img {
  height: 32px;
  width: 32px;
}

.site-footer__brand span {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.06em;
  color: var(--color-white);
}

.site-footer__columns p {
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.site-footer__columns h4 {
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 14px;
}

.site-footer__columns ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer__columns a {
  color: rgba(255,255,255,0.65);
  font-size: 14px;
}

.site-footer__columns a:hover {
  color: var(--color-brass);
}

/* ---------- Social-Spalte: Icon + Text ---------- */

.site-footer__social a {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-footer__social svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ---------- Rechtliches-Spalte: ganz rechts, rechtsbündiger Text ---------- */

.site-footer__col--right {
  grid-column: 4;
  text-align: right;
}

.site-footer__col--right ul {
  align-items: flex-end;
}

.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 18px;
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .hero__media { height: 320px; }
  .hero__logo-block .logo { font-size: 32px; letter-spacing: 0.05em; }
  .logo-lockup .logo { font-size: 24px; letter-spacing: 0.04em; }
  .logo-lockup .logo-icon { height: 30px; width: 30px; }
  .logo-lockup { gap: 8px; }
  h1 { font-size: 30px; }
  .site-footer__columns { grid-template-columns: 1fr; gap: 24px; }
  .site-footer__bottom { flex-direction: column; text-align: center; }
  .site-footer__col--right { grid-column: auto; text-align: left; }
  .site-footer__col--right ul { align-items: flex-start; }
}
