/* ==========================================================================
   LAYOUT.CSS - Struktur halaman: container, section, page-hero, transisi.
   Navigasi ada di navigation.css, Footer di footer.css.
   ========================================================================== */

/* CONTAINERS & UTILITY LAYOUTS */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

/* Inner pages — section pertama dapat padding extra untuk clearance navbar fixed */
body.page-inner > section:first-of-type {
  padding-top: 9rem;   /* Desktop: navbar 6.5rem + 2.5rem napas */
}

@media (max-width: 768px) {
  body.page-inner > section:first-of-type {
    padding-top: 6.5rem;  /* Mobile: navbar ~4.75rem + 1.75rem napas */
  }
  body.page-inner {
    padding-top: 0;
  }
}

.section-cream {
  background-color: var(--cream);
}

/* SECTION HEADER */
.section-title-wrapper {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #9A6E1A;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
  background: #FDF4E0;
  border: 1px solid #E8C47A;
  padding: 0.25rem 0.85rem;
  border-radius: var(--radius-full);
}

.section-title {
  font-family: var(--font-sans);
  font-size: 1.75rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.section-desc {
  color: var(--muted);
  max-width: 600px;
  margin: 1rem auto 0 auto;
  font-size: 1.05rem;
}

/* MAIN CONTENT (transisi Swup) */
#main-content {
  will-change: opacity, transform;
  transition: opacity 0.18s ease-out, transform 0.18s ease-out;
}

/* HEADER HERO UNTUK PAGES (SHARED) - Dihilangkan sesuai permintaan user */
.page-hero {
  display: none !important;
}

/* Jarak aman teratas untuk sub-halaman agar tidak tertutup fixed navbar */
.page-hero + .section,
.page-hero + main .section:first-of-type,
body:not(.home) .section:first-of-type,
body:not(.home) main > .section:first-of-type {
  padding-top: 6.75rem !important;
}

@media (max-width: 768px) {
  .page-hero + .section,
  .page-hero + main .section:first-of-type,
  body:not(.home) .section:first-of-type,
  body:not(.home) main > .section:first-of-type {
    padding-top: 5.75rem !important;
  }
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(166, 206, 57, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
}

.page-title {
  font-size: 2.75rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  position: relative;
  color: var(--white);
}

.breadcrumbs {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.breadcrumbs a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

.breadcrumbs a:hover {
  color: var(--lime);
}

/* ── RESPONSIVE SECTION ────────────────────────────────────── */
@media (max-width: 1024px) {
  .section {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .section-title { font-size: 1.75rem; }
}

/* ── SWUP ANIMATION (PAGE TRANSITION) ─────────────────────── */
/* Default state (fade in) */
html.is-animating .transition-fade {
  opacity: 0;
  transform: translateY(10px);
}

/* Transition to default state */
.transition-fade {
  transition: 0.6s ease-out;
  transition-property: opacity, transform;
  opacity: 1;
  transform: translateY(0);
}

/* ── INITIAL PAGE LOAD ANIMATION ────────────────────────────
   Efek fade-in + slide saat hard reload / buka halaman baru.
   Dipisah dari Swup agar tidak konflik.
─────────────────────────────────────────────────────────── */
@keyframes pageload-fadein {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animasi hanya saat BUKAN sedang Swup-transition */
html:not(.is-animating) #main-content {
  animation: pageload-fadein 0.6s ease-out both;
}

/* Jika Swup sedang navigasi, matikan animasi load — Swup yang handle */
html.is-animating #main-content {
  animation: none;
}
