/* ========================================
   Hero Section
   ======================================== */

.hero-section {
  width: 100%;
  overflow: hidden;
  background-color: #ffffff;
  padding: 4.5rem 0 5.5rem;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
  }
}

/* --- Left Column: Text Content --- */
.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

@media (max-width: 1023px) {
  .hero-text {
    align-items: center;
    text-align: center;
  }
}

/* Title */
.hero-section .hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #0f172a;
  line-height: 1.2;
  max-width: 18ch;
}

@media (min-width: 640px) {
  .hero-section .hero-title {
    font-size: 2.625rem;
  }
}

@media (min-width: 1024px) {
  .hero-section .hero-title {
    font-size: 2.875rem;
    line-height: 1.18;
  }
}

/* Subtitle */
.hero-section .hero-subtitle {
  margin-top: 1.25rem;
  max-width: 34rem;
  font-size: 1.0625rem;
  color: #4b5563;
  line-height: 1.65;
  font-weight: 400;
}

@media (min-width: 1024px) {
  .hero-section .hero-subtitle {
    font-size: 1.125rem;
  }
}

/* --- Action Buttons (Exact Same Height & Smooth Hover) --- */
.hero-section .hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  align-items: center;
}

@media (max-width: 1023px) {
  .hero-section .hero-actions {
    justify-content: center;
  }
}

.hero-section .btn-hero-white,
.hero-section .btn-hero-outline {
  height: 3.125rem;
  padding: 0 1.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  border-radius: 0.625rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease,
    box-shadow 0.2s ease, transform 0.2s ease;
}

/* Primary Green Button (Daftar Mitra Grosir) */
.hero-section .btn-hero-white {
  background-color: var(--primary);
  color: #ffffff;
  border: 1.5px solid var(--primary);
  box-shadow: 0 4px 14px -2px rgba(22, 163, 74, 0.28);
}

.hero-section .btn-hero-white:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -4px rgba(22, 163, 74, 0.38);
}

.hero-section .btn-hero-white:active {
  transform: translateY(0);
}

/* Secondary Outlined Button (Lihat Stok & Harga) */
.hero-section .btn-hero-outline {
  background-color: #ffffff;
  color: #1f2937;
  border: 1.5px solid #d1d5db;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.hero-section .btn-hero-outline:hover {
  background-color: #f9fafb;
  border-color: #9ca3af;
  color: #111827;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.08);
}

.hero-section .btn-hero-outline:active {
  transform: translateY(0);
}

/* --- Right Column: Image Collage --- */
.hero-images {
  position: relative;
  width: 100%;
  height: 440px;
}

@media (min-width: 640px) {
  .hero-images {
    height: 480px;
  }
}

/* Individual image cards */
.hero-image {
  position: absolute;
  background-color: #e4e2e2;
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.5rem;
  padding: 0.45rem;
  box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.6);
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1.25rem;
  display: block;
}

/* Top center-left image */
.image-top {
  width: 13rem;
  height: 14rem;
  top: 15px;
  left: 24%;
  z-index: 2;
}

@media (min-width: 640px) {
  .image-top {
    width: 15rem;
    height: 16rem;
    left: 24%;
  }
}

/* Middle-right image (overlaps top card) */
.image-right {
  width: 14rem;
  height: 13rem;
  top: 140px;
  right: 0;
  z-index: 3;
}

@media (min-width: 640px) {
  .image-right {
    width: 16.5rem;
    height: 15rem;
    right: 0;
  }
}

/* Bottom-left image */
.image-bottom {
  width: 12rem;
  height: 12rem;
  bottom: 10px;
  left: 0;
  z-index: 4;
}

@media (min-width: 640px) {
  .image-bottom {
    width: 13.5rem;
    height: 13.5rem;
    left: 0;
  }
}

/* --- Floating Decorative Shapes --- */
.floating-shape {
  position: absolute;
  animation: hero-float 3.5s ease-in-out infinite;
}

.shape-circle {
  border-radius: 50%;
}

.shape-square {
  border-radius: 12px;
}

/* Blue circle top-left of top image */
.shape-blue {
  width: 3.75rem;
  height: 3.75rem;
  top: 0;
  left: 19%;
  background-color: rgba(30, 58, 138, 0.55);
  z-index: 1;
}

/* Purple rounded square bottom right */
.shape-purple {
  width: 2.75rem;
  height: 2.75rem;
  bottom: 25px;
  right: 140px;
  background-color: rgba(88, 28, 135, 0.55);
  z-index: 1;
  animation-delay: 0.6s;
}

@keyframes hero-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* Animations on scroll */
.hero-text.animate-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-text.animate-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-image {
  opacity: 0;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.image-top.animate-image {
  transform: scale(0.85);
}

.image-right.animate-image {
  transform: scale(0.85);
}

.image-bottom.animate-image {
  transform: scale(0.85);
}

.animate-image.is-visible {
  opacity: 1;
  transform: scale(1);
}

.image-top.animate-image { transition-delay: 0s; }
.image-right.animate-image { transition-delay: 0.18s; }
.image-bottom.animate-image { transition-delay: 0.36s; }

/* Small screen adjustments */
@media (max-width: 639px) {
  .hero-section {
    padding: 3rem 0;
  }
  .hero-images {
    height: 380px;
  }
  .image-top {
    width: 10.5rem;
    height: 11.5rem;
    left: 20%;
  }
  .image-right {
    width: 11.5rem;
    height: 10.5rem;
    top: 110px;
  }
  .image-bottom {
    width: 9.5rem;
    height: 9.5rem;
  }
  .shape-purple {
    right: 80px;
  }
}
