/*
Theme Name: difdele Child
Template: blocksy
Version: 1.6 Optimized (Mobile LCP Fix & Stable Scroll)
*/

/* =========================================================
   1. GLOBAL SETUP & PERFORMANCE
   ========================================================= */


html {
    scroll-padding-top: 0px !important;
    scroll-behavior: auto !important;
    scroll-snap-type: none !important;
    overscroll-behavior-y: auto !important;
}

/* Fix für WordPress Admin-Bar */
body.admin-bar html {
    scroll-padding-top: 32px !important;
}

body, #page, .site-content {
    margin: 0;
    padding: 0;
    -webkit-overflow-scrolling: auto !important;
}

/* --- LCP / PERFORMANCE FIX --- */
/* Standardmäßig sichtbar für Lighthouse (verhindert NO_LCP) */
body {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Nur auf DESKTOP blenden wir für den GSAP-Effekt kurz aus */
@media (min-width: 769px) {
    .js-enabled body:not(.loaded) {
        opacity: 0 !important;
    }
    body.loaded {
        opacity: 1 !important;
        transition: opacity 0.8s ease-in-out;
    }
}

/* Sicherheits-Animation falls JS hakt */
@keyframes autoShowPage { to { opacity: 1; } }
body:not(.loaded) {
    animation: autoShowPage 0.1s forwards;
    animation-delay: 2.5s;
}

h2.double-font-light {
    color: #fafafa;
}

/* =========================================================
   2. SCROLL & VIEWPORT FIXES
   ========================================================= */

.hero-section,
.about-section,
.snap-section {
    scroll-snap-align: none !important;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.snap-section {
    --theme-content-spacing: 0 !important;
    --wp--style--block-gap: 0 !important;
}

.snap-section * + * {
    margin-block-start: 0 !important;
}

@supports not (height: 100dvh) {
    .hero-section, .about-section, .snap-section { 
        min-height: calc(var(--vh, 1vh) * 100); 
    }
}

/* =========================================================
   3. MOBILE VIDEO OPTIMIZATION (Der LCP-Fix für Handy)
   ========================================================= */

@media (max-width: 768px) {
    /* Verhindert das Laden des schweren Videos auf Handys */
    .stk-video-background, 
    video.stk-video-background,
    [data-block-id="242acad"] .stk-video-background {
        display: none !important;
    }
    
    /* Nutzt stattdessen das Poster-Bild als Hintergrund für mobile Performance */
    .stk-242acad {
        background-image: url('https://difdele.de/wp-content/uploads/2025/11/Bildschirmfoto-2025-11-07-um-21.43.55-scaled.png') !important;
        background-size: cover !important;
        background-position: center !important;
    }
}

/* =========================================================
   4. HERO VIDEO DEBUG & OVERLAY (ID: 242acad)
   ========================================================= */

[data-block-id="242acad"] {
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
    min-height: 100vh !important;
    display: block !important;
    z-index: 1 !important;
}

[data-block-id="242acad"] > .stk-video-background,
[data-block-id="242acad"] video.stk-video-background {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    display: block !important;
    z-index: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
    background: black !important;
    opacity: 1 !important;
}

.stk-242acad {
    position: relative;
    background-color: var(--theme-palette-color-4, #212121) !important;
    min-height: 100vh !important;
    padding-top: 300px !important;
    padding-bottom: 200px !important;
    margin-bottom: 0px !important;
    overflow: hidden;
}

.stk-242acad:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5) !important;
    z-index: 1;
    opacity: 1 !important;
}

.stk-242acad .stk-row {
    position: relative;
    z-index: 2;
}

.stk-242acad-column { --stk-column-gap: 35px !important; }

@media screen and (max-width: 1023px) {
    .stk-242acad { padding-top: 250px !important; padding-bottom: 150px !important; }
}
@media screen and (max-width: 767px) {
    .stk-242acad { padding-top: 150px !important; padding-bottom: 100px !important; }
}

/* =========================================================
   5. ANIMATIONS & UTILITY
   ========================================================= */

/* Bounce Animation für Icon */
@keyframes hoverBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(15px); }
}

.stk-cfe0a26 {
    animation: hoverBounce 2s ease-in-out infinite;
}

.stk-cfe0a26:hover {
    animation-play-state: paused;
}

/* Word Rotator & Gradient Text */
.word-rotator {
    display: inline-grid;
    place-items: center;
    position: relative;
}

.word-rotator span {
    grid-area: 1 / 1;
    opacity: 0;
    background: linear-gradient(90deg, #4FC3F7, #FFB74D, #A56CFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 100%;
    animation: rotateWords 6s infinite, gradientShift 6s infinite linear;
    transition: opacity 0.3s ease;
}

.word-rotator span:nth-child(2) { animation-delay: 2s; }
.word-rotator span:nth-child(3) { animation-delay: 4s; }

@keyframes rotateWords {
    0%, 20%   { opacity: 0; transform: translateY(10px); }
    25%, 45%  { opacity: 1; transform: translateY(0); }
    50%, 100% { opacity: 0; transform: translateY(-10px); }
}

@keyframes gradientShift {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* Accessibility & Admin-Bar Mobile */
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 782px) {
    body.admin-bar html { scroll-padding-top: 46px !important; }
}

/* =========================================================
   ABOUT SECTION
   ========================================================= */
.about-section {
  background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
  padding: 6vw 2rem;
  text-align: center;
}

.about-section .inner {
  max-width: 900px;
  margin: 0 auto;
}

.double-font {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 900;
  margin-bottom: 1.2rem;
  position: relative;
}

.gradient-text {
  background: linear-gradient(90deg, #4FC3F7, #FFB74D, #A56CFF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 100%;
  animation: gradientShift 8s infinite linear;
}

.lead-text {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  color: #666;
  margin-bottom: 1.6rem;
}

.about-body {
  max-width: 700px;
  margin: 0 auto 3rem;
  color: #888;
  line-height: 1.6;
  font-size: 1.05rem;
}

/* Stats / Counter */
.about-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(1rem, 2vw, 2rem);
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.about-stats > div {
  flex: 1 1 220px;
  display: grid;
  grid-template-rows: auto auto;
  justify-items: center;
}

.num {
  position: relative;
  display: inline-block;
  min-width: 6ch;
  height: 1em;
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  font-weight: 900;
  line-height: 1;
  color: #4FC3F7;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  text-align: center;
  white-space: nowrap;
}

.num-inner {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  white-space: nowrap;
}

.about-stats .label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #777;
  margin-top: 0.4rem;
  text-align: center;
}

@media (max-width: 700px) {
  .about-stats {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }
  .about-stats > div {
    width: 100%;
    max-width: 280px;
  }
}

/* Ball Animation Container */
.ball-container {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  z-index: 9999;
  pointer-events: none;
}
.basketball-emoji {
  position: absolute;
  font-size: 60px;
}
.basketball-shadow {
  position: absolute;
  width: 70px;
  height: 18px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.35) 0%, transparent 70%);
  border-radius: 50%;
  transform: translateX(-50%);
}
.ball-emoji {
  opacity: 0;
  display: inline-block;
  position: relative;
  will-change: transform, opacity;
  transform: translateY(0);
}

/* =========================================================
   SERVICES SECTION (Modern)
   ========================================================= */
.services-modern {
  position: relative;
  background: #212121 !important;
  color: #E0E0E0 !important;
  overflow: hidden;
  padding: 6rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0;
}

.services-modern.snap {
  scroll-snap-align: start;
  min-height: 100vh;
}

.services-head {
  text-align: center;
  margin-bottom: clamp(60px, 10vw, 100px);
}

.services-head h2,
.services-head p {
  color: #E0E0E0 !important;
  margin: 0 auto;
  max-width: 1136px;
}

.services-head p {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  opacity: 0.8;
  margin-top: 1rem;
}

.services-head .gradient-text {
  animation: gradientFlow 6s infinite alternate ease-in-out;
}

.services-flow {
  display: grid;
  gap: clamp(2rem, 5vw, 3rem);
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}

/* Responsive Grid */
@media (min-width: 768px) {
  .services-flow { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .services-flow { grid-template-columns: 1fr; }
}

.service-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  padding: clamp(1.8rem, 4vw, 2.8rem);
  border-radius: 16px;
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  overflow: hidden;
}

.service-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.service-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    600px circle at var(--x, 50%) var(--y, 50%),
    rgba(79, 195, 247, 0.25),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.service-item:hover .service-glow { opacity: 1; }

.service-item .ico {
  font-size: clamp(2rem, 4vw, 3rem);
  z-index: 2;
  color: #4FC3F7;
  flex-shrink: 0;
}

.service-item .text { z-index: 2; position: relative; }

.service-item h3 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.3rem, 2.8vw, 1.6rem);
  font-weight: 800;
  color: #E0E0E0;
}

.service-item p {
  margin: 0;
  color: rgba(224, 224, 224, 0.8);
  line-height: 1.6;
}

@media (max-width: 700px) {
  .service-item {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
  .service-item .ico { margin-bottom: 1rem; }
}

/* =========================================================
   PROCESS SECTION
   ========================================================= */
.process-modern {
  position: relative;
  background: #F8F9FB !important;
  color: #212121 !important;
  padding: 6rem 2rem;
  margin: 0;
}

.process-modern.snap {
  scroll-snap-align: start;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.process-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  box-sizing: border-box;
}

.process-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

.process-head {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.process-head p {
  color: rgba(33, 33, 33, 0.7);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.6;
  margin: 0;
}

.process-head .gradient-text {
  animation: processGradientFlow 6s infinite alternate ease-in-out;
}

@keyframes processGradientFlow {
  0% { background-position: 0 50%; }
  100% { background-position: 100% 50%; }
}

.process-timeline {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
}

.process-timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #4FC3F7, #A56CFF);
  opacity: 0.4;
  transform: translateX(-50%);
  border-radius: 10px;
}

.process-step {
  position: relative;
  width: 50%;
  padding: 2rem 3rem;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.process-step.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.process-step:nth-child(1) { transition-delay: 0s; }
.process-step:nth-child(2) { transition-delay: 0.15s; }
.process-step:nth-child(3) { transition-delay: 0.30s; }
.process-step:nth-child(4) { transition-delay: 0.45s; }

.process-step:nth-child(odd) { left: 0; text-align: right; }
.process-step:nth-child(even) { left: 50%; text-align: left; }

.process-step::before {
  content: "";
  position: absolute;
  top: 2.2rem;
  left: calc(50% - 10px);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle, #4FC3F7, #A56CFF);
  box-shadow: 0 0 20px rgba(165,108,255,0.6);
  z-index: 2;
}

.process-step .step-num {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  background: linear-gradient(90deg, #4FC3F7, #FFB74D, #A56CFF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.4rem;
  display: inline-block;
}

.process-step h3 {
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  font-weight: 700;
  margin: 0 0 0.6rem;
  color: #212121;
}

.process-step p {
  margin: 0;
  color: rgba(33, 33, 33, 0.7);
  line-height: 1.6;
}

/* Process Responsive & Sticky Head */
@media (min-width: 1024px) {
  .process-grid {
    grid-template-columns: minmax(320px, 0.95fr) minmax(520px, 1.05fr);
    align-items: start;
  }
  .process-head {
    margin: 0;
    justify-self: center;
    text-align: center;
    max-width: 700px;
    position: sticky;
    top: 10vh;
    align-self: start;
    text-align: left;
  }
}

@media (max-width: 768px) {
  .process-timeline::before {
    left: 0.8rem;
    transform: none;
  }
  .process-step {
    width: 100%;
    padding: 1.5rem 1rem 1.5rem 2.5rem;
    text-align: left !important;
    left: 0 !important;
  }
  .process-step::before { left: 0; }
}

.process-modern .process-container:is(.is-layout-constrained, .wp-block-group-is-layout-constrained) {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 2rem !important;
}

/* =========================================================
   CASE STUDIES / PROJECTS
   ========================================================= */
.cases-modern {
  position: relative;
  background: #1e1e1e !important;
  color: #e0e0e0 !important;
  padding: 6rem 2rem;
  overflow: hidden;
  margin: 0;
}

.cases-modern.snap {
  scroll-snap-align: start;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cases-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2rem;
  box-sizing: border-box;
  overflow: visible !important;
}

.cases-head {
  text-align: center;
  max-width: 820px;
  margin: 0 auto clamp(2.5rem, 6vw, 4.5rem);
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.cases-head.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.cases-head h2 { color: #fafafa; }
.cases-head p {
  margin: 0;
  color: rgba(224,224,224,0.72);
  font-size: clamp(1rem, 1.7vw, 1.15rem);
  line-height: 1.7;
}

.cases-gradient {
  background: linear-gradient(90deg, #4FC3F7, #FFB74D, #A56CFF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 100%;
  animation: casesGradient 6s infinite alternate ease-in-out;
}

@keyframes casesGradient {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* Case Card */
.case-card {
  display: grid;
  grid-template-areas: "media" "body";
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: stretch;
  width: 100%;
  margin: 0 auto clamp(1.5rem, 3vw, 2rem);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 10px 40px rgba(0,0,0,0.35);
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease, opacity 0.8s ease, transform 0.8s ease;
  opacity: 0;
  transform: translateY(60px);
  will-change: opacity, transform;
}

.case-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.case-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 60px rgba(0,0,0,0.45);
  border-color: rgba(255,255,255,0.14);
}

.case-card:nth-of-type(1) { transition-delay: 0s; }
.case-card:nth-of-type(2) { transition-delay: 0.15s; }
.case-card:nth-of-type(3) { transition-delay: 0.3s; }
.case-card:nth-of-type(4) { transition-delay: 0.45s; }
.case-card:nth-of-type(5) { transition-delay: 0.6s; }

.case-media {
  grid-area: media;
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #111;
}

.case-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform .6s ease, filter .6s ease;
  filter: saturate(0.9) contrast(1.05);
}

.case-card:hover .case-media img {
  transform: scale(1.06);
  filter: saturate(1.05) contrast(1.08);
}

.case-badge {
  position: absolute;
  bottom: 14px;
  left: 14px;
  padding: 0.4rem 0.7rem;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .2px;
  color: #0b0b0b;
  border-radius: 999px;
  background: linear-gradient(90deg, #4FC3F7, #FFB74D, #A56CFF);
}

.case-body {
  grid-area: body;
  padding: 1.25rem 1.25rem 1.5rem;
}

.case-body h3 {
  margin: 0 0 .45rem;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-weight: 800;
  color: #f3f3f3;
}

.case-body p {
  margin: 0 0 .9rem;
  color: rgba(224,224,224,0.78);
  line-height: 1.65;
}

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .6rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.case-meta li {
  font-size: .82rem;
  padding: .28rem .6rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  color: rgba(224,224,224,0.86);
}

@media (min-width: 960px) {
  .case-card {
    grid-template-columns: minmax(360px, 0.95fr) minmax(480px, 1.05fr);
    grid-template-areas: "body media";
    gap: 1.75rem;
    padding: 0;
  }
  .case-body { padding: 2rem; }
  .case-media { aspect-ratio: auto; min-height: 360px; }
}

@media (prefers-reduced-motion: reduce) {
  .cases-gradient { animation: none; }
  .case-media img { transition: none; transform: none; }
  .case-card { transition: none; }
}

/* Stacked Logic for Cases */
.cases-modern.stacked {
  --peek: 36px;
  --offset: 120px;
  --after: 20vh;
  position: relative;
  overflow: visible;
}

.cases-modern.stacked .cases-container {
  position: relative;
  padding-bottom: calc(var(--offset) + (var(--count) - 1) * var(--peek) + var(--after));
  z-index: 0;
}

.cases-modern.stacked .case-card {
  position: sticky;
  top: calc(var(--offset) + var(--i) * var(--peek));
  z-index: calc(100 + var(--z));
  background: #1e1e1e;
  margin-bottom: 2rem;
  box-shadow: 0 10px 35px rgba(0,0,0,0.4);
  will-change: transform;
  transition: transform .3s ease, box-shadow .3s ease, filter .3s ease;
}

.cases-modern.stacked .case-card:last-child {
  top: calc(var(--offset) + (var(--count) - 1) * var(--peek));
}

.cases-modern.stacked::after {
  content: "";
  display: block;
  height: var(--after);
}

.cases-modern.stacked .case-card.is-active {
  transform: translateY(-3px);
  filter: brightness(1.04);
  box-shadow: 0 16px 45px rgba(0,0,0,0.55);
}

.cases-modern.stacked .case-card:not(.is-active):not(:hover) {
  filter: brightness(0.92);
}

.cases-modern.stacked .cases-head {
  position: relative;
  z-index: 999;
  margin-bottom: 5rem;
}

@media (max-width: 959px) {
  .cases-modern.stacked .case-card {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
    filter: none !important;
    transform: none !important;
  }
  .cases-modern.stacked .cases-container { padding-bottom: 0 !important; }
  .cases-modern.stacked::after { display: none !important; }
}

/* Blocksy Wrapper Fix */
.wp-block-group.alignfull,
.wp-block-group.has-background {
  overflow: visible !important;
  transform: none !important;
  isolation: auto !important;
}

/* =========================================================
   PRICING SECTION
   ========================================================= */
.pricing-modern {
  position: relative;
  background: #FAFAFA;
  color: #212121;
  padding: 6rem 2rem;
  text-align: center;
  overflow: hidden;
}

.pricing-modern.snap {
  scroll-snap-align: start;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pricing-container {
  max-width: 1200px;
  margin: 0 auto;
}

.pricing-head {
  margin-bottom: clamp(60px, 10vw, 100px);
}

.pricing-head h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.pricing-head p {
  color: rgba(33, 33, 33, 0.7);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  max-width: 700px;
  margin: 0 auto 1.6rem auto;
}

.pricing-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .pricing-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
}

/* Pricing Card */
.pricing-card {
  position: relative;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  transition: transform 0.35s ease, box-shadow 0.35s ease, opacity 0.8s ease;
  overflow: hidden;
  opacity: 0;
  transform: translateY(60px);
}

.pricing-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.pricing-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.12);
}

.pricing-card:nth-child(1) { transition-delay: 0s; }
.pricing-card:nth-child(2) { transition-delay: 0.15s; }
.pricing-card:nth-child(3) { transition-delay: 0.3s; }

.pricing-inner { padding: 3rem 2rem; }

.plan-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.plan-desc {
  color: rgba(33, 33, 33, 0.7);
  margin-bottom: 1.8rem;
}

.plan-price {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  transition: all 0.4s ease;
  overflow: visible !important;
}

.plan-price .period {
  font-size: 1rem;
  font-weight: 400;
  opacity: 0.6;
}

.plan-price .amount {
  display: inline-block;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.plan-price .amount.changing {
  opacity: 0;
  transform: translateY(-0.5em);
}

.plan-features {
  list-style: none;
  margin: 0 0 2.5rem;
  padding: 0;
  text-align: left;
}

.plan-features li {
  margin-bottom: 0.6rem;
  padding-left: 1.4rem;
  position: relative;
  color: rgba(33, 33, 33, 0.85);
}

.plan-features li::before {
  content: "✓";
  color: #4FC3F7;
  font-weight: bold;
  position: absolute;
  left: 0;
}

.btn-plan {
  display: inline-block;
  background: linear-gradient(90deg, #4FC3F7, #FFB74D, #A56CFF);
  color: #fff !important;
  border: none;
  border-radius: 40px;
  padding: 0.9rem 2rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-plan:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(165, 108, 255, 0.3);
}

.pricing-card.featured {
  border: 2px solid #A56CFF;
  background: #fff;
  transform: scale(1.04);
}

.pricing-card.featured .badge {
  position: absolute;
  top: 18px;
  right: -40px;
  background: linear-gradient(90deg, #4FC3F7, #A56CFF);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.4rem 2rem;
  transform: rotate(45deg);
  box-shadow: 0 2px 10px rgba(165,108,255,0.3);
}

/* Footnote */
.pricing-footnote {
  max-width: 800px;
  margin: clamp(2rem, 5vw, 3rem) auto 0;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(26, 25, 25, 0.6);
  line-height: 1.6;
}
.pricing-footnote strong { color: #212121; font-weight: 700; }
.pricing-footnote p { margin-top: 2em; }

/*
 * Billing Toggle (Stabil, Auto-Breite)
 * Angepasst für native <button>-Elemente zur Verbesserung der Barrierefreiheit.
 */
.billing-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 2rem auto 0;
  /* Hintergrund des Containers */
  background: rgba(0, 0, 0, 0.05);
  border-radius: 50px;
  padding: 0.4rem;
  font-size: 0.95rem;
  overflow: hidden;
  user-select: none;
}

/* Styling der Buttons */
.billing-toggle .label {
  /* Wichtig für Buttons: Standard-Styles entfernen */
  appearance: none;
  background: none;
  border: none;
  margin: 0;
  padding: 0.6rem 1.4rem;
  
  /* Layout und Text-Styles */
  position: relative;
  z-index: 2;
  cursor: pointer;
  color: rgba(33, 33, 33, 0.6);
  transition: color 0.3s ease, font-weight 0.3s ease;
  font-weight: 500;
  white-space: nowrap;
  
  /* Für Fokus-Ring: den Standard-Focus-Ring des Browsers verwenden und stylen */
  outline-offset: 2px; 
}

/* Aktiver Zustand (active class wird per JS gesetzt) */
.billing-toggle .label.active {
  color: #212121;
  font-weight: 700;
}

/* Hover-Effekt */
.billing-toggle .label:hover {
  color: #111;
}

/* Styling für den "geschenkt" Text */
.billing-toggle small {
  font-size: 0.75rem;
  color: #333;
  margin-left: 4px;
  font-weight: 500;
}

/* Styling für den "geschenkt" Text, wenn der Button aktiv ist (Wunsch des Benutzers) */
.billing-toggle .label.active small {
  color: #000;
}

/* Der visuelle "Knopf", der sich bewegt */
.billing-toggle .toggle-btn {
  position: absolute;
  z-index: 1;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 6px); /* Startbreite (wird von JS korrigiert) */
  background: #fff;
  border-radius: 40px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.35s ease, width 0.35s ease;
  transform-origin: left center;
  will-change: transform, width;
  pointer-events: none; /* Wichtig, damit Klicks auf die Buttons durchgehen */
  opacity: 1;
}

/* Besonderes Styling für den Gradient-Toggle */
.billing-toggle.gradient .toggle-btn {
  background: linear-gradient(90deg, #4FC3F7, #A56CFF);
  box-shadow: 0 2px 14px rgba(165, 108, 255, 0.3);
}

/* === Mobile Optimierung === */
@media (max-width: 480px) {
  .billing-toggle {
    flex-direction: column;
    gap: 0.4rem;
    background: none; /* Hintergrund im mobilen Layout entfernen */
    box-shadow: none;
    padding: 0;
    width: 100%; /* Volle Breite im mobilen Layout */
  }
  
  .pricing-head .billing-toggle {
      margin-left: 0;
      margin-right: 0;
  }
  
  .billing-toggle .toggle-btn {
    display: none; /* Visuellen Schieberegler ausblenden */
  }
  
  .billing-toggle .label {
    /* Button-Styles im mobilen Modus anpassen */
    background: rgba(0, 0, 0, 0.05);
    border-radius: 30px;
    width: 100%;
    text-align: center;
    padding: 0.8rem 1rem;
    /* Im mobilen Modus soll der aktive Button den visuellen Fokus haben */
    color: rgba(33, 33, 33, 0.8);
    font-weight: 500;
  }
  
  .billing-toggle .label.active {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: #212121;
    font-weight: 700;
  }
  
  /* Korrektur für Mobile: small muss auf dem weißen aktiven Hintergrund dunkel bleiben. */
  .billing-toggle .label.active small {
    color: #212121;
  }
}

/* =========================================================
   FAQ SECTION
   ========================================================= */
.faq-modern {
  background: #1c1c1c;
  color: #f3f3f3;
  padding: 6rem 2rem;
  overflow: hidden;
  margin-bottom: 0;
  padding-bottom: 0;
}

.faq-container {
  max-width: 900px;
  margin: 0 auto;
}

.faq-head {
  text-align: center;
  margin-bottom: clamp(60px, 10vw, 100px);
}

.faq-head h2 { margin: 0; }
.faq-head p {
  color: rgba(240, 240, 240, 0.75);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  margin-top: 1rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(60px);
}

.faq-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  color: #fff;
  text-align: left;
  padding: 1.4rem 2.8rem 1.4rem 1.4rem;
  font-size: 1.1rem;
  font-weight: 600;
  position: relative;
  cursor: pointer;
  transition: color 0.3s ease;
}

.faq-question:hover { color: #4FC3F7; }

.faq-icon {
  position: absolute;
  right: 1.4rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  transition: transform 0.3s ease;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  padding: 0 1.4rem;
  transition: all 0.4s ease;
  opacity: 0;
}

.faq-item.active .faq-answer {
  padding: 0 1.4rem 1.4rem;
  max-height: 300px;
  opacity: 1;
}

.faq-item.active .faq-icon {
  transform: translateY(-50%) rotate(45deg);
}

/* =========================================================
   CONTACT SECTION
   ========================================================= */
.contact-modern {
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  color: #212121;
  padding: 6rem 2rem;
  position: relative;
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

.contact-container {
  display: grid;
  gap: 4rem;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.contact-info { max-width: 520px; }

.contact-info h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  margin-bottom: 1rem;
}

.contact-info p {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: rgba(33, 33, 33, 0.7);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.contact-details {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 1rem;
}

.contact-details li { margin-bottom: 0.5rem; }
.contact-details a {
  color: #4FC3F7;
  text-decoration: none;
  transition: color 0.3s ease;
}
.contact-details a:hover { color: #A56CFF; }

/* Contact Form */
.contact-form {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.08);
  padding: 2rem;
  width: 100%;
}
.contact-form .form-wrapper { min-height: 200px; }

/* WPForms Resets */
.contact-form .wpforms-container,
.contact-form .wpforms-form { margin: 0 !important; }
.contact-form .wpforms-field-container { display: grid; gap: 1rem; }
.contact-form .wpforms-field { margin: 0 !important; }

.contact-form .wpforms-field-label,
.contact-form .wpforms-field-sublabel {
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #212121;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100% !important;
  font-size: 1rem !important;
  border-radius: 8px !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  padding: 0.9rem 1rem !important;
  background: #fff !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: none !important;
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: #A56CFF !important;
  box-shadow: 0 0 0 3px rgba(165, 108, 255, 0.15) !important;
  outline: none !important;
}

/* Submit Buttons */
.contact-form .wpforms-submit,
.contact-form button,
.contact-form input[type="submit"] {
  display: inline-block;
  background: linear-gradient(90deg, #4FC3F7, #A56CFF) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 40px !important;
  padding: 0.9rem 2rem !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-form .wpforms-submit:hover,
.contact-form button:hover,
.contact-form input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(165,108,255,0.3);
}

/* Error States */
.contact-form .wpforms-error {
  border-color: #e53935 !important;
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.12) !important;
}
.contact-form .wpforms-error-container,
.contact-form .wpforms-field .wpforms-field-description.wpforms-error {
  color: #e53935 !important;
  font-size: 0.9rem;
  margin-top: 0.4rem;
}

/* WPForms DSGVO Checkbox – Final Layout Fix */
.contact-form .wpforms-field-gdpr-checkbox ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  width: 100% !important;
}

.contact-form .wpforms-field-gdpr-checkbox li {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 0.6rem !important;
  line-height: 1.5 !important;
  width: auto !important;
  max-width: 100% !important;
  white-space: normal !important;
  flex-wrap: wrap !important;
}

/* Checkbox */
.contact-form .wpforms-field-gdpr-checkbox input[type="checkbox"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  flex-shrink: 0 !important;
  width: 18px !important;
  height: 18px !important;
  margin-top: 3px !important;
  cursor: pointer !important;
  accent-color: #A56CFF !important;
  border: 2px solid rgba(0, 0, 0, 0.25) !important;
  border-radius: 4px !important;
  background: #fff !important;
  position: relative !important;
  transition: all 0.25s ease !important;
}

.contact-form .wpforms-field-gdpr-checkbox input[type="checkbox"]:hover {
  border-color: #A56CFF !important;
}

.contact-form .wpforms-field-gdpr-checkbox input[type="checkbox"]:checked {
  background: linear-gradient(90deg, #4FC3F7, #A56CFF) !important;
  border-color: transparent !important;
}

.contact-form .wpforms-field-gdpr-checkbox input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 5px;
  width: 4px;
  height: 9px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}

/* Label */
.contact-form .wpforms-field-gdpr-checkbox label.wpforms-field-label-inline {
  display: inline-block !important;
  flex: 1 !important;
  width: auto !important;
  white-space: normal !important;
  font-size: 0.95rem !important;
  font-weight: 400 !important;
  color: rgba(33, 33, 33, 0.85) !important;
  line-height: 1.55 !important;
  cursor: pointer !important;
  margin: 0 !important;
  word-break: normal !important;
}

.contact-form .wpforms-field-gdpr-checkbox label.wpforms-field-label-inline a {
  color: #4FC3F7 !important;
  text-decoration: none !important;
  transition: color 0.3s ease !important;
}
.contact-form .wpforms-field-gdpr-checkbox label.wpforms-field-label-inline a:hover {
  color: #A56CFF !important;
}

.contact-form .wpforms-field-gdpr-checkbox.wpforms-has-error label {
  color: #e53935 !important;
}
.contact-form .wpforms-field-gdpr-checkbox.wpforms-has-error input[type="checkbox"] {
  border-color: #e53935 !important;
  box-shadow: 0 0 0 2px rgba(229, 57, 53, 0.1);
}

@media (min-width: 960px) {
  .contact-container { grid-template-columns: minmax(360px, 0.9fr) minmax(480px, 1.1fr); }
}

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

/* =========================================================
   REVEAL UTILS
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal:nth-child(1) { transition-delay: 0s; }
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }
.reveal:nth-child(5) { transition-delay: 0.4s; }
.reveal:nth-child(6) { transition-delay: 0.5s; }

/* =========================================================
   MODAL WRAPPER
   ========================================================= */
.termin-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  opacity: 0;
}

.termin-modal.open {
  display: block;
  opacity: 1;
}

.termin-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(4px);
}

.termin-modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(90vw, 940px);
  max-height: 90vh;
  overflow-y: auto;
  background: #1c1c1c;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}

.termin-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
}

.termin-dsgvo {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-top: 1.5rem;
  color: #fff;
}