:root {
  /* Filament-inspired Color Palette */
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-300: #93c5fd;
  --primary-400: #60a5fa;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a8a;

  --danger-50: #fef2f2;
  --danger-100: #fee2e2;
  --danger-200: #fecaca;
  --danger-300: #fca5a5;
  --danger-400: #f87171;
  --danger-500: #ef4444;
  --danger-600: #dc2626;
  --danger-700: #b91c1c;

  --warning-400: #fbbf24;
  --warning-500: #f59e0b;
  --warning-600: #d97706;

  --success-400: #4ade80;
  --success-500: #22c55e;
  --success-600: #16a34a;

  /* Legacy colors - mapped to Filament palette */
  --merah: #dc2626;
  --merah-gelap: #b91c1c;
  --biru: #2563eb;
  --biru-tua: #1e40af;
  --biru-gelap: #0f172a;
  --emas: #f59e0b;
  --emas-muda: #fef3c7;
  --krem: #fef3c7;
  --putih: #FFFFFF;
  --charcoal: #0f172a;

  /* Typography - Inter Font (Filament Design Concept) */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Design tokens - Filament style */
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.03);
  --shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.05), 0 1px 2px -1px rgba(15, 23, 42, 0.03);
  --shadow-hover: 0 4px 12px -2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 6px 16px -4px rgba(15, 23, 42, 0.08);

  --max-width: 1180px;
  --nav-height: 72px;

  /* Grayscale - Filament uses slate */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: inherit;
}

button, input, optgroup, select, textarea {
  font-family: inherit;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
}

body {
  font-family: var(--font-body);
  color: var(--charcoal);
  background: #f8fafc;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  -webkit-overflow-scrolling: touch;
}

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

a {
  color: var(--biru);
  text-decoration: none;
  transition: color .2s;
}

a:hover {
  color: var(--merah);
}

ul,
ol {
  list-style: none;
}

.accordion-body ul,
.accordion-body ol,
.faq-jawaban ul,
.faq-jawaban ol,
.berita-content ul,
.berita-content ol,
.pengumuman-content ul,
.pengumuman-content ol {
  list-style: disc;
  padding-left: 1.5rem;
  margin: .5rem 0;
}

.accordion-body ol,
.faq-jawaban ol,
.berita-content ol,
.pengumuman-content ol {
  list-style: decimal;
}

.accordion-body li,
.faq-jawaban li,
.berita-content li,
.pengumuman-content li {
  margin-bottom: .25rem;
}

/* ===== TYPOGRAPHY ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  line-height: 1.3;
  color: var(--biru);
  font-weight: 600;
}

h1 {
  font-size: 2.75rem;
  margin-bottom: .75rem;
  letter-spacing: -.02em;
}

h2 {
  font-size: 2rem;
  margin-bottom: .75rem;
  letter-spacing: -.01em;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: .5rem;
}

h4 {
  font-size: 1.125rem;
  margin-bottom: .4rem;
}

p {
  margin-bottom: 1rem;
  color: #475569;
  line-height: 1.7;
}

.text-muted {
  color: #94a3b8;
  text-align: center;
  padding: 2rem 0;
}

.text-light {
  color: rgba(255, 255, 255, .8);
}

/* ===== CONTAINER ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 60px;
  width: 100%;
}

/* ===== SECTION ===== */
.section {
  padding: 96px 0;
}

.section-alt {
  background: var(--putih);
}

/* ===== SECTION HEADER ===== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--biru);
  margin: 0;
  font-weight: 700;
  letter-spacing: -.01em;
}

/* ===== SECTION TITLE (centered) ===== */
.section-title-center {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--biru);
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  padding-bottom: 1rem;
  font-weight: 700;
}

.section-title-center::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 3px;
  background: var(--merah);
  border-radius: 2px;
}

/* ===== GRID ===== */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -1.25rem;
}

.col-lg-4,
.col-lg-3,
.col-md-6 {
  padding: 0 1.25rem;
  width: 100%;
}

.col-lg-4 {
  width: 33.333%;
}

.col-lg-3 {
  width: 25%;
}

.col-md-6 {
  width: 50%;
}

/* ===== UTILITIES ===== */
.mb-3 {
  margin-bottom: 1rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

.h-100 {
  height: 100%;
}

.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: 2rem;
}

.page-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 1rem;
}

.page-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 .625rem;
  border-radius: 8px;
  font-size: .813rem;
  font-weight: 600;
  background: var(--putih);
  color: var(--text);
  border: 1px solid #e2e8f0;
  transition: all .2s;
}

.page-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ===== HOVER ANIMATIONS & OPTIMIZATION ===== */
/* GPU acceleration hints */
.gallery-card,
.card,
.btn,
.nav-link,
.sambutan-card,
.kontak-item,
.alumni-card,
.osis-card,
.fasilitas-card,
.stat-item,
.badge,
.gallery-view-toggle button,
.carousel-btn,
.hero-dot,
.hero-announcement-item,
.footer-social a {
  will-change: transform;
}

/* Card lift — enhanced */
.card-hover {
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .35s ease, border-color .3s ease;
}

.card-hover:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .1);
  border-color: rgba(29, 78, 137, .12);
}

.card-hover .card-img img {
  transition: transform .5s cubic-bezier(.34, 1.56, .64, 1);
}

.card-hover:hover .card-img img {
  transform: scale(1.06);
}

/* Prestasi card hover */
.card-prestasi {
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .35s ease;
}

.card-prestasi:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .1);
}

.card-prestasi:hover .card-img img {
  transform: scale(1.08);
}

/* Hero slide fade animation */
.hero-slide.active {
  animation: heroFadeIn .6s cubic-bezier(.4, 0, .2, 1) both;
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-text-col>* {
  animation: heroTextFade .7s .15s both;
}

.hero-text-col>*:nth-child(2) {
  animation-delay: .25s;
}

.hero-text-col>*:nth-child(3) {
  animation-delay: .35s;
}

.hero-text-col>*:nth-child(4) {
  animation-delay: .45s;
}

@keyframes heroTextFade {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Gallery card enhanced */
.gallery-card {
  will-change: transform, box-shadow;
}

.gallery-card:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .13);
}

.gallery-card:hover img {
  transform: scale(1.06);
}

.gallery-overlay {
  transform: translateY(4px);
  transition: opacity .35s cubic-bezier(.4, 0, .2, 1), transform .35s cubic-bezier(.4, 0, .2, 1);
}

.gallery-card:hover .gallery-overlay {
  opacity: 1;
  transform: translateY(0);
}

/* Badge pulse on hover */
.badge-emas:hover {
  animation: badgePulse .6s ease;
}

@keyframes badgePulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

/* Stat item hover */
.stat-item {
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s ease, background .3s ease;
}

.stat-item:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 24px rgba(29, 78, 137, .12);
  background: rgba(29, 78, 137, .08);
}

/* Profile card hover */
.profile-card,
.info-card {
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s ease;
}

.profile-card:hover,
.info-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .08);
}

/* Sambutan card hover */
.sambutan-card {
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .35s ease;
}

.sambutan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .08);
}

/* Kontak item hover */
.kontak-item {
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
}

.kontak-item:hover {
  transform: translateX(4px);
}

.kontak-icon {
  transition: transform .3s ease, background .3s ease;
}

.kontak-item:hover .kontak-icon {
  transform: scale(1.1);
  background: rgba(29, 78, 137, .15);
}

/* Footer social icon bounce */
.footer-social a {
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), background .2s, color .2s;
}

.footer-social a:hover {
  transform: translateY(-3px) scale(1.1);
}

/* Section reveal on scroll — subtle */
.section {
  animation: sectionReveal .5s cubic-bezier(.4, 0, .2, 1) both;
  animation-timeline: view();
  animation-range: entry 0% entry 15%;
}

@keyframes sectionReveal {
  from {
    opacity: .3;
  }

  to {
    opacity: 1;
  }
}

/* Section spacing only */
.section+.section {
  margin-top: 0;
}

/* Hero image zoom on hover */
.hero-image-col img {
  transition: transform .5s cubic-bezier(.34, 1.56, .64, 1), box-shadow .5s ease;
}

.hero-image-col:hover img {
  transform: scale(1.015);
  box-shadow: 0 28px 72px rgba(0, 0, 0, .4);
}

/* Smooth scrollbar for carousel */
.carousel-track {
  scroll-behavior: smooth;
}

/* Osis/Alumni card hover */
.osis-card,
.alumni-card {
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .35s ease;
}

.osis-card:hover,
.alumni-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .08);
}

/* Fasilitas card hover */
.fasilitas-card {
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .35s ease;
}

.fasilitas-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .08);
}

/* Gallery view toggle button hover */
.gallery-view-toggle button {
  transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), background .2s, color .2s;
}

.gallery-view-toggle button:hover {
  transform: scale(1.1);
}

/* Page-hero subtle parallax */
.page-hero {
  transition: background-position .3s ease;
  background-position: center;
}

.page-hero:hover {
  background-position: center 45%;
}

/* Announcement item with slide */
.announcement-item {
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), padding-left .3s ease, border-color .3s ease;
}

.announcement-item:hover {
  transform: translateX(5px);
  border-color: var(--biru, #1D4E89);
}

/* Accordion */
.accordion {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.accordion-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}

.accordion-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  user-select: none;
}

.accordion-icon {
  font-size: .8rem;
  color: #94a3b8;
  transition: transform .25s ease;
  flex-shrink: 0;
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
  padding: 0 1.25rem;
}

.accordion-item.active .accordion-body {
  max-height: 1000px;
  padding: 0 1.25rem 1.25rem;
}

/* Faq accordion item hover */

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
main {
  animation: pageFadeIn .35s ease-out;
}
@media (prefers-reduced-motion: reduce) {
  main { animation: none; }
}

@media (max-width: 480px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  h4 { font-size: 1rem; }
}

@media (max-width: 360px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.125rem; }
  h4 { font-size: .938rem; }
}
