/* ═══════════════════════════════════════════════
   NUSANTARA — Tema Modern SID Belitung
   Bootstrap 5.3 + custom overrides
   ═══════════════════════════════════════════════ */

:root {
  --ns-primary: #0d9488;
  --ns-primary-dark: #0f766e;
  --ns-primary-light: #14b8a6;
  --ns-primary-50: #f0fdfa;
  --ns-accent: #f59e0b;
  --ns-accent-dark: #d97706;
  --ns-text: #1e293b;
  --ns-text-muted: #64748b;
  --ns-bg: #f8fafc;
  --ns-white: #ffffff;
  --ns-footer: #0f172a;
  --ns-border: #e2e8f0;
  --ns-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --ns-shadow-md: 0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -2px rgba(0,0,0,.04);
  --ns-shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.04);
  --ns-radius: .75rem;
  --ns-radius-sm: .5rem;
}

/* ── Reset & base ── */
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ns-text);
  background: var(--ns-bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ns-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--ns-primary-dark); }
img { max-width: 100%; height: auto; }

/* ── Navbar ── */
.ns-navbar {
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ns-border);
  transition: box-shadow .3s;
  z-index: 1030;
}
.ns-navbar.scrolled { box-shadow: var(--ns-shadow-md); }
.ns-navbar .navbar-brand { display: flex; align-items: center; gap: .75rem; }
.ns-navbar .navbar-brand img { height: 48px; width: auto; }
.ns-navbar .brand-text h1 { font-size: 1rem; font-weight: 700; margin: 0; color: var(--ns-text); line-height: 1.2; }
.ns-navbar .brand-text small { font-size: .75rem; color: var(--ns-text-muted); font-weight: 400; }
.ns-navbar .nav-link {
  color: var(--ns-text) !important; font-weight: 500; font-size: .9rem;
  padding: .5rem .875rem !important; border-radius: var(--ns-radius-sm);
  transition: background .2s, color .2s;
}
.ns-navbar .nav-link:hover,
.ns-navbar .nav-link:focus { background: var(--ns-primary-50); color: var(--ns-primary) !important; }
.ns-navbar .dropdown-menu {
  border: 1px solid var(--ns-border); border-radius: var(--ns-radius-sm);
  box-shadow: var(--ns-shadow-lg); padding: .5rem; min-width: 12rem;
}
.ns-navbar .dropdown-item { border-radius: .375rem; font-size: .875rem; padding: .5rem .75rem; }
.ns-navbar .dropdown-item:hover { background: var(--ns-primary-50); color: var(--ns-primary); }

/* ── Hero / Slider ── */
.ns-hero { position: relative; min-height: 65vh; overflow: hidden; }
.ns-hero .carousel-item {
  min-height: 65vh; background-size: cover; background-position: center;
}
.ns-hero .hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(15,23,42,.7) 0%, rgba(13,148,136,.5) 100%);
}
.ns-hero .hero-content { position: relative; z-index: 2; padding: 6rem 0 4rem; }
.ns-hero h1 { font-size: clamp(1.75rem, 4vw, 3rem); font-weight: 800; color: #fff; line-height: 1.2; }
.ns-hero p { font-size: clamp(1rem, 1.5vw, 1.25rem); color: rgba(255,255,255,.85); max-width: 600px; }
.ns-hero .carousel-indicators [data-bs-target] {
  width: 2rem; height: 4px; border-radius: 2px; border: 0;
  background: rgba(255,255,255,.4); transition: all .3s;
}
.ns-hero .carousel-indicators .active { background: var(--ns-accent); width: 3rem; }

/* ── Section titles ── */
.ns-section { padding: 4rem 0; }
.ns-section-light { background: var(--ns-bg); }
.ns-section-white { background: var(--ns-white); }
.ns-section-title { margin-bottom: 2.5rem; }
.ns-section-title h2 {
  font-size: 1.75rem; font-weight: 700; color: var(--ns-text);
  position: relative; display: inline-block;
}
.ns-section-title h2::after {
  content: ''; display: block; width: 3rem; height: 3px;
  background: var(--ns-accent); border-radius: 2px; margin-top: .5rem;
}
.ns-section-title.text-center h2::after { margin-left: auto; margin-right: auto; }
.ns-section-title p { color: var(--ns-text-muted); font-size: 1rem; margin-top: .5rem; }

/* ── Tagline / welcome ── */
.ns-tagline {
  background: linear-gradient(135deg, var(--ns-primary) 0%, var(--ns-primary-dark) 100%);
  color: #fff; padding: 2.5rem 0; text-align: center;
}
.ns-tagline h3 { font-weight: 700; font-size: 1.35rem; margin-bottom: .5rem; }
.ns-tagline p { opacity: .85; font-size: 1rem; margin: 0; }

/* ── Cards ── */
.ns-card {
  background: var(--ns-white); border: 1px solid var(--ns-border);
  border-radius: var(--ns-radius); overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}
.ns-card:hover { transform: translateY(-4px); box-shadow: var(--ns-shadow-lg); }
.ns-card .card-img-wrap {
  position: relative; overflow: hidden; aspect-ratio: 16/10;
  background: #e2e8f0;
}
.ns-card .card-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s;
}
.ns-card:hover .card-img-wrap img { transform: scale(1.05); }
.ns-card .card-body { padding: 1.25rem; }
.ns-card .card-body h5 { font-size: 1rem; font-weight: 600; line-height: 1.4; margin-bottom: .5rem; }
.ns-card .card-body h5 a { color: var(--ns-text); }
.ns-card .card-body h5 a:hover { color: var(--ns-primary); }
.ns-card .card-meta { font-size: .8rem; color: var(--ns-text-muted); display: flex; gap: 1rem; flex-wrap: wrap; }
.ns-card .card-meta i { margin-right: .25rem; }
.ns-card .card-excerpt { font-size: .875rem; color: var(--ns-text-muted); margin-top: .5rem; line-height: 1.6; }
.ns-card .card-category {
  display: inline-block; font-size: .7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; color: var(--ns-primary); background: var(--ns-primary-50);
  padding: .25rem .625rem; border-radius: 999px; margin-bottom: .5rem;
}

/* ── Gallery ── */
.ns-gallery-item {
  position: relative; border-radius: var(--ns-radius); overflow: hidden;
  aspect-ratio: 4/3; background: #e2e8f0;
}
.ns-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.ns-gallery-item:hover img { transform: scale(1.08); }
.ns-gallery-item .gallery-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,23,42,.7) 0%, transparent 60%);
  opacity: 0; transition: opacity .3s;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.25rem;
}
.ns-gallery-item:hover .gallery-overlay { opacity: 1; }
.ns-gallery-item .gallery-overlay h6 { color: #fff; font-weight: 600; margin: 0; font-size: .9rem; }
.ns-gallery-item .gallery-overlay small { color: rgba(255,255,255,.75); }

/* ── Sidebar ── */
.ns-sidebar { position: sticky; top: 5rem; }
.ns-sidebar .sidebar-card {
  background: var(--ns-white); border: 1px solid var(--ns-border);
  border-radius: var(--ns-radius); padding: 1.5rem; margin-bottom: 1.5rem;
}
.ns-sidebar .sidebar-card h5 {
  font-size: .9rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ns-text); margin-bottom: 1rem; padding-bottom: .75rem;
  border-bottom: 2px solid var(--ns-primary);
}
.ns-sidebar .sidebar-item {
  display: flex; gap: .75rem; padding: .625rem 0;
  border-bottom: 1px solid var(--ns-border);
}
.ns-sidebar .sidebar-item:last-child { border-bottom: none; }
.ns-sidebar .sidebar-item img { width: 4.5rem; height: 3.5rem; object-fit: cover; border-radius: .375rem; flex-shrink: 0; }
.ns-sidebar .sidebar-item h6 { font-size: .8rem; font-weight: 600; margin: 0; line-height: 1.4; }
.ns-sidebar .sidebar-item h6 a { color: var(--ns-text); }
.ns-sidebar .sidebar-item h6 a:hover { color: var(--ns-primary); }
.ns-sidebar .sidebar-item small { font-size: .7rem; color: var(--ns-text-muted); }

/* ── Organisasi / pimpinan ── */
.ns-org-card {
  text-align: center; padding: 1.5rem 1rem;
  background: var(--ns-white); border: 1px solid var(--ns-border);
  border-radius: var(--ns-radius); transition: transform .25s, box-shadow .25s;
}
.ns-org-card:hover { transform: translateY(-4px); box-shadow: var(--ns-shadow-lg); }
.ns-org-card img {
  width: 6rem; height: 6rem; object-fit: cover; border-radius: 50%;
  border: 3px solid var(--ns-primary-50); margin-bottom: .75rem;
}
.ns-org-card h6 { font-size: .875rem; font-weight: 600; margin-bottom: .125rem; }
.ns-org-card .position-title { font-size: .8rem; color: var(--ns-primary); font-weight: 500; margin-bottom: .25rem; }
.ns-org-card small { font-size: .7rem; color: var(--ns-text-muted); }

/* ── Breadcrumbs ── */
.ns-breadcrumb-section {
  background: linear-gradient(135deg, var(--ns-primary) 0%, var(--ns-primary-dark) 100%);
  padding: 3rem 0 2rem; color: #fff;
}
.ns-breadcrumb-section h2 { font-size: 1.5rem; font-weight: 700; color: #fff; margin-bottom: .5rem; }
.ns-breadcrumb-section .breadcrumb { background: transparent; padding: 0; margin: 0; }
.ns-breadcrumb-section .breadcrumb-item,
.ns-breadcrumb-section .breadcrumb-item a { color: rgba(255,255,255,.7); font-size: .85rem; }
.ns-breadcrumb-section .breadcrumb-item.active { color: #fff; }
.ns-breadcrumb-section .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.4); }

/* ── Footer ── */
.ns-footer {
  background: var(--ns-footer); color: rgba(255,255,255,.7); padding: 4rem 0 0;
}
.ns-footer h5 { color: #fff; font-size: 1rem; font-weight: 600; margin-bottom: 1.25rem; }
.ns-footer p, .ns-footer li { font-size: .875rem; line-height: 1.7; }
.ns-footer a { color: rgba(255,255,255,.7); transition: color .2s; }
.ns-footer a:hover { color: var(--ns-accent); }
.ns-footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding: 1.25rem 0;
  margin-top: 3rem; font-size: .8rem; color: rgba(255,255,255,.4);
}
.ns-footer .social-links { display: flex; gap: .75rem; }
.ns-footer .social-links a {
  width: 2.25rem; height: 2.25rem; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(255,255,255,.08); color: rgba(255,255,255,.6);
  transition: all .2s;
}
.ns-footer .social-links a:hover { background: var(--ns-primary); color: #fff; }

/* ── Info wilayah table ── */
.ns-info-table { font-size: .875rem; }
.ns-info-table th { font-weight: 600; color: var(--ns-text); white-space: nowrap; padding: .5rem .25rem; width: 40%; }
.ns-info-table td { color: var(--ns-text-muted); padding: .5rem .25rem; }
.ns-info-table tr { border-bottom: 1px solid var(--ns-border); }
.ns-info-table tr:last-child { border-bottom: none; }

/* ── Article content ── */
.isi-artikel { text-align: justify; text-justify: inter-word; overflow-wrap: break-word; line-height: 1.8; }
.isi-artikel img { max-width: 100%; height: auto; border-radius: var(--ns-radius-sm); margin: 1rem 0; }
.isi-artikel h1,.isi-artikel h2,.isi-artikel h3,
.isi-artikel h4,.isi-artikel h5,.isi-artikel h6 { text-align: left; }
.isi-artikel td,.isi-artikel th,.isi-artikel figcaption { text-align: left; }

/* ── Buttons ── */
.btn-ns-primary {
  background: var(--ns-primary); color: #fff; border: none;
  padding: .625rem 1.5rem; border-radius: var(--ns-radius-sm); font-weight: 600;
  font-size: .875rem; transition: all .2s;
}
.btn-ns-primary:hover { background: var(--ns-primary-dark); color: #fff; transform: translateY(-1px); }
.btn-ns-outline {
  background: transparent; color: var(--ns-primary); border: 2px solid var(--ns-primary);
  padding: .5rem 1.25rem; border-radius: var(--ns-radius-sm); font-weight: 600;
  font-size: .875rem; transition: all .2s;
}
.btn-ns-outline:hover { background: var(--ns-primary); color: #fff; }

/* ── Badge ── */
.ns-badge {
  display: inline-block; padding: .25rem .75rem; font-size: .7rem; font-weight: 600;
  border-radius: 999px; text-transform: uppercase; letter-spacing: .05em;
}
.ns-badge-primary { background: var(--ns-primary-50); color: var(--ns-primary); }
.ns-badge-accent { background: #fffbeb; color: var(--ns-accent-dark); }

/* ── Pagination ── */
.pagination .page-link {
  color: var(--ns-primary); border-radius: var(--ns-radius-sm) !important;
  margin: 0 .125rem; border-color: var(--ns-border);
}
.pagination .page-item.active .page-link { background: var(--ns-primary); border-color: var(--ns-primary); }

/* ── Map ── */
.ns-map iframe { width: 100%; height: 100%; min-height: 300px; border: 0; border-radius: var(--ns-radius); }

/* ── Back to top ── */
.ns-back-to-top {
  position: fixed; bottom: 2rem; right: 2rem; width: 2.75rem; height: 2.75rem;
  background: var(--ns-primary); color: #fff; border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--ns-shadow-md); opacity: 0; visibility: hidden;
  transition: all .3s; z-index: 1020; cursor: pointer;
}
.ns-back-to-top.show { opacity: 1; visibility: visible; }
.ns-back-to-top:hover { background: var(--ns-primary-dark); transform: translateY(-2px); }

/* ── 404 ── */
.ns-404 { text-align: center; padding: 5rem 1rem; }
.ns-404 h1 { font-size: 6rem; font-weight: 800; color: var(--ns-primary); }
.ns-404 h3 { font-weight: 600; margin-bottom: 1rem; }

/* ── Responsive ── */
@media (max-width: 991px) {
  .ns-hero { min-height: 50vh; }
  .ns-hero .carousel-item { min-height: 50vh; }
  .ns-hero h1 { font-size: 1.5rem; }
  .ns-section { padding: 3rem 0; }
}
@media (max-width: 575px) {
  .ns-hero { min-height: 40vh; }
  .ns-hero .carousel-item { min-height: 40vh; }
  .ns-hero .hero-content { padding: 4rem 0 3rem; }
  .ns-navbar .brand-text h1 { font-size: .85rem; }
  .ns-card .card-body { padding: 1rem; }
  .ns-section { padding: 2.5rem 0; }
}
