/* ================= GLOBAL RESET & BASE ================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: "Inter", sans-serif;
  color: #2d3748;
  background-color: #f8fafc;
  overflow-x: hidden;
}

/* ================= SECTIONS GENERAL ================= */
.page-section {
  padding: 120px 0;
  position: relative;
}

.section-title {
  font-size: 36px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 50px;
  color: #0f172a;
  position: relative;
  letter-spacing: -0.02em;
}

.section-title::after {
  content: "";
  display: block;
  width: 50px;
  height: 4px;
  background: linear-gradient(135deg, #25d366, #1ebe5d);
  margin: 16px auto 0;
  border-radius: 50px;
  transition: width 0.4s ease;
}

/* Efek interaktif ketika area section dilewati */
.page-section:hover .section-title::after {
  width: 80px;
}

/* ================= TIRAI TRANSISI HALAMAN MELENGKUNG ELASTIS ================= */
.page-loader {
  position: fixed;
  inset: 0;
  background: #0f172a;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: ellipse(150% 100% at 50% 0%);
  animation: slideOutUp 1.3s cubic-bezier(0.85, 0, 0.15, 1) forwards;
}

@keyframes slideOutUp {
  0% {
    clip-path: ellipse(150% 100% at 50% 0%);
  }

  40% {
    clip-path: ellipse(150% 100% at 50% 0%);
  }

  100% {
    clip-path: ellipse(150% 0% at 50% 0%);
    visibility: hidden;
  }
}

/* ================= HERO SLIDER (SINEMATIK INTERAKTIF) ================= */
.hero {
  position: relative;
  height: 95vh;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.06);
  /* Total 24 detik untuk 5 foto */
  animation: heroSlider 24s infinite ease-in-out;
}

/* Slide 1 langsung diberi opacity 1 agar langsung tampil setelah loader selesai */
/* Sesuaikan delay agar durasi tiap slide sama (4.8s x urutan) */
.hero-slide:nth-child(5) {
  animation-delay: 0s;
  opacity: 1;
} /* Slide 1 (Sort 1) */
.hero-slide:nth-child(4) {
  animation-delay: 4.8s;
} /* Slide 2 (Sort 2) */
.hero-slide:nth-child(3) {
  animation-delay: 9.6s;
} /* Slide 3 (Sort 3) */
.hero-slide:nth-child(2) {
  animation-delay: 14.4s;
} /* Slide 4 (Sort 4) */
.hero-slide:nth-child(1) {
  animation-delay: 19.2s;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.3),
    rgba(15, 23, 42, 0.75)
  );
  z-index: 3; /* Dinaikkan agar tetap di atas gambar yang ber-z-index 2 */
}

.hero-overlay {
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 4; /* Dinaikkan agar teks tidak tertimbun slider */
  text-align: center;
  color: #fff;
  width: 100%;
  max-width: 850px;
  padding: 0 24px;
}

.hero-overlay h1 {
  font-size: clamp(32px, 5.5vw, 60px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  opacity: 0;
  animation: luxuryFadeUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.5s;
}

.hero-overlay p {
  font-size: clamp(16px, 2.5vw, 22px);
  margin-bottom: 40px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  opacity: 0;
  animation: luxuryFadeUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.7s;
}

/* Tombol Utama WA Interaktif Bersinar */
.btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 40px;
  background: linear-gradient(135deg, #25d366, #1ebe5d);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: 50px;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  animation: luxuryFadeUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.9s;
}

.btn-wa:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 35px rgba(37, 211, 102, 0.5);
  background: linear-gradient(135deg, #1ebe5d, #17a84c);
}

.btn-wa i {
  font-size: 20px;
  transition: transform 0.3s ease;
}

.btn-wa:hover i {
  transform: scale(1.15) rotate(10deg);
}

/* ================= EXTRA SECTIONS STYLE ================= */
.about-section {
  background-color: #ffffff;
  border-radius: 50px 50px 0 0;
  margin-top: -50px;
  z-index: 10;
  position: relative;
  box-shadow: 0 -20px 40px rgba(15, 23, 22, 0.04);
}

.about-content {
  max-width: 850px;
  margin: auto;
  text-align: center;
}

.about-content p {
  font-size: 17px;
  color: #475569;
  line-height: 1.9;
}

/* ================= PRODUK & MERCH SECTION ================= */
.product-section {
  background-color: #f8fafc;
  padding-bottom: 0px;
}

.product-section .slider-wrapper {
  padding-bottom: 15px;
}

.merch-section {
  background-color: #f8fafc;
  padding-top: 30px;
}

.slider-wrapper {
  overflow-x: auto;
  padding: 20px 4px 50px 4px;
  scrollbar-width: none;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.slider-wrapper::-webkit-scrollbar {
  display: none;
}

.slider-track {
  display: flex;
  gap: 30px;
}

/* Kartu Produk Eksklusif */
.post-card {
  min-width: 285px;
  max-width: 285px;
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  color: #0f172a;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.02);
  border: 1px solid rgba(226, 232, 240, 0.7);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.img-container {
  width: 100%;
  height: 340px;
  overflow: hidden;
  background: #f8fafc;
  position: relative;
  border-bottom: 2px solid #000000;
}

.post-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.post-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 40px rgba(15, 23, 42, 0.08);
  border-color: rgba(203, 213, 225, 0.7);
}

.post-card:hover img {
  transform: scale(1.06);
}

.product-details {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  position: relative;
}

.product-details h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1e293b;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s;
}

.post-card:hover .product-details h4 {
  color: #1ebe5d;
}

.product-price {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 18px;
  transition: transform 0.3s ease;
}

.post-card:hover .product-price {
  transform: translateX(2px);
}

.product-action {
  font-size: 13px;
  font-weight: 600;
  color: #1ebe5d;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  margin-top: auto;
}

.post-card:hover .product-action {
  gap: 12px;
}

/* ================= BERITA SECTION ================= */
.news-section {
  background-color: #ffffff;
  position: relative;
  clip-path: ellipse(145% 100% at 50% 100%);
  padding-top: 140px;
  padding-bottom: 140px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

.news-card {
  background: #fff;
  border-radius: 24px;
  padding: 32px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.01);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.06);
  border-color: #cbd5e1;
}

.post-date-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  background: #f1f5f9;
  color: #64748b;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 18px;
  align-self: flex-start;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.news-card:hover .post-date-badge {
  background: #e2e8f0;
  color: #0f172a;
}

.judul-berita {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 54px;
}

.judul-berita a {
  text-decoration: none;
  color: #0f172a;
  transition: color 0.3s;
}

.news-card:hover .judul-berita a {
  color: #1ebe5d;
}

.isi-berita {
  font-size: 14px;
  color: #475569;
  line-height: 1.63;
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 68px;
}

.btn-readmore {
  font-size: 13px;
  font-weight: 600;
  color: #1ebe5d;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  transition:
    gap 0.3s ease,
    color 0.3s;
}

.news-card:hover .btn-readmore {
  gap: 12px;
}

.more-news-wrapper {
  text-align: center;
  margin-top: 60px;
}

.btn-more-news {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 40px;
  color: #0f172a;
  background: transparent;
  border: 1px solid #cbd5e1;
  border-radius: 50px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.4s ease;
}

.btn-more-news:hover {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
  transform: scale(1.03);
}

/* ================= PORTOFOLIO TICKER ================= */
.portfolio-section {
  background-color: #f8fafc;
}

.ticker {
  overflow: hidden;
  width: 100%;
  cursor: grab;
  padding: 30px 0;
}

.ticker:active {
  cursor: grabbing;
}

.track {
  display: flex;
  align-items: center;
  gap: 70px;
  width: max-content;
  will-change: transform;
  user-select: none;
}

.porto-img {
  width: 95px;
  height: auto;
  max-height: 55px;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.85;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.porto-img:hover {
  transform: scale(1.15);
  opacity: 1;
}

/* ================= SCROLL REVEAL ANIMATION SYSTEM ================= */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ================= ANIMASI KEYFRAMES GLOBAL ================= */
/* Pembagian durasi yang tepat untuk 4 slide (total 24 detik) dengan kontrol z-index */
@keyframes heroSlider {
  0% {
    opacity: 0;
    transform: scale(1.06);
    z-index: 1;
  }
  5% {
    opacity: 1;
    z-index: 2;
  } /* Gambar muncul ke depan */
  20% {
    opacity: 1;
    z-index: 2;
  } /* Gambar diam sejenak */
  25% {
    opacity: 0;
    transform: scale(1.01);
    z-index: 1;
  } /* Gambar menghilang */
  100% {
    opacity: 0;
    z-index: 1;
  }
}

@keyframes luxuryFadeUp {
  from {
    opacity: 0;
    transform: translateY(35px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================= MEDIA QUERIES RESPONSIVE ================= */
@media (max-width: 768px) {
  .page-section {
    padding: 70px 0;
  }

  .product-section {
    padding-bottom: 0px !important;
  }

  .product-section .slider-wrapper {
    padding-bottom: 10px !important;
  }

  .merch-section {
    padding-top: 15px !important;
  }

  .about-section {
    border-radius: 30px 30px 0 0;
    margin-top: -30px;
  }

  .news-section {
    clip-path: none;
    padding-top: 70px;
    padding-bottom: 70px;
  }

  .section-title {
    font-size: 28px;
    margin-bottom: 35px;
  }

  .hero {
    height: 70vh;
  }

  .slider-track {
    gap: 15px;
  }

  .post-card {
    min-width: 180px;
    max-width: 180px;
    border-radius: 14px;
  }

  .img-container {
    height: 210px;
  }

  .product-details {
    padding: 14px;
  }

  .product-details h4 {
    font-size: 13px;
  }

  .product-price {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .product-action {
    font-size: 12px;
  }

  .about-content p {
    font-size: 15px;
  }

  .news-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .track {
    gap: 45px;
  }

  .porto-img {
    width: 75px;
  }
}
