/* =========================================
   ROOT COLOR
========================================= */
:root{
  --bg:#F5F7F8;
  --card:#ffffff;
  --accent:#0A9E8C;
  --accent-soft:#16C8B2;
  --text:#11443F;
  --muted:#6c8a86;

  --c1:#0FB8A4;
  --c2:#13C7B7;
  --c3:#F4A340;
  --c4:#8F7EF2;
}

*{
  box-sizing:border-box;
  font-family:'Poppins', sans-serif;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

/* ===========================
   GALERI
=========================== */
.gallery {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.gallery h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

.subtext {
    color: var(--muted);
    margin-bottom: 40px;
}

/* --- GRID YANG BENAR --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    justify-content: center;
    align-items: start;
    justify-items: center;
}

/* CARD GALERI */
.gallery-item {
    background: var(--card);
    padding: 12px;
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: 0.2s;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
}

.gallery-item:hover {
    transform: translateY(-4px);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
}

.gallery-caption {
    margin-top: 12px;
    padding: 8px 12px;
    font-size: 15px;
    font-weight: 600;
    background: #0A9E8C;
    color: #ffffff;
    border-radius: 10px;
    display: inline-block;
}

/* =========================================
   NAVBAR GLOBAL
========================================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: white;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  height: 42px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo img {
  height: 42px;
}

.logo-text {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--accent);
}

/* NAV ITEMS */
nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links li {
  list-style: none;
}

.nav-links li a {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}

.nav-btn {
  padding: 8px 16px;
  background: var(--accent);
  color: white !important;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}

/* HAMBURGER */
.menu-toggle {
  display: none;
  font-size: 30px;
  cursor: pointer;
  color: var(--accent);
}

/* Logo tidak gepeng */
.logo img,
.nav-logo img {
    height: 52px;
    width: auto;
    object-fit: contain;
}

/* =========================================
   MOBILE NAVBAR
========================================= */
@media(max-width: 780px){
  .nav-container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    width: 100%;
    row-gap: 14px;
    align-items: center;
  }

  .nav-logo {
    grid-column: 1 / 2;
    grid-row: 1;
  }

  .nav-btn {
    grid-column: 3 / 4;
    grid-row: 1;
    display: none;
  }

  .nav-links {
    grid-column: 1 / 4;
    grid-row: 2;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  nav.active {
    flex-direction: column;
    gap: 16px;
    margin-top: 14px;
  }

  nav.active .nav-links {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: white;
    padding: 20px 20px;
    border-radius: 12px;
    align-items: flex-start;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links li a {
    text-align: left;
    display: block;
    padding: 6px 0;
  }

  nav.active .nav-btn {
    display: inline-block;
    margin-top: 0;
    align-self: flex-start;
  }
}

/* Animasi Dropdown */
@keyframes dropdown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================================
   CARD / KONTEN LAIN
========================================= */
.card{
  max-width:900px;
  margin:40px auto;
  padding:24px 20px;
  background:var(--card);
  border-radius:24px;
  box-shadow:0 8px 32px rgba(0,0,0,0.08);
  position:relative;
  overflow:hidden;
}

.card::before{
  content:"";
  position:absolute;
  top:-40px;
  right:-40px;
  width:160px;
  height:160px;
  background:var(--accent);
  opacity:0.05;
  border-radius:50%;
  filter:blur(10px);
}

h1{
  font-size:22px;
  margin:0;
  font-weight:600;
  color:var(--accent);
  text-align:center;
}

p.lead{
  color:var(--muted);
  margin:4px 0 20px;
  text-align:center;
  font-size:14px;
}

/* =========================================
   CHART
========================================= */
.chart{
  display:flex;
  gap:24px;
  align-items:flex-start;
  flex-wrap:wrap;
  width:100%;
}

.legend{
  width:100%;
  padding:16px;
  border-radius:16px;
  background:#F2FBF9;
  border:1px solid #D8F1EC;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  justify-items:center;
  align-items:center;
  text-align:center;
}

.legend-item{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
}

.swatch{
  width:16px;
  height:16px;
  border-radius:4px;
}

.lbl{
  font-size:14px;
  font-weight:500;
  line-height:1.3;
}

.sub{
  font-size:12px;
  color:var(--muted);
  margin-top:2px;
}

.bars{
  flex:1;
  min-width:100%;
}

.bar-row{
  margin-bottom:20px;
}

.bar-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:6px;
  gap:6px;
}

.bar-title{
  font-weight:500;
  font-size:14px;
  flex:1;
}

.bar-percent{
  font-size:13px;
  color:var(--muted);
  white-space:nowrap;
}

.bar{
  height:28px;
  background:#ECF7F5;
  border-radius:10px;
  position:relative;
  overflow:hidden;
}

.bar > i{
  position:absolute;
  left:0; top:0; bottom:0;
  border-radius:10px;
  display:block;
  transition:width .6s cubic-bezier(.2,.9,.25,1);
}

.w-41{ width:41.67%; }
.w-33{ width:33.33%; }
.w-17{ width:16.67%; }
.w-8 { width:8.33%; }

.t1{ background:var(--c1); }
.t2{ background:var(--c2); }
.t3{ background:var(--c3); }
.t4{ background:var(--c4); }

.bar:hover .tooltip{
  opacity:1;
  transform:translateY(-8px);
}

.tooltip{
  position:absolute;
  right:8px;
  top:-34px;
  padding:6px 10px;
  border-radius:6px;
  font-size:12px;
  background:var(--accent);
  color:white;
  opacity:0;
  transition:all .18s;
  white-space:nowrap;
}

@media(max-width:640px){
  .card{ padding:20px 14px; }
  .chart{ gap:20px; }
  .legend{
    grid-template-columns:1fr;
    gap:12px;
  }
  .bar-percent{ font-size:12px; }
}

.meta{
  margin-top:10px;
  color:var(--muted);
  font-size:12px;
  text-align:center;
}

/* -----------------------------------
   FOOTER
----------------------------------- */
footer {
    background: var(--primary);
    color: var(--white);
    padding: 60px 0 20px;
    margin-top: 50px;
}

.footer-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
}

.footer-logo {
    width: 70px;
    margin-bottom: 1rem;
    background-color: white;
    padding: 2px;
    border-radius: 50%;
}

.footer-links li a {
    color: var(--white);
    opacity: .8;
}
.footer-links li a:hover {
    opacity: 1;
}

.link-media {
    color: inherit;
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    margin-top: 1.5rem;
    opacity: .8;
    font-size: .9rem;
}

/* Penyesuaian agar footer-grid memiliki 4 kolom saat desktop */
.footer-grid {
    display: grid;
    gap: 2rem;
    /* Ubah dari minmax(200px, 1fr) ke 4 kolom langsung agar terlihat rapi */
    grid-template-columns: repeat(4, 1fr); 
}

/* Menyesuaikan grid untuk mobile/tablet */
@media(max-width: 768px) {
    .footer-grid {
        /* Kembali ke auto-fit agar bisa menyesuaikan 2 kolom, 1 kolom, atau lebih */
        grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
    }
}
