/* Custom Styles for Media Pembelajaran Interaktif NKPI SMKN 1 Mundu */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  --primary-navy: #0B192C;
  --ocean-deep: #1E3E62;
  --ocean-blue: #0077B6;
  --maritime-teal: #00B4D8;
  --sea-foam: #90E0EF;
  --gold-accent: #FFB703;
  --amber-orange: #FB8500;
  --light-bg: #F8FAFC;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: #071324;
  color: #1e293b;
  min-height: 100%;
  overflow-x: clip;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y pinch-zoom;
}

h1, h2, h3, h4, .font-heading {
  font-family: 'Outfit', sans-serif;
}

/* Oceanic Wave Background Animation */
.ocean-hero-bg {
  background: linear-gradient(135deg, #071324 0%, #0d2847 45%, #005082 100%);
  position: relative;
  overflow: hidden;
}

.wave-animation {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 60px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0 C150,90 350,-40 500,50 C650,140 900,10 1200,40 L1200,120 L0,120 Z' fill='%23f8fafc'%3E%3C/path%3E%3C/svg%3E");
  background-size: 1200px 60px;
  animation: waveMove 15s linear infinite;
  opacity: 1;
}

.wave-animation.wave-back {
  bottom: 10px;
  opacity: 0.35;
  animation: waveMove 10s linear infinite reverse;
}

@keyframes waveMove {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Compass Needle Rotation Effect */
.compass-ring {
  box-shadow: 0 0 25px rgba(0, 180, 216, 0.4);
  border: 2px dashed rgba(255, 183, 3, 0.6);
  animation: spinSlow 40s linear infinite;
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Nautical Radar Pulse */
.radar-sweep {
  position: relative;
  overflow: hidden;
}
.radar-sweep::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, rgba(0, 212, 255, 0.25) 0deg, transparent 60deg, transparent 360deg);
  transform-origin: 0 0;
  animation: radarRotate 4s linear infinite;
  pointer-events: none;
}

@keyframes radarRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Card hover & shadow */
.card-maritime {
  background: #ffffff;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-maritime:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 25px -5px rgba(11, 25, 44, 0.12), 0 8px 10px -6px rgba(11, 25, 44, 0.08);
  border-color: #90E0EF;
}

/* Glassmorphism Navigation */
.nav-glass {
  background: rgba(11, 25, 44, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #0077b6;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #023e8a;
}

/* Simulation Dialogue Bubble */
.speech-bubble {
  position: relative;
  background: #ffffff;
  border-radius: 1rem;
  border: 2px solid #e2e8f0;
}
.speech-bubble::before {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 36px;
  border-width: 12px 12px 0;
  border-style: solid;
  border-color: #ffffff transparent;
  display: block;
  width: 0;
}
.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 34px;
  border-width: 14px 14px 0;
  border-style: solid;
  border-color: #cbd5e1 transparent;
  display: block;
  width: 0;
  z-index: -1;
}

/* Print Optimization for Paspor Karir & Refleksi */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .no-print, header, nav, footer, #nav-tracker, .btn-action-area {
    display: none !important;
  }
  .print-only-container {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .card-maritime {
    box-shadow: none !important;
    border: 1px solid #999 !important;
    page-break-inside: avoid;
  }
}

/* Zoom and Screen Controls */
.display-zoom-level {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  min-width: 3.2rem;
  text-align: center;
}

:fullscreen, ::backdrop {
  background-color: #071324;
}

/* ========================================================
   DESKTOP 16:9 RATIO PRESENTATION ARCHITECTURE
   ======================================================== */
@media (min-width: 1024px) {
  body.ratio-16-9-enabled {
    background: radial-gradient(circle at 50% 25%, #0e2744 0%, #071324 60%, #02070f 100%);
    background-attachment: fixed;
  }

  body.ratio-16-9-enabled .app-viewport-16-9 {
    width: 100%;
    max-width: min(100vw, calc(100vh * 16 / 9));
    min-height: 100vh;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(0, 180, 216, 0.35);
    background-color: #071324;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
  }
}

/* ========================================================
   MOBILE & TABLET: PORTRAIT & LANDSCAPE OPTIMIZATION
   ======================================================== */
@media (max-width: 1023px) {
  .app-viewport-16-9 {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100vh !important;
    margin: 0 !important;
    box-shadow: none !important;
    display: flex;
    flex-direction: column;
    overflow-y: visible !important;
  }
}

/* Landscape Mode on Phones & Compact Tablets (Full vertical scroll without cutoffs) */
@media (max-width: 1023px) and (orientation: landscape) and (max-height: 600px) {
  .nav-glass {
    min-height: auto !important;
  }
  .ocean-hero-bg {
    padding-top: 2rem !important;
    padding-bottom: 5rem !important;
  }
  .page-section {
    padding-top: 1.5rem !important;
    padding-bottom: 7rem !important;
  }
  /* Modal inner card fits safely and scrolls smoothly in landscape */
  .modal-scroll-card {
    max-height: 82vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
}

