/* ============================================================
   Pramuka SMK Remaja Pluit — Main Stylesheet
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --primary:     #1a3a5c;   /* Navy deep */
  --secondary:   #2d6a9f;   /* Navy medium */
  --accent:      #ffc107;   /* Kuning Pramuka */
  --accent-dark: #e0a800;
  --green:       #198754;
  --dark:        #0f1f35;
  --text:        #2c3e50;
  --text-muted:  #6c757d;
  --bg-light:    #f8f9fa;
  --white:       #ffffff;
  --radius:      12px;
  --radius-lg:   20px;
  --shadow:      0 4px 20px rgba(0,0,0,.08);
  --shadow-lg:   0 8px 40px rgba(0,0,0,.14);
  --transition:  all .3s ease;
  --navbar-h:    72px;
}

/* ── Base ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  background: var(--white);
  padding-top: var(--navbar-h);
}

img { max-width: 100%; }

.object-fit-cover { object-fit: cover; }

/* ── Navbar ─────────────────────────────────────────────────── */
#mainNavbar {
  background: rgba(15, 31, 53, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,193,7,.15);
  transition: var(--transition);
  height: var(--navbar-h);
}
#mainNavbar.scrolled {
  background: rgba(15, 31, 53, .98);
  box-shadow: 0 2px 20px rgba(0,0,0,.3);
}
#mainNavbar .nav-link {
  font-weight: 500;
  font-size: .88rem;
  letter-spacing: .3px;
  padding: .5rem .75rem;
  border-radius: 8px;
  transition: var(--transition);
  color: rgba(255,255,255,.82) !important;
}
#mainNavbar .nav-link:hover,
#mainNavbar .nav-link.active {
  color: var(--accent) !important;
  background: rgba(255,193,7,.08);
}
#mainNavbar .navbar-brand { line-height: 1.2; }

/* ── Hero Section ───────────────────────────────────────────── */
.hero-section {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background-color: var(--dark);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}
.hero-section::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(10,22,40,.88) 0%, rgba(15,40,70,.78) 100%);
  z-index: 0;
  pointer-events: none;
}
.hero-section::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(255,193,7,.07) 0%, transparent 65%);
  z-index: 0;
  pointer-events: none;
}
.hero-overlay { display: none; }

.hero-badge {
  display: inline-flex; align-items: center;
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  padding: .45rem 1.1rem;
  border-radius: 50px;
  font-size: .82rem; font-weight: 700;
  letter-spacing: .5px;
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  line-height: 1.1;
  text-shadow: 0 3px 24px rgba(0,0,0,.7);
}
.hero-sub {
  color: #f8d347;
  font-weight: 700;
  text-shadow: 0 2px 12px rgba(0,0,0,.6);
  display: inline-block;
}

/* Hero list items */
.hero-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.hero-list li {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  padding: .4rem 0;
  margin-bottom: .2rem;
  text-shadow: 0 2px 10px rgba(0,0,0,.8);
  background: transparent;
}
.hero-list li i {
  font-size: 1.1rem;
  color: var(--accent);
  flex-shrink: 0;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,.6));
}
.hero-logo-img {
  width: 260px; height: 260px;
  object-fit: contain;
  filter: drop-shadow(0 0 40px rgba(255,193,7,.35));
  animation: float 4s ease-in-out infinite;
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-18px); }
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute; bottom: 30px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.scroll-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: scrollBounce 1.6s ease-in-out infinite;
}
.scroll-dot:nth-child(2) { animation-delay: .2s; opacity: .6; }
.scroll-dot:nth-child(3) { animation-delay: .4s; opacity: .3; }
@keyframes scrollBounce {
  0%,100% { transform: translateY(0); opacity: 1; }
  50%      { transform: translateY(8px); opacity: .3; }
}

/* ── Section Helpers ────────────────────────────────────────── */
.section-badge {
  display: inline-block;
  background: rgba(255,193,7,.12);
  color: var(--accent-dark);
  border: 1px solid rgba(255,193,7,.3);
  padding: .25rem .9rem;
  border-radius: 50px;
  font-size: .78rem; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase;
}
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--primary);
  margin-top: .5rem;
}

/* ── Stats Section ──────────────────────────────────────────── */
.stats-section { background: var(--accent); }
.stat-card {
  padding: 1rem;
}
.stat-icon {
  font-size: 2rem;
  display: block; margin-bottom: .25rem;
  color: var(--primary);
}
.stat-number {
  font-size: 2.4rem; font-weight: 900;
  color: var(--primary); line-height: 1;
}
.stat-label {
  font-size: .82rem; font-weight: 600;
  color: rgba(15,31,53,.7);
  text-transform: uppercase; letter-spacing: .5px;
}

/* ── Cards ──────────────────────────────────────────────────── */
.kegiatan-card, .berita-card {
  border-radius: var(--radius) !important;
  transition: var(--transition);
  overflow: hidden;
}
.kegiatan-card:hover, .berita-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg) !important;
}

.kegiatan-img-wrap { position: relative; overflow: hidden; height: 200px; }
.kegiatan-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.kegiatan-card:hover .kegiatan-img-wrap img { transform: scale(1.05); }

.badge-status {
  position: absolute; top: 12px; right: 12px;
  padding: .35rem .8rem; border-radius: 50px;
  font-size: .73rem; font-weight: 700;
  text-transform: capitalize;
}
.status-akan-datang  { background: #0d6efd; color: #fff; }
.status-berlangsung  { background: #198754; color: #fff; }
.status-selesai      { background: #6c757d; color: #fff; }

.berita-img-wrap { overflow: hidden; height: 200px; }
.berita-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.berita-card:hover .berita-img-wrap img { transform: scale(1.05); }
.berita-img { object-fit: cover; }

/* Berita / Kegiatan detail */
.kegiatan-detail-img,
.berita-detail-img { max-height: 420px; width: 100%; object-fit: cover; }

/* ── Galeri Thumb ───────────────────────────────────────────── */
.galeri-thumb {
  position: relative; overflow: hidden;
  border-radius: var(--radius); cursor: pointer;
  aspect-ratio: 1/1;
}
.galeri-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.galeri-thumb:hover img { transform: scale(1.08); }
.galeri-overlay {
  position: absolute; inset: 0;
  background: rgba(15,31,53,.55);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  opacity: 0; transition: var(--transition);
}
.galeri-thumb:hover .galeri-overlay { opacity: 1; }

/* ── Page Header ────────────────────────────────────────────── */
.page-header {
  background:
    linear-gradient(135deg, rgba(15,31,53,.9) 0%, rgba(26,58,92,.85) 100%),
    url('../images/hero-bg.svg') center/cover no-repeat;
  padding: 5rem 0 2.5rem;
  margin-top: calc(-1 * var(--navbar-h));
  padding-top: calc(var(--navbar-h) + 3rem);
}

/* ── Profil Page ────────────────────────────────────────────── */
.profil-logo-float {
  width: 220px;
  height: 220px;
  object-fit: contain;
  filter: drop-shadow(0 6px 24px rgba(255,193,7,.35));
  animation: float 4s ease-in-out infinite;
  transition: filter .3s ease;
}
.profil-logo-float:hover {
  filter: drop-shadow(0 6px 32px rgba(255,193,7,.7));
}
.info-box { transition: var(--transition); }
.info-box:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

@media (max-width: 768px) {
  .profil-logo-float { width: 150px; height: 150px; }
  .tri-satya-card { padding: 1.25rem !important; }
}
@media (max-width: 480px) {
  .profil-logo-float  { width: 110px; height: 110px; }
  .pengurus-avatar    { width: 72px; height: 72px; }
  .pengurus-avatar-sm { width: 52px; height: 52px; }
}

.tri-satya-card {
  background: var(--dark);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--accent);
}
.dasa-dharma-list { padding-left: 1.2rem; }
.dasa-dharma-list li { color: rgba(255,255,255,.75); margin-bottom: .35rem; font-size: .88rem; }

.visi-card {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-radius: var(--radius-lg);
}
.visi-card .text-muted { color: rgba(255,255,255,.75) !important; }
.misi-card {
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--accent);
}
.misi-list { padding-left: 1.2rem; }
.misi-list li { margin-bottom: .5rem; color: var(--text); }

.pengurus-card {
  background: var(--white);
  border: 1px solid rgba(255,193,7,.15);
  transition: var(--transition);
}
.pengurus-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--accent); }
.pengurus-avatar { width: 90px; height: 90px; border: 3px solid var(--accent); border-radius: 50%; overflow: hidden; }
.pengurus-avatar-sm { width: 65px; height: 65px; border: 2px solid var(--accent); border-radius: 50%; overflow: hidden; }
.prestasi-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); transition: var(--transition); }
.prestasi-card:hover { background: rgba(255,255,255,.1); transform: translateY(-4px); }

/* ── Anggota Page ───────────────────────────────────────────── */
.stat-mini-card { cursor: default; transition: var(--transition); }
.stat-mini-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.anggota-card {
  background: var(--white);
  border: 1px solid rgba(255,193,7,.12) !important;
  transition: var(--transition);
}
.anggota-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--accent) !important; }
.anggota-avatar { width: 80px; height: 80px; border: 3px solid var(--accent); border-radius: 50%; overflow: hidden; }
.bg-pink { background-color: #e83e8c !important; }

/* ── Filter Bar ─────────────────────────────────────────────── */
.filter-bar {
  border: 1px solid rgba(255,193,7,.2);
  position: relative;
  z-index: 9;
}

/* ── Content Body (rich text) ───────────────────────────────── */
.content-body {
  font-size: .95rem; line-height: 1.85;
  color: var(--text);
}
.content-body h2,.content-body h3,.content-body h4 { color: var(--primary); margin-top: 1.5rem; }
.content-body img { border-radius: var(--radius); max-width: 100%; margin: .75rem 0; }
.content-body a { color: var(--secondary); }
.content-body blockquote {
  border-left: 4px solid var(--accent);
  padding: .75rem 1.25rem;
  background: var(--bg-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}

/* ── Kontak Page ────────────────────────────────────────────── */
.kontak-icon { width: 40px; text-align: center; }
.kontak-info-item { padding-bottom: 1rem; border-bottom: 1px dashed #dee2e6; }
.kontak-info-item:last-child { border-bottom: none; }

/* ── Footer ─────────────────────────────────────────────────── */
.footer-main {
  background: var(--dark);
  border-top: 3px solid var(--accent);
}
.footer-links li { margin-bottom: .4rem; }
.footer-links a {
  color: rgba(255,255,255,.6);
  text-decoration: none;
  font-size: .88rem;
  transition: var(--transition);
}
.footer-links a:hover { color: var(--accent); padding-left: 4px; }
.footer-contact { list-style: none; padding: 0; }
.footer-contact li { color: rgba(255,255,255,.6); font-size: .88rem; margin-bottom: .6rem; }
.social-link {
  color: rgba(255,255,255,.6);
  transition: var(--transition);
  text-decoration: none;
}
.social-link:hover { color: var(--accent); transform: translateY(-2px); }

/* ── Pagination ─────────────────────────────────────────────── */
.page-link {
  color: var(--primary);
  border-radius: 8px !important;
  margin: 0 2px;
}
.page-link:hover, .page-item.active .page-link {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--primary);
}

/* ── Utilities ──────────────────────────────────────────────── */
.hover-warning:hover { color: var(--accent) !important; }
.bg-outline-warning { border: 1px solid var(--accent); color: var(--accent); background: transparent; }
.text-white-75 { color: rgba(255,255,255,.75); }
.fw-black { font-weight: 900; }
.btn-xs { padding: .15rem .4rem; font-size: .72rem; border-radius: 5px; }
.w-lg-auto { width: auto !important; }
html, body { overflow-x: hidden; }

/* ── AOS override ───────────────────────────────────────────── */
[data-aos] { transition-duration: .6s !important; }

/* ── Berita Page ────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Sidebar berita pindah ke bawah konten (sudah col-lg-4) */
  .berita-img-wrap { height: 170px; }
}
@media (max-width: 480px) {
  /* Berita grid 1 kolom */
  .berita-card .col-md-6 { flex: 0 0 100%; max-width: 100%; }
  .berita-img-wrap { height: 150px; }
}

/* ── Galeri Page ────────────────────────────────────────────── */
@media (max-width: 480px) {
  /* Filter album wrap agar tidak overflow */
  .galeri-filter-wrap { overflow-x: auto; flex-wrap: nowrap !important; padding-bottom: .5rem; }
  .galeri-filter-wrap .btn { flex-shrink: 0; }
  /* Galeri modal max-height */
  #modalGaleriImg { max-height: 60vh !important; }
}

/* ── Kegiatan Page ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .kegiatan-detail-img { max-height: 220px; }
  /* Filter stack vertikal */
  .filter-bar .col-md-4:last-child .btn { width: 100%; }
}

/* ── Kontak Page ────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Map iframe kontak */
  .kontak-map-wrap iframe { height: 180px !important; }
  /* Form kontak full width */
  .kontak-form-card { padding: 1.25rem !important; }
}
@media (max-width: 480px) {
  .kontak-info-item { padding-bottom: .75rem; }
  /* Tombol sosmed stack */
  .kontak-sosmed { flex-direction: column; gap: .5rem !important; }
  .kontak-sosmed .btn { width: 100%; }
}

/* ── Responsive ─────────────────────────────────────────────── */

/* Tablet & bawah (≤ 768px) */
@media (max-width: 768px) {
  body { padding-top: 60px; overflow-x: hidden; }
  :root { --navbar-h: 60px; }

  /* Navbar */
  #mainNavbar { height: auto; min-height: var(--navbar-h); }
  #navMenu.show,
  #navMenu.collapsing {
    background: rgba(10, 22, 40, .98);
    border-top: 1px solid rgba(255,193,7,.15);
    padding: .5rem 0 1rem;
    margin: 0 -12px;
    padding-left: 12px;
    padding-right: 12px;
  }
  #mainNavbar .nav-link {
    padding: .65rem 1rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,.05);
  }
  #mainNavbar .nav-link.active {
    border-left: 3px solid var(--accent);
    padding-left: calc(1rem - 3px);
    background: rgba(255,193,7,.08);
  }

  /* Hero */
  .hero-section { min-height: 100svh; }
  .hero-title { font-size: 1.85rem; }
  .hero-sub { font-size: 1.1rem !important; }
  .hero-list li { font-size: .88rem; }
  .hero-badge { font-size: .75rem; }

  /* Stats */
  .stat-number { font-size: 1.8rem; }
  .stat-label  { font-size: .72rem; }

  /* Page Header */
  .page-header { padding-top: calc(60px + 2rem); }

  /* Sections spacing */
  .py-5 { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }

  /* Cards */
  .kegiatan-img-wrap { height: 160px; }
  .berita-img-wrap   { height: 150px; }

  /* Footer */
  .footer-main { text-align: center; }
  .footer-links, .footer-contact { text-align: left; }
  .social-link { font-size: 1.25rem; }
  .footer-map-wrap { height: 140px; pointer-events: none; }
  .footer-map-wrap:active { pointer-events: auto; }

  /* Galeri */
  .galeri-thumb { aspect-ratio: 1/1; }

  /* Filter bar */
  .filter-bar { z-index: 9; }
}

/* Ponsel kecil (≤ 480px) */
@media (max-width: 480px) {
  .hero-title  { font-size: 1.6rem; }
  .hero-sub    { font-size: 1rem !important; }
  .hero-list li { font-size: .82rem; gap: .5rem; }

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

  .stat-card { padding: .75rem .5rem; }
  .stat-number { font-size: 1.6rem; }
  .stat-icon   { font-size: 1.5rem; }

  /* Tombol hero */
  .hero-section .btn-lg { font-size: .88rem; padding: .55rem 1.25rem; }

  /* Kartu grid 1 kolom untuk konten sempit */
  .kegiatan-img-wrap { height: 140px; }

  /* Filter bar stack full */
  .filter-bar .row > div { flex: 0 0 100%; max-width: 100%; }
}

/* Ponsel sangat kecil (≤ 360px) */
@media (max-width: 360px) {
  .hero-title { font-size: 1.4rem; }
  .hero-badge { font-size: .7rem; padding: .35rem .8rem; }
  .stat-number { font-size: 1.4rem; }
}

/* ── Anggota Page v2 (ReactBits) ────────────────────────── */

/* Hapus style lama yang bentrok */
.anggota-card  { display: none !important; } /* digantikan TiltCard React */
.anggota-avatar { display: none !important; }

/* Modal anggota detail */
#modalAnggotaDetail .modal-content {
  background: transparent;
  border: none;
  border-radius: 18px !important;
  overflow: hidden;
}
#anggota-modal-content {
  position: relative;
  min-height: 320px;
}

/* Stat mini cards di bagian atas (React versi) */
#anggota-stats-root .col-6,
#anggota-stats-root .col-md-3 {
  padding: 0 8px;
}

/* Spotlight search dropdown z-index fix */
.filter-bar { z-index: 10; position: relative; }

/* TiltCard touch device — no tilt */
@media (hover: none) {
  #anggota-cards-root [style*="perspective"] {
    transform: none !important;
  }
}

/* Anggota cards mobile */
@media (max-width: 480px) {
  #anggota-cards-root .col-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Search dropdown z-index */
#anggota-cards-root [style*="zIndex: 200"] {
  z-index: 9 !important;
}
