/*
Theme Name: KG Ka-Ju-Ka Hühnerfeld
Theme URI: https://kajuka.de
Author: KG Ka-Ju-Ka Hühnerfeld e.V.
Description: Individuelles WordPress-Theme für die Karnevalgesellschaft Ka-Ju-Ka Hühnerfeld e.V. Mit Vereinsbereich, Veranstaltungskalender und passwortgeschütztem internen Bereich.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: kajuka
*/

/* ==========================================================================
   Grundlagen
   ========================================================================== */

:root {
  --navy: #253575;
  --navy-header: #6E86D6; /* helleres Blau, damit das Logo besser hervortritt */
  --navy-dark: #1B2757;
  --red: #E30613;
  --red-dark: #B80410;
  --gold: #F9B233;
  --gold-dark: #E29A12;
  --ink: #1A1A1A;
  --muted: #5B6478;
  --muted-light: #8E95AE;
  --bg: #F7F8FC;
  --border: #E3E6F0;
  --white: #ffffff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Figtree', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
}

h1, h2, h3, h4 {
  font-family: 'Baloo 2', system-ui, sans-serif;
  font-weight: 700;
  margin: 0 0 0.5em;
  color: var(--ink);
}

p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; height: auto; display: block; }

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--red); }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.btn {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-align: center;
}
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-dark); color: var(--navy); }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-dark); color: var(--white); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.55); }
.btn-outline:hover { background: rgba(255,255,255,0.12); color: var(--white); }
.btn-white { background: var(--white); color: var(--red); }
.btn-white:hover { background: #FBEAEA; color: var(--red); }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header { background: var(--navy-header); padding: 0 40px; }
.site-header-inner {
  max-width: 1200px; margin: 0 auto; min-height: 84px; padding: 12px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  flex-wrap: wrap;
}
.site-logo img { height: 56px; width: auto; display: block; }
.header-right { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }

.primary-nav ul { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.primary-nav a {
  font-family: 'Baloo 2', sans-serif; font-weight: 600; font-size: 16px;
  color: var(--white); opacity: 0.92; padding-bottom: 4px; border-bottom: 3px solid transparent;
}
.primary-nav a:hover { color: var(--gold); opacity: 1; }
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a {
  opacity: 1; border-bottom-color: var(--gold);
}

.social-icons { display: flex; align-items: center; gap: 10px; }
.social-icons a {
  width: 34px; height: 34px; border-radius: 9px; border: 1.5px solid rgba(255,255,255,0.4);
  display: flex; align-items: center; justify-content: center; color: var(--white); flex-shrink: 0;
}
.social-icons a:hover { border-color: var(--gold); color: var(--gold); }

.header-shop-btn {
  font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 15px;
  color: var(--navy); background: var(--gold); padding: 11px 22px; border-radius: 999px;
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
.header-shop-btn:hover { background: var(--gold-dark); color: var(--navy); }

/* Menü-Button: auf dem Desktop unsichtbar (Menü steht dort direkt in der
   Kopfzeile) – erst ab 900px Breite sichtbar, siehe Media-Query unten. */
.mobile-nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px; border: 1.5px solid rgba(255,255,255,0.4);
  background: transparent; color: var(--white); cursor: pointer; padding: 0; flex-shrink: 0;
}
.mobile-nav-toggle:hover { border-color: var(--gold); color: var(--gold); }
.mobile-nav-toggle-icon.icon-close { display: none; }
.site-header.is-open .mobile-nav-toggle-icon.icon-menu { display: none; }
.site-header.is-open .mobile-nav-toggle-icon.icon-close { display: block; }

/* Schmalere Fenster/Laptops (z. B. nicht maximiertes Browserfenster): Abstände
   etwas enger, damit Menü, Icons und Kartenshop-Button möglichst lange in
   einer Zeile bleiben, bevor bei 900px auf die gestapelte Ansicht umgeschaltet
   wird – sonst kann das Menü unschön in einer zweiten Zeile im dunkelblauen
   Kopfbereich "hängen bleiben". */
@media (max-width: 1150px) {
  .header-right { gap: 18px; }
  .primary-nav ul { gap: 20px; }
  .primary-nav a { font-size: 15px; }
}

/* Ab hier (Handyansicht/schmale Tablets): Hauptmenü + Social-Icons stehen
   nicht mehr offen in der Kopfzeile, sondern nur noch nach Klick auf den
   Menü-Button (Hamburger-Icon) – Desktop-Darstellung bleibt unverändert. */
@media (max-width: 900px) {
  .site-header-inner { height: auto; padding: 16px 0; }
  /* Logo, Kartenshop-Button und Menü-Button bleiben zusammen in der ersten
     Zeile (auf Hoehe des Logos); Menue + Social-Icons erscheinen erst nach
     Klick auf den Menü-Button als eigene, volle Zeile darunter. */
  .site-logo { order: 1; }
  .header-shop-btn { order: 2; }
  .mobile-nav-toggle { display: flex; order: 3; }
  .header-right {
    display: none; order: 4; width: 100%; flex-direction: column; align-items: flex-start; gap: 16px;
  }
  .site-header.is-open .header-right { display: flex; }
  .primary-nav ul { flex-direction: column; align-items: flex-start; gap: 14px; }
  .site-logo img { height: 44px; }
}

/* ==========================================================================
   Page header / Hero
   ========================================================================== */

.page-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  padding: 56px 40px;
}
.page-header .eyebrow {
  font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 13px;
  letter-spacing: 0.07em; text-transform: uppercase; color: var(--gold);
}
.page-header h1 { color: var(--white); font-size: 34px; margin-top: 8px; }
.page-header p { color: #C9D0E8; max-width: 620px; margin-top: 12px; font-size: 16px; }

.hero { position: relative; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%); overflow: hidden; padding: 72px 40px; }
.hero-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 56px; flex-wrap: wrap; }
.hero-text { flex: 1 1 420px; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.hero-eyebrow { font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); }
.hero-text h1 { color: var(--white); font-size: 44px; line-height: 1.18; }
.hero-text p { color: #C9D0E8; max-width: 480px; font-size: 17px; white-space: pre-line; }
.hero-image { flex: 1 1 300px; display: flex; justify-content: center; }
.hero-image img { width: 100%; max-width: 380px; filter: drop-shadow(0 18px 30px rgba(0,0,0,0.28)); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.hero-confetti span { position: absolute; border-radius: 50%; }

@media (max-width: 700px) {
  .hero-text h1 { font-size: 30px; }
  .page-header h1 { font-size: 26px; }
}

/* ==========================================================================
   Cards / Grids
   ========================================================================== */

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  border: 1px solid var(--border); border-radius: 16px; background: var(--white);
  padding: 26px; display: flex; flex-direction: column; gap: 12px;
  transition: box-shadow 0.15s, border-color 0.15s;
}
a.card:hover { border-color: var(--navy); box-shadow: 0 10px 24px rgba(37,53,117,0.12); }
.card-icon {
  width: 42px; height: 42px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.card-icon.navy { background: #EEF0F8; color: var(--navy); }
.card-icon.gold { background: #FBEFE0; color: var(--gold-dark); }
.card-icon.red { background: #FBE6E7; color: var(--red); }
.card-icon.muted { background: #F1F2F6; color: var(--muted); }

.highlight-card { border-radius: 16px; background: var(--white); border: 1px solid var(--border); overflow: hidden; display: flex; flex-direction: column; }
.highlight-card .bar { height: 8px; }
.highlight-card .body { padding: 24px; display: flex; flex-direction: column; gap: 10px; }

/* ==========================================================================
   Section headings
   ========================================================================== */

.section { padding: 44px 40px 8px; }
.section:last-of-type { padding-bottom: 64px; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.section-head h2 { font-size: 25px; }
.section-link { font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 14px; color: var(--navy); display: flex; align-items: center; gap: 6px; }

/* ==========================================================================
   Event list rows
   ========================================================================== */

.event-list { border: 1px solid var(--border); border-radius: 16px; background: var(--white); overflow: hidden; }
.event-row { display: flex; align-items: flex-start; gap: 20px; padding: 16px 24px; border-bottom: 1px solid #EFF1F7; }
.event-list .event-row:last-child { border-bottom: none; }
.event-row:hover { background: #FAFBFD; }
.event-date { width: 58px; text-align: center; font-family: 'Baloo 2', sans-serif; color: var(--navy); flex-shrink: 0; }
.event-date .day { font-weight: 800; font-size: 19px; line-height: 1; }
.event-date .month { font-weight: 600; font-size: 10.5px; text-transform: uppercase; }
.event-title { font-family: 'Baloo 2', sans-serif; font-weight: 600; font-size: 15.5px; }
.event-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted-light); margin-top: 4px; }
.event-meta span { display: flex; align-items: center; gap: 6px; }
.badge-intern {
  display: inline-flex; align-items: center; gap: 4px; background: #FBE6E7; color: var(--red);
  font-family: 'Figtree', sans-serif; font-weight: 600; font-size: 11.5px; padding: 3px 9px; border-radius: 999px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer { background: var(--navy-dark); padding: 56px 40px 28px; }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h4 { font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 14px; color: var(--gold); margin-bottom: 4px; }
.footer-col a, .footer-contact-item { color: #C9D0E8; font-size: 14.5px; }
.footer-col a:hover { color: var(--gold); }
.footer-contact-item { display: flex; gap: 10px; align-items: flex-start; color: #A9B0CC; font-size: 14px; }
.footer-contact-item svg { flex-shrink: 0; margin-top: 1px; }
.footer-bottom { max-width: 1200px; margin: 40px auto 0; padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 13px; color: #7F89AE; }

/* ==========================================================================
   Login gate / internal area
   ========================================================================== */

.login-gate {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  padding: 72px 40px 64px; display: flex; justify-content: center;
}
.login-gate-card {
  width: 100%; max-width: 420px; background: var(--white); border-radius: 20px;
  padding: 40px 36px; display: flex; flex-direction: column; align-items: center; gap: 18px;
  box-shadow: 0 20px 44px rgba(0,0,0,0.22); text-align: center;
}
.login-gate-card form { width: 100%; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.login-gate-card label { font-family: 'Baloo 2', sans-serif; font-weight: 600; font-size: 12.5px; color: var(--muted); }
.login-gate-card input[type="text"],
.login-gate-card input[type="password"] {
  border: 1px solid var(--border); border-radius: 10px; padding: 11px 14px; font-size: 14.5px; width: 100%;
}
.login-gate-card input[type="submit"] {
  width: 100%; font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 15px;
  color: var(--white); background: var(--navy); padding: 13px 0; border-radius: 999px; border: none; cursor: pointer; margin-top: 4px;
}

.locked-box { position: relative; border: 1px solid var(--border); border-radius: 16px; background: var(--white); overflow: hidden; }
.locked-box-content { padding: 22px 24px; }
.locked-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.55);
}
.locked-overlay span {
  display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: var(--white);
  font-family: 'Baloo 2', sans-serif; font-weight: 600; font-size: 13.5px; padding: 10px 18px; border-radius: 999px;
}

/* Direkt eingebettetes externes Formular (z. B. Microsoft Forms, siehe
   page-gulschsupp.php) – schlichter Rahmen, Höhe über min-height statt
   einer festen Höhe, damit auf schmalen Bildschirmen kein unnötiger
   Leerraum/Abschneiden entsteht. */
.embed-direct { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--white); }
.embed-direct iframe { width: 100%; min-height: 760px; border: 0; display: block; }

.date-chip {
  background: #EEF0F8; color: var(--navy); font-family: 'Baloo 2', sans-serif; font-weight: 600;
  font-size: 12.5px; padding: 6px 12px; border-radius: 999px; display: inline-block;
}

.empty-note { font-size: 14px; color: var(--muted-light); font-style: italic; padding: 20px 24px; }

/* ==========================================================================
   Formulare (z. B. Vermietungsanfrage Martin-Luther-Haus)
   ========================================================================== */

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

.form-field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.form-field input, .form-field textarea {
  font-family: 'Figtree', sans-serif; padding: 11px 14px; border: 1px solid var(--border);
  border-radius: 10px; font-size: 14.5px; font-weight: 400; color: var(--ink); background: var(--white);
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--navy); }
.form-honeypot { position: absolute; left: -9999px; top: -9999px; }

.form-notice { border-radius: 14px; padding: 18px 22px; margin-bottom: 22px; font-size: 14.5px; line-height: 1.5; }
.form-notice.success { background: #EAF7EE; border: 1px solid #BFE6C9; color: #1E6B33; }
.form-notice.error { background: #FDEDEE; border: 1px solid #F3C4C8; color: var(--red-dark); font-size: 14px; }
.form-notice.error div + div { margin-top: 4px; }

/* ==========================================================================
   Generic content pages (Impressum, Datenschutz, Orden, Ehrenrat …)
   ========================================================================== */

.content-page { padding: 48px 40px 64px; }
.content-page .container { max-width: 800px; }
.content-page h2 { font-size: 20px; margin-top: 1.6em; }
.content-page h2:first-child { font-size: 25px; margin-top: 0; line-height: 1.3; }
.content-page h3 { font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 19px; color: var(--navy); margin-top: 1.4em; margin-bottom: 0.4em; }
.content-page p { font-size: 15px; line-height: 1.7; color: #3A3F4E; }
.content-page a { color: var(--red); font-weight: 600; text-decoration: underline; }
.content-page blockquote { margin: 1.2em 0; padding: 18px 22px; border-left: 4px solid var(--gold); background: #FBF9F2; border-radius: 0 10px 10px 0; }
.content-page blockquote p { font-family: 'Baloo 2', sans-serif; font-weight: 600; font-size: 15.5px; color: var(--navy); line-height: 1.6; margin: 0; }
.content-page table { width: 100%; border-collapse: collapse; margin: 1em 0; }
.content-page table td, .content-page table th { text-align: left; padding: 6px 10px 6px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.content-page ul, .content-page ol { margin: 0.6em 0 1.2em; padding-left: 1.4em; }
.content-page ul { list-style: disc; }
.content-page ol { list-style: decimal; }
.content-page li { font-size: 15px; line-height: 1.7; color: #3A3F4E; margin-bottom: 0.3em; }
.content-page img { border-radius: 14px; }
.content-page .wp-block-image { margin: 1.4em 0; }
.content-page figcaption { font-size: 13px; color: var(--muted-light); margin-top: 6px; text-align: center; }
.legal-note {
  background: #FFF8E6; border: 1px solid #F3DFA0; border-radius: 12px; padding: 16px 20px;
  font-size: 14px; color: #7A5E12; margin: 1.5em 0;
}

/* "Weiterlesen"-Aufklapp-Box (z. B. Vorwort auf der Startseite, Willkommens-
   text auf "Verein"). Die Kürzung selbst passiert serverseitig nach
   Wortanzahl (kajuka_render_expandable_content()), hier geht es nur noch um
   das Ein-/Ausblenden von Vorschau- und Volltext beim Klick. */
.expandable-full[hidden] { display: none; }
.expandable.is-expanded .expandable-preview { display: none; }
.expandable-toggle {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 6px;
  font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 14px; color: var(--navy);
  background: none; border: none; padding: 0; cursor: pointer;
}
.expandable-toggle:hover { color: var(--red); }
.expandable-toggle svg { transform: rotate(90deg); transition: transform 0.2s ease; }
.expandable.is-expanded .expandable-toggle svg { transform: rotate(-90deg); }

/* Hallenkalender-Liste (öffentlich): "Belegt"-Badge statt Details -------- */
.kajuka-belegt-badge {
  background: var(--red); color: var(--white); font-size: 12px; font-weight: 700;
  padding: 4px 14px; border-radius: 999px; flex-shrink: 0;
}

/* "Seiteninhalte"-Kacheln: flexibler Repeater (Admin) ------------------- */
.kajuka-cards-repeater .kajuka-card-row { position: relative; }
.kajuka-cards-repeater .kajuka-remove-card { font-size: 12px; }
.kajuka-cards-repeater template { display: none; }
