/*
Theme Name: JVG Gunzenhausen
Theme URI: https://example.com/jvg-gunzenhausen
Author: JVG
Author URI: https://example.com
Description: Modernes, responsives Vereins-Theme für den Jagdverein Gunzenhausen mit minimaler Plugin-Abhängigkeit.
Version: 0.1.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
Text Domain: jvg-gunzenhausen
*/

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&display=swap');

:root {
  --bg: #f5f3ec;
  --surface: #fffdf7;
  --ink: #1a2e1a;
  --muted: #4a6b4a;
  --accent: #2d7a2d;
  --accent-2: #c8831a;
  --line: #cdd9c8;
  --radius: 16px;
  --shadow: 0 12px 35px rgba(18, 40, 18, 0.09);
  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Sora', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(185, 129, 53, 0.14), transparent 36%),
    radial-gradient(circle at 85% 10%, rgba(47, 95, 60, 0.16), transparent 38%),
    linear-gradient(180deg, #f3f0e5 0%, #f6f4ed 100%);
  line-height: 1.65;
}

a {
  color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(185, 129, 53, 0.7);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin: 0 auto;
}

.site-header {
  --header-control-height: 40px;
  --header-control-radius: 999px;
  --header-control-bg: #fff;
  --header-control-border: 1px solid var(--line);
  --header-control-font-size: 0.88rem;

  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid rgba(31, 42, 34, 0.10);
  box-shadow: 0 1px 5px rgba(18, 40, 18, 0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.4rem 0.85rem;
  width: 100%;
}

.header-tools {
  order: 5;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.header-auth {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.home .header-auth-home {
  justify-content: flex-end;
  text-align: right;
}

.header-login-form {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.3rem;
}

.header-login-form input[type='text'],
.header-login-form input[type='password'] {
  min-height: var(--header-control-height);
  border-radius: var(--header-control-radius);
  border: var(--header-control-border);
  padding: 0 0.7rem;
  font-size: var(--header-control-font-size);
  width: 100%;
}

.header-login-form button {
  min-height: var(--header-control-height);
  border-radius: var(--header-control-radius);
  border: 0;
  padding: 0 0.85rem;
  background: var(--accent);
  color: #fff;
  font-size: var(--header-control-font-size);
  font-weight: 700;
}

.header-auth-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--header-control-height);
  border-radius: var(--header-control-radius);
  border: var(--header-control-border);
  padding: 0 0.85rem;
  text-decoration: none;
  font-weight: 700;
  font-size: var(--header-control-font-size);
  color: #1e1a12;
  background: var(--accent-2);
}

.header-welcome {
  margin: 0;
  font-size: var(--header-control-font-size);
  font-weight: 700;
  color: var(--ink);
}

.branding {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding-left: 0;
  margin-left: 0;
  margin-right: auto;
}

.custom-logo {
  display: block;
  width: auto;
  height: auto;
  max-height: var(--header-logo-height, 48px);
}

.menu-toggle {
  order: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: var(--header-control-border);
  background: var(--header-control-bg);
  border-radius: var(--header-control-radius);
  min-height: var(--header-control-height);
  min-width: var(--header-control-height);
  padding: 0 0.95rem;
  cursor: pointer;
  color: var(--ink);
  font-weight: 700;
  font-size: var(--header-control-font-size);
}

.primary-nav {
  order: 4;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0.8rem 1rem 1rem;
  display: none;
}

.primary-nav.is-open {
  display: block;
}

.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.primary-nav a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  min-height: auto;
  padding: 0.35rem 0.25rem;
  border: 0;
  background: transparent;
  border-radius: 0;
  font-size: var(--header-control-font-size);
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

.hero {
  padding: 0;
}

.hero-panel {
  background: linear-gradient(145deg, rgba(47, 95, 60, 0.95), rgba(28, 43, 33, 0.95));
  color: #f7f6f1;
  border-radius: 0;
  box-shadow: none;
  width: 100%;
  position: relative;
}

.hero-content {
  padding: clamp(2.8rem, 7vw, 5.2rem) 0 clamp(1.2rem, 4vw, 2.8rem);
  position: relative;
  min-height: clamp(220px, 36vw, 420px);
}

@media (max-width: 640px) {
  .hero-texte-overlay {
    display: none;
  }

  .hero-content {
    min-height: 120px;
  }
}

.hero h1 {
  margin: 0;
  line-height: 1.2;
  font-size: clamp(1.8rem, 3vw + 1rem, 3rem);
}

.hero p {
  margin: 1rem 0 1.4rem;
  color: rgba(247, 246, 241, 0.88);
  max-width: 65ch;
}

/* Hero Banner mit SVG-Overlay (Texte-Banner) */
.hero-texte-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  display: flex;
  justify-content: center;
  z-index: 1;
  pointer-events: none;
}

.word-cross-section {
  width: 100%;
  background: transparent;
  padding: 0;
  overflow: hidden;
}

.word-cross {
  --unit: 11px;
  --font-size: 12px;
  --main-size: 16px;
  --letter-space: 0;
  --char-duration: 360ms;
  --word-fade-y: 8px;

  position: relative;
  width: min(980px, 100%);
  aspect-ratio: 16 / 11;
  margin: 0 auto;
  transform-origin: top left;
}

.word {
  position: absolute;
  white-space: pre;
  font-family: 'Courier New', Courier, monospace;
  font-weight: 700;
  color: #f7f6f1;
  letter-spacing: var(--letter-space);
  line-height: 1;
}

.word.main {
  font-size: var(--main-size);
}

.word.secondary {
  font-size: var(--font-size);
}

.word.vertical {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.word.horizontal {
  display: flex;
  flex-direction: row;
  gap: 0;
}

.char {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1ch;
  opacity: 0;
  transform: translateY(var(--word-fade-y));
}

.cell-char {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1ch;
  font-family: 'Courier New', Courier, monospace;
  font-weight: 700;
  line-height: 1;
  color: #f7f6f1;
  opacity: 0;
  transform: translateY(var(--word-fade-y));
}

.cell-char.main {
  font-size: var(--main-size);
}

.cell-char.secondary {
  font-size: var(--font-size);
}

.word-cross.is-ready .cell-char {
  animation: charIn var(--char-duration) ease forwards;
  animation-delay: var(--char-delay, 0ms);
}

.word-cross.reduced-motion .cell-char {
  opacity: 1;
  transform: none;
  animation: none;
}

@keyframes charIn {
  from {
    opacity: 0;
    transform: translateY(var(--word-fade-y));
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 641px) {
  .hero-texte-overlay {
    width: 74%;
  }

  .word-cross {
    --unit: 13px;
    --font-size: 14px;
    --main-size: 18px;
    aspect-ratio: 16 / 10;
  }

  .header-login-form {
    grid-template-columns: 1fr 1fr auto;
  }

  .header-auth-link {
    width: auto;
  }

  .event-subscribe-links {
    width: auto;
  }
}

@media (min-width: 901px) {
  .hero-texte-overlay {
    width: clamp(58%, 62vw, 68%);
  }

  .word-cross {
    --unit: 16px;
    --font-size: 17px;
    --main-size: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cell-char {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

.hero-actions {
  position: relative;
  z-index: 2;
}

.page-hero .breadcrumbs {
  margin-bottom: 0.9rem;
}

.page-hero .breadcrumbs ol {
  color: rgba(247, 246, 241, 0.8);
}

.page-hero .breadcrumbs a {
  color: #f7f6f1;
  text-decoration-color: rgba(247, 246, 241, 0.55);
}

.page-hero .breadcrumbs li::after {
  color: rgba(247, 246, 241, 0.45);
}

.button,
button,
input[type='submit'] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  padding: 0.7rem 1.2rem;
  cursor: pointer;
}

.button.primary,
input[type='submit'] {
  background: var(--accent-2);
  color: #1e1a12;
}

.button.ghost {
  background: transparent;
  color: #f7f6f1;
  border: 1px solid rgba(247, 246, 241, 0.5);
}

.section {
  padding: clamp(1.6rem, 4vw, 3rem) 0;
}

.breadcrumbs {
  margin-bottom: 1rem;
}

.breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumbs li::after {
  content: '/';
  margin-left: 0.4rem;
  color: var(--line);
}

.breadcrumbs li:last-child::after {
  content: '';
  margin: 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* ── Aktuelles overview ─────────────────────────────────── */
.aktuelles-category-block {
  margin-bottom: 3rem;
}

.aktuelles-category-block:last-child {
  margin-bottom: 0;
}

.aktuelles-more {
  margin-top: 1.25rem;
  text-align: center;
}

.link-all {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--color-primary, #5a7a2e);
  text-decoration: none;
}

.link-all:hover {
  text-decoration: underline;
}

/* Outline button (used in category "more" links) */
.btn {
  display: inline-block;
  padding: 0.55rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn--outline {
  background: transparent;
  border: 2px solid var(--color-primary, #5a7a2e);
  color: var(--color-primary, #5a7a2e);
}

.btn--outline:hover {
  background: var(--color-primary, #5a7a2e);
  color: #fff;
}

.section h2 {
  margin: 0;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 2rem);
}

.event-subscribe-links {
  margin: 1.25rem 0 0;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.event-subscribe-links a {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(31, 42, 34, 0.18);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 90%, white 10%);
}

.event-subscribe-links a:hover,
.event-subscribe-links a:focus-visible {
  border-color: rgba(31, 42, 34, 0.35);
  background: color-mix(in srgb, var(--surface) 80%, white 20%);
}

.card-grid {
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid rgba(31, 42, 34, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  overflow-wrap: break-word;
  hyphens: auto;
}

.card h1 {
  font-size: clamp(1.3rem, 1rem + 1.5vw, 2rem);
}

.card h2,
.card h3,
.card h4 {
  overflow-wrap: break-word;
  hyphens: auto;
}

.post-featured-image,
.post-card-image {
  display: block;
  margin: 0 0 1rem;
  overflow: hidden;
  border-radius: calc(var(--radius) - 4px);
}

.post-featured-image img,
.post-card-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.post-card-image img {
  aspect-ratio: 16 / 9;
}

.card--split {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  height: 100%;
  overflow: hidden;
}

.card__header,
.card__body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.card__header,
.card__body {
  padding-inline: 1rem;
}

.card--split {
  padding: 1rem 0;
}

.card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: transparent;
  border: 0;
}

.card__media img,
.card__media-placeholder {
  display: block;
  width: 100%;
  height: 100%;
}

.card__media img {
  object-fit: contain;
  object-position: center;
}

.card__media-placeholder {
  background: rgba(31, 42, 34, 0.05);
}

.card-link-wrapper {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.45rem;
}

.card__body p {
  margin: 0;
}

.meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.login-box,
.form-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.form-box--wide {
  max-width: 860px;
}

.auth-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.auth-panel h2 {
  margin-top: 0;
}

.jvg-member-register-form input[type='submit'] {
  margin-top: 0.9rem;
}

label {
  display: block;
  margin-top: 0.7rem;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

input[type='text'],
input[type='email'],
input[type='password'],
input[type='date'],
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.62rem 0.72rem;
  background: #fff;
  font: inherit;
}

textarea {
  min-height: 130px;
}

@media (max-width: 640px) {
  textarea {
    min-height: 80px;
  }
}

.notice {
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  margin-bottom: 0.9rem;
}

.notice.success {
  background: rgba(47, 95, 60, 0.15);
  border: 1px solid rgba(47, 95, 60, 0.35);
}

.notice.error {
  background: rgba(166, 46, 46, 0.13);
  border: 1px solid rgba(166, 46, 46, 0.35);
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.quiz-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.quiz-row input[type="text"] {
  flex: 1;
}

.quiz-refresh-btn {
  white-space: nowrap;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  background: var(--jvg-green, #2d5a27);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.quiz-refresh-btn:hover {
  opacity: 0.85;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-panel,
  .card {
    animation: jvg-rise 0.55s ease both;
  }

  .card-grid .card:nth-child(2) {
    animation-delay: 0.06s;
  }

  .card-grid .card:nth-child(3) {
    animation-delay: 0.12s;
  }
}

@keyframes jvg-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.site-footer {
  margin-top: 2rem;
  border-top: 1px solid rgba(31, 42, 34, 0.1);
  background: rgba(255, 253, 247, 0.9);
}

.footer-inner {
  padding: 1.4rem 0 1.8rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  text-align: center;
}

@media (min-width: 641px) {
  .footer-inner {
    justify-content: space-between;
    text-align: left;
  }
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

@media (min-width: 641px) {
  .footer-nav ul {
    justify-content: flex-start;
  }
}

.footer-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-nav a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ── Mediathek ────────────────────────────────────────────── */
.mediathek-intro {
  margin-bottom: 1.5rem;
  max-width: 72ch;
}

.mediathek-empty {
  color: var(--muted);
  font-style: italic;
}

.mediathek-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.mediathek-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  box-shadow: 0 2px 8px rgba(18, 40, 18, 0.05);
}

.mediathek-item__icon {
  flex-shrink: 0;
  width: 44px;
  height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  gap: 3px;
  position: relative;
}

.mediathek-item__icon--pdf {
  background: rgba(185, 38, 38, 0.1);
  color: #b92626;
}

.mediathek-item__icon--file {
  background: rgba(47, 95, 60, 0.1);
  color: var(--accent);
}

.mediathek-item__icon svg {
  width: 24px;
  height: 24px;
}

.mediathek-item__ext {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mediathek-item__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.mediathek-item__title {
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mediathek-item__size {
  font-size: 0.82rem;
  color: var(--muted);
}

.mediathek-item__download {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 38px;
  padding: 0 0.9rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
}

.mediathek-item__download:hover {
  filter: brightness(0.92);
}

.mediathek-item__download svg {
  width: 15px;
  height: 15px;
  stroke: #fff;
}

@media (max-width: 480px) {
  .mediathek-item {
    flex-wrap: wrap;
  }

  .mediathek-item__download {
    width: 100%;
    justify-content: center;
  }
}
/* ── Galerie & Lightbox ────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
}

.gallery-new-card {
  cursor: pointer;
  min-height: 220px;
  justify-content: center;
  align-items: center;
  border: 2px dashed rgba(31, 42, 34, 0.2);
  background: rgba(31, 42, 34, 0.03);
  transition: border-color 0.2s, background 0.2s;
}

.gallery-new-card:hover {
  border-color: var(--accent);
  background: rgba(47, 95, 60, 0.06);
}

.gallery-new-card.is-editing {
  cursor: default;
  justify-content: flex-start;
  align-items: stretch;
}

.gallery-new-card__idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  color: var(--muted);
  pointer-events: none;
  padding: 1.5rem;
}

.gallery-new-card__idle i {
  font-size: 2.5rem;
}

.gallery-new-card__idle span {
  font-size: 0.88rem;
  font-weight: 600;
}

.gallery-new-card__form {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1rem;
  width: 100%;
}

.gallery-new-card__form label {
  display: grid;
  gap: 0.2rem;
  font-size: 0.82rem;
  font-weight: 600;
  margin: 0;
}

.gallery-new-card__form input[type='text'],
.gallery-new-card__form input[type='date'],
.gallery-new-card__form textarea {
  width: 100%;
  font-size: 0.82rem;
  padding: 0.38rem 0.5rem;
  min-height: unset;
}

.gallery-new-card__form textarea {
  min-height: 52px;
  resize: vertical;
}

.gallery-new-card__actions {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.3rem;
}

.gallery-new-card__btn {
  flex: 1;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  font-size: 0.82rem;
}

.gallery-new-card__btn--ok {
  background: var(--accent);
  color: #fff;
}

.gallery-new-card__btn--ok:hover {
  filter: brightness(0.9);
}

.gallery-new-card__btn--cancel {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}

.gallery-new-card__btn--cancel:hover {
  background: rgba(0, 0, 0, 0.05);
}

.gallery-item {
  display: block;
  padding: 0;
  border: none;
  background: var(--bg-alt, #f5f5f4);
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border-radius: 4px;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .25s ease, opacity .2s ease;
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
  transform: scale(1.04);
  opacity: .88;
}

.gallery-item:focus-visible {
  outline: 3px solid var(--accent, #3a6b35);
  outline-offset: 2px;
}

.gallery-slot {
  position: relative;
}

.gallery-manage {
  margin-top: 1.75rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.gallery-manage h2 {
  margin: 0 0 .8rem;
  font-size: 1rem;
}

.gallery-manage__grid {
  display: grid;
  gap: .8rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.gallery-manage__form {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .8rem;
  background: #fff;
  display: grid;
  gap: .55rem;
}

.gallery-manage__form h3 {
  margin: 0;
  font-size: .95rem;
}

.gallery-manage__form p {
  margin: 0;
  font-size: .85rem;
  color: var(--muted);
}

.gallery-manage__actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.gallery-manage__meta {
  font-size: .82rem;
  color: var(--ink);
}

.gallery-manage__notice {
  margin: 0 0 .7rem;
  padding: .6rem .7rem;
  border-radius: 6px;
  font-size: .85rem;
}

.gallery-manage__notice--success {
  background: rgba(47, 95, 60, .08);
  border: 1px solid rgba(47, 95, 60, .25);
}

.gallery-manage__notice--error {
  background: rgba(185, 38, 38, .08);
  border: 1px solid rgba(185, 38, 38, .25);
}

.gallery-delete {
  position: absolute;
  top: .3rem;
  right: .3rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  padding: .25rem;
  border: none;
  border-radius: 4px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s, background .15s;
}

.gallery-slot:hover .gallery-delete,
.gallery-slot:focus-within .gallery-delete {
  opacity: 1;
}

.gallery-delete:hover {
  background: rgba(180, 20, 20, .85);
}

.gallery-delete svg,
.gallery-delete i {
  width: 1rem;
  height: 1rem;
  font-size: 1rem;
  line-height: 1;
  pointer-events: none;
}

.gallery-delete:disabled {
  opacity: .35;
  cursor: wait;
}

/* Lightbox overlay */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, .92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox[hidden] { display: none; }

.lightbox__stage {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
}

.lightbox__img {
  max-width: 100%;
  max-height: calc(100vh - 8rem);
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0,0,0,.6);
  transition: opacity .18s ease;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  background: rgba(0,0,0,.45);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  padding: .4rem;
  transition: background .18s;
}

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
  background: rgba(0,0,0,.75);
}

.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__prev  { left: 1rem;  top: 50%; transform: translateY(-50%); }
.lightbox__next  { right: 1rem; top: 50%; transform: translateY(-50%); }

.lightbox__close svg,
.lightbox__prev svg,
.lightbox__next svg {
  width: 1.2rem;
  height: 1.2rem;
}

.lightbox__caption {
  color: rgba(255,255,255,.75);
  font-size: .85rem;
  margin: .5rem 0 0;
  max-width: 60ch;
  text-align: center;
}

.lightbox__counter {
  color: rgba(255,255,255,.5);
  font-size: .78rem;
  margin: .2rem 0 0;
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.3rem;
  }

  .lightbox__prev { left: .3rem; }
  .lightbox__next { right: .3rem; }
}
/* ────────────────────────────────────────────────────────── */

.footer-social-links {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--accent);
  text-decoration: none;
}

.footer-social-link:hover {
  background: rgba(47, 95, 60, 0.09);
}

.footer-social-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.footer-widgets {
  width: 100%;
  display: grid;
  gap: 0.75rem;
}

.footer-widget {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.social-links a {
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  background: var(--surface);
}

@media (min-width: 760px) {
  .menu-toggle {
    display: none;
  }

  .header-inner {
    flex-wrap: nowrap;
    gap: 0.55rem;
  }

  .primary-nav {
    order: 2;
    position: static;
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    margin-left: auto;
    margin-right: 0;
  }

  .primary-nav ul {
    display: flex;
    gap: 0.9rem;
    align-items: center;
  }

  .header-tools {
    order: 3;
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
  }

  .header-auth {
    width: auto;
    flex-wrap: nowrap;
    margin-left: auto;
  }

  .home .header-auth-home {
    margin-left: auto;
  }

  .header-login-form {
    width: auto;
    min-width: 0;
  }

  .header-auth-link {
    white-space: nowrap;
  }

  .footer-widgets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-grid.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .auth-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

@media (min-width: 980px) {
  .hero-actions {
    display: flex;
    gap: 0.65rem;
  }

  .homepage-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
  }

  .homepage-sidebar {
    position: sticky;
    top: calc(var(--header-offset, 5rem) + 1rem);
  }
}

/* Homepage two-column layout */
.homepage-layout {
  display: grid;
  gap: 2rem;
}

.homepage-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-widget {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.sidebar-widget .section-header h2 {
  font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.2rem);
  line-height: 1.3;
}

.sidebar-widget .card {
  padding: 0.85rem;
}

.sidebar-widget .card h3 {
  font-size: inherit;
  line-height: inherit;
}

.sidebar-widget .card p {
  font-size: inherit;
  line-height: inherit;
}

/* Fallenjagd: readable text flow around inline images */
.page-id-116 .entry-content {
  max-width: 78ch;
}

.page-id-116 .entry-content p {
  line-height: 1.75;
  text-align: justify;
  hyphens: auto;
}

.page-id-116 .entry-content .wp-block-image.alignleft,
.page-id-116 .entry-content .wp-block-image.alignright {
  max-width: min(40%, 320px);
  margin-top: 0.3rem;
  margin-bottom: 0.9rem;
}

.page-id-116 .entry-content .wp-block-image.alignleft {
  margin-right: 1.15rem;
}

.page-id-116 .entry-content .wp-block-image.alignright {
  margin-left: 1.15rem;
}

.page-id-116 .entry-content h3 {
  clear: both;
  margin-top: 1.4rem;
}

.page-id-116 .entry-content > *:last-child {
  clear: both;
}

@media (max-width: 900px) {
  .page-id-116 .entry-content .wp-block-image.alignleft,
  .page-id-116 .entry-content .wp-block-image.alignright {
    float: none;
    display: block;
    max-width: 100%;
    margin: 0.8rem auto;
  }

  .page-id-116 .entry-content p {
    text-align: left;
  }
}

/* --- Content with event sidebar --- */
.content-with-sidebar {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.content-with-sidebar .content-main {
  flex: 1;
  min-width: 0;
}

.content-with-sidebar .content-sidebar {
  flex: 0 0 300px;
  position: sticky;
  top: 2rem;
}

.content-with-sidebar .content-sidebar .sidebar-widget {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .content-with-sidebar {
    flex-direction: column;
  }

  .content-with-sidebar .content-sidebar {
    flex: none;
    width: 100%;
    position: static;
  }
}
