
:root {
  --emerald-dark: #0a3d1f;
  --emerald: #155d30;
  --emerald-mid: #1e7a40;
  --emerald-light: #2a9a52;
  --gold: #c9a037;
  --gold-light: #e6c062;
  --gold-dark: #9e7820;
  --cream: #fdf9f0;
  --cream-dark: #f0e8d4;
  --text-dark: #1a1a1a;
  --text-mid: #3a3a3a;
  --text-light: #666;
  --white: #ffffff;
  --nav-height: 85px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  line-height: 1.6;
  padding-top: var(--nav-height);
  overflow-x: hidden;
}

/* ===== GLOBAL NAVIGATION ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: var(--white);
  box-shadow: 0 2px 15px rgba(10,61,31,0.1);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.nav-container {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
}

.brand-logo {
  height: 55px;
  width: auto;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  border-left: 2px solid var(--emerald-light);
  padding-left: 15px;
}

.brand-name {
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--emerald-dark);
  line-height: 1.1;
  letter-spacing: 0.5px;
}

.brand-tagline {
  font-size: 0.68rem;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  margin-top: 2px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 25px;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: var(--text-mid);
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.3s;
  cursor: pointer;
  padding: 5px 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--emerald);
}

/* Dropdown Menu */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  min-width: 230px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border-radius: 8px;
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s;
  border-top: 3px solid var(--emerald);
}
.dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item {
  display: block;
  padding: 10px 20px;
  text-decoration: none;
  color: var(--text-mid);
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s;
  cursor: pointer;
}
.dropdown-item:hover { background: var(--cream); color: var(--emerald); }

.mobile-toggle { display: none; cursor: pointer; font-size: 1.5rem; color: var(--emerald-dark); }

.mobile-nav {
  position: fixed;
  top: var(--nav-height);
  left: 0; width: 100%; height: calc(100vh - var(--nav-height));
  background: var(--white); z-index: 1001; padding: 20px;
  display: flex; flex-direction: column; gap: 15px;
  transform: translateX(100%); transition: transform 0.3s ease-in-out;
  overflow-y: auto;
}
.mobile-nav.active { transform: translateX(0); }


/* ===== CONTENT SECTIONS CONTROL ===== */
.page-section { display: none; animation: fadeIn 0.6s ease-out; }
.page-section.active { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-bg {
  min-height: calc(100vh - var(--nav-height));
  background-color: var(--cream);
  background-image: 
    repeating-linear-gradient(45deg, rgba(21,93,48,0.03) 0, rgba(21,93,48,0.03) 1px, transparent 0, transparent 50%),
    repeating-linear-gradient(-45deg, rgba(21,93,48,0.03) 0, rgba(21,93,48,0.03) 1px, transparent 0, transparent 50%);
  background-size: 30px 30px;
  padding: 40px 20px 80px;
}

.wrapper { max-width: 1100px; margin: 0 auto; }

/* ===== BERANDA / HOME STYLES ===== */
.hero-section {
  background: linear-gradient(rgba(10,61,31,0.85), rgba(10,61,31,0.85)), url('https://masjidrayaaljabbar.com/wp-content/uploads/2022/12/DJI_0493-1024x576.jpg');
  background-size: cover;
  background-position: center;
  border-radius: 30px;
  padding: 100px 40px;
  text-align: center;
  color: var(--white);
  margin-bottom: 50px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  position: relative;
  overflow: hidden;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--gold-light);
  max-width: 700px;
  margin: 0 auto 30px;
  font-weight: 300;
}

.hero-cta {
  display: inline-block;
  background: var(--gold);
  color: var(--emerald-dark);
  padding: 15px 40px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: 0.3s;
  cursor: pointer;
}
.hero-cta:hover { transform: scale(1.05); box-shadow: 0 10px 20px rgba(201,160,55,0.3); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: -30px;
  padding: 0 20px;
}

.feature-card {
  background: var(--white);
  padding: 40px 30px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  transition: 0.3s;
}
.feature-card:hover { transform: translateY(-10px); }
.feature-icon { font-size: 2.5rem; color: var(--emerald); margin-bottom: 20px; display: block; }
.feature-card h3 { font-family: 'Playfair Display', serif; color: var(--emerald-dark); margin-bottom: 15px; }
.feature-card p { font-size: 0.9rem; color: var(--text-mid); }

/* ===== SHARED CONTENT HEADER ===== */
.content-header {
  background: linear-gradient(160deg, var(--emerald-dark) 0%, var(--emerald) 50%, var(--emerald-mid) 100%);
  color: var(--white);
  border-radius: 20px;
  padding: 60px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: 0 10px 40px rgba(10,61,31,0.25);
}

.header-ornament { position: absolute; top: -20px; right: -20px; font-size: 8rem; opacity: 0.08; color: var(--gold); font-family: serif; }
.header-label { font-family: 'Playfair Display', serif; font-size: 1.1em; color: var(--gold-light); letter-spacing: 4px; text-transform: uppercase; margin-bottom: 12px; }
.header-title { font-family: 'Playfair Display', serif; font-size: 2.8em; font-weight: 800; line-height: 1.2; }

/* ===== PROFIL & SEJARAH STYLES ===== */
.essay-card { background: var(--white); padding: 60px; border-radius: 24px; box-shadow: 0 15px 50px rgba(10,61,31,0.06); border-bottom: 6px solid var(--gold); }
.essay-p { font-size: 1.15rem; color: var(--text-mid); margin-bottom: 30px; text-align: justify; text-indent: 40px; }
.essay-p:first-of-type::first-letter { font-size: 3.5rem; float: left; margin-right: 10px; color: var(--emerald); font-family: 'Playfair Display', serif; font-weight: 800; line-height: 1; }

.panca-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; margin: 40px 0; }
.panca-card { background: var(--cream); border: 1px solid var(--gold-light); padding: 25px 15px; border-radius: 15px; text-align: center; transition: 0.3s; }
.panca-card:hover { transform: translateY(-8px); background: var(--white); box-shadow: 0 10px 20px rgba(201,160,55,0.15); }
.panca-word { display: block; font-family: 'Playfair Display', serif; font-weight: 800; color: var(--emerald-dark); font-size: 1.4rem; }
.panca-meaning { display: block; font-size: 0.85rem; color: var(--gold-dark); text-transform: uppercase; font-weight: 700; letter-spacing: 1px; }

.quote-box { background: rgba(21,93,48,0.04); border-left: 5px solid var(--emerald); padding: 30px 40px; margin: 40px 0; font-style: italic; font-size: 1.1rem; color: var(--emerald-dark); position: relative; }

/* Responsive Adjustments */
@media (max-width: 992px) {
  .nav-menu { display: none; }
  .mobile-toggle { display: block; }
  .feature-grid { grid-template-columns: 1fr; margin-top: 20px; }
  .hero-title { font-size: 2.5rem; }
  .essay-card { padding: 35px; }
  .bidang-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .header-title { font-size: 2em; }
  .advisory-row { flex-direction: column; }
}

@media (max-width: 480px) {
  .brand-logo { height: 45px; }
  .brand-name { font-size: 1rem; }
  .brand-tagline { font-size: 0.55rem; }
  .brand-text { padding-left: 10px; }
  .brand { gap: 10px; }
}

/* MERGED OLD STYLES FOR OVERLAPPING OR SPECIFIC COMPONENTS */
/* ===== HEADER ===== */
.org-header {
  background: linear-gradient(160deg, var(--emerald-dark) 0%, var(--emerald) 50%, var(--emerald-mid) 100%);
  color: var(--white);
  border-radius: 20px;
  padding: 40px 30px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 4px;
  box-shadow: 0 8px 40px rgba(10,61,31,0.35);
}

.org-header::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 220px; height: 220px;
  border: 40px solid rgba(201,160,55,0.15);
  border-radius: 50%;
}
.org-header::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -40px;
  width: 260px; height: 260px;
  border: 40px solid rgba(255,255,255,0.05);
  border-radius: 50%;
}

.header-bismillah {
  font-family: 'Playfair Display', serif;
  font-size: 1.05em;
  color: var(--gold-light);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 12px;
  opacity: 0.9;
}
.header-org {
  font-family: 'Playfair Display', serif;
  font-size: 2.4em;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.header-sub {
  font-size: 1em;
  color: rgba(255,255,255,0.8);
  margin: 8px 0 16px;
  font-weight: 400;
}
.header-period {
  display: inline-block;
  background: var(--gold);
  color: var(--emerald-dark);
  font-weight: 800;
  font-size: 0.9em;
  padding: 5px 22px;
  border-radius: 30px;
  letter-spacing: 1px;
  margin-bottom: 14px;
  box-shadow: 0 2px 10px rgba(201,160,55,0.4);
}
.header-address {
  font-size: 0.78em;
  color: rgba(255,255,255,0.65);
  font-weight: 300;
  margin-top: 6px;
}

/* ===== CONNECTOR ===== */
.v-line {
  width: 3px;
  margin: 0 auto;
  background: linear-gradient(to bottom, var(--emerald), var(--gold));
}

.h-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  position: relative;
  margin: 0;
}

/* ===== SECTION LABEL ===== */
.section-label {
  text-align: center;
  margin: 20px 0 12px;
}
.section-label-inner {
  display: inline-block;
  background: var(--emerald-dark);
  color: var(--gold-light);
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 0.82em;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 7px 28px;
  border-radius: 30px;
  border: 2px solid var(--gold-dark);
  box-shadow: 0 3px 12px rgba(10,61,31,0.25);
}

/* ===== ADVISORY ROW ===== */
.advisory-row {
  display: flex;
  gap: 14px;
  margin-bottom: 0;
}

.advisory-card {
  flex: 1;
  background: var(--white);
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid var(--emerald-light);
  box-shadow: 0 4px 16px rgba(10,61,31,0.1);
  transition: box-shadow 0.2s;
}
.advisory-card:hover { box-shadow: 0 6px 24px rgba(10,61,31,0.18); }

.advisory-head {
  background: linear-gradient(135deg, var(--emerald), var(--emerald-mid));
  color: var(--white);
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: background 0.2s;
}
.advisory-head:hover { background: linear-gradient(135deg, var(--emerald-dark), var(--emerald)); }

.advisory-head-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 0.8em;
  letter-spacing: 0.5px;
}
.advisory-badge {
  background: var(--gold);
  color: var(--emerald-dark);
  font-weight: 800;
  font-size: 0.72em;
  padding: 2px 8px;
  border-radius: 12px;
}
.advisory-toggle {
  font-size: 0.75em;
  opacity: 0.8;
  transition: transform 0.3s;
}
.advisory-body {
  padding: 12px 16px;
  max-height: 260px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--emerald-light) transparent;
}
.advisory-body ol {
  padding-left: 20px;
}
.advisory-body li {
  font-size: 0.76em;
  color: var(--text-mid);
  padding: 3px 0;
  border-bottom: 1px solid rgba(21,93,48,0.08);
  line-height: 1.4;
}
.advisory-body li:last-child { border-bottom: none; }

/* ===== EXECUTIVE BOARD ===== */
.exec-section {
  background: var(--white);
  border-radius: 16px;
  padding: 24px;
  border: 2px solid var(--emerald-light);
  box-shadow: 0 4px 20px rgba(10,61,31,0.1);
  margin: 0;
}

.ketua-umum-box {
  text-align: center;
  margin-bottom: 20px;
}
.ketua-umum-inner {
  display: inline-block;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--emerald-dark);
  padding: 14px 40px;
  border-radius: 14px;
  box-shadow: 0 5px 20px rgba(201,160,55,0.4);
  min-width: 280px;
}
.ketua-umum-inner .pos-label {
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  font-size: 0.85em;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: block;
}
.ketua-umum-inner .pos-name {
  font-size: 0.88em;
  font-weight: 700;
  margin-top: 3px;
  display: block;
}

/* Wakil Ketua */
.wakil-section-label {
  text-align: center;
  font-size: 0.7em;
  font-weight: 700;
  color: var(--emerald);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
  margin-top: 4px;
}

.wakil-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}
.wakil-box {
  background: var(--cream);
  border: 2px solid var(--emerald-light);
  border-radius: 10px;
  padding: 8px 12px;
  text-align: center;
  min-width: 120px;
  flex: 1;
  max-width: 155px;
}
.wakil-box .wpos {
  display: block;
  font-size: 0.65em;
  font-weight: 800;
  color: var(--emerald);
  background: rgba(30,122,64,0.1);
  padding: 2px 6px;
  border-radius: 6px;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.wakil-box .wname {
  font-size: 0.72em;
  color: var(--text-mid);
  line-height: 1.3;
  font-weight: 600;
}

/* Sekretaris & Bendahara */
.sekben-row {
  display: flex;
  gap: 16px;
  justify-content: center;
}
.sekben-card {
  flex: 1;
  max-width: 420px;
  border: 2px solid var(--emerald-dark);
  border-radius: 12px;
  overflow: hidden;
}
.sekben-head {
  background: var(--emerald-dark);
  color: var(--gold-light);
  padding: 8px 16px;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 0.8em;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.sekben-body { padding: 8px 14px; }
.sekben-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 5px 0;
  border-bottom: 1px solid rgba(21,93,48,0.1);
  gap: 8px;
}
.sekben-item:last-child { border-bottom: none; }
.sekben-item .si-pos {
  font-size: 0.72em;
  color: var(--text-light);
  font-style: italic;
  flex-shrink: 0;
}
.sekben-item .si-name {
  font-size: 0.74em;
  color: var(--emerald-dark);
  font-weight: 700;
  text-align: right;
}

/* ===== BIDANG GRID ===== */
.bidang-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.bidang-card {
  background: var(--white);
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid var(--emerald-light);
  box-shadow: 0 3px 14px rgba(10,61,31,0.08);
  transition: box-shadow 0.2s;
}
.bidang-card:hover { box-shadow: 0 5px 22px rgba(10,61,31,0.15); }

.bidang-head {
  background: linear-gradient(135deg, var(--emerald-mid), var(--emerald-dark));
  color: var(--white);
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: background 0.2s;
}
.bidang-head:hover { background: linear-gradient(135deg, var(--emerald-dark), #051f10); }
.bidang-num {
  background: var(--gold);
  color: var(--emerald-dark);
  font-weight: 800;
  font-size: 0.75em;
  padding: 2px 8px;
  border-radius: 20px;
  margin-right: 8px;
  flex-shrink: 0;
}
.bidang-title-text {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 0.82em;
  flex: 1;
}
.bidang-toggle {
  font-size: 0.8em;
  opacity: 0.8;
  transition: transform 0.3s;
  flex-shrink: 0;
}

.bidang-subhead {
  background: var(--cream-dark);
  padding: 8px 16px;
  border-bottom: 1px solid rgba(201,160,55,0.3);
}
.bidang-pimpinan {
  font-size: 0.72em;
  color: var(--emerald-dark);
}
.bidang-pimpinan strong { font-weight: 700; }
.bidang-pimpinan .pim-sep { margin: 0 6px; color: var(--gold-dark); }

.bidang-content { padding: 12px 14px; }

/* Divisi */
.divisi-card {
  margin-bottom: 8px;
  border: 1px solid rgba(21,93,48,0.2);
  border-radius: 8px;
  overflow: hidden;
}
.divisi-card:last-child { margin-bottom: 0; }
.divisi-head {
  background: rgba(21,93,48,0.06);
  padding: 7px 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: background 0.2s;
}
.divisi-head:hover { background: rgba(21,93,48,0.12); }
.divisi-label {
  font-size: 0.73em;
  font-weight: 700;
  color: var(--emerald);
}
.divisi-toggle {
  font-size: 0.68em;
  color: var(--emerald-mid);
  transition: transform 0.3s;
}
.divisi-body {
  padding: 8px 12px;
  background: var(--white);
}
.div-koordinator {
  font-size: 0.72em;
  margin-bottom: 5px;
  color: var(--text-mid);
}
.div-koordinator span {
  font-weight: 700;
  color: var(--emerald-dark);
}
.div-anggota-title {
  font-size: 0.69em;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}
.div-anggota-list {
  list-style: none;
  padding: 0;
}
.div-anggota-list li {
  font-size: 0.7em;
  color: var(--text-mid);
  padding: 2px 0 2px 12px;
  position: relative;
  line-height: 1.3;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.div-anggota-list li:last-child { border-bottom: none; }
.div-anggota-list li::before {
  content: '•';
  position: absolute;
  left: 2px;
  color: var(--gold-dark);
  font-size: 0.9em;
}

/* Collapsed states */
.collapsed-content { display: none; }

/* Footer */
.org-footer {
  text-align: center;
  margin-top: 40px;
  font-size: 0.72em;
  color: var(--text-light);
}

/* Responsive */
@media (max-width: 768px) {
  .advisory-row { flex-direction: column; }
  .bidang-grid { grid-template-columns: 1fr; }
  .sekben-row { flex-direction: column; align-items: center; }
  .wakil-row { gap: 6px; }
  .wakil-box { max-width: 140px; min-width: 100px; }
  .org-header { padding: 28px 16px; }
  .header-org { font-size: 1.7em; }
}

/* ===== GALERI MEDIA STYLES ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  padding: 30px 0;
}
.gallery-item {
  background: var(--white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  transition: all 0.4s ease;
  position: relative;
  cursor: pointer;
}
.gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(10,61,31,0.2);
}
.gallery-img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}
.gallery-item:hover .gallery-img {
  transform: scale(1.08);
}
.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(10,61,31,0.95), rgba(10,61,31,0.4), transparent);
  color: var(--white);
  padding: 30px 20px 15px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.95em;
  font-weight: 700;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}
.gallery-item:hover .gallery-caption {
  transform: translateY(0);
}


/* ===== COMMON FOOTER ===== */
.footer {
  text-align: center;
  padding: 40px 20px;
  margin-top: 60px;
  border-top: 2px solid rgba(201,160,55,0.3);
  font-size: 0.95em;
  color: var(--emerald-dark);
  font-weight: 700;
  letter-spacing: 0.5px;
  font-family: 'Nunito', sans-serif;
}
