/* ============================================================
   PPID - Main Stylesheet
   ============================================================ */

/* ── Variables ──────────────────────────────────────────────── */
:root {
  --primary:      #1a3a6e;
  --primary-dark: #0f2348;
  --primary-light:#2563b8;
  --accent:       #f59e0b;
  --accent-dark:  #d97706;
  --success:      #16a34a;
  --danger:       #dc2626;
  --text:         #1e293b;
  --text-muted:   #64748b;
  --border:       #e2e8f0;
  --bg-light:     #f8fafc;
  --bg-section:   #f1f5f9;
  --white:        #ffffff;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:    0 4px 16px rgba(0,0,0,.08);
  --shadow-lg:    0 10px 40px rgba(0,0,0,.12);
  --radius:       12px;
  --radius-sm:    8px;
  --radius-lg:    20px;
  --transition:   .25s ease;
  --font-body:    'Inter', sans-serif;
  --font-heading: 'Plus Jakarta Sans', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
  line-height: 1.7;
}

h1,h2,h3,h4,h5,h6 { font-family: var(--font-heading); font-weight: 700; color: var(--primary-dark); }

a { color: var(--primary-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; }

/* ── Topbar ─────────────────────────────────────────────────── */
.topbar {
  background: var(--primary-dark);
  color: rgba(255,255,255,.8);
  font-size: .78rem;
  padding: 6px 0;
}
.topbar span { margin-right: 8px; }
.topbar i { color: var(--accent); }
.topbar-social {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,.1); color: #fff;
  margin-left: 4px; font-size: .7rem;
  transition: background var(--transition);
}
.topbar-social:hover { background: var(--accent); color: #fff; }

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar-ppid {
  background: var(--white);
  box-shadow: var(--shadow-md);
  padding: 0;
}
.navbar-ppid .navbar-brand { padding: 10px 0; }
.brand-icon {
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.3rem;
}
.brand-logo { border-radius: var(--radius-sm); object-fit: contain; }
.brand-title { font-family: var(--font-heading); font-weight: 800; font-size: 1.05rem; color: var(--primary-dark); display: block; line-height: 1.2; }
.brand-sub   { font-size: .72rem; color: var(--text-muted); font-weight: 500; }

.navbar-ppid .nav-link {
  font-weight: 500; font-size: .9rem; color: var(--text);
  padding: 1.1rem .75rem; position: relative;
  transition: color var(--transition);
}
.navbar-ppid .nav-link::after {
  content: ''; position: absolute; bottom: 0; left: .75rem; right: .75rem;
  height: 3px; background: var(--accent); border-radius: 3px 3px 0 0;
  transform: scaleX(0); transition: transform var(--transition);
}
.navbar-ppid .nav-link:hover,
.navbar-ppid .nav-link.active { color: var(--primary); }
.navbar-ppid .nav-link:hover::after,
.navbar-ppid .nav-link.active::after { transform: scaleX(1); }

.navbar-ppid .dropdown-menu {
  border: none; box-shadow: var(--shadow-lg);
  border-radius: var(--radius); padding: .5rem;
  margin-top: .5rem;
}
.navbar-ppid .dropdown-item {
  border-radius: var(--radius-sm); padding: .5rem 1rem;
  font-size: .875rem; font-weight: 500;
  transition: background var(--transition), color var(--transition);
}
.navbar-ppid .dropdown-item:hover { background: var(--bg-light); color: var(--primary); }

/* ── Hero / Banner ─────────────────────────────────────────── */
.hero-section {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  padding: 90px 0 80px;
  position: relative; overflow: hidden;
  color: #fff;
}
.hero-section::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-section h1 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 800; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.2); }
.hero-section p  { font-size: 1.05rem; color: rgba(255,255,255,.85); }
.hero-badge { display: inline-block; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3); color: #fff; padding: 4px 14px; border-radius: 50px; font-size: .78rem; font-weight: 600; letter-spacing: .5px; margin-bottom: 1rem; }

/* ── Page Hero (inner pages) ───────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 60px 0 50px; color: #fff;
}
.page-hero h1 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.page-hero .breadcrumb-item a { color: rgba(255,255,255,.75); }
.page-hero .breadcrumb-item.active { color: var(--accent); }
.page-hero .breadcrumb-item+.breadcrumb-item::before { color: rgba(255,255,255,.5); }

/* ── Swiper Slider ─────────────────────────────────────────── */
.hero-swiper { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.hero-swiper .swiper-slide img { width: 100%; height: 400px; object-fit: cover; }
.swiper-pagination-bullet-active { background: var(--accent) !important; }
.swiper-button-prev, .swiper-button-next { color: var(--white) !important; }

/* ── Section Titles ────────────────────────────────────────── */
.section-header { margin-bottom: 3rem; }
.section-header .section-label {
  display: inline-block; background: rgba(37,99,184,.1);
  color: var(--primary-light); padding: 4px 16px; border-radius: 50px;
  font-size: .78rem; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; margin-bottom: .75rem;
}
.section-header h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); color: var(--primary-dark); margin-bottom: .5rem; }
.section-header p  { color: var(--text-muted); max-width: 600px; margin: 0 auto; }
.section-divider { width: 50px; height: 4px; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 4px; margin: .75rem auto 0; }

/* ── Quick Links ───────────────────────────────────────────── */
.quicklink-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 2rem 1.5rem;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  color: var(--text); height: 100%;
}
.quicklink-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); color: var(--primary); }
.quicklink-icon {
  width: 64px; height: 64px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; margin-bottom: 1rem;
}
.quicklink-card span { font-weight: 600; font-size: .9rem; }

/* ── Cards ─────────────────────────────────────────────────── */
.card-ppid {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  height: 100%;
}
.card-ppid:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.card-ppid .card-img-wrap { overflow: hidden; height: 200px; }
.card-ppid .card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card-ppid:hover .card-img-wrap img { transform: scale(1.06); }
.card-ppid .card-body { padding: 1.5rem; }
.card-ppid .card-badge {
  display: inline-block; padding: 3px 12px; border-radius: 50px;
  font-size: .7rem; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; margin-bottom: .75rem;
}
.card-ppid .card-title { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; line-height: 1.4; color: var(--primary-dark); }
.card-ppid .card-title a { color: inherit; }
.card-ppid .card-title a:hover { color: var(--primary-light); }
.card-ppid .card-meta { font-size: .78rem; color: var(--text-muted); }
.card-ppid .card-meta i { margin-right: 3px; }

/* Galeri card */
.galeri-card { position: relative; border-radius: var(--radius); overflow: hidden; cursor: pointer; }
.galeri-card img { width: 100%; height: 220px; object-fit: cover; transition: transform .4s ease; display: block; }
.galeri-card:hover img { transform: scale(1.08); }
.galeri-card .galeri-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,35,72,.85) 0%, transparent 60%);
  opacity: 0; transition: opacity var(--transition);
  display: flex; align-items: flex-end; padding: 1.25rem;
}
.galeri-card:hover .galeri-overlay { opacity: 1; }
.galeri-card .galeri-overlay .galeri-info { color: #fff; }
.galeri-card .galeri-overlay h6 { font-size: .9rem; font-weight: 600; margin-bottom: .25rem; }
.galeri-card .galeri-overlay small { opacity: .8; font-size: .75rem; }
.galeri-icon-overlay {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%) scale(.5);
  opacity: 0; transition: all var(--transition);
  background: rgba(255,255,255,.9); color: var(--primary);
  width: 50px; height: 50px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.galeri-card:hover .galeri-icon-overlay { opacity: 1; transform: translate(-50%,-50%) scale(1); }

/* Dokumen card */
.dokumen-card {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.25rem; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.dokumen-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary-light); }
.dokumen-icon {
  width: 52px; height: 52px; min-width: 52px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.dokumen-card h6 { font-size: .9rem; font-weight: 600; margin-bottom: .25rem; color: var(--primary-dark); }
.dokumen-card small { color: var(--text-muted); font-size: .75rem; }

/* ── Stat Cards ────────────────────────────────────────────── */
.stat-card {
  padding: 2rem; border-radius: var(--radius);
  text-align: center; color: #fff; position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; top: -30px; right: -30px;
  width: 100px; height: 100px; border-radius: 50%;
  background: rgba(255,255,255,.1);
}
.stat-card .stat-num { font-size: 2.5rem; font-weight: 800; display: block; }
.stat-card .stat-label { font-size: .85rem; opacity: .9; }

/* ── Forms ─────────────────────────────────────────────────── */
.form-ppid .form-label { font-weight: 600; font-size: .875rem; color: var(--text); margin-bottom: .4rem; }
.form-ppid .form-control,
.form-ppid .form-select {
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: .65rem 1rem; font-size: .9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-ppid .form-control:focus,
.form-ppid .form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(37,99,184,.15);
  outline: none;
}
.form-ppid .required::after { content: ' *'; color: var(--danger); }
.form-section-title {
  font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--primary); padding-bottom: .5rem;
  border-bottom: 2px solid var(--primary-light); margin-bottom: 1.25rem;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn-ppid-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; border: none; border-radius: var(--radius-sm);
  padding: .65rem 1.75rem; font-weight: 600; font-size: .9rem;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 12px rgba(26,58,110,.3);
}
.btn-ppid-primary:hover { opacity: .9; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(26,58,110,.4); color: #fff; }

.btn-ppid-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff; border: none; border-radius: var(--radius-sm);
  padding: .65rem 1.75rem; font-weight: 600; font-size: .9rem;
  transition: opacity var(--transition), transform var(--transition);
  box-shadow: 0 4px 12px rgba(245,158,11,.3);
}
.btn-ppid-accent:hover { opacity: .9; transform: translateY(-2px); color: #fff; }

/* ── Status badges ─────────────────────────────────────────── */
.badge-baru     { background: #dbeafe; color: #1d4ed8; }
.badge-diproses { background: #fef3c7; color: #b45309; }
.badge-selesai  { background: #dcfce7; color: #15803d; }
.badge-ditolak  { background: #fee2e2; color: #b91c1c; }

/* ── Ticker pengumuman ─────────────────────────────────────── */
.ticker-wrap {
  background: var(--accent); color: #fff;
  padding: 8px 0; overflow: hidden;
}
.ticker-label {
  background: var(--primary-dark); color: #fff;
  padding: 4px 16px; font-size: .78rem; font-weight: 700;
  white-space: nowrap; margin-right: 16px; border-radius: 4px;
}
.ticker-content { display: flex; gap: 60px; animation: ticker 30s linear infinite; white-space: nowrap; }
.ticker-content a { color: #fff; font-size: .83rem; }
.ticker-content a:hover { text-decoration: underline; }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.ticker-wrap:hover .ticker-content { animation-play-state: paused; }

/* ── Info cards (homepage) ─────────────────────────────────── */
.info-highlight {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-lg); padding: 3rem; color: #fff; position: relative; overflow: hidden;
}
.info-highlight::after {
  content: ''; position: absolute; bottom: -40px; right: -40px;
  width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255,255,255,.06);
}

/* ── Tabs ──────────────────────────────────────────────────── */
.nav-tabs-ppid { border-bottom: 2px solid var(--border); gap: .25rem; }
.nav-tabs-ppid .nav-link {
  border: none; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-weight: 600; font-size: .875rem; color: var(--text-muted);
  padding: .65rem 1.25rem; transition: color var(--transition), background var(--transition);
}
.nav-tabs-ppid .nav-link:hover { color: var(--primary); background: var(--bg-light); }
.nav-tabs-ppid .nav-link.active { color: var(--primary); background: var(--white); border-bottom: 2px solid var(--primary); margin-bottom: -2px; }

/* ── Footer ────────────────────────────────────────────────── */
.site-footer { background: var(--primary-dark); }
.footer-top { padding: 4rem 0 2.5rem; }
.footer-heading { color: #fff; font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1.25rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .6rem; }
.footer-links a { color: rgba(255,255,255,.65); font-size: .875rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--accent); padding-left: 4px; }
.footer-contact { list-style: none; padding: 0; margin: 0; }
.footer-contact li { display: flex; gap: .75rem; color: rgba(255,255,255,.65); font-size: .875rem; margin-bottom: .75rem; }
.footer-contact i { color: var(--accent); margin-top: 3px; min-width: 14px; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.1); color: #fff;
  margin-right: 6px; font-size: .85rem;
  transition: background var(--transition);
}
.footer-social a:hover { background: var(--accent); color: #fff; }
.footer-bottom { background: rgba(0,0,0,.3); padding: 1rem 0; border-top: 1px solid rgba(255,255,255,.05); }

/* ── Back to top ───────────────────────────────────────────── */
.btn-back-to-top {
  position: fixed; bottom: 30px; right: 30px; z-index: 999;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); color: #fff; border: none;
  box-shadow: var(--shadow-md); opacity: 0; visibility: hidden;
  transition: all var(--transition);
}
.btn-back-to-top.show { opacity: 1; visibility: visible; }
.btn-back-to-top:hover { background: var(--accent); transform: translateY(-3px); }

/* ── Utilities ─────────────────────────────────────────────── */
.text-primary-ppid { color: var(--primary) !important; }
.text-accent       { color: var(--accent)  !important; }
.bg-primary-ppid   { background: var(--primary) !important; }
.bg-section        { background: var(--bg-section); }
.rounded-ppid      { border-radius: var(--radius) !important; }
.shadow-ppid       { box-shadow: var(--shadow-md) !important; }

.divider { height: 1px; background: var(--border); margin: 2rem 0; }

/* ── Timeline ──────────────────────────────────────────────── */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before { content: ''; position: absolute; left: .5rem; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding-bottom: 2rem; }
.timeline-item::before {
  content: ''; position: absolute; left: -1.6rem; top: .35rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--primary); border: 2px solid var(--white);
  box-shadow: 0 0 0 3px rgba(37,99,184,.2);
}
.timeline-date { font-size: .78rem; color: var(--text-muted); font-weight: 600; margin-bottom: .3rem; }
.timeline-title { font-weight: 700; margin-bottom: .5rem; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-section { padding: 70px 0 60px; }
  .hero-swiper .swiper-slide img { height: 240px; }
  .stat-card .stat-num { font-size: 2rem; }
  .navbar-ppid .nav-link::after { display: none; }
  .topbar .col-md-7 { display: none !important; }
}

@media (max-width: 576px) {
  .page-hero { padding: 40px 0 30px; }
  .section-header { margin-bottom: 2rem; }
}

/* ── Lightbox ──────────────────────────────────────────────── */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.92); display: none;
  align-items: center; justify-content: center;
}
.lightbox-overlay.active { display: flex; }
.lightbox-img { max-height: 85vh; max-width: 90vw; border-radius: var(--radius); object-fit: contain; }
.lightbox-close { position: absolute; top: 20px; right: 25px; color: #fff; font-size: 2rem; cursor: pointer; z-index: 10000; }
.lightbox-prev, .lightbox-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.15); color: #fff; border: none;
  width: 48px; height: 48px; border-radius: 50%; font-size: 1.2rem;
  cursor: pointer; transition: background var(--transition);
}
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,.3); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* ── Loading spinner ───────────────────────────────────────── */
.spinner-ppid {
  display: inline-block; width: 20px; height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Alert custom ──────────────────────────────────────────── */
.alert { border-radius: var(--radius-sm); border: none; }
.alert-success { background: #dcfce7; color: #15803d; }
.alert-danger   { background: #fee2e2; color: #b91c1c; }
.alert-warning  { background: #fef3c7; color: #b45309; }
.alert-info     { background: #dbeafe; color: #1d4ed8; }

/* ── Table ─────────────────────────────────────────────────── */
.table-ppid th { background: var(--primary-dark); color: #fff; font-size: .82rem; font-weight: 600; padding: .85rem 1rem; }
.table-ppid td { padding: .85rem 1rem; font-size: .875rem; vertical-align: middle; }
.table-ppid tbody tr:hover { background: var(--bg-light); }

/* ── Extra utilities ───────────────────────────────────────── */
.letter-spacing-1 { letter-spacing: 1px; }
.fw-500 { font-weight: 500 !important; }
.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }
.fw-800 { font-weight: 800 !important; }
.lh-sm  { line-height: 1.3 !important; }
