  html, body {
  overflow-x: hidden;
  max-width: 100%;
}
 
/* Pastikan semua direct children body tidak bisa overflow */
body > * {
  max-width: 100%;
  box-sizing: border-box;
}
 
/* Hero: background-image tidak menyebabkan overflow, tapi
   kalau ada inner element yang lebar — batasi */
.hero-paroki {
  max-width: 100%;
  overflow: hidden;
}
 
/* Slider: gambar di dalam slide bisa overflow kalau tanpa min-width:0 */
#artikelSlider {
  min-width: 0;
  max-width: 100%;
}
.artikel-slide img {
  width: 100%;
  max-width: 100%;
}
 
/* Grid artikel: kolom bisa overflow di layar sempit */
.artikel-layout {
  min-width: 0;
}
.artikel-layout > * {
  min-width: 0;
}
 
/* Jadwal grid */
.jadwal-grid {
  max-width: 100%;
}
 
/* Container utama */
.container-main {
  overflow-x: hidden;
}
.hero-paroki {
  min-height: 65vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Desktop: hero pakai background-image → ini LCP di desktop */
@media (min-width: 601px) {
  .hero-paroki {
    background-image: url('/img/gereja/exterior-blank.webp');
    background-size: cover;
    background-position: center;
  }
}

/* Mobile: hero solid color saja — gambar hero bukan LCP di mobile
   (slider artikel lebih besar), tidak perlu load gambar background. */
@media (max-width: 600px) {
  .hero-paroki {
    min-height: 0;
    height: 200px;
    /* Warna solid — tidak buang bandwidth untuk gambar yang bukan LCP */
    background-color: #1a0e05;
  }
  .hero-title    { font-size: 1.6rem !important; margin-bottom: 6px !important; }
  .hero-tagline  { font-size: .65rem !important; letter-spacing: 1.5px !important; margin-bottom: 8px !important; }
  .hero-location { font-size: .6rem  !important; letter-spacing: 4px  !important; }
  .hero-location::before { margin-bottom: 6px; }
  .scroll-indicator { display: none; }
}

/* ── Container ───────────────────────────────── */
.container-main {
  max-width: 900px;
  margin: auto;
  padding: 0 12px;
}
.container-main section {
  margin-bottom: 10px;
}
.container-main h2 {
  margin-top: 4px;
  margin-bottom: 10px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Menu (tombol) ───────────────────────────── */
.home-menu {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.home-menu a {
  background: #fff;
  padding: 14px 8px;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  color: #2c1a0e;
  font-weight: 600;
  font-size: .9rem;
  transition: background .25s, color .25s, transform .2s;
  white-space: nowrap;
}
.home-menu a:hover {
  background: #b8860b;
  color: #fff;
  transform: translateY(-2px);
}

/* ── SECTION ─────────────────────────────────── */
.romo-modern {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.romo-modern .eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #c9a23a;
  margin-bottom: 10px;
}

.romo-modern h2 {
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  margin-bottom: 0px;
  color: #3a2a1a;
}

/* ── GRID ─────────────────────────────────────── */
.romo-wrapper {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 32px;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
  margin-top: 44px;          /* ← ruang untuk foto floating */
}

/* ── CARD ─────────────────────────────────────── */
.romo-card.modern {
  position: relative;
  flex: 0 0 200px;
  width: 200px;
  padding: 0 0 28px;
  border-radius: 24px;
  background: #fff;
  border: 0.5px solid rgba(212,175,55,0.25);
  box-shadow: 0 2px 24px rgba(44,26,14,0.07);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: visible;
}

.romo-card.modern:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(44,26,14,0.13),
              0 0 0 1.5px rgba(212,175,55,0.3);
}

/* ── TOP BAND GELAP ───────────────────────────── */
.romo-card-top {
  border-radius: 24px 24px 0 0;
  background: linear-gradient(135deg, #2c1a0e 0%, #5a3520 60%, #2c1a0e 100%);
  position: relative;
}

.romo-card-top::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px 24px 0 0;
  background: repeating-linear-gradient(
    45deg,
    transparent, transparent 18px,
    rgba(212,175,55,0.06) 18px,
    rgba(212,175,55,0.06) 19px
  );
}

/* ── GOLD LINE ────────────────────────────────── */
.romo-gold-line {
  width: 100%;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, #d4af37, transparent);
  opacity: 0.8;
}

/* ── FOTO FLOATING ────────────────────────────── */
.romo-img-wrap {
  position: absolute;
  top: -44px;                /* ← ganti bottom menjadi top */
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #fff;
  padding: 3px;
  box-shadow: 0 4px 20px rgba(44,26,14,0.18);
  z-index: 2;
}

.romo-img-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid rgba(212,175,55,0.5);
}

.romo-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

/* ── CARD BODY ────────────────────────────────── */
.romo-card-body {
  padding: 50px 18px 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.romo-role {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #c9a23a;
  background: rgba(212,175,55,0.09);
  border: 0.5px solid rgba(212,175,55,0.3);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.romo-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1e1209;
  line-height: 1.35;
  margin: 0;
  text-align: center;
  width: 100%;
}

/* ── ORNAMEN ──────────────────────────────────── */
.romo-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px auto 0;
  opacity: 0.5;
}

.romo-ornament span {
  display: inline-block;
  height: 0.5px;
  width: 28px;
  background: #c9a23a;
}

.romo-ornament i {
  width: 4px;
  height: 4px;
  background: #c9a23a;
  transform: rotate(45deg);
  display: inline-block;
  flex-shrink: 0;
}

/* ── MOBILE ───────────────────────────────────── */
@media (max-width: 480px) {
  .romo-wrapper {
    gap: 16px;
    justify-content: center;
    align-items: stretch;
    padding: 0 16px;
    box-sizing: border-box;
    margin-top: 44px;        /* ← tetap ada ruang foto */
  }
  .romo-card.modern {
    flex: 0 0 160px;
    width: 160px;
  }
  .romo-modern h2 {
    font-size: 1.7rem;
    margin-bottom: 0px;     /* ← dikurangi karena margin-top sudah di wrapper */
  }
}
/* ── Artikel ─────────────────────────────────── */
.artikel-modern { text-align: center; padding: 4px 0; }

.artikel-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 15px;
  align-items: stretch;
}

.artikel-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.artikel-small {
  display: flex;
  gap: 8px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: #2c1a0e;
  transition: transform .2s, box-shadow .2s;
  flex: 1;
}
.artikel-small:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,.1);
}
/* [PERF] Tentukan ukuran eksplisit agar browser reserve space & tidak layout-shift */
/* Desktop: kartu side masing-masing ~125px tinggi, gambar ikut penuh */
.artikel-small img {
  width: 90px;
  height: 100%;
  min-height: 90px;
  object-fit: cover;
  flex-shrink: 0;
}
.artikel-small-content {
  padding: 8px 8px 8px 0;
  display: flex;
  align-items: center;
}
.artikel-small-content p {
  font-size: .75rem;
  line-height: 1.4;
  margin: 0;
  text-align: left;
}

/* ── Artikel Slider ──────────────────────────────── */
#artikelSlider {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  /* Desktop: tinggi fixed agar sejajar dengan dua kartu side.
     Kartu side: flex:1 dalam container 260px → masing-masing ~125px + 10px gap */
  height: 260px;
  display: block;
  cursor: pointer;
  /* [PERF] contain: layout mencegah repaint menyebar ke luar elemen */
  contain: layout style;
}

/* [PERF] Semua slide pakai position absolute di dalam wrapper aspect-ratio */
.artikel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .5s ease;
  text-decoration: none;
  display: block;
  /* [PERF] will-change hanya pada elemen aktif (diset via JS) */
}
.artikel-slide.active {
  opacity: 1;
  z-index: 1;
}

.artikel-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  /* [PERF] Gambar non-aktif tidak perlu decode eagerly */
}

/* Overlay gradient */
.artikel-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.1) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px 18px 14px;
  pointer-events: none;
}
.artikel-overlay h3 {
  color: #fff;
  font-size: .95rem;
  line-height: 1.4;
  margin: 0 0 8px;
  text-align: left;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  text-shadow: 0 1px 6px rgba(0,0,0,.5);
}

/* Tombol panah */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .2s, transform .2s, border-color .2s;
  user-select: none;
  line-height: 1;
}
.slider-btn:hover {
  background: rgba(184,134,11,.75);
  border-color: rgba(184,134,11,.6);
  transform: translateY(-50%) scale(1.08);
}
.slider-btn:active {
  transform: translateY(-50%) scale(.96);
}
.slider-btn.prev { left: 10px; }
.slider-btn.next { right: 10px; }

/* [PERF] Sembunyikan tombol panah di mobile — tidak perlu, sudah ada swipe */
@media (max-width: 600px) {
  .slider-btn { display: none; }
}

/* Dots */
.slider-dots {
  position: absolute;
  bottom: 10px;
  right: 14px;
  display: flex;
  gap: 5px;
  z-index: 10;
}
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  transition: background .3s, transform .3s;
  cursor: pointer;
}
.dot.active {
  background: #fff;
  transform: scale(1.3);
}

/* Progress bar */
.slider-progress {
  position: absolute;
  bottom: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, #b8860b, #d4af37);
  z-index: 10;
  transition: width .1s linear;
  border-radius: 0 2px 0 0;
}

/* ── Jadwal ──────────────────────────────────── */
.jadwal-modern { text-align: center; padding: 4px 0; }

.jadwal-grid {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}
.jadwal-card {
  min-width: 180px;
  flex: 1;
  max-width: 240px;
  background: #fff;
  border-radius: 14px;
  padding: 15px;
  box-shadow: 0 4px 14px rgba(0,0,0,.07);
  position: relative;
  overflow: hidden;
}
.jadwal-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, #b8860b, #d4af37);
}
.jadwal-item {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: .85rem;
  border-bottom: 1px dashed #eee;
}
.jadwal-item:last-child { border-bottom: none; }

/* ── MOBILE ──────────────────────────────────── */
@media (max-width: 600px) {

  /* tombol: tetap 3 kolom */
  .home-menu {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .home-menu a {
    padding: 12px 4px;
    font-size: .8rem;
    border-radius: 10px;
  }

  /* romo: tetap 2 kolom */
  .romo-wrapper {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-width: 100%;
  }
  .romo-card.modern { padding: 12px 8px; }
  .romo-img-wrap { width: 60px; height: 60px; }
  .romo-name { font-size: .72rem; }
  .romo-role { font-size: .62rem; }

  /* [PERF] Di mobile: artikel full-width, side cards jadi row di bawah slider */
  .artikel-layout {
    grid-template-columns: 1fr;
  }

  /* Mobile: reset height fixed dari desktop, pakai aspect-ratio landscape */
  #artikelSlider {
    height: auto;
    aspect-ratio: 16/9;
  }

  /* [PERF] Side cards mobile: horizontal layout lebih compact */
  .artikel-side {
    flex-direction: row;
    gap: 8px;
  }
  .artikel-small {
    flex-direction: column;
    flex: 1;
  }
  .artikel-small img {
    width: 100%;
    height: 80px;
  }
  .artikel-small-content {
    padding: 6px 8px;
  }

  /* jadwal */
  .jadwal-grid { gap: 10px; }
  .jadwal-card { min-width: 140px; }
}