/* Friedrich-Rückert-Grundschule Erlangen — Design System */

/* Weiche Überblendung zwischen Seitenaufrufen (statt hartem Schnitt), damit
   z.B. die Hauptmenü-Hervorhebung beim Klicken nicht "flackert". Browser
   ohne Unterstuetzung ignorieren die Regel einfach. */
@view-transition {
  navigation: auto;
}

/* ===== CSS Variables ===== */
:root {
  /* Leitfarbe: Petrolblau */
  --color-primary:       #146c8e;
  --color-primary-dark:  #0f5470;
  --color-primary-light: #4aa0be;
  --color-accent:        #1a86ab;
  --color-accent-light:  #dbeaf1;
  --color-accent-dark:   #0f5470;
  /* Wärme: Honig als Akzent, warmes Papier als Fläche */
  --color-honey:         #e0972a;
  --color-honey-deep:    #c07e18;
  --color-honey-soft:    #f7e6c4;
  --color-paper:         #f8f3ea;
  --color-paper-line:    #ebe1d0;
  /* dezentes Rot/Koralle – nur als Signal (Datum, Hinweise) */
  --color-signal:        #d5604c;
  --color-signal-dark:   #c0492f;
  --color-signal-soft:   #f7e2dc;
  --color-bg:            #ffffff;
  --color-bg-alt:        #eef5f9;
  --color-text:          #1c2b34;
  --color-text-muted:    #5c6b76;
  --color-border:        #d3e2ea;
  --color-white:         #ffffff;

  --font-sans: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Fraunces", Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --font-size-sm:   0.875rem;
  --font-size-base: 1rem;
  --font-size-lg:   1.125rem;
  --font-size-xl:   1.375rem;
  --font-size-2xl:  1.75rem;
  --font-size-3xl:  2.25rem;

  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  22px;

  --shadow-sm: 0 2px 6px rgba(33,118,174,0.08);
  --shadow-md: 0 4px 16px rgba(33,118,174,0.13);
  --shadow-lg: 0 8px 30px rgba(33,118,174,0.18);

  --container-max: 1100px;
  --container-pad: 1.25rem;
  --header-height: 78px;
}

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

html {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
}

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

a {
  color: var(--color-accent-dark);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

a:hover {
  text-decoration: underline;
}

ul, ol {
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.25rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.16;
  font-weight: 700;
  color: var(--color-accent-dark);
  text-wrap: balance;
}

h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }

p {
  margin-bottom: 1rem;
}

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

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.main {
  flex: 1;
  padding-bottom: 3rem;
}

/* ===== Entwurf-Hinweis ===== */
.draft-banner {
  background: var(--color-honey);
  color: var(--color-white);
  text-align: center;
  font-weight: 700;
  font-size: var(--font-size-sm);
  padding: 0.5rem 1rem;
}

/* ===== Header & Nav ===== */
.site-header {
  background: var(--color-white);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--color-border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 1rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-text);
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo:hover {
  text-decoration: none;
  opacity: 0.9;
}

.logo-img {
  height: 58px;
  width: auto;
}

.logo-text {
  font-size: var(--font-size-lg);
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-text);
}

.logo-text span {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 400;
  color: var(--color-text-muted);
  opacity: 1;
}

@media (max-width: 640px) {
  .site-logo {
    gap: 0.4rem;
  }

  .logo-img {
    height: 48px;
  }

  .logo-text {
    display: none;
  }

  .logo-text span {
    display: none;
  }
}

/* Desktop nav */
.main-nav {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  list-style: none;
  padding: 0;
}

.nav-list > li {
  position: relative;
}

.nav-list > li > a {
  display: block;
  color: var(--color-text);
  font-size: var(--font-size-sm);
  font-weight: 600;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  text-decoration: none;
}

.nav-list > li > a:hover {
  background: var(--color-bg-alt);
  color: var(--color-accent);
  text-decoration: none;
}

.nav-list > li.is-active > a {
  color: var(--color-primary);
  font-weight: 700;
  background: transparent;
}

/* Dropdown-Untermenüs */
.nav-list .has-sub .sub {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: 0.4rem 0;
  z-index: 200;
  list-style: none;
}

.nav-list .has-sub:hover .sub,
.nav-list .has-sub:focus-within .sub {
  display: block;
}

.nav-list .sub a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--color-text);
  font-size: var(--font-size-sm);
  white-space: nowrap;
  transition: background 0.1s;
  text-decoration: none;
}

.nav-list .sub a:hover {
  background: var(--color-bg-alt);
  color: var(--color-accent);
}

/* Hamburger */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  margin-left: auto;
  z-index: 201;
  position: relative;
}

.menu-toggle:hover {
  background: rgba(255,255,255,0.1);
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile-Menü – floating panel */
.mobile-menu {
  display: none; /* Versteckt: hat 'hidden' Attribut */
  position: fixed;
  right: 1rem;
  top: calc(var(--header-height) + 0.5rem);
  width: 17rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  max-height: calc(100vh - var(--header-height) - 1.5rem);
  overflow-y: auto;
}

/* Sichtbar wenn 'hidden' Attribut entfernt wurde */
.mobile-menu:not([hidden]) {
  display: block !important;
}

.mobile-inner {
  padding: 0.75rem;
}


.mobile-menu ul {
  list-style: none;
  padding: 0;
  clear: both;
  margin-top: 0.5rem;
}

.mobile-menu li {
  margin-bottom: 0;
}

.mobile-menu > .mobile-inner > ul > li > a,
.mobile-menu details > summary {
  display: block;
  padding: 0.6rem 0.75rem;
  color: var(--color-text);
  font-size: var(--font-size-sm);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background 0.1s;
  cursor: pointer;
  text-decoration: none;
}

.mobile-menu > .mobile-inner > ul > li > a:hover,
.mobile-menu details > summary:hover {
  background: var(--color-bg-alt);
  color: var(--color-accent);
}

.mobile-menu details > summary {
  outline: none;
  list-style: none;
}

.mobile-menu details > summary::marker,
.mobile-menu details > summary::-webkit-details-marker {
  display: none;
}

.mobile-menu details > summary::after {
  content: " ▾";
  font-size: 0.7rem;
  opacity: 0.6;
  float: right;
}

.mobile-menu details[open] > summary::after {
  content: " ▴";
}

.mobile-menu details > ul {
  padding-left: 0.75rem;
  margin: 0.25rem 0 0.5rem;
}

.mobile-menu details > ul li > a {
  display: block;
  padding: 0.4rem 0.75rem;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  border-radius: var(--radius-sm);
  transition: background 0.1s;
  text-decoration: none;
}

.mobile-menu details > ul li > a:hover {
  background: var(--color-bg-alt);
  color: var(--color-accent);
}

@media (max-width: 1024px) {
  .menu-toggle {
    display: flex;
  }

  .main-nav {
    display: none;
  }
}

/* ===== Hero Section ===== */
.hero {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  color: var(--color-white);
  padding: 3.5rem 0;
  text-align: center;
  position: relative;
}

.hero.has-image {
  background-size: cover;
  background-position: center 25%;
  background-repeat: no-repeat;
}

.hero.has-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(30, 70, 110, 0.50);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(1.75rem, 4vw, var(--font-size-3xl));
  color: var(--color-white);
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: var(--font-size-lg);
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Startseiten-Foto (unter dem Hero) ===== */
.home-photo {
  background: var(--color-bg-alt);
  padding: 2.25rem var(--container-pad);
  display: flex;
  justify-content: center;
}

.home-photo img {
  display: block;
  width: 100%;
  max-width: 940px;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* ===== Startseite: Hero (Redesign) ===== */
.hp-hero {
  background:
    radial-gradient(1100px 380px at 82% -10%, var(--color-honey-soft) 0%, transparent 60%),
    var(--color-paper);
  border-bottom: 1px solid var(--color-paper-line);
  padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(2rem, 4vw, 3rem);
}

.hp-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.hp-eyebrow {
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-honey-deep);
}

.hp-title {
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  color: var(--color-primary-dark);
  margin: 0.6rem 0 1.1rem;
}

.hp-verse {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  color: var(--color-accent-dark);
  line-height: 1.4;
  max-width: 32ch;
  margin-bottom: 0;
}

.hp-verse .chalk {
  position: relative;
  white-space: nowrap;
  font-style: inherit;
}

.hp-verse .chalk::after {
  content: "";
  position: absolute;
  left: -0.05em;
  right: -0.05em;
  bottom: -0.14em;
  height: 0.5em;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='16' viewBox='0 0 240 16'><path d='M4 11 C60 4, 120 14, 236 6' fill='none' stroke='%23e0972a' stroke-width='4' stroke-linecap='round'/></svg>") no-repeat center / 100% 100%;
  pointer-events: none;
}

.hp-verse-by {
  display: block;
  margin-top: 0.55rem;
  font-style: normal;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.hp-lead {
  margin: 1.3rem 0 1.6rem;
  font-size: 1.05rem;
  color: var(--color-text);
  max-width: 44ch;
}

.hp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.hp-photo {
  position: relative;
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 3.2;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: linear-gradient(160deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
}

.hp-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hp-photo-tag {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-primary-dark);
  font-weight: 800;
  font-size: 0.78rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
}

@media (max-width: 760px) {
  .hp-hero-grid {
    grid-template-columns: 1fr;
  }

  .hp-photo {
    order: -1;
    aspect-ratio: 16 / 10;
  }
}

/* ===== Startseite: Motto-Band ===== */
.hp-motto {
  background: var(--color-primary-dark);
  color: var(--color-white);
  text-align: center;
  padding: clamp(2.5rem, 5vw, 3.5rem) 0;
  /* .main hat unten 3rem Abstand fuer alle Seiten; hier wieder aufheben,
     damit das (gleichfarbige) Band nahtlos in den Footer uebergeht */
  margin-bottom: -3rem;
}

.hp-motto p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.2rem, 2.6vw, 1.7rem);
  max-width: 28ch;
  margin: 0 auto;
  line-height: 1.4;
  color: var(--color-white);
}

.hp-motto span {
  display: block;
  margin-top: 0.7rem;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-honey);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: var(--color-white);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-white {
  background: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-white);
}

.btn-white:hover {
  background: var(--color-accent-light);
  color: var(--color-primary-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255,255,255,0.5);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--color-white);
  color: var(--color-white);
}

/* ===== Page Header ===== */
.page-header {
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
  padding: 2rem 0;
}

.page-header h1 {
  font-size: var(--font-size-2xl);
}

.page-header p {
  color: var(--color-text-muted);
  margin-top: 0.4rem;
}

/* ===== Section ===== */
.section {
  padding: 3rem 0;
}

.section-title {
  font-size: var(--font-size-xl);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--color-accent);
  display: inline-block;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.section-header .section-title {
  margin-bottom: 0;
}

.section-more {
  font-size: var(--font-size-sm);
  color: var(--color-accent-dark);
  font-weight: 600;
}

.section-more:hover {
  color: var(--color-primary);
}

/* ===== Grid ===== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.home-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

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

/* ===== News Card ===== */
.news-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.news-card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.news-card:hover .news-card-image img {
  transform: scale(1.04);
}

.news-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-card-date {
  display: inline-block;
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--color-signal-dark);
  background: var(--color-signal-soft);
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}

.news-card-title {
  font-size: var(--font-size-lg);
  margin-bottom: 0.5rem;
  color: var(--color-primary-dark);
}

.news-card-title a {
  color: inherit;
}

.news-card-title a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.news-card-intro {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  flex: 1;
  margin-bottom: 1rem;
}

.news-card-link {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-primary);
}

/* ===== Event Item ===== */
.event-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.event-item {
  display: flex;
  gap: 1rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
  text-decoration: none;
  color: var(--color-text);
  align-items: flex-start;
}

.event-item:hover {
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: var(--color-text);
}

.event-date-badge {
  flex-shrink: 0;
  width: 52px;
  text-align: center;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.3rem;
  line-height: 1;
}

.event-date-badge .day {
  font-family: var(--font-display);
}

.event-date-badge .day {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
}

.event-date-badge .month {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.event-details {
  flex: 1;
  min-width: 0;
}

.event-title {
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 0.2rem;
}

.event-meta {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.event-meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.event-item.past {
  opacity: 0.6;
}

/* ===== Article Page ===== */
.article-header {
  padding: 2rem 0 1.5rem;
}

.article-date {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.article-title {
  font-size: clamp(1.5rem, 3.5vw, var(--font-size-3xl));
  margin-bottom: 1rem;
}

.article-intro {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  font-style: italic;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.article-cover {
  margin-bottom: 2rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.article-cover img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.article-body {
  max-width: 720px;
}

.article-body h2 {
  font-size: var(--font-size-2xl);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.article-body h3 {
  font-size: var(--font-size-xl);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.article-body ul,
.article-body ol {
  margin-bottom: 1rem;
}

.article-back {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

/* ===== Gallery ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.gallery-thumb {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.gallery-thumb:hover img {
  transform: scale(1.06);
}

.gallery-thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(101,49,62,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.gallery-thumb:hover .gallery-thumb-overlay {
  opacity: 1;
}

.gallery-icon {
  width: 36px;
  height: 36px;
  color: white;
}

.album-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.album-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}

.album-card-img {
  aspect-ratio: 4/3;
  overflow: hidden;
}

.album-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.album-card:hover .album-card-img img {
  transform: scale(1.04);
}

.album-card-body {
  padding: 1rem;
}

.album-card-title {
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 0.25rem;
}

.album-card-count {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* ===== Lightbox ===== */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox-overlay.is-open {
  display: flex;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.2);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255,255,255,0.2);
}

.lightbox-caption {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.85);
  font-size: var(--font-size-sm);
  text-align: center;
}

/* ===== Downloads ===== */
.download-section {
  margin-bottom: 2.5rem;
}

.download-section-title {
  font-size: var(--font-size-xl);
  margin-bottom: 1rem;
  color: var(--color-primary);
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--color-accent);
}

.download-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}

.download-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  transition: box-shadow 0.2s;
}

.download-item:hover {
  box-shadow: var(--shadow-sm);
}

.download-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--color-accent-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent-dark);
  font-weight: 700;
  font-size: 0.65rem;
  text-transform: uppercase;
}

.download-name {
  flex: 1;
  font-size: var(--font-size-sm);
  color: var(--color-text);
}

.download-link {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-primary);
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.download-link:hover {
  background: var(--color-primary);
  color: white;
  text-decoration: none;
}

/* ===== Subpage List ===== */
.subpage-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
}

.subpage-list-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  color: var(--color-primary-dark);
  font-weight: 600;
  transition: box-shadow 0.2s, background 0.15s;
}

.subpage-list-item a:hover {
  background: var(--color-bg-alt);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

/* ===== Content Page ===== */
.content-page {
  padding: 2.5rem 0;
}

.content-page .content-body {
  max-width: 720px;
}

.content-body h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.content-body h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.content-body ul,
.content-body ol {
  margin-bottom: 1rem;
}

.content-body p + p {
  margin-top: 0.5rem;
}

/* ===== Kontakt ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

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

.contact-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.contact-card h2 {
  font-size: var(--font-size-xl);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-accent);
}

.contact-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: var(--font-size-sm);
  margin-bottom: 0;
}

.contact-label {
  font-weight: 700;
  min-width: 90px;
  color: var(--color-text-muted);
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.pagination-link,
.pagination-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  font-weight: 600;
  border: 1px solid var(--color-border);
}

.pagination-link {
  color: var(--color-primary);
  background: var(--color-white);
  transition: background 0.15s;
}

.pagination-link:hover {
  background: var(--color-bg-alt);
  text-decoration: none;
}

.pagination-current {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

/* ===== Personal/Staff ===== */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.staff-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.staff-card-photo {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--color-accent-light);
}

.staff-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.staff-card-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: var(--color-accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--color-accent-dark);
}

.staff-card-body {
  padding: 0.75rem;
}

.staff-card-name {
  font-weight: 700;
  font-size: var(--font-size-sm);
  color: var(--color-primary-dark);
}

.staff-card-role {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* ===== Quick Links ===== */
.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.6rem;
  margin-top: 2rem;
}

.quick {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 0.9rem;
  text-align: left;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  box-shadow: var(--shadow-sm);
  background: var(--color-white);
  color: var(--color-primary-dark);
  border: 1px solid var(--color-border);
  min-height: 56px;
}

.quick:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: var(--color-paper);
  text-decoration: none;
  color: var(--color-primary-dark);
}

.quick .ico {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--color-honey-soft);
  color: var(--color-honey-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  transition: background 0.15s, color 0.15s;
}

.quick:hover .ico {
  background: var(--color-honey);
  color: var(--color-white);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--color-accent-dark);
  color: rgba(255,255,255,0.95);
  margin-top: auto;
  padding: 2.5rem 0 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.footer-col h3 {
  font-size: var(--font-size-base);
  color: var(--color-white);
  margin-bottom: 0.75rem;
}

.footer-col p {
  font-size: var(--font-size-sm);
  line-height: 1.7;
}

.footer-col p a {
  color: var(--color-white);
  font-weight: 600;
  transition: opacity 0.15s;
}

.footer-col p a:hover {
  opacity: 0.85;
  text-decoration: underline;
}

.footer-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-links a {
  color: rgba(255,255,255,0.75);
  font-size: var(--font-size-sm);
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--color-white);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 1rem;
  text-align: center;
  font-size: var(--font-size-sm);
  color: rgba(255,255,255,0.5);
}

/* ===== Notice Box ===== */
.notice {
  background: var(--color-accent-light);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: var(--font-size-sm);
  color: var(--color-text);
}

.notice-warning {
  background: #fff8e6;
  border-color: #e0a830;
}

/* ===== 404 ===== */
.error-page {
  text-align: center;
  padding: 5rem 1rem;
}

.error-code {
  font-size: 6rem;
  font-weight: 900;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.error-page h1 {
  margin-bottom: 1rem;
  font-size: var(--font-size-2xl);
}

.error-page p {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Blocks / Rich Text ===== */
.kirby-text h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

.kirby-text h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.kirby-text p {
  margin-bottom: 1rem;
}

.kirby-text ul,
.kirby-text ol {
  margin-bottom: 1rem;
}

.kirby-text figure {
  margin: 1.5rem 0;
}

.kirby-text figure img {
  border-radius: var(--radius-sm);
}

.kirby-text figcaption {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  text-align: center;
  margin-top: 0.4rem;
}

/* ===== Quote Block ===== */
.quote-block {
  font-size: 1.25rem;
  line-height: 1.5;
  padding: 1.5rem 1.5rem 1.5rem 1.75rem;
  margin: 2rem 0;
  background: var(--color-bg-alt);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-sm);
  position: relative;
  color: var(--color-text);
  word-wrap: break-word;
  overflow-wrap: break-word;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.quote-mark {
  position: absolute;
  left: 0.5rem;
  top: 0.25rem;
  font-size: 2.5rem;
  color: var(--color-accent-dark);
  opacity: 0.6;
  line-height: 1;
  flex-shrink: 0;
}

.quote-text {
  margin-bottom: 0.75rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  font-style: italic;
}

.quote-citation {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  font-style: italic;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.citation-dash {
  margin-right: 0.25rem;
}

@media (max-width: 640px) {
  .quote-block {
    font-size: 1rem;
    padding: 1rem 1rem 1rem 1.25rem;
    margin: 1.5rem 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .quote-mark {
    font-size: 1.75rem;
    left: 0.25rem;
    top: 0.1rem;
  }
}

/* ===== Tabs (for downloads) ===== */
.tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 0;
}

.tab-btn {
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  font: inherit;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}

.tab-btn:hover {
  color: var(--color-primary);
}

.tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.tab-content {
  display: none;
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

.tab-content.active {
  display: block;
}

/* ===== Schul-ABC ===== */
.abc-search {
  margin-bottom: 1.25rem;
}

.abc-search input {
  width: 100%;
  max-width: 420px;
  padding: 0.6rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  font-family: inherit;
}

.abc-search input:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.abc-jumpnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 2rem;
}

.abc-jumpnav[hidden] {
  display: none;
}

.abc-jumpnav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  background: var(--color-bg-alt);
  color: var(--color-primary-dark);
  font-weight: 700;
  font-size: var(--font-size-sm);
  text-decoration: none;
}

.abc-jumpnav a:hover {
  background: var(--color-primary);
  color: var(--color-white);
  text-decoration: none;
}

.abc-empty {
  color: var(--color-text-muted);
  font-style: italic;
}

/* ===== Mehrsprachige Infoseite ===== */
.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0 2rem;
}

.lang-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.lang-card h2 {
  font-size: var(--font-size-lg);
  margin-bottom: 0.75rem;
  color: var(--color-primary-dark);
}

/* ===== Utility ===== */
.text-muted { color: var(--color-text-muted); }
.text-sm { font-size: var(--font-size-sm); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
