/* --- ROOT & GLOBAL --- */
:root {
  --primary-color: #2563eb;
  --primary-rgb: 37, 99, 235;
}

html {
  scroll-behavior: smooth;
}

/* --- ANIMATIONS: PAGE LOAD --- */
.nav-animate {
  transform: translateY(-100%);
  opacity: 0;
  animation: navSlideDown 0.8s ease-out forwards;
}

.hero-animate {
  opacity: 0;
  transform: translateX(40px);
  animation: heroFadeSlide 1s ease-out forwards;
  animation-delay: 0.3s;
}

@keyframes navSlideDown {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes heroFadeSlide {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* --- ANIMATIONS: SCROLL TRIGGER --- */
.scroll-animate {
  opacity: 0;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate.from-bottom {
  transform: translateY(30px);
}
.scroll-animate.from-left {
  transform: translateX(-50px);
}
.scroll-animate.from-right {
  transform: translateX(40px);
}

.scroll-animate.active {
  opacity: 1;
  transform: translate(0, 0);
}

/* --- ANIMATIONS: LOOPING --- */
@keyframes bounce-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.animate-bounce-slow {
  animation: bounce-slow 4s ease-in-out infinite;
}

@keyframes slow-zoom {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.1);
  }
}

.animate-slow-zoom {
  animation: slow-zoom 20s linear infinite alternate;
}

/* --- TEXT & STROKE EFFECTS --- */
.stroke-premium {
  -webkit-text-stroke: 2px #e5e7eb;
  transition: -webkit-text-stroke 0.3s ease;
}

.group:hover .stroke-premium {
  -webkit-text-stroke: 2px var(--primary-color);
}

.glow-text {
  filter: drop-shadow(0 0 15px rgba(var(--primary-rgb), 0.6));
}

.nav-animate a {
  position: relative;
}

.nav-animate a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.nav-animate a:hover::after {
  width: 100%;
}

/* --- SERVICE CARDS (DYNAMIC FLEX) --- */
/* Update di bagian ini saja */
.service-card {
  flex: 1;
  flex-basis: 0;
  min-width: 0;
  /* Tinggi dikurangi: 350px di mobile, 400px di desktop */
  height: 350px;
  transition: all 0.7s cubic-bezier(0.25, 1, 0.3, 1);
  position: relative;
  will-change: flex;
}

@media (min-width: 1024px) {
  .service-card {
    height: 400px; /* Tinggi yang sangat aman untuk 1 layar */
  }

  .service-card:hover {
    flex: 2; /* Tidak terlalu lebar, supaya kartu lain nggak terlalu gepeng */
    opacity: 1 !important;
    filter: blur(0) !important;
  }

  .group\/container:hover .service-card:not(:hover) {
    flex: 0.8;
    filter: blur(3px); /* Blur dikurangi agar tidak pusing */
    opacity: 0.7;
  }
}

/* Padding content diperkecil lagi */
.card-content-wrapper {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.2rem;
  pointer-events: none;
}

.service-card h3 {
  white-space: nowrap;
  transition: all 0.5s ease;
}

/* Penyesuaian teks saat kartu menyempit */
.group\/container:hover .service-card:not(:hover) h3 {
  font-size: 1.1rem;
  white-space: normal;
}

@media (min-width: 1024px) {
  /* Kartu diam */
  .premium-glass-card {
    flex: 1;
    filter: brightness(0.9);
  }

  /* Saat ada yang di-hover */
  .group\/container:hover .premium-glass-card:not(:hover) {
    flex: 0.8;
    filter: blur(2px) brightness(0.7);
  }

  /* Kartu yang aktif */
  .premium-glass-card:hover {
    flex: 2.2;
    filter: brightness(1.1);
    z-index: 10;
  }
}

/* Pastikan judul tidak pecah saat transisi */
.premium-glass-card h3 {
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Slow zoom yang lebih smooth */
.premium-glass-card img {
  transition: transform 4s ease-out;
}
