/* Modern SMK Light Theme CSS Styles & Animations (Universal Paten Font: Plus Jakarta Sans) */

:root {
  /* Font Paten Universal (100% Identik & Presisi di HP Android, iPhone, Windows, Mac & Linux) */
  --font-primary: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  --color-brand-primary: #1e40af;
  --color-brand-accent: #2563eb;
  --color-brand-glow: #60a5fa;
  --color-gold: #d97706;
}

*, ::before, ::after {
  font-family: var(--font-primary);
}

body {
  font-family: var(--font-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  cursor: default;
  overflow-x: clip;
  background-color: #f8fafc;
  color: #0f172a;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

/* Animated Interactive Glowing Trail Cursor */
#custom-cursor-dot {
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 9px;
  height: 9px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: 50%;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease, width 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), height 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.9), 0 0 24px rgba(59, 130, 246, 0.5);
  will-change: transform;
}

#custom-cursor-ring {
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 38px;
  height: 38px;
  border: 2px solid rgba(37, 99, 235, 0.6);
  border-radius: 50%;
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), height 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
  backdrop-filter: blur(1px);
}

/* Cursor Hover States on Links, Buttons, Inputs */
body.cursor-hover #custom-cursor-ring {
  width: 58px;
  height: 58px;
  border-color: rgba(245, 158, 11, 0.95);
  background-color: rgba(245, 158, 11, 0.12);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.4), inset 0 0 15px rgba(245, 158, 11, 0.15);
  animation: cursorRingPulse 1.8s infinite ease-in-out;
}

body.cursor-hover #custom-cursor-dot {
  width: 6px;
  height: 6px;
  background: #f59e0b;
  box-shadow: 0 0 15px #f59e0b, 0 0 30px #d97706;
}

/* Click Active State */
body.cursor-click #custom-cursor-ring {
  transform: translate(-50%, -50%) scale(0.75);
  border-color: #3b82f6;
  background-color: rgba(59, 130, 246, 0.3);
}

body.cursor-click #custom-cursor-dot {
  transform: translate(-50%, -50%) scale(1.8);
  background: #2563eb;
}

/* Click Sparkle Particle */
.cursor-sparkle {
  pointer-events: none;
  position: fixed;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  z-index: 99997;
  transform: translate(-50%, -50%);
  animation: sparkBurst 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes cursorRingPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
  }
}

@keyframes sparkBurst {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px))) scale(0);
  }
}

@media (pointer: coarse) {
  #custom-cursor-dot, #custom-cursor-ring, .cursor-sparkle {
    display: none !important;
  }
}

/* Crisp Light Glassmorphism Card Style */
.glass-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.06), 0 4px 6px -2px rgba(15, 23, 42, 0.03);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  border-color: rgba(37, 99, 235, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -15px rgba(37, 99, 235, 0.15), 0 8px 12px -4px rgba(15, 23, 42, 0.05);
}

.glass-nav {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.glass-modal {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(226, 232, 240, 1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Light Theme Hero Background */
.bg-gradient-hero {
  background: radial-gradient(circle at 50% -10%, rgba(219, 234, 254, 0.7) 0%, rgba(248, 250, 252, 1) 75%);
}

.text-gradient {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.glow-button {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.glow-button::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.glow-button:hover::after {
  opacity: 1;
}

/* Formal typography for Navbar School Name */
.nav-school-title {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #0f172a;
  text-transform: uppercase;
}

/* Proportional Animated Glowing Border Badge for Hero School Title */
.hero-school-highlight {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35em 0.85em;
  margin-top: 0.35em;
  border-radius: 1.5rem;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border: 3px solid #2563eb;
  box-shadow: 0 10px 30px -5px rgba(37, 99, 235, 0.25), 0 0 20px rgba(245, 158, 11, 0.2);
  animation: glowOutlineBorder 3.5s ease-in-out infinite alternate;
  max-width: 100%;
  line-height: 1.25;
}

.hero-school-highlight span {
  display: inline-block;
  padding: 0.1em 0;
  word-break: normal;
  overflow-wrap: break-word;
}

@keyframes glowOutlineBorder {
  0% {
    border-color: #2563eb;
    box-shadow: 0 0 18px rgba(37, 99, 235, 0.35), 0 0 35px rgba(37, 99, 235, 0.15);
  }
  50% {
    border-color: #f59e0b;
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.45), 0 0 45px rgba(245, 158, 11, 0.2);
  }
  100% {
    border-color: #4f46e5;
    box-shadow: 0 0 22px rgba(79, 70, 229, 0.4), 0 0 40px rgba(79, 70, 229, 0.15);
  }
}

/* Infinite Seamless Marquee Animation for Running Sponsor Logos */
@keyframes marqueeSeamless {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-50%);
  }
}

.animate-marquee-infinite {
  display: flex;
  width: max-content;
  animation: marqueeSeamless 28s linear infinite;
  will-change: transform;
}

.animate-marquee-infinite:hover {
  animation-play-state: paused;
}

/* Custom Scrollbar for Light Theme */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #2563eb;
}

/* Floating animation */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0px); }
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

/* Pulse Glow Animation */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 15px rgba(37, 99, 235, 0.3); }
  50% { box-shadow: 0 0 30px rgba(37, 99, 235, 0.6); }
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

section[id] {
  scroll-margin-top: 76px;
}

/* Mobile Responsive Layout & Touch UX Enhancements */
@media (max-width: 1023px) {
  html {
    scroll-padding-top: 64px;
  }

  section[id] {
    scroll-margin-top: 64px;
  }

  body {
    padding-bottom: 86px !important;
  }
  
  /* Solid Opaque White Header on Mobile: Bebas bayangan tembus pandang */
  .glass-nav {
    background: #ffffff !important;
    background-color: #ffffff !important;
    opacity: 1 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08) !important;
  }

  /* Fixed Mobile Bottom Bar Navy Blue Theme (Clean & Matte, Tanpa Efek Glow) */
  .mobile-bottom-bar {
    background: #0f172a !important;
    border-top: 1px solid #1e293b !important;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* PASTIKAN TOMBOL MENGAPUNG TIDAK MUNCUL DI HP / TABLET (TIDAK MENUTUPI MENU) */
  #floating-whatsapp-container,
  #floating-whatsapp-btn,
  #whatsapp-popup-card {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    position: absolute !important;
    bottom: -9999px !important;
    right: -9999px !important;
  }
}

@media (max-width: 768px) {
  /* Prevent horizontal overflow on small phone screens without breaking position: sticky */
  body, html {
    overflow-x: clip !important;
    width: 100% !important;
  }

  /* Sleek, Compact Top Announcement Bar on Mobile */
  #top-announcement-bar {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  #top-announcement-bar span.animate-pulse {
    padding: 2px 7px !important;
    font-size: 9.5px !important;
    letter-spacing: 0.02em !important;
    border-radius: 6px !important;
  }

  #top-announcement-bar p {
    font-size: 10px !important;
    line-height: 1.2 !important;
  }
}

/* Responsive Modal & Form System */
.glass-modal {
  max-height: 94vh !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

@media (max-width: 768px) {
  /* Phone Form & Modal Layout Optimization (Senada & Seimbang Desktop) */
  .glass-modal {
    max-height: 96vh !important;
    border-radius: 1.25rem !important;
    width: 96% !important;
    margin: auto !important;
  }
  
  .glass-modal input,
  .glass-modal select,
  .glass-modal textarea {
    font-size: 12.5px !important;
    padding: 9px 12px !important;
    border-radius: 0.75rem !important;
  }

  .glass-modal label {
    font-size: 11.5px !important;
    margin-bottom: 4px !important;
  }

  .glass-card {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}

.mobile-drawer-backdrop {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
}

.animate-pulse-glow {
  animation: pulseGlow 3s infinite;
}

/* KUNING BERSIH & ELEGAN (Solid Bright Yellow) */
.bg-kuning-stabilo,
.bg-kuning-solid {
  background-color: #facc15 !important;
  color: #0f172a !important;
  border: 1.5px solid #eab308 !important;
  box-shadow: 0 4px 14px rgba(250, 204, 21, 0.45) !important;
  font-weight: 800 !important;
}

.bg-kuning-stabilo:hover,
.bg-kuning-solid:hover {
  background-color: #fde047 !important;
  box-shadow: 0 6px 20px rgba(250, 204, 21, 0.65) !important;
}

@keyframes yellowGlow {
  0%, 100% {
    box-shadow: 0 4px 14px rgba(250, 204, 21, 0.4);
  }
  50% {
    box-shadow: 0 6px 22px rgba(250, 204, 21, 0.7);
  }
}

.animate-stabilo-pulse {
  animation: yellowGlow 2.5s infinite ease-in-out;
}

/* PROTEKSI MEDIA PRINT (Mencegah cetak seluruh halaman HTML 13 sheet) */
@media print {
  body > *:not(#ppdb-receipt-modal):not(#ppdb-registration-modal) {
    display: none !important;
  }
  #ppdb-receipt-modal {
    position: static !important;
    display: block !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  #ppdb-receipt-modal .glass-modal {
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  button, a[href*="wa.me"] {
    display: none !important;
  }
}
