/* =========================
   Font Definitions
   ========================= */
/* Local LibreBaskerville fonts for GDPR compliance */

@font-face {
  font-family: 'Libre Baskerville';
  src: url('../fonts/LibreBaskerville-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Libre Baskerville';
  src: url('../fonts/LibreBaskerville-Bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Libre Baskerville';
  src: url('../fonts/LibreBaskerville-Italic.ttf') format('truetype');
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}

/* =========================
   Variables & Base Styles
   ========================= */
:root {
  --primary: #004e9e;
  --secondary: #00b4d8;
  --text: #1a1a1a;
  --text-light: #666666;
  --background: #ffffff;
  --background-alt: #f8f9fa;
  --shadow: 0 8px 32px rgba(0, 78, 158, 0.13);
}

html {
  scroll-behavior: smooth;
}

html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

/* =========================
   Skip to Content (A11y)
   ========================= */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100000;
  padding: 0.75rem 1.25rem;
  background: var(--primary);
  color: #fff !important;
  font-weight: bold;
  border-radius: 0 0 0.5rem 0;
  text-decoration: none;
  transform: translateY(-100%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--secondary);
}

/* =========================
   Header & Navigation
   ========================= */
#main-header {
  transition: box-shadow 0.3s ease;
}

#main-header.scrolled {
  box-shadow: 0 4px 16px rgba(0,78,158,0.15);
}

.logo-container img {
  height: 100px;
  transition: transform 0.3s ease;
}

.logo-container:hover img {
  transform: scale(1.05);
}

/* =========================
   Header & Navigation
   ========================= */
.hero {
  position: relative;
}

/* Hero title with Libre Baskerville font */
#home h1 {
  font-family: 'Libre Baskerville', serif;
}

.hero-overlay {
  max-width: 90%;
}

.hero-feature {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-feature:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.hero-overlay img {
  max-width: 20%;
  height: auto;
}

/* =========================
   Section Styles
   ========================= */
.section-overlap-box {
  position: relative;
  z-index: 2;
  background: rgba(255,255,255,0.96);
  box-shadow: var(--shadow);
}

section.relative.z-20 {
  margin-top: -4rem;
  margin-bottom: 3rem;
}

/* =========================
   Timeline Styles
   ========================= */
#geschichte .container {
  position: relative;
  padding-top: 0;
}

#geschichte .timeline-line {
  content: "";
  position: absolute;
  left: 50%;
  top: 4rem;
  transform: translateX(-50%);
  width: 2px;
  height: calc(100% - 4rem);
  background: var(--primary);
  z-index: 0;
}

/* =========================
   Box & Card Styles
   ========================= */
.bg-white {
  background: rgba(255,255,255,0.95);
  border-radius: 0.5rem;
  padding: 2rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bg-white:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

/* =========================
   Animations
   ========================= */
.animate-fadein {
  animation: fadein 1.2s cubic-bezier(.4,0,.2,1);
}

@keyframes fadein {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-20px); }
}

/* =========================
   Gallery & Carousel
   ========================= */
.gallery-img-laden {
  max-width: 100%;
  max-height: 500px;
  width: auto;
  height: auto;
  display: none;
  border-radius: 1.5rem;
  box-shadow: var(--shadow);
  transition: all 0.5s ease;
  opacity: 1;
  position: relative;
  z-index: 2;
}

.gallery-img-laden.active {
  display: block !important;
}

/* =========================
   Accordion
   ========================= */
.accordion-panel {
  transition: all 0.3s ease;
}

.accordion-panel.is-open {
  display: block !important;
}

/* =========================
   Slider Dots
   ========================= */
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px 0 4px;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d1d5db;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  padding: 0;
}

.slider-dot.active {
  background: #004e9e;
  transform: scale(1.3);
}

/* =========================
   Footer
   ========================= */
footer p {
  font-size: 0.9rem;
}

/* =========================
   Links
   ========================= */
a {
  color: var(--primary);
  text-decoration: none;
}

/* =========================
   Responsive Styles
   ========================= */
@media (max-width: 900px) {
  .section-overlap-box {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100vw;
    box-sizing: border-box;
  }

  .overflow-hidden.rounded-2xl.shadow-xl.border.border-gray-100.animate-fadein img {
    width: 100% !important;
    height: 320px !important;
    margin: 0 !important;
    max-width: 100vw !important;
    box-sizing: border-box;
  }

  section.relative.z-20 {
    margin-top: -2rem;
    margin-bottom: 2rem;
  }

  /* Timeline: auf Mobile als vertikale Liste ohne negative Margins */
  #geschichte .timeline-img {
    width: 80px !important;
    height: 80px !important;
    margin: 0 0 0.75rem 0 !important;
    flex-shrink: 0;
  }

  #geschichte .flex.flex-col.md\:flex-row {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  #geschichte .flex.w-full.md\:w-1\/2 {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    justify-content: flex-start !important;
  }

  #geschichte .bg-white.rounded-xl {
    margin: 0 !important;
  }
}

/* =========================
   Editorial Hero
   ========================= */
.hero {
  position: relative;
  min-height: 88vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  text-align: left;
}
.hero__bg {
  position: absolute; inset: 0;
  background-image: image-set(url('/images/hero.webp') type('image/webp'), url('/images/hero.JPEG') type('image/jpeg'));
  background-image: -webkit-image-set(url('/images/hero.webp') type('image/webp'), url('/images/hero.JPEG') type('image/jpeg'));
  background-size: cover;
  background-position: center 60%;
  z-index: -2;
  transform: scale(1.05);
  animation: heroZoom 18s cubic-bezier(.4,.0,.2,1) forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(20,30,55,.55) 0%, rgba(20,30,55,.35) 35%, rgba(20,30,55,.7) 100%);
}
.hero__inner {
  color: #fff;
  max-width: 720px;
  padding: 6rem 0 5rem;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Helvetica, Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255,255,255,.92);
  margin-bottom: 1.5rem;
}
.hero__eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: #fff;
  display: inline-block;
}
.hero h1 {
  font-family: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  font-weight: 700;
  color: #fff;
  font-size: clamp(2.5rem, 6.5vw, 5rem);
  line-height: 1.05;
  letter-spacing: .02em;
  margin: 0 0 1.25rem;
  text-shadow: 0 2px 24px rgba(0,0,0,.25);
}
.hero__lead {
  font-family: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  color: rgba(255,255,255,.92);
  max-width: 38ch;
  line-height: 1.5;
  margin: 0 0 2.5rem;
}
.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  padding: 1rem 2rem;
  background: var(--primary, #004e9e);
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Helvetica, Arial, sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 4px;
  box-shadow: 0 8px 24px -8px rgba(0, 78, 158, .55);
  transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
}
.hero__cta:hover {
  background: #003a78;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -10px rgba(0, 78, 158, .65);
}
.hero__cta:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.hero__cta-arrow {
  display: inline-block;
  transition: transform .25s ease;
}
.hero__cta:hover .hero__cta-arrow { transform: translateX(4px); }
.hero__scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.85);
  font-size: 11px;
  letter-spacing: .25em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Helvetica, Arial, sans-serif;
}
.hero__scroll::after {
  content: "";
  display: block;
  width: 1px; height: 40px;
  background: rgba(255,255,255,.6);
  margin: .8rem auto 0;
  animation: heroScrollPulse 2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes heroScrollPulse {
  0%, 100% { transform: scaleY(1);  opacity: .85; }
  50%      { transform: scaleY(.4); opacity: .4;  }
}
@media (prefers-reduced-motion: reduce) {
  .hero__bg { animation: none; transform: none; }
  .hero__scroll::after { animation: none; }
}
@media (max-width: 768px) {
  .hero__inner { padding: 5rem 0 4.5rem; }
  .hero__scroll { display: none; }
}