/* ==========================================================================
   WyciekiPro — Hero Section
   Full-screen hero with gradient, particles, stats counter
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;      /* вертикальний розподіл */
  align-items: center;
  background: var(--color-bg-hero);
  overflow: hidden;
  padding-top: 80px;
  padding-bottom: 0; /* Прибрали відступ знизу, щоб притиснути статистику */
}

/* Контейнер розтягується на всю висоту героя */
.hero > .container {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
}

/* ── Hero background image (responsive <picture>) ─────────────────────── */

.hero__bg-image {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

.hero__bg-image picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero__bg-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.hero__bg-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    hsla(210, 80%, 10%, 0.65) 0%,   /* Darker start for text contrast */
    hsla(200, 70%, 15%, 0.50) 50%,
    hsla(195, 75%, 20%, 0.45) 100%
  );
  z-index: 1;
}

/* ── Water effect overlay ──────────────────────────────────────────────── */

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 20% 50%, hsla(195, 100%, 55%, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, hsla(200, 80%, 45%, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, hsla(210, 70%, 30%, 0.2) 0%, transparent 50%);
  pointer-events: none;
  z-index: 2;
}

/* Animated water ripple circles */
.hero::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  border: 1px solid hsla(195, 100%, 70%, 0.08);
  top: 50%;
  right: -100px;
  transform: translateY(-50%);
  animation: ripple 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes ripple {
  0%, 100% {
    transform: translateY(-50%) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translateY(-50%) scale(1.15);
    opacity: 0.2;
  }
}

.hero__content {
  position: relative;
  z-index: 3;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  flex: 1;                     /* займає весь вільний простір */
  padding-bottom: 0;           /* Прибрали відступ, щоб статистика була в самому низу */
}

/* ── Title ─────────────────────────────────────────────────────────────── */

.hero__badge {
  display: inline-flex;
  align-self: flex-start; /* Запобігає розтягуванню по горизонталі у flex-column */
  align-items: center;
  gap: var(--space-sm);
  padding: 0.4rem 1rem;
  background: hsla(0, 0%, 100%, 0.1);
  border: 1px solid hsla(0, 0%, 100%, 0.15);
  border-radius: var(--radius-full);
  color: var(--color-accent-light);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  margin-bottom: var(--space-xl);
  backdrop-filter: blur(8px);
}

.hero__badge .pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--color-success);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero__title {
  font-size: var(--text-4xl);
  font-weight: var(--fw-extrabold);
  color: #fff;
  line-height: var(--lh-tight);
  margin-bottom: var(--space-lg);
  letter-spacing: -0.02em; /* Tighter for premium look */
  text-shadow: 0 2px 15px hsla(210, 50%, 10%, 0.4);
}

.hero__title .highlight {
  color: var(--color-accent-light);
  position: relative;
}

.hero__subtitle {
  font-size: var(--text-lg);
  color: #fff; /* Solid white for maximum contrast */
  font-weight: 400; /* Reverted to Regular */
  line-height: var(--lh-relaxed);
  margin-bottom: var(--space-2xl);
  max-width: 550px;
  text-shadow: 0 1px 8px hsla(210, 50%, 10%, 0.3);
}

/* ── CTA Buttons ───────────────────────────────────────────────────────── */

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
  margin-top: auto;            /* штовхає кнопки + статистику в нижню чверть */
  padding-top: var(--space-xl);
  margin-bottom: var(--space-xl);
}

/* ── Insurance Banner ──────────────────────────────────────────────────── */

.hero__insurance-banner {
  display: inline-flex;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  padding: var(--space-md) var(--space-lg);
  background: hsla(210, 50%, 15%, 0.4);
  border-left: 4px solid var(--color-accent-light);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: hsla(200, 20%, 95%, 0.9);
  font-size: var(--text-sm);
  line-height: var(--lh-snug);
  max-width: 550px;
  backdrop-filter: blur(8px);
}

.hero__insurance-icon {
  color: var(--color-accent-light);
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Stats Counter ─────────────────────────────────────────────────────── */

.hero__stats {
  display: flex;
  gap: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid hsla(0, 0%, 100%, 0.1);
  margin-top: auto;            /* статистика притиснута до низу */
  padding-bottom: var(--space-md); /* балансуємо відстань під текстом, щоб від цифр до низу було як від цифр до лінії */
}

.stat {
  text-align: left;
}

.stat__number {
  font-size: var(--text-3xl);
  font-weight: var(--fw-extrabold);
  color: #fff;
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.stat__number .accent {
  color: var(--color-accent-light);
}

.stat__label {
  font-size: var(--text-sm);
  color: hsla(200, 20%, 75%, 0.8);
  font-weight: var(--fw-medium);
}

/* ── Decorative water drops ────────────────────────────────────────────── */

.hero__drops {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}

.drop {
  position: absolute;
  width: 4px;
  height: 4px;
  background: hsla(195, 100%, 70%, 0.3);
  border-radius: 50%;
  animation: fall linear infinite;
}

.drop:nth-child(1) { left: 10%; animation-duration: 7s; animation-delay: 0s; width: 3px; height: 3px; }
.drop:nth-child(2) { left: 30%; animation-duration: 9s; animation-delay: 1s; width: 5px; height: 5px; }
.drop:nth-child(3) { left: 50%; animation-duration: 6s; animation-delay: 2s; }
.drop:nth-child(4) { left: 70%; animation-duration: 8s; animation-delay: 0.5s; width: 3px; height: 3px; }
.drop:nth-child(5) { left: 85%; animation-duration: 10s; animation-delay: 3s; width: 6px; height: 6px; }
.drop:nth-child(6) { left: 15%; animation-duration: 11s; animation-delay: 4s; width: 2px; height: 2px; }
.drop:nth-child(7) { left: 60%; animation-duration: 7s; animation-delay: 1.5s; width: 4px; height: 4px; }
.drop:nth-child(8) { left: 90%; animation-duration: 8s; animation-delay: 2.5s; width: 3px; height: 3px; }

@keyframes fall {
  0% {
    transform: translateY(-10vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(110vh) rotate(360deg);
    opacity: 0;
  }
}

/* ── Responsive ────────────────────────────────────────────────────────── */

/* Tablet (768px–1024px) — image is 768×400 */
@media (max-width: 1024px) {
  .hero {
    min-height: 80vh;
  }

  .hero__bg-image img {
    object-position: center 40%;
  }

  .hero__subtitle {
    font-size: var(--text-base);
  }
}

/* Mobile (≤768px) — image is 480×400 (nearly square) */
@media (max-width: 768px) {
  .hero {
    min-height: 100vh;
    min-height: 100svh; /* iOS/Android — враховує панель браузера */
    padding-top: 70px;
    padding-bottom: 0;
  }

  .hero__bg-image img {
    object-position: 50% 20%;
  }

  .hero__badge {
    padding: 0.35rem 0.85rem;
    font-size: 0.75rem;
    margin-top: 0; /* Підтягує бейдж ближче до хедера */
    margin-bottom: auto; /* Відштовхує заголовок вниз, зберігаючи пропорції */
  }

  .hero__title {
    font-size: 2.2rem; /* Збільшено на ~20% (було 1.8rem) */
    margin-bottom: 0.8rem;
  }
  
  .hero__subtitle {
    font-size: 0.9rem;
    margin-bottom: auto; /* Відступ знизу (штовхає кнопки вниз) */
  }

  .hero__stats {
    flex-direction: row;
    justify-content: space-between;
    gap: var(--space-sm);
    padding-top: var(--space-md);
    padding-bottom: var(--space-sm); /* балансуємо на мобільному */
    margin-top: 0; /* Знімаємо auto з десктопу */
  }
  
  .hero__stats .stat {
    text-align: center;
    flex: 1;
  }

  .hero__stats .stat__number {
    font-size: var(--text-xl);
  }

  .hero__stats .stat__label {
    font-size: var(--text-xs);
    line-height: var(--lh-tight);
  }

  .hero__cta {
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm); /* reduced gap */
    margin-top: 0; /* Знімаємо auto з десктопу */
    margin-bottom: var(--space-lg); /* Фіксований відступ між кнопками і статистикою */
    padding-top: 0;
  }

  .hero__insurance-banner {
    margin-bottom: var(--space-lg);
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-xs);
    border-left-width: 3px;
  }

  .hero__cta .btn {
    width: 100%;
    max-width: 80%; /* increased by 20% from 60% */
    min-width: max-content;
    justify-content: center;
  }
}

/* Small mobile (≤480px) */
@media (max-width: 480px) {
  .hero {
    min-height: 100vh;
    min-height: 100svh; /* iOS/Android — враховує панель браузера */
    padding-top: 80px;
    padding-bottom: 0;
  }

  .hero__bg-image img {
    object-position: 55% 20%; /* людина видна зверху */
    object-fit: cover;
  }

  .hero__title {
    font-size: 1.9rem; /* Збільшено на ~20% (було 1.6rem) */
  }

  .hero__stats {
    gap: var(--space-xs);
    padding-top: var(--space-sm);
    padding-bottom: var(--space-xs); /* балансуємо на найменших екранах */
  }

  .hero__stats .stat__number {
    font-size: var(--text-lg);
  }

  .hero__stats .stat__label {
    font-size: 0.65rem;
  }
}
