:root {
  --green: #1c6f47;
  --green-dark: #10482d;
  --gold: #d7b15b;
  --cream: #f7f3e8;
  --paper: #ffffff;
  --ink: #17211b;
  --muted: #637169;
  --shadow: 0 24px 70px rgba(23, 33, 27, 0.14);
  --radius-lg: 28px;
  --radius-md: 18px;
  --content: 1180px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}

body.home-redesign {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(
      circle at top left,
      rgba(215, 177, 91, 0.18),
      transparent 30rem
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 243, 232, 0.96));
  line-height: 1.6;
}

img,
video {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}

.redesign-header {
  min-height: 96px;
  display: grid;
  grid-template-columns: 120px 1fr 120px;
  align-items: center;
  gap: 20px;
  padding: 0 max(20px, calc((100vw - 1180px) / 2));
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, #16573a 0%, #1c6f47 50%, #16573a 100%);
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  z-index: 20;
}

.redesign-header__watermark {
  position: absolute;
  right: -54px;
  top: -72px;
  width: 230px;
  height: 230px;
  background: url("bilder/SG_Wappen.jpg") center / contain no-repeat;
  opacity: 0.06;
  pointer-events: none;
}

.redesign-header__crest {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  padding: 5px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.26);
  z-index: 2;
}

.redesign-header__crest img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.redesign-nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 2;
}

.redesign-nav a {
  min-height: 42px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.9rem;
  font-weight: 800;
}

.redesign-nav a:hover {
  background: rgba(255, 255, 255, 0.14);
}

.redesign-social {
  justify-self: end;
  display: flex;
  gap: 10px;
  z-index: 2;
}
.redesign-social a {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green-dark);
  border: 1px solid rgba(255, 255, 255, 0.24);
}
.redesign-social img {
  width: 23px;
  height: 23px;
  object-fit: contain;
}
.redesign-social a:first-child img {
  width: 28px;
  height: 28px;
}
.redesign-nav-toggle,
.redesign-nav-toggle-label {
  display: none;
}

/* Hero liegt ab jetzt zentral in hero.css. */

.section-kicker {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 900;
}

.button {
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  transition: 0.18s ease;
  border: none;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--gold);
  color: #2c2208;
  box-shadow: 0 14px 34px rgba(215, 177, 91, 0.28);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
}

.button.green {
  background: var(--green);
  color: #fff;
  box-shadow: 0 14px 34px rgba(28, 111, 71, 0.2);
}

main {
  width: min(100% - 32px, var(--content));
  margin: 0 auto;
  padding-bottom: 76px;
}

.kingdom-countdown {
  margin-top: -32px;
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 0;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(28, 111, 71, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate;
}

.kingdom-countdown::after {
  content: "";
  position: absolute;
  right: -150px;
  bottom: -190px;
  width: 520px;
  height: 520px;
  background: url("bilder/SG_Wappen.jpg") center/contain no-repeat;
  opacity: 0.035;
  z-index: -1;
}

.kingdom-photo {
  min-height: 360px;
  background: #eee;
}
.kingdom-photo img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  object-position: center;
}

.kingdom-copy {
  padding: clamp(24px, 4vw, 42px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.kingdom-text {
  margin-top: 12px;
  color: var(--muted);
  font-size: 1.06rem;
  max-width: 620px;
}

.countdown-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.countdown-item {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 8px 4px;
  text-align: center;
  box-shadow: none;
}

.countdown-item .count {
  display: block;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  font-weight: 900;
  color: var(--green);
}

.countdown-item span:last-child {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.countdown-subline {
  margin-top: 14px;
  color: var(--green);
  font-weight: 900;
  text-align: center;
}

.stats-band {
  margin-top: 42px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(28, 111, 71, 0.1);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
}

.stats-band div {
  padding: 26px 18px;
  text-align: center;
  border-right: 1px solid rgba(28, 111, 71, 0.1);
}
.stats-band div:last-child {
  border-right: 0;
}
.stats-band strong {
  display: block;
  color: var(--green);
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
  font-weight: 900;
}
.stats-band span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 800;
}

.gallery-teaser {
  margin-top: 70px;
}

.gallery-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.gallery-heading-row h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.03;
  letter-spacing: -0.055em;
}

.gallery-heading-row .button {
  flex: 0 0 auto;
}

.gallery-preview-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr 1fr;
  gap: 16px;
}

.gallery-preview-card {
  position: relative;
  min-height: 260px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: #fff;
  box-shadow: var(--shadow);
}

.gallery-preview-card.large {
  min-height: 360px;
}

.gallery-preview-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.gallery-preview-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.7));
}

.gallery-preview-card span {
  position: absolute;
  left: 22px;
  bottom: 20px;
  right: 22px;
  z-index: 2;
  font-size: 1.35rem;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.parade-feature,
.people-teaser {
  margin-top: 72px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(255, 255, 255, 0.94);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(28, 111, 71, 0.1);
}

.parade-image img,
.people-image img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
}

.parade-copy,
.people-copy {
  padding: clamp(28px, 5vw, 52px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.parade-copy h2,
.people-copy h2,
.section-heading h2 {
  margin-top: 8px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.03;
  letter-spacing: -0.055em;
}

.parade-copy p:not(.section-kicker),
.people-copy p:not(.section-kicker) {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.08rem;
}

.parade-copy .button,
.people-copy .button {
  margin-top: 24px;
}

.traditions-section {
  margin-top: 78px;
}

.traditions-heading-row {
  display: flex;
  justify-content: center;
  align-items: end;
  margin-bottom: 24px;
  text-align: center;
}

.traditions-heading-row h2 {
  margin: 0 auto;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.03;
  letter-spacing: -0.055em;
}

.traditions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.tradition-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(28, 111, 71, 0.1);
}

.tradition-card.highlight {
  grid-column: span 2;
}
.tradition-media {
  height: 210px;
  background: var(--image) center/cover no-repeat;
}
.tradition-card.highlight .tradition-media {
  height: 280px;
}
.tradition-card > div:last-child {
  padding: 24px;
}
.tradition-card span {
  font-size: 2rem;
}
.tradition-card h3 {
  margin-top: 8px;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}
.tradition-card p {
  margin-top: 10px;
  color: var(--muted);
}

.news-section {
  margin-top: 78px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.text-link {
  color: var(--green);
  font-weight: 900;
  border-bottom: 2px solid rgba(28, 111, 71, 0.25);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.news-card {
  background: rgba(255, 255, 255, 0.95);
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid rgba(28, 111, 71, 0.1);
}

.news-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.news-card div {
  padding: 22px;
}
.news-card span {
  color: var(--green);
  font-weight: 900;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.news-card h3 {
  margin-top: 8px;
  font-size: 1.35rem;
  line-height: 1.1;
  letter-spacing: -0.035em;
}
.news-card p {
  margin-top: 10px;
  color: var(--muted);
}

@media (max-width: 980px) {
  .redesign-header {
    min-height: 88px;
    grid-template-columns: 88px 1fr 56px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .redesign-header__crest {
    width: 72px;
    height: 72px;
  }
  .redesign-social {
    display: none;
  }
  .redesign-nav-toggle-label {
    justify-self: end;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-content: center;
    gap: 5px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.14);
    z-index: 30;
  }
  .redesign-nav-toggle-label span {
    width: 22px;
    height: 2px;
    background: #fff;
    display: block;
    border-radius: 2px;
  }
  .redesign-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 16px;
    right: 16px;
    display: none;
    background: #fff;
    padding: 14px;
    border-radius: 22px;
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
    z-index: 50;
  }
  .redesign-nav a {
    color: var(--green);
    justify-content: flex-start;
    padding: 0 14px;
  }
  .redesign-nav-toggle:checked ~ .redesign-nav {
    display: flex;
  }

  .kingdom-countdown,
  .stats-band,
  .gallery-preview-grid,
  .parade-feature,
  .people-teaser,
  .traditions-grid,
  .news-grid {
    grid-template-columns: 1fr;
  }
  .gallery-preview-card,
  .gallery-preview-card.large {
    min-height: 260px;
  }
  .gallery-heading-row {
    align-items: flex-start;
  }
  .countdown-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-band div {
    border-right: 0;
    border-bottom: 1px solid rgba(28, 111, 71, 0.1);
  }
  .stats-band div:last-child {
    border-bottom: 0;
  }
  .tradition-card.highlight {
    grid-column: auto;
  }
  .parade-image img,
  .people-image img,
  .kingdom-photo img,
  .kingdom-photo {
    min-height: 300px;
  }
}

@media (max-width: 540px) {
  .button {
    width: 100%;
  }
  .kingdom-countdown {
    margin-top: -18px;
  }
  .kingdom-copy {
    padding: 16px;
  }
  .countdown-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-heading-row {
    display: block;
  }
  .gallery-heading-row .button {
    margin-top: 16px;
  }
  .tradition-media,
  .tradition-card.highlight .tradition-media {
    height: 220px;
  }
  .quicklink-card {
    min-height: 245px;
  }
  .section-heading {
    display: block;
  }
  .text-link {
    display: inline-flex;
    margin-top: 14px;
  }

  .kingdom-photo,
  .kingdom-photo img {
    min-height: 220px;
  }
  .kingdom-text {
    font-size: 0.96rem;
    margin-top: 8px;
  }
  .countdown-grid {
    gap: 8px;
    margin-top: 16px;
  }
  .countdown-item {
    padding: 10px 6px;
    border-radius: 14px;
  }
  .countdown-item .count {
    font-size: 1.5rem;
  }
  .countdown-item span:last-child {
    font-size: 0.76rem;
  }
  .countdown-subline {
    margin-top: 10px;
    font-size: 0.9rem;
  }
  .stats-band {
    margin-top: 28px;
    border-radius: 22px;
  }
  .stats-band div {
    padding: 18px 14px;
  }
  .stats-band strong {
    font-size: 1.75rem;
  }
  .stats-band span {
    margin-top: 5px;
    font-size: 0.86rem;
  }
  .gallery-teaser,
  .parade-feature,
  .people-teaser,
  .traditions-section,
  .news-section {
    margin-top: 46px;
  }
  .gallery-preview-card,
  .gallery-preview-card.large {
    min-height: 220px;
  }
  .parade-image img,
  .people-image img {
    min-height: 240px;
  }
  .parade-copy,
  .people-copy {
    padding: 22px;
  }
  .tradition-card > div:last-child,
  .news-card div {
    padding: 18px;
  }
  main {
    padding-bottom: 52px;
  }
}

/* =========================================================
   Mobile Verdichtung Startseite: Countdown, Facts und Karten
   ========================================================= */
@media (max-width: 768px) {
  .kingdom-countdown {
    margin-top: -16px;
  }

  .kingdom-photo,
  .kingdom-photo img {
    min-height: 190px !important;
  }

  .kingdom-copy {
    padding: 16px !important;
  }

  .kingdom-text {
    font-size: 0.94rem;
    line-height: 1.45;
    margin-top: 8px;
  }

  .countdown-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
    margin-top: 14px !important;
  }

  .countdown-item {
    padding: 8px 4px !important;
    border-radius: 13px !important;
  }

  .countdown-item .count {
    font-size: 1.28rem !important;
  }

  .countdown-item span:last-child {
    font-size: 0.68rem !important;
  }

  .countdown-subline {
    margin-top: 9px !important;
    font-size: 0.86rem !important;
  }

  .stats-band {
    grid-template-columns: repeat(2, 1fr) !important;
    margin-top: 24px !important;
    border-radius: 20px !important;
  }

  .stats-band div {
    padding: 14px 10px !important;
    border-right: 1px solid rgba(28, 111, 71, 0.1) !important;
    border-bottom: 1px solid rgba(28, 111, 71, 0.1) !important;
  }

  .stats-band div:nth-child(2n) {
    border-right: 0 !important;
  }

  .stats-band div:nth-last-child(-n + 2) {
    border-bottom: 0 !important;
  }

  .stats-band strong {
    font-size: 1.55rem !important;
  }

  .stats-band span {
    margin-top: 4px !important;
    font-size: 0.78rem !important;
  }

  .gallery-teaser,
  .parade-feature,
  .people-teaser,
  .traditions-section,
  .news-section {
    margin-top: 38px !important;
  }

  .gallery-preview-card,
  .gallery-preview-card.large {
    min-height: 200px !important;
  }

  .parade-image img,
  .people-image img {
    min-height: 210px !important;
  }

  .parade-copy,
  .people-copy,
  .tradition-card > div:last-child,
  .news-card div {
    padding: 16px !important;
  }
}

/* Mobile: Startseiten-Wasserzeichen entfernen */
@media (max-width: 768px) {
  .kingdom-countdown::after {
    display: none !important;
    content: none !important;
    background: none !important;
  }
}

/* Termine Startseite */
.events-section {
  margin-top: 54px;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.event-card {
  display: grid;
  grid-template-columns: 116px 1fr;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(28, 111, 71, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.event-card__date {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 18px 12px;
  background: linear-gradient(180deg, var(--green), var(--green-dark));
  color: #fff;
  text-align: center;
}

.event-card__date strong {
  font-size: 1rem;
  line-height: 1;
}

.event-card__date span {
  font-size: 0.78rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.84);
}

.event-card__body {
  padding: 18px;
}

.event-card__body h3 {
  margin: 0;
  font-size: 1.14rem;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.event-card__body p {
  margin-top: 8px;
  color: var(--muted);
}

.event-card__place {
  color: var(--green) !important;
  font-weight: 900;
}

@media (max-width: 980px) {
  .events-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .events-section {
    margin-top: 38px !important;
  }
  .event-card {
    grid-template-columns: 1fr;
  }
  .event-card__date {
    padding: 13px;
  }
  .event-card__body {
    padding: 16px;
  }
}

/* =========================================================
   MOBILE ONLY: Startseite kompakter
   - Countdown ohne Bild/Text
   - Termine kleiner
   - Galerie-Vorschau 2x2
   Desktop bleibt unverändert.
   ========================================================= */
@media (max-width: 768px) {
  /* Countdown: nur Kicker + Zahlen + Subline */
  .kingdom-countdown {
    display: block !important;
    margin-top: -16px !important;
    padding: 18px 14px !important;
    text-align: center !important;
  }

  .kingdom-photo,
  .kingdom-photo img,
  .kingdom-text {
    display: none !important;
  }

  .kingdom-copy {
    padding: 0 !important;
    display: block !important;
    text-align: center !important;
  }

  .kingdom-copy .section-kicker {
    display: block !important;
    text-align: center !important;
    margin: 0 0 14px !important;
  }

  .countdown-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 6px !important;
    margin-top: 0 !important;
  }

  .countdown-item {
    padding: 9px 4px !important;
    border-radius: 13px !important;
  }

  .countdown-item .count {
    font-size: clamp(1.25rem, 7vw, 1.65rem) !important;
  }

  .countdown-item span:last-child {
    font-size: 0.66rem !important;
  }

  .countdown-subline {
    margin-top: 11px !important;
    font-size: 0.88rem !important;
    text-align: center !important;
  }

  /* Wichtige Termine: mobil flacher und kompakter */
  .events-section {
    margin-top: 34px !important;
  }

  .events-grid {
    gap: 10px !important;
  }

  .event-card {
    grid-template-columns: 82px 1fr !important;
    border-radius: 18px !important;
  }

  .event-card__date {
    padding: 10px 8px !important;
  }

  .event-card__date strong {
    font-size: 0.9rem !important;
  }

  .event-card__date span {
    font-size: 0.68rem !important;
  }

  .event-card__body {
    padding: 12px 13px !important;
  }

  .event-card__body h3 {
    font-size: 1rem !important;
  }

  .event-card__body p {
    margin-top: 5px !important;
    font-size: 0.88rem !important;
    line-height: 1.35 !important;
  }

  /* "Vier Bilder. Ein Gefühl." mobil 2x2 statt untereinander */
  .gallery-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .gallery-preview-card,
  .gallery-preview-card.large {
    min-height: 150px !important;
    border-radius: 18px !important;
  }

  .gallery-preview-card span {
    left: 13px !important;
    right: 13px !important;
    bottom: 12px !important;
    font-size: 1rem !important;
  }
}

@media (max-width: 380px) {
  .countdown-item .count {
    font-size: 1.18rem !important;
  }

  .countdown-item span:last-child {
    font-size: 0.6rem !important;
  }

  .event-card {
    grid-template-columns: 76px 1fr !important;
  }
}

/* Mobile: nur ersten Termin anzeigen */
@media (max-width: 768px) {
  .events-grid .event-card:nth-child(n + 2) {
    display: none !important;
  }
}

/* Mobile: Traditionen 2x2 */
@media (max-width: 768px) {
  .traditions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  /* Gerichtsverhandlung ausblenden */
  .tradition-card:nth-child(4) {
    display: none !important;
  }

  .tradition-media,
  .tradition-card.highlight .tradition-media {
    height: 120px !important;
  }

  .tradition-card > div:last-child {
    padding: 12px !important;
  }

  .tradition-card h3 {
    font-size: 1rem !important;
  }

  .tradition-card p {
    font-size: 0.82rem !important;
    line-height: 1.3 !important;
  }

  .tradition-card span {
    font-size: 1.4rem !important;
  }
}
