:root {
  --primary: #1F4D3A;      /* hijau tua teks/tombol */
  --footer: #15382A;       /* hijau sangat tua untuk footer */
  --primary-2: #2E6B4F;
  --accent: #DB9E30;       /* emas */
  --mint: #9FD4B5;         /* hijau mint dari pola */
  --bg: #F6F1E7;           /* krem */
  --surface: #FFFFFF;
  --border: #E5DFD0;
  --muted: #5B6B63;
  --text: #1F2A24;
  --danger: #B03A2E;
  --success: #2E7D4F;
  --shadow-sm: 0 1px 2px rgba(31,77,58,.06), 0 1px 3px rgba(31,77,58,.08);
  --shadow-md: 0 4px 12px rgba(31,77,58,.08), 0 2px 6px rgba(31,77,58,.06);
  --shadow-lg: 0 12px 32px rgba(31,77,58,.12), 0 4px 12px rgba(31,77,58,.08);
  --radius: 14px;
  --glass: rgba(255,255,255,.82);
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth !important;
  scroll-padding-top: 5.5rem;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
}
/* Custom smooth scrollbar */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-track {
  background: #f8fafc;
}
::-webkit-scrollbar-thumb {
  background: #2e6b4f;
  border-radius: 9999px;
  border: 2px solid #f8fafc;
}
::-webkit-scrollbar-thumb:hover {
  background: #1f4d3a;
}

/* Card Fasilitas Sesuai Referensi Gambar (Background Pola Lembut, Icon Hijau, Hover Hijau Template & Teks Putih) */
.facility-card {
  position: relative;
  background-color: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  cursor: pointer;
}

.facility-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../assets/pattern-bg.jpg');
  background-repeat: repeat;
  background-size: 180px 180px;
  opacity: 0.065;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.28s ease, filter 0.28s ease;
}

.facility-card:hover {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  transform: translateY(-5px);
  box-shadow: 0 16px 32px -8px rgba(31, 77, 58, 0.28);
}

.facility-card:hover::before {
  opacity: 0.12;
  filter: brightness(2);
}

.facility-card > * {
  position: relative;
  z-index: 1;
}

.facility-card-icon {
  color: var(--primary);
  transition: color 0.28s ease, transform 0.28s ease;
}
.facility-card:hover .facility-card-icon {
  color: #ffffff !important;
  transform: scale(1.08);
}

.facility-card-title {
  color: #1e293b;
  transition: color 0.28s ease;
}
.facility-card:hover .facility-card-title {
  color: #ffffff !important;
}

.facility-card-desc {
  color: #64748b;
  transition: color 0.28s ease;
}
.facility-card:hover .facility-card-desc {
  color: rgba(255, 255, 255, 0.92) !important;
}

.facility-card-link {
  color: var(--primary);
  font-weight: 600;
  transition: color 0.28s ease;
}
.facility-card:hover .facility-card-link {
  color: #ffffff !important;
  text-decoration: underline;
}

/* Hide scrollbar for facility carousel */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
body { font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--text); background: var(--surface); margin: 0; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
button, a, input, select, textarea { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .6; }

/* Fokus terlihat sesuai standar aksesibilitas WCAG AA (R-32) */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Pola islami sebagai latar (hero, jadwal sholat, login kiri) */
.pattern-bg {
  position: relative;
  background-color: var(--bg);
}
.pattern-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../assets/pattern-bg.jpg');
  background-repeat: repeat;
  background-size: 220px 220px;
  opacity: .14;
  pointer-events: none;
  z-index: 0;
}
.pattern-bg > * { position: relative; z-index: 1; }

/* Band hijau tua untuk kutipan/ayat (kontras ritme section) */
.dark-band { position: relative; background: var(--primary); color: #fff; overflow: hidden; }
.dark-band::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url('../assets/pattern-bg.jpg');
  background-repeat: repeat;
  background-size: 220px 220px;
  opacity: .10;
  pointer-events: none;
}
.dark-band > * { position: relative; z-index: 1; }

/* Overlay gradasi agar teks terbaca */
.pattern-overlay {
  background: linear-gradient(180deg, rgba(246,241,231,.85) 0%, rgba(246,241,231,.6) 100%);
}

/* Skyline masjid via mask (rasio gambar 991x148 agar ujung kubah & menara utuh tidak terpotong) */
.skyline-hero, .skyline-footer {
  width: 100%;
  aspect-ratio: 991 / 148;
  max-height: 165px;
  background-color: var(--primary);
  -webkit-mask-image: url('../assets/sec-botm-mckp.png');
  mask-image: url('../assets/sec-botm-mckp.png');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-position: center bottom;
  mask-position: center bottom;
  pointer-events: none;
}
.skyline-hero {
  min-height: 55px;
}
.skyline-footer {
  background-color: var(--footer);
  margin-bottom: -1px;
}
@media (max-width: 480px) {
  .skyline-hero, .skyline-footer {
    min-height: 48px;
  }
}

/* Ornamen krem sebagai watermark/pemisah */
.ornament-divider {
  width: 40%;
  max-width: 320px;
  height: 24px;
  margin: 1.5rem auto;
  background-image: url('../assets/sec-top-mckp.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: .55;
  pointer-events: none;
}
.ornament-watermark {
  position: absolute;
  inset: 0;
  background-image: url('../assets/sec-top-mckp.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 60%;
  opacity: .08;
  pointer-events: none;
  z-index: 0;
}

/* Pembatas antar-section modern */
.section-divider {
  width: 100%;
  max-width: 1152px;
  margin: 3rem auto;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border) 25%, var(--border) 75%, transparent 100%);
  position: relative;
  border: none;
}
.section-divider::after {
  content: '✦';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--surface);
  padding: 0 14px;
  font-size: 11px;
  color: var(--accent);
}

/* Garis modern dekoratif pada judul element (Modern Title Line) */
.title-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}
.title-line::before {
  content: '';
  width: 44px;
  height: 3.5px;
  border-radius: 4px;
  background-color: var(--primary);
}
.title-line::after {
  content: '';
  width: 10px;
  height: 3.5px;
  border-radius: 4px;
  background-color: var(--accent);
}
.title-line.center {
  justify-content: center;
}

/* Card dasar */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card-krem { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-glass { background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.6); border-radius: var(--radius); box-shadow: var(--shadow-md); }

/* Tombol */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .65rem 1.25rem; border-radius: 10px; font-weight: 600; border: 1px solid transparent; transition: background .18s, transform .12s, box-shadow .18s; box-shadow: var(--shadow-sm); }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-2); }
.btn-accent { background: var(--accent); color: #1F2A24; }
.btn-accent:hover { filter: brightness(.95); }
.btn-outline { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

/* Input */
.input { width: 100%; padding: .6rem .75rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); }
.input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(219,158,48,.18); }

/* Tabel */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .6rem .75rem; border-bottom: 1px solid var(--border); text-align: left; font-size: .9rem; }
.table th { background: var(--bg); font-weight: 600; }

/* Countdown */
.countdown { font-variant-numeric: tabular-nums; }

/* Tab buttons */
.tab-btn {
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
}

/* Scroll reveal (MOTION 2) */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  * { animation: none !important; transition: none !important; }
}

/* Mobile tap targets standard (R-03) */
@media (max-width: 640px) {
  .btn, .tab-btn { min-height: 44px; }
}

/* Prayer Hero Card (Reference Mosque Aesthetic) */
.prayer-hero-card {
  position: relative;
  background: linear-gradient(145deg, #1F4D3A 0%, #153A2B 100%);
  color: #fff;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 12px 28px -6px rgba(31, 77, 58, 0.45), 0 8px 12px -6px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.prayer-hero-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../assets/pattern-bg.jpg');
  background-repeat: repeat;
  background-size: 220px 220px;
  opacity: 0.085;
  pointer-events: none;
  z-index: 0;
}

.prayer-hero-row-dark {
  background: rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(4px);
}

.prayer-hero-row-light {
  background: rgba(255, 255, 255, 0.04);
}

/* Agenda / Event Date Badge (Reference Style) */
.event-date-badge {
  display: flex;
  flex-direction: column;
  width: 4.75rem; /* ~76px */
  border: 4px solid #EBEBEB;
  background: #ffffff;
  border-radius: 0.375rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
  text-align: center;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

@media (min-width: 640px) {
  .event-date-badge {
    width: 5.25rem; /* ~84px */
    border-width: 5px;
  }
}

.card:hover .event-date-badge {
  border-color: #d1d5db;
}

.event-date-badge-day {
  background: #ffffff;
  color: #1a1a1a;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-weight: 700;
  font-size: 1.85rem;
  line-height: 1;
  padding: 0.6rem 0.25rem 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 640px) {
  .event-date-badge-day {
    font-size: 2.25rem;
    padding: 0.75rem 0.25rem 0.5rem;
  }
}

.event-date-badge-meta {
  background-color: var(--primary);
  color: #ffffff;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-weight: 700;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.25rem;
  line-height: 1.2;
}

@media (min-width: 640px) {
  .event-date-badge-meta {
    font-size: 0.75rem;
    padding: 0.4rem 0.25rem;
  }
}

/* Announcement / Bulletin Card (Desain Pengumuman Cantik) */
.announcement-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 0.75rem;
  padding: 1.125rem 1.25rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  cursor: pointer;
}

.announcement-card:hover {
  border-color: var(--primary);
  border-left-color: var(--accent);
  box-shadow: 0 8px 20px -4px rgba(31, 77, 58, 0.12), 0 3px 6px -2px rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
}

.announcement-card-featured {
  background: linear-gradient(135deg, var(--surface) 0%, rgba(31, 77, 58, 0.035) 100%);
  border-left: 4px solid var(--accent);
  border-color: rgba(219, 158, 48, 0.3);
}

.announcement-card-featured:hover {
  border-left-color: var(--primary);
  border-color: var(--primary);
}

/* Print Stylesheet: Untuk cetak tabel jadwal sholat / laporan kas masjid */
@media print {
  header, footer, .skyline-footer, .skyline-hero, #btn-fullscreen, .copy-btn, .btn, #menuBtn {
    display: none !important;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .card, .card-glass {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
  .table th {
    background-color: #f0f0f0 !important;
    color: #000 !important;
  }
}
