/* --- landing-page.css --- */
/* ENTHÄLT: Hero Sektion, Animationen, Partner, Team, Spendenbanner */

/* --- SMOOTH SCROLLING SETUP (Lenis) --- */
/* We removed 'html { scroll-behavior: smooth; }' to prevent conflicts with Lenis */

html {
  height: 100%; /* Ensures base height for sticky positioning */
}

/* Recommended styles for Lenis Smooth Scroll */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important; /* Forces browser to let Lenis handle scroll */
}

.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 {
  /* Existing Styles */
  background: radial-gradient(
    circle at top right,
    rgba(0, 87, 183, 0.05),
    transparent 40%
  );
  overflow: hidden;

  /* NEW: Sticky Logic */
  position: sticky;
  top: 0;
  z-index: 0; /* Lowered to 0 to ensure it stays behind */
  height: 70vh; /* Must be full height for effect to look right */

  /* NEW: Center content vertically since it's full height */
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0;
}

/* NEW CLASS: The "Rug" Overlay */
.content-overlay {
  position: relative;
  z-index: 100; /* Raised to 100 to forcefully sit on top of Hero */
  background-color: var(--bg-body, #ffffff); /* Solid background is MANDATORY */
  width: 100%;
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.1); /* Shadow creates the "layer" depth */
  margin-top: -1px; /* Fixes occasional hairline gaps */
  will-change: transform; /* Optimizes rendering for smooth scrolling */
}

/* --- NEW: GLASS GRADIENT TOP EDGE --- */
.content-overlay::before {
  content: "";
  position: absolute;
  /* Moves the gradient up so it sits "on top" of the section start */
  top: -50px;
  left: 0;
  width: 100%;
  height: 50px; /* Reduced to ~1/3 size */

  /* The Glass Effect */
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    var(--bg-body, #ffffff) 100%
  );

  /* Blur effect for that "frosted glass" look */
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);

  /* Fades the blur itself so there is no hard top line */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 100%);

  pointer-events: none; /* Allows clicking through the transparent part */
  z-index: 1;
}

/* Dark Mode Handling for the Overlay and Glass Edge */
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%);
}

/* ========================================= */
/* REST OF YOUR STYLES             */
/* ========================================= */
.hero{
  margin-bottom: 5%;
}
.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;
}
/* Zweiter Teil: Leerzeichen hinzugefügt und Selektor verstärkt */
body.dark-mode partner-section {
  background-color: #121212 !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;
}

/* Interaktion Stack */
.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 */
/* Mini Projekte Grid */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr; /* NEU: Erzwingt zwei gleich hohe Zeilen */
  gap: 10px;
  width: 100%;
  height: 100%;
}

a.project-mini-card {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  height: 100%; /* NEU: Muss die volle Höhe der Grid-Zelle füllen */
}

.project-mini-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  height: 100%; /* NEU: Sicherstellen, dass der Container voll gefüllt ist */
  width: 100%;
}

.project-mini-card img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* WICHTIG: Schneidet das Bild passend zu, ohne es zu verzerren */
  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: 20;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  color: #ffffff;
  font-size: 2rem;
  z-index: 5;
}
.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;
}
.logos {
  background-color: #ffffff;
}
/* PARTNER SECTION */
.partner-section {
  padding: 0px 0;
  overflow: hidden;
}
.partner-logo-track {
  display: flex;
  white-space: nowrap;
  animation: scroll-logos 40s linear infinite;
  padding: 10px 0;
}
.partner-logo-track:hover {
  animation-play-state: paused;
}
.partner-logo {
  display: inline-block;
  width: 120px;
  flex-shrink: 0;
  margin-right: 50px;
  opacity: 0.6;
  transition: opacity 0.3s;
}
.partner-logo:hover {
  opacity: 1;
}
.partner-logo img {
  width: 100%;
  height: auto;
  display: block;
}
@keyframes scroll-logos {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(-100%);
  }
}

/* CONTENT SECTIONS (About, Pillars, Team) */
.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;
}

/* TEAM SECTION */
.team-section {
  background-color: var(--bg-body);
  padding: 100px 0;
  transition: background-color 0.3s ease;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 50px;
  margin-top: 50px;
}
.team-card {
  text-align: center;
  padding: 20px;
  transition: transform 0.3s ease;
}
.team-card:hover {
  transform: translateY(-5px);
}
.team-img-ring {
  width: 160px;
  height: 160px;
  background-color: var(--ukraine-blue);
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 10px 20px var(--shadow-color);
}
.team-img-ring img {
  width: 145px;
  height: 145px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-body);
  transition: border-color 0.3s ease;
}
.team-grid .team-card:nth-child(1) .team-img-ring img,
.team-grid .team-card:nth-child(2) .team-img-ring img {
  object-position: center 15%;
}
.team-name {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 5px;
  color: var(--text-main);
}
.team-role {
  font-family: "Merriweather", serif;
  font-style: italic;
  color: var(--ukraine-blue);
  font-weight: 700;
  font-size: 0.95rem;
  display: block;
  margin-bottom: 12px;
}
.team-quote {
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.5;
  max-width: 250px;
  margin: 0 auto;
}

/* 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 Landing Page */
@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;
  }
  }

  @media (max-width: 1280px){

 
  .hero{
min-height: 80vh;

  }
}

  @media (max-height: 820px){

 
  .hero{
min-height: 85vh;
margin-bottom: 5%;
margin-top:-3%;
  }
  .hero p {
    margin-bottom: 2%;
  }
   .hero h1 {
    margin-bottom: 1%;
    font-size: clamp(2.0rem, 4,5vw, 3,5rem);
  }
  .hero-grid{
    height: 71%;
  }
}
  @media (max-height: 830px){

 
  .hero{
min-height: 85vh;
margin-bottom: 5%;
margin-top:-25%;
  }
  .hero p {
    margin-bottom: 2%;
  }
   .hero h1 {
    margin-bottom: 1%;
    font-size: clamp(2.0rem, 4,5vw, 3,5rem);
  }
  .hero-grid{
    height: 55%;
  }
}
  @media (max-height: 730px){
.hero-image-stack{
  min-height: 70vh;
  width: 100%;
}
 .content-overlay{
  margin-top: 15%;
 }
  .hero{
min-height:100vh;
margin-bottom:15%;
margin-top:-25%;
  }
  .hero p {
    margin-bottom: 2%;
  }
   .hero h1 {
    margin-bottom: 1%;
    font-size: clamp(2.0rem, 4,5vw, 3,5rem);
  }
  .hero-grid{
    height: 55%;
  }
}
  @media (max-height: 660px){
.hero-image-stack{
  min-height: 65vh;
  width: 100%;
}
 .content-overlay{
  margin-top: 15%;
 }
  .hero{
min-height: 100vh;
margin-bottom: 5%;
margin-top:-25%;
  }
  .hero p {
    margin-bottom: 2%;
  }
   .hero h1 {
    margin-bottom: 1%;
    font-size: clamp(2.0rem, 4,5vw, 3,5rem);
  }
  .hero-grid{
    height: 55%;
  }
}
/* PARTNER SECTION */
.partner-section {
  padding: 40px 0;
  overflow: hidden;
  background-color: var(--bg-body, #ffffff); /* Nutze die Variable statt Hardcoded #fff */
}

.partner-logo-track {
  display: flex;
  width: max-content; /* Wichtig: Erlaubt dem Track, so breit wie der Inhalt zu sein */
  animation: scroll-logos 30s linear infinite; /* Geschwindigkeit angepasst */
 
}

.partner-logo-track:hover {
  animation-play-state: paused;
}

.partner-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  /* 15vw entspricht 15% der Breite des Browserfensters */
  width: 15vw; 
  min-width: 180px; /* Verhindert, dass die Logos auf Handys zu winzig werden */
  margin-right: 6vw; /* Abstand zwischen den Logos */
  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; /* Verhindert, dass hochkant-Logos die Sektion sprengen */
  object-fit: contain;
  display: block;
}

/* Optimierte Animation für flüssigen Durchlauf */
@keyframes scroll-logos {
  0% {
    transform: translateX(0);
  }
  100% {
    /* Bewegt den Track nach links. 
       Hinweis: Für einen perfekten Loop müssten die Logos im HTML verdoppelt werden. */
    transform: translateX(-50%); 
  }
}