/* =========================================================================
 * SMA Negeri 1 Nabire (sman1nabire.sch.id) - V3.0
 * Animasi Modern, Warna Dinamis, Light/Dark Adaptif, Banner Rasio 16:9
 * ========================================================================= */

:root {
  --smansa-blue: #1d4ed8;
  --smansa-gold: #f59e0b;
  --smansa-emerald: #10b981;
}

html.dark {
  --smansa-blue: #60a5fa;
  --smansa-gold: #fbbf24;
  --smansa-emerald: #34d399;
}

html {
  scroll-behavior: smooth;
  font-size: clamp(13px, 2.5vw, 16px);
}

body {
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Tipografi Fluid */
.hero-title {
  font-size: clamp(1.35rem, 4.4vw, 3.15rem);
  line-height: 1.16;
}

.section-title {
  font-size: clamp(1.2rem, 3.2vw, 2.2rem);
  line-height: 1.25;
}

/* Latar Gradien Beranimasi */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.bg-animated-hero {
  background: linear-gradient(-45deg, #1e3a8a, #1d4ed8, #0f766e, #312e81);
  background-size: 300% 300%;
  animation: gradientShift 14s ease infinite;
}

html.dark .bg-animated-hero {
  background: linear-gradient(-45deg, #090d16, #172554, #0f172a, #134e4a);
  background-size: 300% 300%;
  animation: gradientShift 14s ease infinite;
}

/* Animasi Teks Berjalan */
@keyframes marqueeTicker {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: marqueeTicker 28s linear infinite;
}

.ticker-wrapper:hover .ticker-track {
  animation-play-state: paused;
}

/* Animasi Mengambang & Denyut */
@keyframes floatSlow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-7px); }
}

.animate-float-slow {
  animation: floatSlow 4.2s ease-in-out infinite;
}

@keyframes pulseOrb {
  0%, 100% { transform: scale(1); opacity: 0.35; }
  50% { transform: scale(1.12); opacity: 0.55; }
}

.animate-orb {
  animation: pulseOrb 7s ease-in-out infinite;
}

/* Efek Masuk Scroll Reveal */
.reveal-item {
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-item.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.card-glow {
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.card-glow:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px -10px rgba(29, 78, 216, 0.2);
}

/* Rasio Banner Berita Layar Lebar Standar 16:9 */
.aspect-16-9 {
  aspect-ratio: 16 / 9;
}

@media (max-width: 340px) {
  .container-fluid-safe {
    padding-left: 0.65rem !important;
    padding-right: 0.65rem !important;
  }
  .btn-touch-safe {
    width: 100%;
    justify-content: center;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    font-size: 0.875rem !important;
  }
}

.watch-only-menu {
  display: none;
}

@media (max-width: 260px) {
  html { font-size: 12px; }
  .watch-hide { display: none !important; }
  .watch-only-menu { display: block !important; }
  .watch-compact-card {
    padding: 0.6rem !important;
    border-radius: 0.75rem !important;
  }
  a, button { min-height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-item,
  .animate-float-slow,
  .animate-orb,
  .bg-animated-hero,
  .ticker-track {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}