/* ═══════════════════════════════════════════════════════════════════════
   AIKALYN – Homepage Extended Styles
   Responsive hero fix + enhanced animations + real imagery
   ═══════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────── 
   HERO — Complete Responsive Rewrite
   ──────────────────────────────────────────── */

.hero-section {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Background Slideshow */
.hero-slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.4s cubic-bezier(0.45, 0, 0.55, 1);
  transform: scale(1.04);
  transition: opacity 1.4s ease, transform 8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    120deg,
    rgba(31, 61, 64, 0.88) 0%,
    rgba(31, 61, 64, 0.72) 45%,
    rgba(31, 61, 64, 0.38) 100%
  );
}

.hero-grid-pattern {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(212, 115, 90, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 115, 90, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom right, black 30%, transparent 80%);
  -webkit-mask-image: linear-gradient(to bottom right, black 30%, transparent 80%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: clamp(80px, 12vw, 110px);
  padding-bottom: clamp(40px, 6vw, 80px);
}

/* Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(212, 115, 90, 0.14);
  border: 1px solid rgba(212, 115, 90, 0.35);
  color: #f0b8a8;
  font-family: var(--font-primary);
  font-size: clamp(0.65rem, 1.5vw, 0.75rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
  border-radius: 100px;
  margin-bottom: clamp(1rem, 3vw, 1.75rem);
  opacity: 0;
  transform: translateY(16px);
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: #d4735a;
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}

/* Headline */
.hero-title {
  margin: 0 0 clamp(1rem, 3vw, 1.5rem);
  font-family: var(--font-primary);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: white;
  max-width: 900px;
  overflow: hidden;
}

.hero-line {
  display: block;
  font-size: clamp(2rem, 7vw, 5.5rem);
  overflow: hidden;
}

.hero-line-accent {
  color: #f0b8a8;
}

/* Each line is a clip-reveal unit */
.hero-line > span,
.hero-line {
  display: block;
  transform: translateY(100%);
  opacity: 0;
}

/* Subtitle */
.hero-subtitle {
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  color: rgba(255,255,255,0.75);
  max-width: 560px;
  line-height: 1.8;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  opacity: 0;
  transform: translateY(20px);
}

/* CTAs */
.hero-actions {
  display: flex;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  flex-wrap: wrap;
  margin-bottom: clamp(2rem, 5vw, 4rem);
  opacity: 0;
  transform: translateY(20px);
}

/* Glass button variant */
.btn-glass {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  border: 1.5px solid rgba(255,255,255,0.35);
  transition: background var(--duration-base), border-color var(--duration-base), transform var(--duration-base) var(--ease-out);
}

.btn-glass:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.6);
  transform: translateY(-2px);
}

/* Stats strip */
.hero-stats {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-stat-number {
  font-family: var(--font-primary);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: white;
  line-height: 1;
  letter-spacing: -0.03em;
}

.hero-stat-label {
  font-family: var(--font-primary);
  font-size: clamp(0.65rem, 1.2vw, 0.72rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.52);
}

.hero-stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.18);
  flex-shrink: 0;
}

/* Slide dots */
.hero-dots {
  position: absolute;
  bottom: clamp(5rem, 8vw, 6.5rem);
  left: clamp(1.25rem, var(--container-pad), 2rem);
  display: flex;
  gap: 0.6rem;
  z-index: 3;
}

.hero-dot {
  width: 28px;
  height: 3px;
  border-radius: 3px;
  background: rgba(255,255,255,0.3);
  transition: background var(--duration-base), width var(--duration-base) var(--ease-out);
}

.hero-dot.active {
  width: 48px;
  background: #d4735a;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: clamp(1.5rem, 3vw, 2.5rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 3;
  color: rgba(255,255,255,0.45);
  font-family: var(--font-primary);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.4), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

/* ─────────────────────────────────────────── 
   HERO — Mobile Overrides
   ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero-section {
    min-height: 100dvh;
    align-items: flex-end;
    padding-bottom: 2rem;
  }

  .hero-content {
    padding-top: 80px;
    padding-bottom: 120px;
  }

  .hero-subtitle {
    font-size: 0.95rem;
    max-width: 100%;
  }

  .hero-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .hero-stats {
    gap: 1rem;
  }

  .hero-stat-divider { height: 28px; }

  .hero-dots {
    left: 50%;
    transform: translateX(-50%);
    bottom: 4.5rem;
  }

  .scroll-indicator { display: none; }
}

@media (max-width: 380px) {
  .hero-stats { gap: 0.75rem; }
  .hero-stat-number { font-size: 1.25rem; }
}

/* ─────────────────────────────────────────── 
   ABOUT PREVIEW — Image Stack
   ──────────────────────────────────────────── */
.about-img-stack {
  position: relative;
  padding-bottom: 80px;
  padding-right: 60px;
}

.about-img-main {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: var(--radius-xl);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 2;
}

.about-img-float {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 55%;
  aspect-ratio: 4/3;
  border-radius: var(--radius-xl);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-xl);
  border: 4px solid white;
  z-index: 3;
}

.about-img-accent {
  position: absolute;
  top: -20px;
  right: 20px;
  width: 45%;
  height: 45%;
  border: 2px solid rgba(212, 115, 90, 0.35);
  border-radius: var(--radius-xl);
  z-index: 1;
  pointer-events: none;
}

/* ─────────────────────────────────────────── 
   TECHNOLOGY — Image Cards
   ──────────────────────────────────────────── */
.tech-bg-mosaic {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  z-index: 0;
}

.tbm-img {
  background-size: cover;
  background-position: center;
  filter: saturate(0.4) brightness(0.35);
}

.tech-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(31,61,64,0.7) 0%,
    rgba(31,61,64,0.88) 40%,
    rgba(31,61,64,0.97) 100%
  );
  z-index: 1;
}

/* Tech feature cards — with photo header */
.tech-feature {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  transition: transform var(--duration-base) var(--ease-out),
              border-color var(--duration-base),
              background var(--duration-base);
  animation-delay: var(--delay, 0s);
}

.tech-feature:hover {
  transform: translateY(-6px);
  border-color: rgba(212, 115, 90, 0.4);
  background: rgba(255,255,255,0.08);
}

.tech-feature-img {
  width: 100%;
  height: 160px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.tech-feature-img::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(transparent, rgba(31,61,64,1));
}

.tech-feature-body {
  padding: var(--space-6);
  position: relative;
}

.tech-feature-badge {
  position: absolute;
  top: -12px;
  right: var(--space-6);
  background: rgba(212, 115, 90, 0.18);
  border: 1px solid rgba(212, 115, 90, 0.45);
  color: #f0b8a8;
  font-family: var(--font-primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
}

.tech-feature-icon {
  width: 44px;
  height: 44px;
  color: #d4735a;
  margin-bottom: var(--space-4);
}

.tech-feature-icon svg { width: 100%; height: 100%; }

/* Remove old standalone tech-features-grid defaults  */
.tech-features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
  position: relative;
  z-index: 2;
}

@media (max-width: 1100px) {
  .tech-features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 580px) {
  .tech-features-grid { grid-template-columns: 1fr; }
  .tech-feature-img { height: 200px; }
}

/* ─────────────────────────────────────────── 
   WATER SECTION — with real AIKALYN image
   ──────────────────────────────────────────── */
.water-section {
  position: relative;
  min-height: clamp(440px, 60vw, 700px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.water-bg {
  position: absolute;
  inset: -10%;
  background-size: cover;
  background-position: center;
  will-change: transform;
}

.water-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(31,61,64,0.94) 0%,
    rgba(31,61,64,0.78) 50%,
    rgba(31,61,64,0.4) 100%
  );
}

.water-content {
  position: relative;
  z-index: 2;
  padding: var(--section-padding) var(--container-pad);
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
}

.water-text { max-width: 560px; }

@media (max-width: 640px) {
  .water-overlay {
    background: rgba(31,61,64,0.85);
  }
  .water-text { max-width: 100%; }
}

/* ─────────────────────────────────────────── 
   PATIENT IMAGES — 3-up mosaic
   ──────────────────────────────────────────── */
.patient-img-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: var(--space-3);
  height: 480px;
}

.pimg {
  border-radius: var(--radius-xl);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-lg);
  transition: transform var(--duration-slow) var(--ease-out);
  overflow: hidden;
}

.pimg:hover { transform: scale(1.02); }

.pimg-large {
  grid-row: span 2;
}

.pimg-small-top, .pimg-small-bot {
  grid-column: 2;
}

@media (max-width: 900px) {
  .patient-img-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 220px 220px;
    height: auto;
  }
  .pimg-large { grid-row: span 2; }
}

@media (max-width: 640px) {
  .patient-img-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 260px;
    height: 260px;
  }
  .pimg-large { grid-row: 1; }
  .pimg-small-top, .pimg-small-bot { display: none; }
}

/* ─────────────────────────────────────────── 
   HORIZONTAL IMAGE RIBBON (auto-scrolling)
   ──────────────────────────────────────────── */
.image-ribbon {
  overflow: hidden;
  padding: var(--space-10) 0;
  background: var(--color-gray-50);
  border-top: 1px solid var(--color-gray-200);
  border-bottom: 1px solid var(--color-gray-200);
}

.ribbon-track {
  display: flex;
  gap: var(--space-4);
  animation: ribbon-scroll 32s linear infinite;
  width: max-content;
}

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

.ribbon-item {
  width: 280px;
  height: 180px;
  border-radius: var(--radius-lg);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
  transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base);
}

.ribbon-item:hover {
  transform: scale(1.04) translateY(-4px);
  box-shadow: var(--shadow-xl);
}

@keyframes ribbon-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(calc(-280px * 9 - var(--space-4) * 9)); }
}

@media (max-width: 640px) {
  .ribbon-item { width: 220px; height: 140px; }
  @keyframes ribbon-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(calc(-220px * 9 - var(--space-4) * 9)); }
  }
}

/* ─────────────────────────────────────────── 
   VIDEO SECTION — use bg-image thumbs
   ──────────────────────────────────────────── */
.video-thumb {
  position: relative;
  aspect-ratio: 16/10;
  background-size: cover;
  background-position: center;
  cursor: pointer;
}

/* ─────────────────────────────────────────── 
   GALLERY PREVIEW — Real images + header row
   ──────────────────────────────────────────── */
.gallery-preview-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-10);
  gap: var(--space-8);
  flex-wrap: wrap;
}

.gallery-masonry {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(2, 220px);
  gap: var(--space-3);
  margin-bottom: 0;
}

.gallery-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  position: relative;
  display: block;
  transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base);
  text-decoration: none;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(31,61,64,0);
  transition: background var(--duration-base);
}

.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-xl);
  z-index: 1;
}

.gallery-item:hover::after {
  background: rgba(31,61,64,0.22);
}

.gallery-item-large { grid-column: span 3; grid-row: span 2; }
.gallery-item-tall  { grid-column: span 1; grid-row: span 2; }
.gallery-item:nth-child(3) { grid-column: span 2; }
.gallery-item:nth-child(4) { grid-column: span 1; }
.gallery-item-wide  { grid-column: span 3; }

/* ─────────────────────────────────────────── 
   CTA SECTION — with real AIKALYN photo bg
   ──────────────────────────────────────────── */
.cta-section {
  position: relative;
  padding: var(--section-padding) 0;
  overflow: hidden;
  isolation: isolate;
}

.cta-bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(0.5) brightness(0.4);
  z-index: -2;
}

.cta-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg,
    rgba(31,61,64,0.92) 0%,
    rgba(31,61,64,0.84) 60%,
    rgba(31,61,64,0.75) 100%
  );
}

.cta-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 70% 50%, rgba(212,115,90,0.1), transparent);
}

.cta-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

/* ─────────────────────────────────────────── 
   ENHANCED SCROLL REVEAL DELAYS
   ──────────────────────────────────────────── */
.reveal-up[style*="--delay"] {
  transition-delay: var(--delay, 0s);
}

/* ─────────────────────────────────────────── 
   FLOATING PARTICLES (hero accent)
   ──────────────────────────────────────────── */
.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.hero-particle {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(212, 115, 90, 0.6);
  animation: float-particle var(--dur, 12s) ease-in-out infinite var(--delay2, 0s);
}

@keyframes float-particle {
  0%   { transform: translateY(100vh) scale(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-100px) scale(1); opacity: 0; }
}

/* ─────────────────────────────────────────── 
   ANIMATED COUNTER (stats)
   ──────────────────────────────────────────── */
.counting { 
  display: inline-block;
  transition: all 0.05s;
}

/* ───────────────────────────────────────────
   WHAT WE OFFER — responsive card composition
   ──────────────────────────────────────────── */
.services-section .services-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: clamp(1rem, 2vw, 1.5rem);
}

.services-section .service-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  height: 100%;
}

.services-section .service-card-image {
  aspect-ratio: 16 / 9;
  min-height: 0;
  background: #e8ebe8;
}

.services-section .service-card-image-inner {
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.services-section .service-image-consultation { background-position: 42% center; }
.services-section .service-image-dialysis { background-position: 50% center; }
.services-section .service-image-care { background-position: 48% center; }

.services-section .service-card-content {
  display: flex;
  flex-direction: column;
  padding: clamp(1.35rem, 2.2vw, 2rem);
}

.services-section .service-card-title {
  font-size: clamp(1.08rem, 1.5vw, 1.3rem);
  overflow-wrap: anywhere;
}

.services-section .service-card-text {
  font-size: clamp(.9rem, 1.1vw, 1rem);
  line-height: 1.65;
}

.services-section .service-link { margin-top: auto; }

@media (min-width: 641px) and (max-width: 980px) {
  .services-section .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }

  .services-section .service-card:last-child {
    grid-column: 1 / -1;
    grid-template-columns: minmax(260px, .9fr) 1.1fr;
    grid-template-rows: 1fr;
  }

  .services-section .service-card:last-child .service-card-image {
    height: 100%;
    aspect-ratio: auto;
    min-height: 300px;
  }
}

@media (max-width: 640px) {
  .services-section .section-header { margin-bottom: var(--space-8); }

  .services-section .services-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    gap: 1rem;
  }

  .services-section .service-card-image {
    aspect-ratio: 16 / 9;
    max-height: 230px;
  }

  .services-section .service-card-content { padding: 1.35rem; }
  .services-section .service-card-text { margin-bottom: 1.1rem; }
}

@media (max-width: 380px) {
  .services-section .service-card-image { max-height: 195px; }
  .services-section .service-card-content { padding: 1.15rem; }
}


/* -------------------------------------------
   HERO V2 — always fits exactly one viewport height
   -------------------------------------------- */
.hero-section {
  height: 100svh;
  height: 100vh;       /* fallback for browsers without svh */
  max-height: 100svh;
  min-height: 580px;   /* safety floor on very short screens */
  isolation: isolate;
  background: #0f2426;
  overflow: hidden;    /* nothing can push content outside */
}

.hero-slide:nth-child(1) { background-position: 58% center; }
.hero-slide:nth-child(2) { background-position: 64% center; }
.hero-slide:nth-child(3) { background-position: 60% center; }

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(20,48,50,.96) 0%, rgba(20,48,50,.86) 38%, rgba(20,48,50,.28) 72%, rgba(20,48,50,.18) 100%),
    linear-gradient(0deg, rgba(20,48,50,.44), transparent 45%);
}

.hero-content {
  max-width: var(--container-max);
  padding-top: clamp(5rem, 14vh, 9rem);
  padding-bottom: clamp(3rem, 8vh, 6rem);
}

.hero-content::before {
  content: '';
  position: absolute;
  z-index: -1;
  width: min(700px, calc(100% - 3rem));
  inset: 4.4rem auto 3.2rem 1.1rem;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 32px;
  background: linear-gradient(145deg, rgba(20,48,50,.68), rgba(20,48,50,.3));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 35px 100px rgba(15,36,38,.28);
}

.hero-badge,
.hero-title,
.hero-subtitle,
.hero-actions,
.hero-stats {
  margin-left: clamp(1rem, 3vw, 2.75rem);
  margin-right: auto;
  max-width: 600px;
}

.hero-badge {
  max-width: max-content;
  font-size: .68rem;
  letter-spacing: .11em;
  padding: .48rem .9rem;
  margin-bottom: clamp(0.8rem, 2vh, 1.25rem);
}

.hero-title {
  max-width: 650px;
  margin-bottom: clamp(0.6rem, 1.5vh, 1rem);
  overflow: visible;
}

.hero-line {
  /* SMALLER FONT SIZE TO FIT VIEWPORT */
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -.045em;
  overflow: visible;
}

.hero-subtitle {
  max-width: 550px;
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  line-height: 1.6;
  color: rgba(255,255,255,.78);
  margin-bottom: clamp(1.2rem, 2.5vh, 1.8rem);
}

.hero-actions { margin-bottom: clamp(1.5rem, 3vh, 2.15rem); }
.hero-actions .btn { min-height: 52px; }

.hero-stats {
  width: min(560px, calc(100% - 2rem));
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 1.25rem;
  padding-top: clamp(1rem, 2vh, 1.4rem);
  border-top: 1px solid rgba(255,255,255,.12);
}

.hero-stat { min-width: 0; }
.hero-stat-number { font-size: 1.45rem; }
.hero-stat-label { font-size: .62rem; line-height: 1.35; }

.hero-image-caption {
  position: absolute;
  z-index: 3;
  right: max(var(--container-pad), calc((100vw - var(--container-max)) / 2 + var(--container-pad)));
  bottom: 2.3rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: rgba(255,255,255,.72);
  font: 600 .68rem/1.4 var(--font-primary);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero-image-caption strong { color: white; font-size: .84rem; }
.hero-dots { left: max(var(--container-pad), calc((100vw - var(--container-max)) / 2 + var(--container-pad))); bottom: 2.7rem; }
.scroll-indicator { display: none; }

@media (min-width: 641px) and (max-width: 1024px) {
  .hero-section { height: 100svh; height: 100vh; max-height: 100svh; min-height: 560px; }
  .hero-overlay {
    background: linear-gradient(90deg, rgba(20,48,50,.95), rgba(20,48,50,.73) 62%, rgba(20,48,50,.32));
  }
  .hero-content { padding-top: clamp(6rem, 13vh, 8.5rem); padding-bottom: clamp(3rem, 7vh, 6.5rem); }
  .hero-content::before { inset: 5.4rem auto 4rem 1.1rem; width: min(650px, calc(100% - 3rem)); }
  .hero-line { font-size: clamp(2rem, 4.5vw, 2.8rem); }
}

@media (max-width: 640px) {
  .hero-section {
    height: 100svh;
    height: 100vh;
    max-height: 100svh;
    min-height: 560px;
    align-items: stretch;
    padding: 0;
  }

  .hero-slideshow { bottom: 43%; }
  .hero-slide { background-size: cover; }
  .hero-slide:nth-child(1) { background-position: 54% center; }
  .hero-slide:nth-child(2) { background-position: 58% center; }
  .hero-slide:nth-child(3) { background-position: 54% center; }

  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(20,48,50,.25) 0%, rgba(20,48,50,.12) 30%, #0f2426 57%, #0f2426 100%);
  }

  .hero-grid-pattern { opacity: .4; }
  .hero-particles { display: none; }

  .hero-content {
    align-self: flex-end;
    padding: 0 1.15rem 2.1rem;
    width: 100%;
  }

  .hero-content::before { display: none; }

  .hero-badge,
  .hero-title,
  .hero-subtitle,
  .hero-actions,
  .hero-stats {
    margin-left: 0;
    margin-right: 0;
    max-width: none;
  }

  .hero-badge {
    font-size: .57rem;
    padding: .38rem .68rem;
    margin-bottom: .8rem;
    white-space: nowrap;
  }

  .hero-title { margin-bottom: .75rem; }
  .hero-line { font-size: clamp(1.6rem, 7.5vw, 2.2rem); line-height: 1.05; }

  .hero-subtitle {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: .89rem;
    line-height: 1.5;
    margin-bottom: 1.05rem;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .65rem;
    margin-bottom: 1.15rem;
  }

  .hero-actions .btn {
    min-width: 0;
    min-height: 46px;
    width: 100%;
    padding: .65rem .7rem;
    font-size: .74rem;
    line-height: 1.2;
  }

  .hero-actions svg { display: none; }

  .hero-stats {
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
    gap: .55rem;
    padding-top: .9rem;
  }

  .hero-stat-divider { display: none; }
  .hero-stat-number { font-size: 1.08rem; }
  .hero-stat-label { font-size: .52rem; letter-spacing: .06em; }
  .hero-image-caption { display: none; }
  .hero-dots { left: 1.15rem; transform: none; bottom: auto; top: calc(43% - 1.6rem); }
  .hero-dot { width: 20px; }
  .hero-dot.active { width: 34px; }
}

@media (max-width: 370px), (max-height: 720px) and (max-width: 640px) {
  .hero-section { height: 100svh; height: 100vh; min-height: 520px; max-height: 100svh; }
  .hero-slideshow { bottom: 48%; }
  .hero-overlay { background: linear-gradient(180deg, rgba(20,48,50,.25), rgba(20,48,50,.12) 28%, #0f2426 52%, #0f2426); }
  .hero-line { font-size: 1.45rem; }
  .hero-subtitle { -webkit-line-clamp: 2; }
  .hero-dots { top: calc(48% - 1.5rem); }
}



/* -------------------------------------------
   HERO V3 — light clinical version
   Bright warm background, photo framed on the right,
   dark text. Header turns dark while it sits over the hero.
   -------------------------------------------- */
.hero-light {
  --hero-frame-right: max(var(--container-pad), calc((100vw - var(--container-max)) / 2 + var(--container-pad)));
  --hero-frame-width: min(44vw, 620px);
  background: linear-gradient(135deg, #fdfbf9 0%, #f7f0eb 55%, #f1e8e1 100%);
}

/* Photo slideshow in a rounded frame */
.hero-light .hero-slideshow {
  inset: auto;
  top: 104px;
  bottom: 40px;
  right: var(--hero-frame-right);
  width: var(--hero-frame-width);
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(31, 61, 64, 0.18), 0 8px 24px rgba(31, 61, 64, 0.08);
}
.hero-light .hero-slideshow::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(20, 48, 50, 0.45) 0%, transparent 35%);
  pointer-events: none;
}
.hero-light .hero-slide:nth-child(1),
.hero-light .hero-slide:nth-child(2),
.hero-light .hero-slide:nth-child(3) { background-position: center; }

/* Soft brand glows instead of the dark overlay */
.hero-light .hero-overlay {
  background:
    radial-gradient(circle at 12% 18%, rgba(122, 170, 151, 0.16), transparent 42%),
    radial-gradient(circle at 48% 92%, rgba(240, 184, 168, 0.22), transparent 38%);
}
.hero-light .hero-grid-pattern {
  background-image:
    linear-gradient(rgba(61, 112, 116, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 112, 116, 0.06) 1px, transparent 1px);
}
.hero-light .hero-particles { display: none; }
.hero-light .hero-content::before { display: none; }

/* Text column */
.hero-light .hero-badge,
.hero-light .hero-title,
.hero-light .hero-subtitle,
.hero-light .hero-actions,
.hero-light .hero-stats {
  margin-left: 0;
  max-width: min(580px, calc(100vw - var(--hero-frame-width) - var(--hero-frame-right) * 2 - 3rem));
}
.hero-light .hero-badge { max-width: max-content; }

.hero-light .hero-badge {
  background: rgba(212, 115, 90, 0.1);
  border-color: rgba(212, 115, 90, 0.3);
  color: #b4573f;
}
.hero-light .hero-title { color: var(--color-navy); }
.hero-light .hero-line-accent { color: #c2614a; }
.hero-light .hero-subtitle { color: var(--color-gray-600); }

.hero-light .btn-glass {
  background: var(--color-white);
  color: var(--color-navy);
  border-color: rgba(31, 61, 64, 0.16);
  box-shadow: var(--shadow-sm);
}
.hero-light .btn-glass:hover {
  background: var(--color-white);
  border-color: var(--color-blue-mid);
  color: var(--color-blue);
}

.hero-light .hero-stats { border-top-color: var(--color-gray-200); }
.hero-light .hero-stat-number { color: var(--color-navy); }
.hero-light .hero-stat-label { color: var(--color-gray-600); }
.hero-light .hero-stat-divider { background: var(--color-gray-200); }

/* Caption sits inside the photo frame */
.hero-light .hero-image-caption {
  right: calc(var(--hero-frame-right) + 1.5rem);
  bottom: calc(40px + 1.4rem);
  color: rgba(255, 255, 255, 0.85);
}

.hero-light .hero-dot { background: rgba(31, 61, 64, 0.2); }
.hero-light .hero-dot.active { background: var(--color-cyan); }

/* Header over the light hero: dark text until it scrolls */
.page-home .site-header:not(.scrolled):not(.is-scrolled) .logo-text,
.page-home .site-header:not(.scrolled):not(.is-scrolled) .nav-link { color: var(--color-navy); }
.page-home .site-header:not(.scrolled):not(.is-scrolled) .nav-link:hover,
.page-home .site-header:not(.scrolled):not(.is-scrolled) .nav-link.active { color: var(--color-blue); }
.page-home .site-header:not(.scrolled):not(.is-scrolled) .burger-line { background: var(--color-navy); }
.page-home .site-header .mobile-menu-toggle.active .burger-line { background: var(--color-white); }

/* Tablet */
@media (min-width: 641px) and (max-width: 1024px) {
  .hero-light { --hero-frame-width: 40vw; }
  .hero-light .hero-overlay {
    background:
      radial-gradient(circle at 12% 18%, rgba(122, 170, 151, 0.16), transparent 42%),
      radial-gradient(circle at 48% 92%, rgba(240, 184, 168, 0.22), transparent 38%);
  }
  .hero-light .hero-stats { grid-template-columns: 1fr 1fr 1fr; }
  .hero-light .hero-stat-divider { display: none; }
}

/* Mobile: framed photo on top, text below on the light background */
@media (max-width: 640px) {
  .hero-light .hero-slideshow {
    top: 76px;
    left: 1rem;
    right: 1rem;
    bottom: 54%;
    width: auto;
    border-radius: 24px;
  }
  .hero-light .hero-overlay {
    background: radial-gradient(circle at 80% 100%, rgba(240, 184, 168, 0.25), transparent 45%);
  }
  .hero-light .hero-badge,
  .hero-light .hero-title,
  .hero-light .hero-subtitle,
  .hero-light .hero-actions,
  .hero-light .hero-stats { max-width: none; }
  .hero-light .hero-dots { left: 2rem; top: calc(46% - 1.75rem); }
  .hero-light .hero-dot { background: rgba(255, 255, 255, 0.5); }
  .hero-light .hero-dot.active { background: var(--color-white); }
}

@media (max-width: 370px), (max-height: 720px) and (max-width: 640px) {
  .hero-light .hero-slideshow { bottom: 58%; }
  .hero-light .hero-overlay { background: none; }
  .hero-light .hero-dots { top: calc(42% - 1.75rem); }
}

/* The badge is now the page H1 — let it wrap on small screens */
h1.hero-badge { margin-top: 0; line-height: 1.4; }
@media (max-width: 640px) {
  .hero-light .hero-badge { white-space: normal; max-width: none; }
}
