/* ===========================
   LOKALE SCHRIFT (Inter)
   =========================== */
@font-face {
  font-family: "Inter";
  src: url("./fonts/Inter/Inter-VariableFont_opsz,wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("./fonts/Inter/Inter-Italic-VariableFont_opsz,wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* ===========================
   BASISVARIABLEN + GLOBAL
   =========================== */
:root {
  --netflix-red: #E50914;
  --netflix-dark: #141414;
  --netflix-darker: #0A0A0A;
  --netflix-light: #F5F5F1;
  --netflix-gray: #808080;
  --netflix-card-shadow: 0 8px 16px rgba(0, 0, 0, 0.6);
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background-color: var(--netflix-darker);
  color: var(--netflix-light);
  scroll-behavior: smooth;
  line-height: 1.4;
}

/* ===========================
   NAVIGATION
   =========================== */
.nav-link {
  position: relative;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 3px;
  bottom: -6px;
  left: 0;
  background-color: var(--netflix-red);
  transition: width 0.3s ease;
  transform-origin: left center;
}

.nav-link:hover::after {
  width: 100%;
}

/* ===========================
   PORTFOLIO-KARTEN
   =========================== */
.portfolio-card {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-origin: center;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  pointer-events: auto !important;
}

.portfolio-card:hover {
  transform: scale(1.06) translateY(-6px);
  box-shadow: var(--netflix-card-shadow);
  z-index: 10;
}

.portfolio-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
  z-index: 1;
}

/* ===========================
   SONSTIGES
   =========================== */
.skill-icon {
  width: 24px;
  height: 24px;
  margin-right: 8px;
}

.carousel-container {
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.carousel-item {
  scroll-snap-align: start;
  flex: 0 0 auto;
}

.modal {
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #333;
}

::-webkit-scrollbar-thumb {
  background: var(--netflix-red);
  border-radius: 4px;
}

/* ===========================
   VIDEO-CONTAINER
   =========================== */
.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  background: #000;
}

.video-container iframe,
.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Einheitliche Medienfüllung */
.portfolio-card img,
.portfolio-card iframe,
.portfolio-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===========================
   RESPONSIVE GRÖSSEN
   =========================== */
/* --- Desktop --- */
@media (min-width: 768px) {
  .normal-video {
    width: 38.18rem;
  }
  .normal-video .portfolio-card {
    height: 21.51rem;
  }
  .short-video {
    width: 12.08rem;
  }
  .short-video .portfolio-card {
    height: 21.51rem;
  }
}

/* --- Mobile --- */
@media (max-width: 767.98px) {
  .normal-video {
    width: 27.26rem;
  }
  .normal-video .portfolio-card {
    height: 15.3rem;
  }
  .short-video {
    width: 8.63rem;
  }
  .short-video .portfolio-card {
    height: 15.3rem;
  }
}

/* ===========================
   REIHEN-ANPASSUNGEN
   =========================== */
/* --- Youtuber (-20%) --- */
@media (min-width: 768px) {
  #youtuber-carousel .normal-video {
    width: 30.54rem;
  }
  #youtuber-carousel .normal-video .portfolio-card,
  #youtuber-carousel .short-video .portfolio-card {
    height: 17.21rem;
  }
  #youtuber-carousel .short-video {
    width: 9.66rem;
  }
}
@media (max-width: 767.98px) {
  #youtuber-carousel .normal-video {
    width: 21.81rem;
  }
  #youtuber-carousel .normal-video .portfolio-card,
  #youtuber-carousel .short-video .portfolio-card {
    height: 12.24rem;
  }
  #youtuber-carousel .short-video {
    width: 6.90rem;
  }
}

/* --- Warimex (-10%) --- */
@media (min-width: 768px) {
  #warimex-carousel .normal-video {
    width: 34.36rem;
  }
  #warimex-carousel .normal-video .portfolio-card,
  #warimex-carousel .short-video .portfolio-card {
    height: 19.36rem;
  }
  #warimex-carousel .short-video {
    width: 10.87rem;
  }
}
@media (max-width: 767.98px) {
  #warimex-carousel .normal-video {
    width: 24.53rem;
  }
  #warimex-carousel .normal-video .portfolio-card,
  #warimex-carousel .short-video .portfolio-card {
    height: 13.77rem;
  }
  #warimex-carousel .short-video {
    width: 7.77rem;
  }
}

/* ===========================
   TITEL & HERO-SEKTION
   =========================== */
#portfolio h2,
#skills h2,
#about h2,
#impressum h2 {
  text-align: center;
}

#portfolio .flex.items-center.mb-4 {
  justify-content: flex-start;
}

#hero {
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  padding-bottom: 0;
  overflow: hidden;
  background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('./img/intergundheader.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.hero-content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  flex-grow: 1;
  height: 100vh;
  justify-content: flex-end;
  max-w: 7xl;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 21;
}

/* --- Hero (Desktop) --- */
@media (min-width: 768px) {
  .hero-content-wrapper {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    align-items: stretch;
    padding-bottom: 0;
    max-width: 90%;
    margin-left: 5%;
    position: relative;
  }

  .hero-text-content {
    --x-position: 70%;
    --y-position: 50%;
    --container-width: 40vw;
    position: absolute;
    left: var(--x-position);
    top: var(--y-position);
    width: var(--container-width);
    max-width: 650px;
    transform: translate(-50%, -50%);
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-text-content h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    white-space: nowrap;
    margin-bottom: 0.5rem;
  }

  .hero-text-content p {
    font-size: clamp(1.2rem, 3.5vw, 2rem);
    white-space: nowrap;
    margin-bottom: 2.5rem !important;
  }

  .hero-text-content a.inline-block {
    font-size: clamp(1rem, 3vw, 1.8rem);
    white-space: nowrap;
    width: 600px;
    height: 85px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  #hero .hero-image-wrapper {
    flex-shrink: 0;
    height: 100%;
    display: flex;
    align-items: flex-end;
    position: absolute;
    left: 0;
    bottom: 0;
    width: auto;
    z-index: 10;
    pointer-events: none;
  }
}

/* --- Hero Bild --- */
#hero .hero-image-wrapper img {
  height: 95vh !important;
  width: auto !important;
  max-width: none !important;
  object-fit: contain !important;
  align-self: flex-end !important;
  border-radius: 0px;
  margin-bottom: 0 !important;
  transform: translateX(-35%) !important;
}

@media (min-width: 768px) {
  #hero .hero-image-wrapper img {
    height: 95vh !important;
    margin-bottom: 0 !important;
    transform: translateX(-35%) !important;
  }
}

/* --- Hero (Mobil) --- */
@media (max-width: 767px) {
  .hero-content-wrapper {
    flex-direction: column-reverse; /* Text oben, Bild unten */
    justify-content: space-between;
    align-items: center;
    padding-top: 7rem; /* Extra Platz für Navbar, damit Text nie verdeckt wird */
    padding-bottom: 0; 
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    height: 100vh;
    min-height: -webkit-fill-available;
  }

  .hero-text-content {
    position: relative;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    flex-shrink: 0; /* Text darf nicht zusammengedrückt werden! */
    margin-top: 1rem;
    margin-bottom: 2rem;
    z-index: 20;
  }

  .hero-text-content h1 {
    font-size: clamp(2.5rem, 12vw, 3.5rem);
    white-space: normal;
    line-height: 1.1;
    margin-bottom: 1rem;
  }

  .hero-text-content p {
    font-size: clamp(1.2rem, 5vw, 1.5rem);
    white-space: normal;
    margin-bottom: 2rem !important;
    color: #fff;
  }

  .hero-text-content a.inline-block {
    width: 100%;
    max-width: 300px;
    font-size: 1.2rem;
    height: auto;
    padding: 1rem;
    text-align: center;
  }

  #hero .hero-image-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Ganz unten am Container ausrichten */
    margin: 0;
    pointer-events: none;
    flex-shrink: 0;
    overflow: visible; /* Wichtig: Bild darf für 3D-Effekt überlappen! */
  }

  #hero .hero-image-wrapper img {
    height: 45vh !important; /* Layout-Höhe bleibt kompakt, damit Text Platz hat */
    width: auto !important; 
    max-width: none !important; 
    max-height: none !important;
    object-fit: contain !important; 
    object-position: bottom center !important; 
    margin-bottom: 0 !important;
    /* Visuelle Vergrößerung + feinjustierte Korrektur, wieder etwas nach rechts geschoben */
    transform: scale(1.4) translate(-3%, 8%) !important; 
    -webkit-mask-image: none;
    mask-image: none;
  }
}
/* Body/HTML Scroll sperren */
.lock-scroll {
  height: 100vh;
  overflow: hidden;
}
/* --- Info-Popover Styling --- */
.info-popover {
  position: fixed; /* richtet sich am Viewport aus, nicht an der Card */
  max-width: min(90vw, 20rem);
  top: 0;
  left: 0;
  transition: opacity 0.2s ease;
}

.info-popover.hidden {
  opacity: 0;
  pointer-events: none;
}


/* Laufband-Animation für Partner */
@keyframes marquee {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}
.animate-marquee {
  animation: marquee 35s linear infinite;
}
.animate-marquee:hover {
  animation-play-state: paused;
}
