/* --- landing-page.css --- */
/* ENTHÄLT: Hero Sektion, Animationen, Partner, Spendenbanner */
/* Team CSS entfernt (veraltet) */


/* =========================================
   SMOOTH SCROLLING SETUP (Lenis)
   'html { scroll-behavior: smooth; }' entfernt um Konflikte mit Lenis zu vermeiden
   ========================================= */

html {
  height: 100%;
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}


/* =========================================
   MARKER ANIMATION
   ========================================= */

.marker-underline {
  position: relative;
  display: inline-block;
}
.marker-underline::after {
  content: "";
  position: absolute;
  bottom: 0.05em;
  left: 0;
  width: 77%;
  height: 0.3em;
  background-color: var(--ukraine-yellow);
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    background-color 0.3s ease;
}
.marker-underline.is-visible::after {
  transform: scaleX(1);
}
body.dark-mode .marker-underline::after {
  background-color: var(--ukraine-blue);
}


/* =========================================
   RUG PULL / STICKY HERO EFFECT
   ========================================= */

.hero {
  background: radial-gradient(
    circle at top right,
    rgba(0, 87, 183, 0.05),
    transparent 40%
  );
  overflow: hidden;

  /* Sticky Logic */
  position: sticky;
  top: 0;
  z-index: 0;

  /* clamp() verhindert, dass der Hero auf kleinen Screens zu sehr schrumpft
     oder auf sehr großen Screens (4K) ins Unendliche wächst */
  height: clamp(520px, 70vh, 1000px);

  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0;
  margin-bottom: 5%;
}

/* Der "Rug" Overlay */
.content-overlay {
  position: relative;
  z-index: 100;
  background-color: var(--bg-body, #ffffff);
  width: 100%;
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.1);
  margin-top: -1px;
  will-change: transform;
}

/* Glas-Gradient obere Kante */
.content-overlay::before {
  content: "";
  position: absolute;
  top: -50px;
  left: 0;
  width: 100%;
  height: 50px;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    var(--bg-body, #ffffff) 100%
  );
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 100%);
  pointer-events: none;
  z-index: 1;
}

/* Dark Mode: Overlay & Glaskante */
body.dark-mode .content-overlay {
  background-color: #121212;
}
body.dark-mode .content-overlay::before {
  background: linear-gradient(to bottom, rgba(18, 18, 18, 0) 0%, #121212 100%);
}


/* =========================================
   HERO INHALT
   ========================================= */

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 25px;
  color: var(--text-main);
  font-weight: 800;
  line-height: 1.2;
}

.hero-badge {
  background: #eef2ff;
  color: var(--ukraine-blue);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: inline-block;
}
body.dark-mode .hero-badge {
  background: rgba(0, 87, 183, 0.2);
  color: #4da3ff;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-body);
  margin-bottom: 40px;
  max-width: 90%;
}


/* =========================================
   HERO STACK (Karte & Slider)
   ========================================= */

.hero-image-stack {
  position: relative;
  height: 100%;
  width: 100%;
  perspective: 1000px;
  cursor: pointer;
}

.card-stack-container {
  position: relative;
  width: 85%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stack-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 30px var(--shadow-strong);
  backface-visibility: hidden;
}

/* Karte Vorderseite */
.card-front {
  z-index: 10;
  background: #fff;
  transform: rotate(0deg) translate(0, 0);
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.1);
  transition: opacity 1.5s ease-in-out, transform 6s linear;
  z-index: 1;
}
.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

.hero-overlay-card {
  position: absolute;
  bottom: 2%;
  right: 2%;
  background: var(--bg-card);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 10px 30px var(--shadow-strong);
  z-index: 10;
  max-width: 48%;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.69);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(7.1px);
  -webkit-backdrop-filter: blur(7.1px);
  border: 1px solid rgba(255, 255, 255, 1);
  height: 35%;
}

/* Karte Rückseite */
.card-back {
  z-index: 5;
  background: var(--ukraine-yellow);
  transform: rotate(6deg) translate(20px, 20px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  color: #1a1a1a;
  overflow: visible !important;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
body.dark-mode .card-back h3,
body.dark-mode .card-back {
  color: #1a1a1a !important;
}

/* Tab Lasche */
.project-toggle-tab {
  position: absolute;
  top: 50%;
  right: -25%;
  transform: translateY(-50%) rotate(90deg);
  background: var(--ukraine-yellow);
  color: #1a1a1a;
  padding: 12px 24px;
  font-weight: 800;
  font-size: 0.9rem;
  text-transform: uppercase;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  z-index: 6;
  transition: background-color 0.3s ease;
}
.project-toggle-tab:hover {
  background-color: #ffd700;
}

/* Stack Interaktion */
.hero-image-stack:not(.swapped):hover .card-back {
  transform: rotate(7deg) translate(40px, 40px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}
.hero-image-stack.swapped .card-front {
  transform: rotate(-6deg) translate(-20px, 20px) scale(0.95);
  z-index: 5;
  opacity: 0.8;
  filter: grayscale(0.5);
  pointer-events: none;
}
.hero-image-stack.swapped .card-back {
  transform: rotate(0deg) translate(0, 0) scale(1);
  z-index: 10;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}


/* =========================================
   MINI PROJEKTE GRID
   ========================================= */

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  width: 100%;
  height: 100%;
}

a.project-mini-card {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  height: 100%;
}

.project-mini-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  height: 100%;
  width: 100%;
}

.project-mini-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.project-mini-card:hover > img {
  transform: scale(1.1);
  filter: blur(5px) brightness(0.7);
}

.project-overlay-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  z-index: 5;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  color: #ffffff;
  font-size: 2rem;
}
.project-mini-card:hover .project-overlay-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.project-mini-title {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--overlay-bg);
  color: #fff;
  font-size: 0.8rem;
  padding: 5px 10px;
  font-weight: 600;
}

.close-projects {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  color: #1a1a1a;
}


/* =========================================
   PARTNER SECTION
   ========================================= */

.logos {
  background-color: #ffffff;
}

.partner-section {
  padding: 40px 0;
  overflow: hidden;
  background-color: var(--bg-body, #ffffff);
}

.partner-logo-track {
  display: flex;
  width: max-content;
  animation: scroll-logos 30s linear infinite;
}

.partner-logo-track:hover {
  animation-play-state: paused;
}

.partner-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 15vw;
  min-width: 180px;
  margin-right: 6vw;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.3s, transform 0.3s;
}

.partner-logo:hover {
  opacity: 1;
  transform: scale(1.05);
}

.partner-logo img {
  width: 100%;
  height: auto;
  max-height: 120px;
  object-fit: contain;
  display: block;
}

@keyframes scroll-logos {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}


/* =========================================
   CONTENT SECTIONS (About, Pillars)
   ========================================= */

.about-section {
  padding: 5%;
  background: var(--bg-body);
}

.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 80px;
}

.about-quote {
  font-size: 1.8rem;
  line-height: 1.4;
  border-left: 4px solid var(--ukraine-blue);
  padding-left: 30px;
  color: var(--text-main);
}

.about-text h3 {
  font-size: 2rem;
  margin-bottom: 20px;
  font-weight: 800;
  color: var(--text-main);
}

.about-text p {
  margin-bottom: 20px;
  font-size: 1.05rem;
  color: var(--text-body);
}

.pillars-section {
  background: var(--bg-light-section);
  padding: 100px 0;
  transition: background-color 0.3s;
}

.section-header {
  text-align: center;
  margin-bottom: 70px;
  max-width: 800px;
  margin: 0 auto 70px;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  font-weight: 800;
  color: var(--text-main);
}

.section-header p {
  color: var(--text-body);
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.pillar-card {
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s;
  border: 1px solid var(--border-color);
}

.pillar-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px var(--shadow-strong);
}

.pillar-img-wrap {
  height: 220px;
  overflow: hidden;
  position: relative;
}

.pillar-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.pillar-card:hover .pillar-img-wrap img {
  transform: scale(1.05);
}

.pillar-content {
  padding: 30px;
}

.pillar-icon {
  width: 50px;
  height: 50px;
  background: rgba(0, 87, 183, 0.1);
  color: var(--ukraine-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 1.5rem;
  margin-bottom: 20px;
}
body.dark-mode .pillar-icon {
  background: rgba(0, 87, 183, 0.2);
  color: #4da3ff;
}

.pillar-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  font-weight: 800;
  color: var(--text-main);
}

.pillar-card p {
  color: var(--text-body);
  margin-bottom: 20px;
  font-size: 0.95rem;
}


/* =========================================
   SPENDEN BANNER
   ========================================= */

.donation-banner {
  background: var(--ukraine-blue);
  color: #ffffff;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.donation-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.1) 1px,
    transparent 1px
  );
  background-size: 30px 30px;
  opacity: 0.5;
}

.donation-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.donation-box {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 30px;
  border-radius: 12px;
  display: inline-block;
  margin-top: 40px;
  text-align: left;
  max-width: 600px;
  width: 100%;
  color: #ffffff;
}
body.dark-mode .donation-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.iban-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-family: monospace;
  font-size: 1.2rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 10px 15px;
  border-radius: 4px;
}


/* =========================================
   MEDIA QUERIES — KORRIGIERT & NICHT-ÜBERLAPPEND
   Reihenfolge: breit → schmal (max-width), hoch → flach (max-height)
   BUGFIX: Überlappende max-height Queries durch Ranges ersetzt
   BUGFIX: clamp() Dezimaltrenner Komma → Punkt korrigiert
   ========================================= */

/* --- Breite: Schmale Screens & Tablets ≤ 900px --- */
@media (max-width: 900px) {
  .hero-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }
  .hero-image-stack {
    height: 350px;
    margin-top: 40px;
  }
  .hero-overlay-card {
    position: relative;
    bottom: auto;
    right: auto;
    margin-top: -50px;
    margin-left: 20px;
  }
}

/* --- Breite: Mittlere Screens 901px–1280px --- */
@media (max-width: 1280px) {
  .hero {
    min-height: 80vh;
  }
}

/* --- Höhe: Screens zwischen 731px und 820px Viewport-Höhe --- */
/* BUGFIX: War (max-height: 820px) + (max-height: 830px) — beide matchten z.B. 800px.
   Da 830px-Query später im Code stand, hat sie immer gewonnen mit margin-top: -25%. */
@media (max-height: 820px) and (min-height: 731px) {
  .hero {
    height: clamp(480px, 90vh, 820px);
    margin-bottom: 3%;
  }
  .hero p {
    margin-bottom: 2%;
  }
  .hero h1 {
    margin-bottom: 1%;
    /* BUGFIX: clamp(2.0rem, 4,5vw, 3,5rem) → korrekte Dezimalpunkte */
    font-size: clamp(2rem, 4.5vw, 3.5rem);
  }
  .hero-grid {
    height: 71%;
  }
}

/* --- Höhe: Screens zwischen 661px und 730px Viewport-Höhe --- */
@media (max-height: 730px) and (min-height: 661px) {
  .hero-image-stack {
    min-height: 70vh;
    width: 100%;
  }
  .content-overlay {
    margin-top: 12%;
  }
  .hero {
    height: clamp(480px, 95vh, 730px);
    margin-bottom: 10%;
  }
  .hero p {
    margin-bottom: 2%;
  }
  .hero h1 {
    margin-bottom: 1%;
    font-size: clamp(2rem, 4.5vw, 3.5rem);
  }
  .hero-grid {
    height: 60%;
  }
}

/* --- Höhe: Sehr flache Screens ≤ 660px (z.B. Landscape-Handy) --- */
@media (max-height: 660px) {
  .hero-image-stack {
    min-height: 65vh;
    width: 100%;
  }
  .content-overlay {
    margin-top: 15%;
  }
  .hero {
    height: clamp(400px, 100vh, 660px);
    margin-bottom: 5%;
  }
  .hero p {
    margin-bottom: 2%;
  }
  .hero h1 {
    margin-bottom: 1%;
    font-size: clamp(2rem, 4.5vw, 3.5rem);
  }
  .hero-grid {
    height: 55%;
  }
}
