/*
Theme Name: Handball Neuhausen Theme
Theme URI: https://handball-neuhausen.de/
Author: handball-neuhausen.de
Description: Custom theme for handball-neuhausen.de — Magazine-strip with sticky sidebar archetype, navy-amber palette, Exo 2 + Noto Sans self-hosted.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hn-theme
Tags: custom-menu, featured-images, translation-ready
*/

/* ============================================================
   FONTS — self-hosted Exo 2 (variable) + Noto Sans (variable)
   ============================================================ */

@font-face {
  font-family: 'Exo 2';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('assets/fonts/exo2-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Exo 2';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('assets/fonts/exo2-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('assets/fonts/noto-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('assets/fonts/noto-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================
   DESIGN TOKENS
   ============================================================ */

:root {
  --navy:       #1d3461;
  --navy-dark:  #152647;
  --amber:      #f4a215;
  --amber-dark: #d48d0c;
  --bg:         #f8f6f0;
  --surface:    #ffffff;
  --text:       #1a1a2e;
  --muted:      #5a6272;
  --border:     #e0dbd0;
  --radius:     6px;
  --shadow-sm:  0 2px 8px rgba(29,52,97,0.08);
  --shadow-md:  0 4px 16px rgba(29,52,97,0.12);
  --font-head:  'Exo 2', system-ui, sans-serif;
  --font-body:  'Noto Sans', system-ui, sans-serif;
  --max-w:      1160px;
  --gutter:     24px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
}

h1 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 2.8vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }
h4 { font-size: 1.05rem; }

p { margin-bottom: 1.2em; }
p:last-child { margin-bottom: 0; }

a { color: var(--navy); text-decoration: underline; text-decoration-color: transparent; transition: color 0.2s, text-decoration-color 0.2s; }
a:hover { color: var(--amber-dark); text-decoration-color: currentColor; }

img, svg { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.4em; }
li { margin-bottom: 0.35em; }

strong { font-weight: 700; }
em { font-style: italic; }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */

.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============================================================
   HEADER
   ============================================================ */

.site-header {
  background: var(--navy);
  border-bottom: 3px solid var(--amber);
  position: sticky;
  top: 0;
  z-index: 200;
}

.header-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.site-logo:hover { color: var(--amber); text-decoration: none; }
.site-logo svg { width: 38px; height: 38px; flex-shrink: 0; }

.primary-nav { display: flex; align-items: center; gap: 28px; list-style: none; padding: 0; margin: 0; }
.primary-nav a {
  color: rgba(255,255,255,0.85);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s;
}
.primary-nav a:hover,
.primary-nav .current-menu-item a { color: var(--amber); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: #fff;
}

/* ============================================================
   HERO STRIP (homepage feature)
   ============================================================ */

.hero-strip {
  background: var(--navy);
  color: #fff;
  overflow: hidden;
}

.hero-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 52px var(--gutter);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-block;
  background: var(--amber);
  color: var(--navy);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 3px;
  margin-bottom: 16px;
  text-decoration: none;
}

.hero-title {
  color: #fff;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: 16px;
}

.hero-excerpt {
  color: rgba(255,255,255,0.8);
  font-size: 1.05rem;
  margin-bottom: 28px;
}

.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 11px 26px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
}
.btn:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-primary { background: var(--amber); color: var(--navy); }
.btn-primary:hover { color: var(--navy); }
.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.5); }

.hero-media {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255,255,255,0.06);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem;
}

/* ============================================================
   MAIN LAYOUT — content + sticky sidebar
   ============================================================ */

.main-wrap {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 52px var(--gutter);
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

.main-content { min-width: 0; }

/* ============================================================
   SECTION LABELS
   ============================================================ */

.section-label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber-dark);
  border-bottom: 2px solid var(--amber);
  padding-bottom: 6px;
  margin-bottom: 28px;
}

/* ============================================================
   TOPIC CARD GRID
   ============================================================ */

.topic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 44px;
}

.topic-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  display: block;
  color: var(--text);
}
.topic-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--text);
  text-decoration: none;
}

.card-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg);
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.topic-card:hover .card-thumb img { transform: scale(1.03); }

.card-body { padding: 20px; }
.card-cat {
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber-dark);
  margin-bottom: 8px;
  display: block;
}
.card-title { font-size: 1.05rem; color: var(--navy); margin-bottom: 8px; }
.card-excerpt { font-size: 0.87rem; color: var(--muted); line-height: 1.55; }

/* ============================================================
   FEATURE STRIP (highlighted single article)
   ============================================================ */

.feature-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  align-items: center;
  margin-bottom: 0;
}

.feature-meta {
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber-dark);
  margin-bottom: 10px;
}

.feature-strip h2 { font-size: 1.45rem; margin-bottom: 12px; }
.feature-strip p { font-size: 0.93rem; color: var(--muted); margin-bottom: 18px; }

.link-arrow {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--amber-dark);
  text-decoration: none;
}
.link-arrow::after { content: ' →'; }
.link-arrow:hover { color: var(--navy); }

.feature-img {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}
.feature-img img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   STICKY SIDEBAR
   ============================================================ */

.sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.widget-title {
  font-family: var(--font-head);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--navy);
  border-bottom: 2px solid var(--amber);
  padding-bottom: 8px;
  margin-bottom: 14px;
}

.widget-nav { list-style: none; padding: 0; margin: 0; }
.widget-nav li { border-bottom: 1px solid var(--border); }
.widget-nav li:last-child { border: none; }
.widget-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s, padding-left 0.15s;
}
.widget-nav a:hover { color: var(--amber-dark); padding-left: 6px; }
.widget-nav a::before { content: '›'; color: var(--amber); font-weight: 700; }

.widget-about {
  background: var(--navy);
  border-color: var(--navy);
}
.widget-about .widget-title { color: var(--amber); border-color: rgba(244,162,21,0.4); }
.widget-about p { font-size: 0.87rem; color: rgba(255,255,255,0.78); line-height: 1.6; }

/* ============================================================
   PAGE / SINGLE CONTENT
   ============================================================ */

.page-header {
  background: var(--navy);
  color: #fff;
  padding: 44px var(--gutter);
  border-bottom: 3px solid var(--amber);
}
.page-header-inner { max-width: var(--max-w); margin-inline: auto; }
.page-breadcrumb {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 10px;
}
.page-breadcrumb a { color: rgba(255,255,255,0.7); text-decoration: none; }
.page-breadcrumb a:hover { color: var(--amber); }
.page-breadcrumb span { color: rgba(255,255,255,0.4); margin: 0 6px; }
.page-title { color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.page-subtitle { color: rgba(255,255,255,0.75); font-size: 1.05rem; margin-top: 8px; }

.entry-content {
  line-height: 1.75;
  font-size: 1.02rem;
}
.entry-content h2 { margin: 2em 0 0.7em; padding-top: 0.2em; border-top: 2px solid var(--border); }
.entry-content h2:first-child { margin-top: 0; border-top: none; }
.entry-content h3 { margin: 1.5em 0 0.5em; }
.entry-content ul, .entry-content ol { margin-bottom: 1.2em; }
.entry-content li { margin-bottom: 0.5em; }
.entry-content table { border-collapse: collapse; width: 100%; margin-bottom: 1.5em; font-size: 0.93rem; }
.entry-content th { background: var(--navy); color: #fff; padding: 10px 14px; text-align: left; font-family: var(--font-head); font-size: 0.85rem; }
.entry-content td { padding: 9px 14px; border-bottom: 1px solid var(--border); }
.entry-content tr:nth-child(even) td { background: var(--bg); }

.entry-content .faq-section { margin: 2.5em 0; }
.entry-content .faq-section h2 { border-top: none; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
.faq-question {
  background: var(--surface);
  padding: 14px 18px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.97rem;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-question::after { content: '+'; font-size: 1.2rem; color: var(--amber); flex-shrink: 0; }
details[open] .faq-question::after { content: '−'; }
.faq-answer { padding: 14px 18px; background: #fafaf8; font-size: 0.93rem; border-top: 1px solid var(--border); }

/* ============================================================
   SINGLE POST LAYOUT
   ============================================================ */

.single-wrap {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 52px var(--gutter);
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

.post-meta { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.post-date { font-size: 0.82rem; color: var(--muted); }
.post-cat { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--amber-dark); text-decoration: none; }

.post-featured-img { margin-bottom: 32px; border-radius: var(--radius); overflow: hidden; }
.post-featured-img img { width: 100%; }

/* ============================================================
   404 PAGE
   ============================================================ */

.error-wrap {
  max-width: 640px;
  margin-inline: auto;
  padding: 80px var(--gutter);
  text-align: center;
}
.error-code { font-size: 6rem; font-weight: 800; color: var(--amber); line-height: 1; margin-bottom: 16px; }
.error-wrap h1 { margin-bottom: 12px; }
.error-wrap p { color: var(--muted); margin-bottom: 28px; }

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: var(--navy);
  border-top: 3px solid var(--amber);
  margin-top: 0;
}

.footer-upper {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 48px var(--gutter) 32px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 48px;
}

.footer-brand .footer-logo { margin-bottom: 14px; }
.footer-brand p {
  font-size: 0.87rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.65;
  max-width: 300px;
}

.footer-col h3 {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: rgba(255,255,255,0.72); font-size: 0.9rem; text-decoration: none; }
.footer-col a:hover { color: var(--amber); }

.footer-bottom {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 16px var(--gutter);
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copy { font-size: 0.8rem; color: rgba(255,255,255,0.4); }
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { font-size: 0.8rem; color: rgba(255,255,255,0.5); text-decoration: none; }
.footer-legal a:hover { color: var(--amber); }

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
}
.footer-logo:hover { color: var(--amber); text-decoration: none; }
.footer-logo svg { width: 34px; height: 34px; }

/* ============================================================
   LEGAL PAGES (Impressum / Datenschutz)
   ============================================================ */

.legal-wrap {
  max-width: 760px;
  margin-inline: auto;
  padding: 52px var(--gutter);
}
.legal-wrap h1 { margin-bottom: 32px; }
.legal-section { margin-bottom: 36px; }
.legal-section h2 { font-size: 1.15rem; margin-bottom: 10px; color: var(--navy); }
.legal-section p, .legal-section address { font-size: 0.97rem; color: var(--text); font-style: normal; line-height: 1.7; }
.legal-section a { color: var(--navy); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .main-wrap, .single-wrap { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero-media { display: none; }
  .footer-upper { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .topic-grid { grid-template-columns: 1fr; }
  .feature-strip { grid-template-columns: 1fr; }
  .feature-img { display: none; }
  .footer-upper { grid-template-columns: 1fr; }
  .primary-nav { display: none; }
  .primary-nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--navy-dark);
    padding: 16px var(--gutter);
    gap: 4px;
    border-bottom: 2px solid var(--amber);
  }
  .primary-nav.is-open a { padding: 10px 0; font-size: 1rem; }
  .nav-toggle { display: block; }
  .header-inner { position: relative; }
}
