/* ============================================
   Home Page Styles
   ============================================ */

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--gradient-hero-light);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 70% 40%, rgba(13, 155, 133, 0.18) 0%, transparent 60%),
              radial-gradient(ellipse 60% 50% at 20% 80%, rgba(30, 77, 140, 0.14) 0%, transparent 60%),
              radial-gradient(ellipse 50% 40% at 90% 20%, rgba(13, 155, 133, 0.10) 0%, transparent 50%),
              url("data:image/svg+xml,%3Csvg width='32' height='32' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='16' cy='16' r='1' fill='rgba(13,155,133,0.10)'/%3E%3C/svg%3E");
  background-size: auto, auto, auto, 32px 32px;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(13, 155, 133, 0.05) 45%,
    rgba(30, 77, 140, 0.04) 55%,
    transparent 70%
  );
  background-size: 200% 100%;
  animation: hero-shimmer 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes hero-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Mouse-follow radial glow */
.hero__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(13, 155, 133, 0.10) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hero:hover .hero__glow {
  opacity: 1;
}

/* Decorative geometric rings */
.hero__deco {
  position: absolute;
  top: 8%;
  right: 5%;
  width: 280px;
  height: 280px;
  pointer-events: none;
  z-index: 1;
}

.hero__deco::before,
.hero__deco::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 2px solid transparent;
}

.hero__deco::before {
  inset: 0;
  border-color: rgba(13, 155, 133, 0.22);
  box-shadow: 0 0 0 60px rgba(13, 155, 133, 0.06), 0 0 0 120px rgba(13, 155, 133, 0.03);
}

.hero__deco::after {
  inset: 30px;
  border-color: rgba(30, 77, 140, 0.18);
}

.hero__grain {
  position: absolute;
  inset: 0;
  background-image: var(--grain-texture);
  background-repeat: repeat;
  background-size: 256px 256px;
  pointer-events: none;
  opacity: 0.15;
  z-index: 1;
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4xl);
  align-items: center;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: calc(var(--space-5xl) + 40px) var(--container-padding) calc(var(--space-4xl) + 48px);
  width: 100%;
}

.hero__content {
  max-width: 580px;
}

.hero__label {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--teal-700);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: var(--space-lg);
  padding: var(--space-xs) var(--space-md);
  border: 1px solid rgba(13, 155, 133, 0.3);
  border-radius: var(--radius-full);
  background: rgba(13, 155, 133, 0.1);
  opacity: 0;
  transform: translateY(20px);
  animation: fade-up-scale 0.6s var(--ease-out-expo) 0.2s forwards;
}

.hero__title {
  font-size: var(--fs-display);
  color: var(--navy-900);
  margin-bottom: var(--space-lg);
  letter-spacing: -0.02em;
  opacity: 0;
  animation: clip-reveal 0.8s var(--ease-out-expo) 0.4s forwards;
}

.hero__subtitle {
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  color: var(--gray-600);
  line-height: var(--lh-normal);
  margin-bottom: var(--space-2xl);
  max-width: 520px;
  opacity: 0;
  transform: translateY(20px);
  animation: fade-up-scale 0.6s var(--ease-out-expo) 0.6s forwards;
}

.hero__actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
  animation: fade-up-scale 0.6s var(--ease-out-expo) 0.8s forwards;
}

/* Hero media */
.hero__media {
  position: relative;
}

.hero__media::before {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: var(--radius-xl);
  background: radial-gradient(ellipse at center, rgba(13, 155, 133, 0.15) 0%, transparent 70%);
  animation: hero-glow 4s ease-in-out infinite alternate;
  z-index: 0;
  pointer-events: none;
}

@keyframes hero-glow {
  0%   { opacity: 0.5; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1.05); }
}

.hero__image-frame {
  position: relative;
  z-index: 1;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(13, 155, 133, 0.2), 0 20px 60px rgba(15, 33, 64, 0.12), 0 0 80px rgba(13, 155, 133, 0.08);
  border: 1px solid rgba(15, 33, 64, 0.08);
  transform: none;
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
  animation: gentle-float 6s ease-in-out infinite;
}

.hero__image-frame:hover {
  transform: scale(1.02);
  box-shadow: 0 0 0 1px rgba(13, 155, 133, 0.3), 0 24px 70px rgba(15, 33, 64, 0.16), 0 0 100px rgba(13, 155, 133, 0.12);
}

.hero__image-frame img {
  width: 100%;
  height: auto;
  display: block;
}

.hero__badge {
  position: absolute;
  bottom: -16px;
  left: -20px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(15, 33, 64, 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  box-shadow: 0 8px 32px rgba(15, 33, 64, 0.1);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  z-index: 3;
  animation: badge-pulse 2s ease-in-out infinite;
}

.hero__badge-number {
  font-family: var(--font-heading);
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  color: var(--teal-600);
  line-height: 1;
}

.hero__badge-text {
  font-size: var(--fs-xs);
  color: var(--navy-800);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
}

@media (max-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    padding-top: calc(var(--space-5xl) + 20px);
  }

  .hero__media {
    order: -1;
    max-width: 500px;
    margin: 0 auto;
  }

  .hero__content {
    max-width: 100%;
    text-align: center;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__badge {
    left: auto;
    right: -10px;
    bottom: -12px;
  }

  .hero::after {
    animation: none;
  }
}

@media (max-width: 480px) {
  .hero__badge {
    padding: var(--space-sm) var(--space-md);
    right: 0;
    bottom: -10px;
  }

  .hero__badge-number {
    font-size: var(--fs-h3);
  }
}

/* Hero button overrides for light background */
.hero .btn--secondary {
  border-color: var(--navy-700);
  color: var(--navy-800);
}

.hero .btn--secondary:hover {
  background-color: rgba(15, 33, 64, 0.06);
  border-color: var(--navy-600);
  color: var(--navy-800);
}

/* ---- Authorized Dealer Bar ---- */
.dealer-bar {
  margin-top: -32px;
  position: relative;
  z-index: 3;
  padding: 0 var(--container-padding);
  background: none;
  border: none;
  box-shadow: none;
}

.dealer-bar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
  flex-wrap: wrap;
  max-width: var(--container-max);
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 32px rgba(15, 33, 64, 0.1);
  padding: var(--space-lg) var(--space-xl);
  position: relative;
}

.dealer-bar__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--teal-600);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
}

.dealer-bar__label svg {
  color: var(--teal-600);
  flex-shrink: 0;
}

.dealer-bar__logos {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.dealer-bar__logo-card {
  padding: 4px var(--space-md);
  background: var(--off-white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow var(--transition-base);
}

.dealer-bar__logo-card:hover {
  box-shadow: var(--shadow-sm);
}

.dealer-bar__logo-card img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.dealer-bar__divider {
  width: 1px;
  height: 24px;
  background: var(--gray-200);
}

.dealer-bar__stats {
  display: flex;
  gap: var(--space-lg);
}

.dealer-bar__stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--teal-500);
}

.dealer-bar__stat strong {
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--navy-800);
  line-height: 1;
}

.dealer-bar__stat span {
  font-size: var(--fs-xs);
  color: var(--gray-400);
}

@media (max-width: 768px) {
  .dealer-bar {
    margin-top: -32px;
  }

  .dealer-bar__inner {
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
  }

  .dealer-bar__label {
    width: 100%;
    justify-content: center;
  }

  .dealer-bar__logos {
    gap: var(--space-sm);
  }

  .dealer-bar__logo-card img {
    height: 28px;
  }

  .dealer-bar__stats {
    gap: var(--space-md);
  }
}

/* ---- About / Tentang Kami ---- */
.about__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: var(--gray-100);
  position: relative;
}

.about__image::before {
  content: '';
  position: absolute;
  top: 16px;
  right: -16px;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  background: var(--blue-gray-50);
  border: 2px solid var(--blue-gray-100);
  z-index: -1;
}

.about__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.stat {
  text-align: center;
  padding: var(--space-md);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}

.stat__number {
  font-family: var(--font-heading);
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  color: var(--navy-800);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.stat__label {
  font-size: var(--fs-xs);
  color: var(--gray-500);
  font-weight: var(--fw-medium);
}

.stat__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gray-100);
}

.stat__progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--teal-600), var(--teal-400));
  border-radius: 0 3px 3px 0;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 8px rgba(13, 155, 133, 0.4);
}

.stat.is-visible .stat__progress-bar {
  width: 100%;
}

/* ---- Service Cards ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
}

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

@media (max-width: 480px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- CPAP Section ---- */
.cpap__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: var(--gray-100);
  position: relative;
}

.cpap__image::before {
  content: '';
  position: absolute;
  top: -16px;
  left: -16px;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  background: var(--blue-gray-50);
  border: 2px solid var(--blue-gray-100);
  z-index: -1;
}

.cpap__image img {
  width: 100%;
  object-fit: cover;
}

.benefit-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.benefit-list__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
}

.benefit-list__check {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  background-color: var(--teal-600);
  color: var(--white);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.benefit-list__check svg {
  width: 14px;
  height: 14px;
}

/* ---- Snoring / Bahaya Mendengkur ---- */
.snoring__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: var(--gray-100);
  position: relative;
}

.snoring__image::before {
  content: '';
  position: absolute;
  top: 16px;
  right: -16px;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  background: var(--blue-gray-50);
  border: 2px solid var(--blue-gray-100);
  z-index: -1;
}

.snoring__image img {
  width: 100%;
  object-fit: cover;
}

/* ---- Visi & Misi ---- */
.visi-misi__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}

.visi-misi__card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-inner-glow);
  position: relative;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.visi-misi__card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-inner-glow), 0 8px 32px rgba(13, 155, 133, 0.15);
}

.visi-misi__card::before,
.visi-misi__card::after {
  display: none;
}

.visi-misi__card h3 {
  color: var(--teal-400);
  margin-bottom: var(--space-md);
  text-shadow: 0 0 24px rgba(13, 155, 133, 0.3);
}

.visi-misi__card p,
.visi-misi__card li {
  color: rgba(255, 255, 255, 0.75);
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
}

.visi-misi__card ol {
  list-style: decimal;
  padding-left: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

@media (max-width: 768px) {
  .visi-misi__grid {
    grid-template-columns: 1fr;
  }

  .about__image::before,
  .cpap__image::before,
  .snoring__image::before {
    display: none;
  }
}

/* ---- Articles Grid ---- */
.articles-grid .card {
  overflow: hidden;
}

.articles-grid .card__img {
  transition: transform var(--transition-slow);
}

.articles-grid .card:hover .card__img {
  transform: scale(1.05);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

@media (max-width: 768px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }

  .about__stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .about__stats {
    grid-template-columns: 1fr;
  }
}
