/* PORTAL P3DS - Gaya utama. Navy, putih, gold. Huruf besar agar mudah dibaca. */
:root {
  --navy: #0b2545;
  --navy-dark: #071a31;
  --navy-soft: #13315c;
  --gold: #c9a227;
  --gold-soft: #f6edcf;
  --white: #ffffff;
  --bg: #f5f7fb;
  --text: #1c2733;
  --muted: #5a6776;
  --border: #dbe2ec;
  --radius: 12px;
  --shadow: 0 4px 16px rgba(11, 37, 69, 0.1);
}

* { box-sizing: border-box; }

html { font-size: 18px; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3 { color: var(--navy); line-height: 1.3; margin: 0 0 .5em; }
a { color: var(--navy-soft); }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 1rem; }
.is-hidden { display: none !important; }

/* ---------- Header ---------- */
.site-header { background: var(--navy); color: var(--white); border-bottom: 4px solid var(--gold); position: sticky; top: 0; z-index: 50; }
.header-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 0; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--white); }
.brand-logo {
  width: 52px; height: 52px; border-radius: 50%; background: var(--gold); color: var(--navy);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.1rem; flex-shrink: 0;
}
.brand-name { font-size: 1.25rem; font-weight: 800; letter-spacing: .5px; display: block; }
.brand-sub { font-size: .75rem; color: #c8d3e3; display: block; }

.header-actions { display: flex; align-items: center; gap: .5rem; }
.menu-toggle {
  display: none; background: transparent; color: var(--white); border: 2px solid var(--gold);
  border-radius: 8px; padding: .4rem .8rem; font-size: 1rem; cursor: pointer;
}

.main-nav { background: var(--navy-soft); }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.main-nav a { display: block; padding: .8rem 1rem; color: var(--white); text-decoration: none; font-size: .95rem; font-weight: 600; }
.main-nav a:hover, .main-nav a.active { background: var(--gold); color: var(--navy); }

/* ---------- Tombol ---------- */
.btn {
  display: inline-block; padding: .7rem 1.4rem; border-radius: 8px; border: 2px solid var(--gold);
  background: var(--gold); color: var(--navy); font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer;
}
.btn:hover { background: #b08d1c; border-color: #b08d1c; }
.btn-outline { background: transparent; color: var(--white); }
.btn-outline:hover { background: var(--gold); color: var(--navy); }
.btn-small { padding: .4rem .9rem; font-size: .9rem; }

/* ---------- Banner ---------- */
.hero { background: linear-gradient(135deg, var(--navy-dark), var(--navy-soft)); color: var(--white); padding: 4rem 0; text-align: center; }
.hero h1 { color: var(--white); font-size: 2.2rem; }
.hero .tagline { color: var(--gold); font-weight: 800; letter-spacing: 2px; font-size: 1.15rem; margin-bottom: 1rem; }
.hero p { max-width: 680px; margin: 0 auto 1.5rem; color: #dbe4f0; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }

/* ---------- Bagian ---------- */
.section { padding: 2.5rem 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; border-bottom: 3px solid var(--gold); padding-bottom: .5rem; }
.section-title h2 { margin: 0; font-size: 1.6rem; }

.grid { display: grid; gap: 1.25rem; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-body { padding: 1.1rem; }
.card h3 { font-size: 1.15rem; }
.card .meta { color: var(--muted); font-size: .85rem; margin-bottom: .4rem; }
.card-cover { width: 100%; height: 170px; object-fit: cover; background: var(--gold-soft); }
.card-cover.placeholder { display: flex; align-items: center; justify-content: center; color: var(--navy); font-weight: 800; font-size: 1.4rem; }

.stat { text-align: center; padding: 1.25rem; border-top: 5px solid var(--gold); }
.stat .number { font-size: 2.4rem; font-weight: 800; color: var(--navy); line-height: 1.1; }
.stat .label { color: var(--muted); font-weight: 600; }

.badge { display: inline-block; background: var(--gold-soft); color: var(--navy); border-radius: 20px; padding: .1rem .7rem; font-size: .75rem; font-weight: 700; margin-right: .4rem; }

.event-item { display: flex; gap: 1rem; align-items: center; padding: 1rem; }
.event-date { background: var(--navy); color: var(--white); border-radius: 10px; text-align: center; padding: .5rem .8rem; min-width: 68px; flex-shrink: 0; }
.event-date .day { font-size: 1.7rem; font-weight: 800; line-height: 1; color: var(--gold); }
.event-date .month { font-size: .8rem; text-transform: uppercase; }
.event-item h3 { margin: 0; font-size: 1.05rem; }

.empty, .loading { padding: 1.5rem; text-align: center; color: var(--muted); background: var(--white); border: 2px dashed var(--border); border-radius: var(--radius); grid-column: 1 / -1; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: #c8d3e3; margin-top: 2rem; border-top: 4px solid var(--gold); }
.footer-inner { padding: 2rem 1rem; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1.5rem; }
.site-footer h3 { color: var(--gold); font-size: 1.05rem; }
.site-footer a { color: #e6edf7; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.footer-bottom { text-align: center; padding: 1rem; font-size: .85rem; border-top: 1px solid #1d3557; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .menu-toggle { display: inline-block; }
  .main-nav { display: none; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; }
  .brand-sub { display: none; }
  .hero { padding: 2.5rem 0; }
  .hero h1 { font-size: 1.6rem; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ---------- Formulir & Pesan (Tahap 6) ---------- */
.page-narrow { max-width: 560px; margin: 2.5rem auto; }
.form-card { background: var(--white); border: 1px solid var(--border); border-top: 5px solid var(--gold); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; }
.form-card h1 { font-size: 1.6rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 700; margin-bottom: .3rem; color: var(--navy); }
.form-group .hint { display: block; font-size: .8rem; color: var(--muted); margin-top: .2rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; min-height: 48px; padding: .6rem .8rem; font-size: 1rem; font-family: inherit;
  border: 2px solid var(--border); border-radius: 8px; background: var(--white); color: var(--text);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--navy-soft); box-shadow: 0 0 0 3px rgba(19, 49, 92, .15); }
.form-group input[type="checkbox"] { width: auto; min-height: 0; margin-right: .5rem; transform: scale(1.3); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.alert { padding: .9rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-weight: 600; border-left: 5px solid; }
.alert-error { background: #fdecea; color: #8a1c13; border-color: #d93025; }
.alert-success { background: #e6f4ea; color: #14532d; border-color: #1e8e3e; }
.alert-info { background: var(--gold-soft); color: #5c4700; border-color: var(--gold); }
.form-footer { margin-top: 1rem; text-align: center; }
@media (max-width: 720px) { .form-row { grid-template-columns: 1fr; } }

/* ---------- Berita & Tabel (Tahap 7) ---------- */
.filter-bar { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; }
.filter-bar select { min-height: 44px; padding: .4rem .8rem; font-size: 1rem; border: 2px solid var(--border); border-radius: 8px; background: var(--white); }
.card h3 a { color: var(--navy); text-decoration: none; }
.card h3 a:hover { text-decoration: underline; color: var(--gold); }
.article { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; max-width: 820px; margin: 0 auto; }
.article h1 { font-size: 1.9rem; }
.article-cover { width: 100%; max-height: 420px; object-fit: cover; border-radius: 10px; margin: 1rem 0; }
.article-content { white-space: pre-line; font-size: 1.05rem; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.data-table th { background: var(--navy); color: var(--white); text-align: left; padding: .7rem; font-size: .9rem; }
.data-table td { padding: .7rem; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: .95rem; }
.actions { white-space: nowrap; }
.actions .btn { margin-right: .3rem; }
.btn-danger { background: #d93025; border-color: #d93025; color: var(--white); }
.btn-danger:hover { background: #b3261e; border-color: #b3261e; }
.btn-outline-dark { background: transparent; color: var(--navy); border-color: var(--navy); margin-left: .5rem; }
.btn-outline-dark:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* ---------- Agenda (Tahap 8) ---------- */
.event-item h3 a { color: var(--navy); text-decoration: none; }
.event-item h3 a:hover { text-decoration: underline; color: var(--gold); }

/* ---------- Galeri (Tahap 9) ---------- */
.card h3 a { color: var(--navy); text-decoration: none; }
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1rem; }
.media-item { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; padding-bottom: .5rem; }
.media-item img, .media-item video { width: 100%; height: 200px; object-fit: cover; display: block; background: #000; }
.media-item .btn { margin: 0 .5rem; }
.media-caption { padding: .5rem; font-size: .9rem; color: var(--muted); }
@media (max-width: 900px) { .media-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .media-grid { grid-template-columns: 1fr; } }

/* ---------- Kegiatan Sosial (Tahap 10) ---------- */
.timeline-item { border-left: 4px solid var(--gold); padding: .25rem 0 .25rem 1rem; margin: 1rem 0; }
.timeline-item h3 { margin: 0 0 .3rem; font-size: 1.1rem; }
.timeline-item .btn { margin-top: .5rem; }

/* ---------- Ruang Silaturahmi (Tahap 11) ---------- */
.post-card h3 a { color: var(--navy); text-decoration: none; }
.post-card h3 a:hover { text-decoration: underline; color: var(--gold); }
.comment { border-left: 4px solid var(--gold); background: var(--bg); border-radius: 0 10px 10px 0; padding: .75rem 1rem; margin: .8rem 0; }
.comment-actions { margin-top: .5rem; }
.comment-actions .btn { margin-right: .4rem; }
.comment-form { margin-top: 1.25rem; }
.badge-warn { background: #fdecea; color: #8a1c13; }

/* ---------- Admin & Status Badges (Tahap 12) ---------- */
.badge-success { background: #e6f4ea; color: #14532d; }
.badge-danger { background: #fdecea; color: #8a1c13; }
.form-select-sm { padding: 0.25rem 0.5rem; font-size: 0.9rem; border: 1px solid var(--border); border-radius: 6px; background: var(--white); }
.filter-buttons { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.filter-buttons .btn.active { background: var(--navy); color: var(--white); }
.text-center { text-align: center; }
