/* 
   Estilos Principales - Presentación Explicativa del Sistema de Predicción
   Diseñado en Tema Oscuro Hidrológico Moderno
*/

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

:root {
  --bg-dark: #070d19;
  --bg-card: #0f172a;
  --bg-card-hover: #1e293b;
  --bg-glass: rgba(15, 23, 42, 0.75);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-glow: rgba(56, 189, 248, 0.3);
  
  --primary-cyan: #38bdf8;
  --primary-blue: #0284c7;
  --accent-teal: #14b8a6;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  
  --shadow-lg: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-cyan: 0 0 25px rgba(56, 189, 248, 0.15);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* NAVBAR / HEADER */
.header-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cesedec-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
  transition: transform 0.3s ease;
}

.cesedec-logo:hover {
  transform: scale(1.04);
}

.brand-divider {
  width: 1px;
  height: 32px;
  background: var(--border-color);
}

.app-title-nav {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-title-nav span {
  color: var(--primary-cyan);
}

.nav-badge {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--primary-cyan);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* HERO SECTION */
.hero-section {
  position: relative;
  padding: 80px 0 60px;
  text-align: center;
  overflow: hidden;
}

.hero-bg-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.25) 0%, rgba(7, 13, 25, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
}

.hero-subtitle-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  font-size: 0.88rem;
  color: var(--primary-cyan);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.hero-title {
  font-size: 2.8rem;
  line-height: 1.2;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 36px;
}

/* CARDS GRID & SECTIONS */
.section-block {
  padding: 60px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 48px;
}

.section-tag {
  color: var(--primary-cyan);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  display: block;
}

.section-title {
  font-size: 2rem;
  color: var(--text-main);
  margin-bottom: 12px;
}

.section-desc {
  font-size: 1rem;
  color: var(--text-muted);
}

/* SVG CONTAINER CARD */
.svg-card-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.svg-card-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-cyan), transparent);
}

/* ANIMATED SVG SPECIFIC STYLES */
.svg-diagram {
  width: 100%;
  height: auto;
  display: block;
}

/* Flowing river line animation */
.animated-flow-line {
  stroke-dasharray: 10, 10;
  animation: flowLine 20s linear infinite;
}

@keyframes flowLine {
  from { stroke-dashoffset: 400; }
  to { stroke-dashoffset: 0; }
}

.pulse-node {
  animation: nodeGlow 2.5s ease-in-out infinite alternate;
}

@keyframes nodeGlow {
  0% { r: 6; opacity: 0.7; }
  100% { r: 9; opacity: 1; filter: drop-shadow(0 0 8px var(--primary-cyan)); }
}

.floating-wave {
  animation: waveFloat 4s ease-in-out infinite alternate;
}

@keyframes waveFloat {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-6px); }
}

/* FEATURE CARDS GRID */
.grid-cards-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.grid-cards-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: all 0.3s ease;
  position: relative;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-cyan);
}

.card-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--primary-cyan);
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 10px;
  color: var(--text-main);
}

.card-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* STEP LIST CARDS */
.step-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step-item {
  display: flex;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  align-items: flex-start;
}

.step-number {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-cyan));
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-content h4 {
  font-size: 1.1rem;
  color: var(--text-main);
  margin-bottom: 4px;
}

.step-content p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* ALERT HORIZONS PREVIEW */
.horizon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.horizon-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}

.horizon-time {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-cyan);
  font-weight: 700;
  margin-bottom: 6px;
}

.horizon-val {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
}

.horizon-range {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 4px;
}

/* FOOTER & DISCLAIMER */
.footer-disclaimer-section {
  background: #030712;
  border-top: 1px solid var(--border-color);
  padding: 60px 0 40px;
}

.disclaimer-box {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin-bottom: 40px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.disclaimer-icon {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
}

.disclaimer-text {
  font-size: 0.95rem;
  color: #fca5a5;
  line-height: 1.6;
}

.disclaimer-text strong {
  color: #ef4444;
}

.footer-credits {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-logo {
  height: 52px;
  width: auto;
  object-fit: contain;
  opacity: 0.9;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  .hero-description {
    font-size: 1rem;
  }
  .section-title {
    font-size: 1.6rem;
  }
  .grid-cards-2, .grid-cards-3 {
    grid-template-columns: 1fr;
  }
  .svg-card-wrapper {
    padding: 16px;
  }
  .nav-wrapper {
    flex-direction: column;
    gap: 12px;
  }
}
