/* ==========================================================
   STYLE CSS - MEDIA PEMBELAJARAN INTERAKTIF
   "TEKNIK PEMBESARAN IKAN AIR TAWAR"
   Kelas XI APAT - SMKN 1 Mundu
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Poppins:wght@400;600;700;800&display=swap');

:root {
  --primary-blue: #0284c7;
  --primary-blue-dark: #0369a1;
  --primary-navy: #0f172a;
  --primary-cyan: #06b6d4;
  --accent-gold: #f59e0b;
  --accent-gold-light: #fef3c7;
  --bg-slate: #f8fafc;
  --surface-white: #ffffff;
  --border-light: #e2e8f0;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --shadow-soft: 0 4px 20px -2px rgba(2, 132, 199, 0.08), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', 'Poppins', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-slate);
  overflow-x: hidden;
  line-height: 1.6;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Navigation Links */
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--primary-blue);
  background-color: #f0f9ff;
}

.nav-active {
  color: var(--primary-blue) !important;
  background-color: #e0f2fe !important;
  font-weight: 700;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 14px 0 rgba(2, 132, 199, 0.35);
  transition: all 0.25s ease;
  border: none;
  cursor: pointer;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(2, 132, 199, 0.45);
  filter: brightness(1.05);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background-color: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 0.75rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-secondary:hover:not(:disabled) {
  background-color: #f8fafc;
  border-color: #94a3b8;
  color: var(--primary-blue-dark);
}

.btn-secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Glassmorphic Navbar & Cards */
.glass-header {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.glass-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

/* Water Wave Animation */
.water-waves-bg {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #0f172a 0%, #0369a1 60%, #0284c7 100%);
}

.water-waves-bg::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  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='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V120H0V95.8C59.71,118.08,130.83,121.31,200.78,114.52,242.49,110.48,283.47,73.1,321.39,56.44Z' fill='%23f8fafc'%3E%3C/path%3E%3C/svg%3E");
  background-size: cover;
  background-repeat: no-repeat;
}

/* Hero Fish Swimming Animation */
.swim-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 280px;
  margin: 0 auto;
}

.fish-swim {
  animation: floatFish 4s ease-in-out infinite alternate;
}

@keyframes floatFish {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(-1.5deg);
  }
  100% {
    transform: translateY(6px) rotate(1.5deg);
  }
}

.bubble-anim {
  animation: riseBubble 3s infinite ease-in;
}

@keyframes riseBubble {
  0% {
    transform: translateY(100%) scale(0.5);
    opacity: 0;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-120%) scale(1.2);
    opacity: 0;
  }
}

/* Module Layout Styles */
.content-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.875rem;
}

.content-table th {
  background-color: #f1f5f9;
  color: #334155;
  font-weight: 700;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid #cbd5e1;
}

.content-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
}

.content-table tr:hover {
  background-color: #f8fafc;
}

.steps-flow {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0;
}

.flow-step {
  position: relative;
  padding: 1.25rem 1.25rem 1.25rem 3.5rem;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.flow-step .step-num {
  position: absolute;
  left: 1rem;
  top: 1.25rem;
  width: 1.75rem;
  height: 1.75rem;
  background-color: #0284c7;
  color: #ffffff;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
}

.flow-step h4 {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.flow-step p {
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.5;
}

.formula-card {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-radius: 1rem;
  padding: 1.25rem;
  margin: 1.25rem 0;
  color: #0369a1;
}

.formula-card h4 {
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #075985;
}

.info-box {
  padding: 1.25rem;
  border-radius: 1rem;
  margin: 1.25rem 0;
  border-left: 4px solid var(--accent-gold);
  background-color: #fffbeb;
  color: #92400e;
}

.info-box h4 {
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: #b45309;
}

/* Simulation 1 Drag & Drop */
.sim1-step-card {
  padding: 1rem 1.25rem;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 1rem;
  cursor: grab;
  transition: all 0.2s ease;
  user-select: none;
}

.sim1-step-card:hover {
  border-color: #38bdf8;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08);
}

.sim1-step-card.dragging {
  opacity: 0.5;
  background: #f0f9ff;
  border-color: #0284c7;
  cursor: grabbing;
}

.step-badge {
  width: 2rem;
  height: 2rem;
  background: #f1f5f9;
  color: #475569;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.btn-step-move {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.375rem;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-step-move:hover:not(:disabled) {
  background: #0284c7;
  color: white;
  border-color: #0284c7;
}

.btn-step-move:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Simulation 2 Virtual Pond */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-healthy {
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.status-warning {
  background-color: #fef9c3;
  color: #854d0e;
  border: 1px solid #fde047;
}

.status-danger {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  animation: pulseDanger 1.5s infinite;
}

@keyframes pulseDanger {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

/* Certificate Styles */
@media print {
  body * {
    visibility: hidden;
  }
  #printable-certificate, #printable-certificate * {
    visibility: visible;
  }
  #printable-certificate {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 2cm;
    box-shadow: none;
    border: 8px solid #0369a1;
  }
  .no-print {
    display: none !important;
  }
}

.certificate-frame {
  border: 12px double #0284c7;
  background: radial-gradient(circle at center, #ffffff 0%, #f8fafc 100%);
  position: relative;
  overflow: hidden;
}

.certificate-frame::before {
  content: "SMKN 1 MUNDU • APAT";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-30deg);
  font-size: 4rem;
  font-weight: 900;
  color: rgba(2, 132, 199, 0.03);
  pointer-events: none;
  white-space: nowrap;
}
