@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #064e3b;
  --primary-light: #10b981;
  --accent: #ea580c;
  --accent-hover: #c2410c;
  --gold: #ca8a04;
  --surface: #f0fdf4;
  --text-slate: #475569;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--surface);
  color: var(--text-slate);
  -webkit-font-smoothing: antialiased;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.selection-custom::selection {
  background: var(--accent);
  color: #fff;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up,
.fade-in-fast {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out forwards;
  }

  .fade-in-fast {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease-out forwards;
  }

  .delay-100 { animation-delay: 0.1s; }
  .delay-200 { animation-delay: 0.2s; }
  .delay-300 { animation-delay: 0.3s; }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar,
#galleryThumbs::-webkit-scrollbar {
  display: none;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.btn {
  cursor: pointer;
  font-weight: 600;
  border: none;
  color: #fff;
  transition: background 0.25s ease, transform 0.2s ease;
}

.btn-primary {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background: var(--primary-light);
}

.btn-primary:hover {
  background: var(--primary);
}

.btn-ppdb {
  padding: 0.5rem;
  border-radius: 5px;
  font-size: 0.875rem;
  font-weight: 700;
  background: #fff;
}

.btn-ppdb:hover {
  background: var(--primary);
  color: #fff;
}

.nav-link {
  position: relative;
  padding: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-slate);
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-active {
  background: var(--primary);
  color: #fff;
  border-radius: 5px;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-active::after {
  width: 100%;
}

.mobile-link {
  display: block;
  padding: 0.75rem;
  border-radius: 0.375rem;
  font-size: 1rem;
  font-weight: 500;
  color: #334155;
  transition: background 0.2s ease;
}

.mobile-link:hover {
  background: #ecfdf5;
  color: var(--primary);
}

.mobile-ppdb {
  display: block;
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 0.375rem;
  text-align: center;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
}

#mobile-menu {
  z-index: 9999;
  transform: translateY(-100%);
  transition: transform 0.35s ease;
}

#mobile-menu.show {
  transform: translateY(0);
}

.hero-bg {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface) center / contain no-repeat;
}

.hero-bg > * {
  z-index: 2;
}

@media (max-width: 768px) {
  .hero-bg {
    background-image: none !important;
  }
}

.input-base {
  width: 100%;
  border: 1px solid #e2e8f0;
  background: #fff;
  transition: border 0.3s ease, box-shadow 0.3s ease;
}

.input-base:focus {
  outline: none;
  border-color: var(--primary-light);
}

.input { padding: 0.75rem 1rem; border-radius: 0.75rem; }
.input-premium { padding: 0.9rem 1.1rem; border-radius: 1rem; }
.input-modern { padding: 1rem 1.2rem; border-radius: 1.2rem; }

.file-base {
  width: 100%;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
}

.file-input { padding: 0.6rem; border-radius: 0.75rem; }
.file-premium { padding: 0.8rem; border-radius: 1rem; }
.file-modern { padding: 0.9rem; border-radius: 1.2rem; }

.label-base {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.label-premium { font-size: 0.8rem; color: #475569; }
.label-modern { font-size: 0.85rem; color: #334155; }

.card {
  background: #fff;
  border-radius: 1rem;
  border: 1px solid #f1f5f9;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 25px rgba(0,0,0,0.1);
}

.gallery-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.2rem;
  cursor: pointer;
}

.gallery-card img {
  transition: transform 0.6s ease;
}

.gallery-card:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  opacity: 0.8;
}

.gallery-card:hover .gallery-overlay {
  opacity: 1;
}

#previewModal {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
}

#previewFrame {
  width: 100%;
  height: 100%;
  border: none;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#mainBeritaImg {
  touch-action: pan-y;
}

#beritaContainer img {
  transition: transform 0.4s ease;
}

#beritaContainer .group:hover img {
  transform: scale(1.08);
}