:root {
  --primary: #056952;
  --teal: #1eaca0;
  --light: #fdfdfd;
  --gold: #ffe748;
  --cream: #ffecb7;
  --aqua: #78d7d7;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}
body {
  font-family: "Plus Jakarta Sans", sans-serif;
  background: var(--light);
  color: #1a1a1a;
  overflow-x: hidden;
}
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #f0f0f0;
}
::-webkit-scrollbar-thumb {
  background: var(--teal);
  border-radius: 3px;
}

#navbar {
  transition:
    background 0.4s,
    box-shadow 0.4s;
}
#navbar.scrolled {
  background: rgba(5, 105, 82, 0.97) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.hero-bg {
  background: linear-gradient(135deg, #033d30 0%, #056952 50%, #1eaca0 100%);
  position: relative;
  overflow: hidden;
}
.hero-bg::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.04'%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-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
}
.geo-ring {
  border: 2px solid rgba(255, 231, 72, 0.3);
  border-radius: 50%;
  animation: spin-slow 20s linear infinite;
}
@keyframes spin-slow {
  to {
    transform: rotate(360deg);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.slider-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.slide-card {
  flex: 0 0 100%;
}

.prog-card {
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}
.prog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(5, 105, 82, 0.18);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-12px);
  }
}
.float-anim {
  animation: float 4s ease-in-out infinite;
}

.gold-under {
  position: relative;
  display: inline-block;
}
.gold-under::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.gold-under:hover::after,
.gold-under.active::after {
  transform: scaleX(1);
}

.wave-divider svg {
  display: block;
}

.pulse-ring {
  animation: pulse-ring 2s ease-out infinite;
}
@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(30, 172, 160, 0.5);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(30, 172, 160, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(30, 172, 160, 0);
  }
}

#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
#mobile-menu.open {
  max-height: 500px;
}

.prog-bar-fill {
  animation: fill-bar 1.5s ease forwards;
}
@keyframes fill-bar {
  from {
    width: 0;
  }
}

.amiri {
  font-family: "Amiri", serif;
}
.grad-text {
  background: linear-gradient(135deg, var(--teal), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── NEWS SLIDER ── */
#news-viewport {
  overflow: hidden;
  position: relative;
  width: 100%;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
#news-slider-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}
#news-slider-track.no-transition {
  transition: none !important;
}
.news-slide {
  flex-shrink: 0;
  box-sizing: border-box;
  padding: 0 10px;
}
/* Desktop: 3 per view */
.news-slide {
  width: calc(100% / 3);
}
/* Tablet */
@media (max-width: 1024px) and (min-width: 640px) {
  .news-slide {
    width: 50%;
  }
}
/* Mobile */
@media (max-width: 639px) {
  .news-slide {
    width: 88%;
  }
}

.news-card {
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.news-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(5, 105, 82, 0.2);
}
.news-card:hover .news-read-more {
  opacity: 1;
  transform: translateX(0);
}
.news-read-more {
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.3s;
}

.news-headline-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.news-headline-placeholder {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  background: linear-gradient(135deg, #033d30, #1eaca0);
  flex-shrink: 0;
}

.img-drop-zone {
  border: 2px dashed #1eaca0;
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: #f0faf8;
}
.img-drop-zone:hover,
.img-drop-zone.drag-over {
  background: #d4f0ed;
  border-color: #056952;
}

.swipe-hint {
  display: none;
}
@media (max-width: 639px) {
  .swipe-hint {
    display: flex;
  }
}

.overlay-page {
  position: fixed;
  inset: 0;
  z-index: 200;
  overflow-y: auto;
  display: none;
}
.overlay-page.active {
  display: block;
}

.admin-panel {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
}
.admin-panel.active {
  display: flex;
}

.login-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}
.login-modal.active {
  display: flex;
}

#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s;
}
#toast.show {
  transform: translateY(0);
  opacity: 1;
}

.cat-keilmuan {
  background: #056952;
}
.cat-sosial {
  background: #1eaca0;
}
.cat-minat {
  background: #c084fc;
}
.cat-humas {
  background: #60a5fa;
}
.cat-umum {
  background: #fb923c;
}
