/* =========================
   DESIGN TOKENS (FORMAL MODERN)
========================= */
:root{
  --bg-main:#f8fafc;
  --bg-soft:#f1f5f9;

  --blue-main:#3f5fbf;     /* formal */
  --blue-soft:#e0e7ff;     /* soft background */

  --accent:#f87171;        /* BLUD soft */

  --text-main:#0f172a;
  --text-soft:#64748b;

  --white:#ffffff;
}

/* RESET */
*{margin:0;padding:0;box-sizing:border-box}

body{
  font-family:'Poppins',sans-serif;
  background:var(--bg-main);
  color:var(--text-main);
  line-height:1.7;
}

/* CONTAINER */
.container{
  width:90%;
  max-width:1200px;
  margin:auto;
}

/* =========================
   NAVBAR (FORMAL GLASS)
========================= */
.navbar{
  position:fixed;
  top:15px;
  left:50%;
  transform:translateX(-50%);
  width:90%;
  max-width:1200px;

  backdrop-filter:blur(14px);
  background:rgba(255,255,255,0.85);

  border-radius:14px;
  padding:12px 20px;

  box-shadow:0 8px 25px rgba(0,0,0,0.05);
  z-index:999;
  transition:0.3s;
}

.nav-flex{
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.logo-area{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:500;
}

.logo-area img{height:38px}

/* NAV */
.nav-links{
  display:flex;
  gap:10px;
  position:relative;
}

.nav-links a{
  padding:8px 14px;
  text-decoration:none;
  color:var(--text-soft);
  font-size:14px;
  transition:0.3s;
}

.nav-links a:hover{
  color:var(--blue-main);
}

/* indicator */
.nav-indicator{
  position:absolute;
  height:32px;
  background:rgba(63,95,191,0.1);
  border-radius:999px;
  transition:0.3s;

  pointer-events: none; /* 🔥 INI WAJIB */
  z-index: 0;
}

.nav-indicator{
  top:50%;
  transform:translateY(-50%);
}

.nav-links a{
  position:relative;
  z-index:1;
}

/* =========================
   HERO (FORMAL CLEAN)
========================= */
.hero-premium{
  padding:180px 0 120px;
  text-align:center;
  background:linear-gradient(
    to bottom,
    var(--blue-soft),
    transparent
  );
}

.hero-premium h1{
  font-size:42px;
  font-weight:600;
}

.gradient-text{
  color:var(--blue-main);
}

.hero-desc{
  margin-top:15px;
  color:var(--text-soft);
  font-size:16px;
}

/* BUTTON */
.btn{
  margin-top:25px;
  display:inline-block;
  padding:12px 26px;
  border-radius:999px;
  background:var(--blue-main);
  color:white;
  text-decoration:none;
  font-size:14px;
  transition:0.3s;
}

.btn:hover{
  background:#2f4f9f;
}

/* =========================
   SECTION
========================= */
.section{
  padding:90px 0;
}

.soft-bg{
  background:var(--bg-soft);
}

.center{text-align:center}

h2{
  font-size:28px;
  font-weight:600;
}

.text-large{
  margin-top:10px;
  color:var(--text-soft);
  max-width:600px;
  margin:auto;
}

/* =========================
   GRID
========================= */
.grid{
  margin-top:40px;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
  gap:20px;
}

/* =========================
   CARD (FORMAL)
========================= */
.card{
  padding:24px;
  border-radius:12px;
  background:white;
  border:1px solid #e2e8f0;
  transition:0.3s;
}

.card:hover{
  transform:translateY(-6px);
  box-shadow:0 15px 35px rgba(0,0,0,0.08);
}


/* =========================
   FOOTER
========================= */
.footer{
  padding:40px 0;
  text-align:center;
  color:var(--text-soft);
}

/* =========================
   ANIMATION
========================= */
.reveal{
  opacity:0;
  transform:translateY(20px);
  transition:0.8s ease;
}

.reveal.active{
  opacity:1;
  transform:translateY(0);
}

/* =========================
   RESPONSIVE
========================= */

/* TABLET */
@media (max-width: 768px){

  .hero-premium h1{
    font-size:28px;
  }

  .navbar{
    padding:10px 15px;
  }

  .nav-links{
    gap:5px;
  }

}

/* MOBILE */
@media (max-width: 480px){

  .container{
    width:92%;
  }

  .hero-premium{
    padding:150px 0 80px;
  }

  .hero-premium h1{
    font-size:24px;
  }

  .hero-desc{
    font-size:14px;
  }

  .grid{
    grid-template-columns:1fr;
  }

}

/* SEARCH BOX */
.search-box{
  width:100%;
  padding:12px;
  margin:20px 0;
  border-radius:10px;
  border:1px solid #e2e8f0;
  outline:none;
}

/* FILTER */
.filter{
  margin-bottom:20px;
}

.filter button{
  padding:8px 14px;
  border:none;
  background:#e2e8f0;
  border-radius:8px;
  margin-right:5px;
  cursor:pointer;
}

.filter button:hover{
  background:#cbd5f5;
}

/* ===== ARSIP TOP ===== */
.arsip-top{
  margin-top:30px;
  margin-bottom:20px;
}

.arsip-actions{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
}

/* FILTER ACTIVE */
.filter button.active{
  background:var(--blue-main);
  color:white;
}

/* ===== ARSIP CARD ===== */
.arsip-card{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.arsip-title{
  font-size:15px;
  font-weight:500;
  line-height:1.4;

  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.arsip-preview{
  width:100%;
  height:180px;
  border-radius:10px;
  overflow:hidden;
  background:#f1f5f9;
}

.arsip-preview img,
.arsip-preview iframe{
  width:100%;
  height:100%;
  object-fit:cover;
  border:none;
}

.arsip-download{
  display:block;
  text-align:center;
  padding:10px;
  border-radius:8px;
  background:var(--blue-soft);
  color:var(--blue-main);
  font-size:14px;
  text-decoration:none;
  transition:0.2s;
}

.arsip-download:hover{
  background:var(--blue-main);
  color:white;
}

/* ===== POPUP PREVIEW ===== */
.preview-modal{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:rgba(15,23,42,0.7);
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  pointer-events:none;
  transition:0.3s;
  z-index:9999;
  background:rgba(15,23,42,0.75);
  backdrop-filter:blur(6px);
}

.preview-modal.active{
  opacity:1;
  pointer-events:auto;
  animation:fadeIn 0.2s ease;
}

@keyframes fadeIn{
  from{ opacity:0; }
  to{ opacity:1; }
}

.preview-content{
  width:90%;
  max-width:900px;

  background:rgba(255,255,255,0.95);
  backdrop-filter:blur(10px);

  border-radius:16px;
  padding:20px;
  position:relative;

  box-shadow:0 20px 60px rgba(0,0,0,0.15);

  animation:zoomIn 0.25s ease;
}

.close-btn{
  position:absolute;
  top:12px;
  right:12px;

  width:36px;
  height:36px;

  display:flex;
  align-items:center;
  justify-content:center;

  border-radius:50%;
  background:#f1f5f9;

  font-size:16px;
  cursor:pointer;
  transition:0.2s;
}

.close-btn:hover{
  background:#e2e8f0;
}


#previewArea{
  width:100%;
  aspect-ratio:16/10;
  margin-bottom:15px;
  border-radius:10px;
  overflow:hidden;
  background:#f1f5f9;
}

#previewArea img,
#previewArea iframe{
  width:100%;
  height:100%;
  object-fit:contain;
  border:none;
}

@keyframes zoomIn{
  from{
    transform:scale(0.9);
    opacity:0;
  }
  to{
    transform:scale(1);
    opacity:1;
  }
}

#downloadBtn{
  display:block;
  width:100%;
  text-align:center;
}

.arsip-preview::after{
  content:"Klik untuk lihat";
  position:absolute;
  bottom:8px;
  left:50%;
  transform:translateX(-50%);
  background:rgba(0,0,0,0.6);
  color:white;
  font-size:12px;
  padding:4px 10px;
  border-radius:999px;
  opacity:0;
  transition:0.3s;
}

.arsip-preview{
  position:relative;
}

.arsip-preview:hover::after{
  opacity:1;
}

.arsip-preview{
  cursor:pointer;
  transition:0.3s;
}

.arsip-preview:hover{
  transform:scale(1.02);
  box-shadow:0 8px 20px rgba(0,0,0,0.1);
}

.arsip-preview img{
  transition:0.4s;
}

.arsip-preview:hover img{
  transform:scale(1.05);
}

@media (max-width: 768px){

  .nav-flex{
    flex-direction:column;
    gap:10px;
  }

  .nav-links{
    flex-wrap:wrap;
    justify-content:center;
  }

}

@media (max-width: 768px){

  .arsip-actions{
    flex-direction:column;
    align-items:stretch;
  }

  .filter{
    display:flex;
    flex-wrap:wrap;
    gap:5px;
  }

  .filter button{
    flex:1;
  }

  .btn{
    width:100%;
    text-align:center;
  }

}

@media (max-width: 768px){

  .preview-content{
    width:95%;
    padding:15px;
  }

  #previewArea{
    aspect-ratio:1/1;
  }

}

@media (max-width: 480px){

  .arsip-title{
    font-size:13px;
  }

}

@media (max-width: 480px){

  .arsip-download{
    font-size:13px;
    padding:8px;
  }

}

@media (max-width: 768px){

  .arsip-preview{
    height:140px;
  }

}

/* =====================================
   FINAL MOBILE RESPONSIVE FIX
   (TIDAK MENGUBAH DESKTOP)
===================================== */

@media (max-width: 768px){

  /* NAVBAR */
  .navbar{
    top:10px;
    width:95%;
    padding:10px;
  }

  .nav-flex{
    flex-direction:column;
    gap:8px;
  }

  .logo-area span{
    font-size:13px;
    text-align:center;
  }

  .nav-links{
    flex-wrap:wrap;
    justify-content:center;
  }

  .nav-links a{
    font-size:13px;
    padding:6px 10px;
  }

  /* HERO */
  .hero-premium{
    padding:140px 0 80px;
  }

  /* TOP BAR */
  .arsip-actions{
    flex-direction:column;
    align-items:stretch;
    gap:10px;
  }

  .filter{
    display:flex;
    flex-wrap:wrap;
    gap:5px;
  }

  .filter button{
    flex:1;
    font-size:12px;
    padding:6px;
  }

  .btn{
    width:100%;
    text-align:center;
    font-size:13px;
  }

  /* GRID */
  .grid{
    grid-template-columns:1fr;
    gap:15px;
    margin-top:25px;
  }

  /* CARD */
  .card{
    padding:16px;
  }

  .arsip-card{
    gap:8px;
  }

  .arsip-title{
    font-size:13px;
    min-height:34px;
  }

  /* PREVIEW (INI PALING PENTING) */
  .arsip-preview{
    aspect-ratio:1/1;   /* bikin tidak kepanjangan */
    height:auto;        /* override height lama */
  }

  /* BUTTON DOWNLOAD */
  .arsip-download{
    font-size:13px;
    padding:8px;
  }

  /* SEARCH */
  .search-box{
    padding:10px;
    font-size:14px;
  }

  /* POPUP */
  .preview-content{
    width:95%;
    padding:12px;
  }

  #previewArea{
    aspect-ratio:1/1;
  }

}


/* EXTRA SMALL DEVICE */
@media (max-width: 480px){

  .container{
    width:94%;
  }

  .hero-premium h1{
    font-size:22px;
  }

  .hero-desc{
    font-size:13px;
  }

}

@media (max-width:768px){

  .grid{
    grid-template-columns:1fr;
    justify-items:center;
  }

  .card{
    max-width:320px;
    width:100%;
  }

}

/* =====================================
   FINAL MOBILE RESPONSIVE (CLEAN FIX)
   TIDAK MENGUBAH DESKTOP
===================================== */

@media (max-width:768px){

  /* CONTAINER (BIAR TIDAK TERLALU LEBAR) */
  .container{
    width:92%;
    max-width:400px;
  }

  /* NAVBAR */
  .navbar{
    top:10px;
    width:95%;
    padding:10px;
  }

  .nav-flex{
    flex-direction:column;
    gap:8px;
  }

  .logo-area span{
    font-size:13px;
    text-align:center;
  }

  .nav-links{
    flex-wrap:wrap;
    justify-content:center;
  }

  .nav-links a{
    font-size:13px;
    padding:6px 10px;
  }

  /* HERO */
  .hero-premium{
    padding:140px 0 80px;
  }

  .hero-premium h1{
    font-size:26px;
  }

  .hero-desc{
    font-size:14px;
  }

  /* TOP BAR */
  .arsip-actions{
    flex-direction:column;
    align-items:stretch;
    gap:10px;
  }

  .filter{
    display:flex;
    flex-wrap:wrap;
    gap:5px;
  }

  .filter button{
    flex:1;
    font-size:12px;
    padding:6px;
  }

  .btn{
    width:100%;
    text-align:center;
    font-size:13px;
  }

  /* GRID (CENTER CARD) */
  .grid{
    grid-template-columns:1fr;
    justify-items:center;
    gap:15px;
    margin-top:25px;
  }

  /* CARD (INI KUNCI) */
  .card{
    width:100%;
    max-width:280px;
    padding:16px;
  }

  .arsip-card{
    gap:8px;
  }

  .arsip-title{
    font-size:13px;
    min-height:34px;
  }

  /* PREVIEW (BIAR TIDAK KEPANJANGAN) */
  .arsip-preview{
    aspect-ratio:1/1;
    height:auto;
  }

  /* DOWNLOAD BUTTON */
  .arsip-download{
    font-size:13px;
    padding:8px;
  }

  /* SEARCH */
  .search-box{
    padding:10px;
    font-size:14px;
  }

  /* POPUP */
  .preview-content{
    width:95%;
    padding:12px;
  }

  #previewArea{
    aspect-ratio:1/1;
  }

}


/* EXTRA SMALL DEVICE */
@media (max-width:480px){

  .container{
    width:94%;
  }

  .hero-premium h1{
    font-size:22px;
  }

  .hero-desc{
    font-size:13px;
  }

}

/* =====================================
   HAMBURGER MENU
===================================== */

.menu-toggle{
  display:none;
  font-size:22px;
  cursor:pointer;
}

/* =====================================
   MOBILE RESPONSIVE FINAL (BERSIH)
===================================== */

@media (max-width:768px){

  /* CONTAINER */
  .container{
    width:92%;
    max-width:400px;
  }

  /* NAVBAR */
  .navbar{
    top:10px;
    width:95%;
    padding:10px;
  }

  .nav-flex{
    flex-direction:row;
    justify-content:space-between;
  }

  .menu-toggle{
    display:block;
  }

  /* NAV MENU (HAMBURGER) */
  .nav-links{
    position:absolute;
    top:70px;
    left:0;
    width:100%;

    background:white;
    border-radius:12px;
    padding:10px;

    display:none;
    flex-direction:column;
    gap:5px;

    box-shadow:0 10px 25px rgba(0,0,0,0.05);
  }

  .nav-links.active{
    display:flex;
  }

  .nav-links a{
    text-align:center;
    padding:10px;
    font-size:14px;
  }

  /* HERO */
  .hero-premium{
    padding:140px 0 80px;
  }

  .hero-premium h1{
    font-size:26px;
  }

  .hero-desc{
    font-size:14px;
  }

  /* TOP BAR */
  .arsip-actions{
    flex-direction:column;
    gap:10px;
  }

  .filter{
    display:flex;
    flex-wrap:wrap;
    gap:5px;
  }

  .filter button{
    flex:1;
    font-size:12px;
    padding:6px;
  }

  .btn{
    width:100%;
    text-align:center;
    font-size:13px;
  }

  /* GRID */
  .grid{
    grid-template-columns:1fr;
    justify-items:center;
    gap:15px;
    margin-top:25px;
  }

  /* CARD */
  .card{
    width:100%;
    max-width:280px;
    padding:16px;
  }

  .arsip-card{
    gap:8px;
  }

  .arsip-title{
    font-size:13px;
    min-height:34px;
  }

  /* PREVIEW */
  .arsip-preview{
    aspect-ratio:1/1;
    height:auto;
  }

  /* BUTTON */
  .arsip-download{
    font-size:13px;
    padding:8px;
  }

  /* SEARCH */
  .search-box{
    padding:10px;
    font-size:14px;
  }

  /* POPUP */
  .preview-content{
    width:95%;
    padding:12px;
  }

  #previewArea{
    aspect-ratio:1/1;
  }

}

/* EXTRA SMALL */
@media (max-width:480px){

  .container{
    width:94%;
  }

  .hero-premium h1{
    font-size:22px;
  }

  .hero-desc{
    font-size:13px;
  }

}

/* ================= HAMBURGER ================= */
.menu-toggle{
  display:none;
  font-size:22px;
  cursor:pointer;
}

/* MOBILE */
@media (max-width:768px){

  .menu-toggle{
    display:block;
  }

  .nav-flex{
    flex-direction:row;
    justify-content:space-between;
    align-items:center;
  }

  .nav-links{
    position:absolute;
    top:70px;
    left:0;
    width:100%;

    background:white;
    border-radius:12px;
    padding:10px;

    display:none;
    flex-direction:column;
    gap:5px;

    box-shadow:0 10px 25px rgba(0,0,0,0.05);
  }

  .nav-links.active{
    display:flex;
  }

  .nav-links a{
    padding:10px;
    text-align:center;
  }

}