/* ==============================================
   Politika Nea — Styles
   Fonts: Georgia (system) + Alfarn / Alfarn 2 (Adobe Fonts)
   To add Adobe Fonts, paste this in <head> before style.css:
     <link rel="stylesheet" href="https://use.typekit.net/XXXXXXX.css">
   Then use: font-family: 'alfarn', serif;
============================================== */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: Georgia, 'Times New Roman', serif;
  background: #fff;
  color: #0a0a0a;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; }
img { border: 0; }

/* ==============================================
   HEADER — header.svg with invisible nav overlays
   SVG viewBox: 2880 × 337.8
   Positions derived from bounding rect elements in SVG source.
============================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: #fff;
}

.header-wrap {
  position: relative;
  width: 100%;
  line-height: 0;
}

.header-img {
  display: block;
  width: 100%;
  height: auto;
}

/* Nav overlay container: pointer-events off so SVG image is visible */
.header-nav {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Each nav link: invisible block, sized to cover the SVG text element */
.nav-ovl {
  position: absolute;
  display: block;
  pointer-events: all;
  cursor: pointer;
}

/* Logo mark + wordmark: full height for easy clicking */
.nav-logo {
  left: 0;
  top: 0;
  width: 43%;
  height: 100%;
}

/* wordmark covered by nav-logo — kept for clarity but same area */
.nav-wordmark {
  display: none;
}

/* "Leitbild": x correct, height stretched to full header for easy clicking */
.nav-leitbild {
  left: 43.5%;
  top: 0;
  width: 7.1%;
  height: 100%;
}

/* "Veranstaltungen" */
.nav-events {
  left: 49.8%;
  top: 0;
  width: 16.5%;
  height: 100%;
}

/* "Kontakt" */
.nav-kontakt {
  left: 65.5%;
  top: 0;
  width: 7.5%;
  height: 100%;
}

/* VEREINSBEITRITT button: full height for easy clicking */
.nav-join {
  left: 75.7%;
  top: 0;
  width: 17%;
  height: 100%;
}

/* ==============================================
   MAIN CONTENT
============================================== */

main {
  flex: 1;
}

/* SVG full-width section (leitbild, kontakt) */
.main-svg {
  width: 100%;
}

.svg-section-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  background: #0a0a0a; /* fills gaps where SVG background image doesn't reach edges */
}

.svg-section-img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

/* Overlay links on content SVGs */
.svg-ovl {
  position: absolute;
  display: block;
  cursor: pointer;
  pointer-events: all;
}

/* ==============================================
   EVENTS PAGE — veranstaltungen.html
============================================== */

.main-events {
  width: 100%;
  max-width: 844px; /* matches leitbild text column: x 600–2287 on 2880px SVG = 844px at 1× */
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 2rem;
}

.events-empty {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #999;
  text-align: center;
  padding: 4rem 0;
}

.hidden { display: none; }

/* Event card */
.ev-card {
  border: 1px solid #0a0a0a;
  display: flex;
  flex-direction: column;
  background: #fff;
}

/* Image — full width, natural height */
.ev-image {
  width: 100%;
  line-height: 0;
}
.ev-image img {
  display: block;
  width: 100%;
  height: auto;
}

/* PDF embed — shown only once iframe is injected by JS */
.ev-pdf-embed {
  width: 100%;
  line-height: 0;
}
.ev-pdf-embed:empty {
  display: none; /* hide until iframe is inserted */
}
.ev-pdf-embed iframe {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1.414; /* A4 portrait */
  border: none;
  min-height: 420px;
}

/* Download button row below PDF embed */
.ev-pdf-actions {
  padding: 0.75rem 1.5rem 0;
}

.ev-btn-pdf {
  display: inline-block;
  line-height: normal;
}

/* Text body */
.ev-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.ev-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 19px;
  font-weight: bold;
  line-height: 1.1;
}

.ev-meta {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 13px;
  color: #555; /* dark grey, lighter than description */
  letter-spacing: 0.02em;
}

.ev-desc {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 13px;
  line-height: 1.5;
  color: #0a0a0a;
}

/* Action buttons */
.ev-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 1rem;
}

.ev-btn {
  font-family: 'alfarn', Georgia, serif; /* Alfarn for linked text */
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 1.25rem;
  background: #0a0a0a;
  color: #fff;
  border: 1px solid #0a0a0a;
  text-decoration: none;
  cursor: pointer;
  display: inline-block;
}

.ev-btn:hover { background: #333; border-color: #333; }

/* "+Kalender" button — Georgia, bold, all caps */
.ev-btn-outline {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: bold;
  font-size: 10px;
  background: #fff;
  color: #0a0a0a;
}
.ev-btn-outline:hover { background: #f6f6f4; }

/* ==============================================
   HOMEPAGE — hero image + Aktuelles blog
============================================== */

/* Hero: same width as blog column */
.hero-section {
  width: 100%;
  max-width: 844px;
  margin: 0 auto;
  padding: 4rem 1.5rem 0;
  line-height: 0;
}

.hero-img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* Aktuelles section */
.main-aktuelles {
  width: 100%;
  max-width: 844px; /* same width as leitbild text column */
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}

.aktuelles-heading {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 33px;
  font-weight: bold;
  color: #0a0a0a;
  margin-bottom: 3rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #0a0a0a;
}

.posts-empty {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #999;
  text-align: center;
  padding: 3rem 0;
}

/* Individual post card */
.post-card {
  margin-bottom: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid #e8e8e6;
}

.post-card:last-child {
  border-bottom: none;
}

/* Post image */
.post-image-wrap {
  width: 100%;
  margin-bottom: 1.5rem;
  line-height: 0;
}

.post-image {
  display: block;
  width: 100%;
  height: auto;
}

/* Post video (YouTube / Vimeo iframe or <video>) */
.post-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 1.5rem;
  background: #0a0a0a;
  line-height: 0;
}

.post-video iframe,
.post-video video {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
}

/* Post title */
.post-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 19px;
  font-weight: bold;
  line-height: 1.25;
  color: #0a0a0a;
  margin-bottom: 0.75rem;
}

/* Post text body — HTML from admin, links use alfarn */
.post-content {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 15px;
  line-height: 1.75;
  color: #0a0a0a;
  margin-bottom: 1rem;
}

.post-content a {
  font-family: 'alfarn', Georgia, serif;
  color: #0a0a0a;
  text-decoration: underline;
}

.post-content a:hover {
  color: #555;
}

/* Post link button */
.post-link {
  display: inline-block;
  font-family: 'alfarn', Georgia, serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0a0a0a;
  text-decoration: none;
  padding: 0.55rem 1.2rem;
  border: 1px solid #0a0a0a;
  margin-top: 0.5rem;
}

.post-link:hover {
  background: #0a0a0a;
  color: #fff;
}

/* Under-construction page */
.main-wip {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  padding: 4rem 2rem;
}

.wip-label {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #999;
}

/* ==============================================
   FOOTER — footer.svg with overlay links
   SVG viewBox: 2880 × 523.55
   Logo image: translate(1333.27 144.94) scale(.6)
     display x: 46.3–53.6%, y: 27.7–49.9%
   "Datenschutz" text: x 1138–1741, y 343.84–398.05
     display: left:39.5%, top:65.7%, width:20.9%, height:10.4%
   "© 2026 Politika Nea" text: x 1138–1741, y 414.29–468.5
     display: left:39.5%, top:79.1%, width:20.9%, height:10.4%
============================================== */

.site-footer {
  width: 100%;
  margin-top: auto;
}

.footer-wrap {
  position: relative;
  width: 100%;
  line-height: 0;
}

.footer-img {
  display: block;
  width: 100%;
  height: auto;
}

/* Clickable logo area → home */
.footer-logo-link {
  position: absolute;
  display: block;
  left: 46.3%;
  top: 27.7%;
  width: 7.3%;
  height: 22.2%;
  cursor: pointer;
}

/* Overlay links on footer text */
.footer-ovl {
  position: absolute;
  display: block;
  cursor: pointer;
}

/* "Datenschutz" text → datenschutz.html */
.footer-datenschutz {
  left: 39.5%;
  top: 65.7%;
  width: 20.9%;
  height: 10.4%;
}

/* "© 2026 Politika Nea" text → impressum.html */
.footer-copyright {
  left: 39.5%;
  top: 79.1%;
  width: 20.9%;
  height: 10.4%;
}

/* ==============================================
   LEGAL PAGES — datenschutz.html, impressum.html
============================================== */

.legal-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 4rem 2rem 5rem;
}

.legal-page h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.5rem;
  font-weight: normal;
  letter-spacing: 0.05em;
  margin-bottom: 2rem;
}

.legal-page h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.85rem;
  font-weight: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 2rem 0 0.5rem;
}

.legal-page p {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #5a5a5a;
  margin-bottom: 0.5rem;
}

.legal-page a { color: #0a0a0a; }

.back-link {
  display: inline-block;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #888;
  text-decoration: none;
  margin-bottom: 2.5rem;
}

.back-link:hover { color: #0a0a0a; }

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

.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 40vh;
  padding: 4rem 2rem;
}

.error-page-inner {
  font-family: Georgia, 'Times New Roman', serif;
}

.error-code {
  font-size: 5rem;
  font-weight: bold;
  line-height: 1;
  color: #0a0a0a;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.error-title {
  font-size: 1.1rem;
  font-weight: normal;
  color: #0a0a0a;
  margin-bottom: 0.75rem;
  letter-spacing: 0.04em;
}

.error-sub {
  font-size: 0.85rem;
  color: #5a5a5a;
  margin-bottom: 2.5rem;
}

.error-back {
  display: inline-block;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #0a0a0a;
  text-decoration: none;
  padding: 0.6rem 1.4rem;
  border: 1px solid #0a0a0a;
}

.error-back:hover {
  background: #0a0a0a;
  color: #fff;
}

/* ==============================================
   SHOW / HIDE HELPERS
============================================== */

.desktop-only  { display: block; }
.mobile-only   { display: none; }
.mobile-menu   { display: none; }   /* always hidden; .open inside @media makes it visible on mobile */
.nav-logo-mobile { display: none; } /* hidden on desktop; shown in @media below */
.nav-hamburger   { display: none; } /* hidden on desktop; shown in @media below */

/* ==============================================
   MOBILE — ≤ 767px
   Mobile SVG dimensions:
     header: 1170 × 309.63
     footer: 1170 × 523.55 (same as desktop)
     menu panel (header_option): 591 × 716.83
============================================== */

@media (max-width: 767px) {

  /* ── Show/hide ── */
  .desktop-only { display: none !important; }
  .mobile-only  { display: block !important; }

  /* ── Header ── */
  /* On mobile the nav only contains mobile elements — re-enable pointer events */
  .header-nav {
    pointer-events: auto;
  }

  /* Hide all desktop nav overlays */
  .nav-logo, .nav-leitbild, .nav-events, .nav-kontakt, .nav-join {
    display: none;
  }

  /* Mobile logo tap target — left ~50% of header */
  .nav-logo-mobile {
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    height: 100%;
    display: block;
    pointer-events: auto;
  }

  /* Hamburger tap target — right ~22% of header (lines at 78–90% of 1170px) */
  .nav-hamburger {
    position: absolute;
    right: 0;
    top: 0;
    width: 24%;
    height: 100%;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: block;
    pointer-events: auto;
  }

  /* ── Mobile menu overlay ── */
  .mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 500;
  }

  .mobile-menu.open {
    display: block;
  }

  /* Semi-transparent backdrop — full overlay, tap closes menu */
  .mobile-menu-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    cursor: pointer;
  }

  /* Panel: positioned per reference SVG (1170×2532 canvas)
     x=471.69 → right gap = 108.68/1170 = 9.29vw
     y=113.39 → top    = 113.39/1170 = 9.69vw
     width    = 589.63/1170 = 50.4vw
     aspect-ratio = 591.05 / 716.83 */
  .mobile-menu-panel {
    position: absolute;
    top: 9.69vw;
    right: 9.29vw;
    width: 50.4vw;
    aspect-ratio: 591.05 / 716.83;
    line-height: 0;
  }

  /* SVG fills the panel exactly */
  .mobile-menu-svg {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
  }

  /* Invisible overlay links — same pattern as header/footer SVGs
     Positions derived from header_option mobile.svg (viewBox 591.05 × 716.83) */
  .mob-ovl {
    position: absolute;
    display: block;
    cursor: pointer;
  }

  /* Close X: lines at x=476.95–562, y=29.06–114.09 */
  .mob-close {
    top: 4%;
    right: 0;
    width: 20%;
    height: 12%;
    background: none;
    border: none;
    padding: 0;
  }

  /* Leitbild nav area: rect y=142.44–285.86, full width */
  .mob-leitbild {
    left: 0; top: 19.9%;
    width: 100%; height: 20%;
  }

  /* Upcoming Events nav area: rect y=285.86–429.28 */
  .mob-events {
    left: 0; top: 39.9%;
    width: 100%; height: 20%;
  }

  /* Kontakt nav area: rect y=429.28–572.70 */
  .mob-kontakt {
    left: 0; top: 59.9%;
    width: 100%; height: 20%;
  }

  /* VEREINSBEITRITT bar: rect y=572.70–716.83 */
  .mob-join {
    left: 0; top: 79.9%;
    width: 100%; height: 20.1%;
    text-decoration: none;
  }

  /* ── Footer — override overlay positions for mobile SVG ──
     Mobile footer SVG: 1170 × 523.55
     Logo: translate(478.27 144.94) scale(.6) → x=40.9%–59%, y=27.7%–49.9%
     Nav text row (opacity .76): y=343.84–398.05 → top=65.6%, height=10.4%
     Copyright row: y=414.29–468.5 → top=79.1%, height=10.4%
  ── */
  .footer-logo-link {
    left: 40.9%;
    top: 27.7%;
    width: 18.1%;
    height: 22.2%;
  }

  .footer-datenschutz {
    left: 24%;
    top: 65.6%;
    width: 52%;
    height: 10.4%;
  }

  .footer-copyright {
    left: 24%;
    top: 79.1%;
    width: 52%;
    height: 10.4%;
  }

  /* ── Content ── */
  .hero-section {
    max-width: 100%;
    padding: 1.5rem 1rem 0;
  }

  .main-aktuelles {
    max-width: 100%;
    padding: 2rem 1rem 4rem;
  }

  .main-events {
    max-width: 100%;
    padding: 2rem 1rem 4rem;
  }

  .events-grid {
    grid-template-columns: 1fr;
  }

  /* Legal pages */
  .legal-page {
    padding: 2.5rem 1.25rem 4rem;
  }
}
