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

:root {
  --primary: #003366; 
  --secondary: #006699; 
  --accent: #8a9ba8; /* Gris Metálico más vivo y brillante */
  --light-bg: #eef1f4; /* Gris plateado muy claro para todo el fondo */
  --dark-text: #212529;
  --light-text: #ffffff;
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Inter', sans-serif;
  color: var(--dark-text);
  background-color: var(--light-bg);
  line-height: 1.6;
  overflow-x: hidden;
  /* El fondo de red abstracta y errática se dibuja usando Canvas vía JavaScript */
}

/* PARALLAX Y FONDOS ANIMADOS */
.parallax-section {
  position: relative;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  color: var(--light-text);
}

.parallax-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 51, 102, 0.75); /* Overlay azul profundo */
  z-index: 1;
}

.parallax-content {
  position: relative;
  z-index: 2;
}

.animated-bg {
  background: linear-gradient(-45deg, #003366, #004d80, #006699, #002244);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  color: var(--light-text);
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}



/* NAVBAR */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 1000;
  transition: var(--transition);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 110px; /* Aumentamos el tamaño significativamente */
  width: auto;
  mix-blend-mode: multiply; /* Este truco hace que el fondo blanco del JPG se vuelva transparente y se fusione con la página */
  margin: -10px 0; /* Ajuste para que no empuje demasiado la barra hacia abajo */
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--primary);
  font-weight: 600;
  position: relative;
  transition: var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--secondary);
  transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--secondary);
}

.hamburger {
  display: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--primary);
}

/* HERO SECTION */
.hero {
  height: 100vh;
  background: linear-gradient(rgba(0, 51, 102, 0.7), rgba(0, 102, 153, 0.7)), url('assets/hero.png') center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--light-text);
  padding: 0 2rem;
  margin-top: 0;
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  animation: fadeInDown 1s ease;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease 0.5s both;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  background-color: var(--secondary);
  color: var(--light-text);
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  transition: var(--transition);
  border: 2px solid var(--secondary);
}

.btn:hover {
  background-color: transparent;
  color: var(--light-text);
  border-color: var(--light-text);
}

.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--light-text);
  box-shadow: 0 5px 15px rgba(138, 155, 168, 0.5); /* Sombra plateada */
}

/* PAGE HEADERS (for subpages) */
.page-header {
  background-color: var(--primary);
  color: var(--light-text);
  /* Usamos !important para anular el padding asimétrico en línea del HTML */
  padding: 12rem 2rem 6rem !important; 
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.page-header p {
  margin: 0 auto;
}

.page-header h1 {
  font-size: 2.5rem;
}

/* GENERAL SECTIONS */
section {
  padding: 5rem 2rem;
}

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

/* Metálico solo para títulos en fondos oscuros */
.hero h1, .page-header h1 {
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 1px;
  text-align: center;
  width: 100%;
  margin: 0 auto;
  /* Degradado metálico brillante */
  background: linear-gradient(to bottom, #ffffff 0%, #cbd5de 40%, #8a9ba8 50%, #a2b1be 60%, #eef1f4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important; 
  /* Biselado y Volumen 3D */
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.4);
  filter: drop-shadow(0px 8px 12px rgba(0, 51, 102, 0.3)) drop-shadow(0px -1px 1px rgba(255,255,255,0.8));
  /* Animación Revelado Scroll */
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  transition: all 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.hero h1.active, .page-header h1.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Regresando Section Titles a su estilo original visible */
.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary); /* Azul profundo original para que contraste con el fondo */
  margin-bottom: 3rem;
  
  /* Conservamos la animación de aparición */
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  transition: all 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.section-title.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.section-title::after {
  content: '';
  display: block;
  width: 100px;
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  margin: 15px auto 0;
  border-radius: 3px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* GRID LAYOUTS */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* CARDS Y HOVER EFECTOS AVANZADOS */
.card {
  background: var(--light-text);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-align: center;
  padding-bottom: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  border-bottom: 4px solid transparent;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(to bottom, rgba(0,102,153,0), rgba(0,102,153,0.05));
  z-index: 0;
  transition: opacity 0.4s ease;
  opacity: 0;
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  transform: translateY(-15px);
  box-shadow: 0 20px 40px rgba(138, 155, 168, 0.4); /* Sombra plateada brillante */
  border-bottom: 4px solid var(--accent); /* Borde plateado al hacer hover */
}

.card .img-container {
  overflow: hidden;
  width: 100%;
  height: 200px;
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.card:hover img {
  transform: scale(1.15);
}

.card h3, .card p, .card .btn {
  position: relative;
  z-index: 1;
}

.card h3 {
  color: var(--primary);
  margin: 1.5rem 0 1rem;
}

.card p {
  padding: 0 1.5rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.card .btn {
  margin: 0 auto 1.5rem;
}

/* TEXT CONTENT */
.text-content h2 {
  color: var(--primary);
  margin-bottom: 1rem;
}
.text-content p {
  margin-bottom: 1rem;
}
.text-content ul {
  margin-left: 20px;
  margin-bottom: 1rem;
}
.text-content li {
  margin-bottom: 0.5rem;
}

/* FOOTER */
footer {
  background: var(--primary);
  color: var(--light-text);
  padding: 3rem 2rem 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  margin-bottom: 2rem;
}

.footer-col h3 {
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

.footer-col p, .footer-col a {
  color: #ccc;
  text-decoration: none;
  margin-bottom: 0.5rem;
  display: block;
  transition: var(--transition);
}

.footer-col a:hover {
  color: var(--light-text);
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: #ccc;
}

/* ANIMATIONS */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 70px;
    left: -100%;
    flex-direction: column;
    background: var(--light-text);
    width: 100%;
    text-align: center;
    padding: 2rem 0;
    transition: var(--transition);
    box-shadow: 0 10px 10px rgba(0,0,0,0.1);
  }
  
  .nav-links.active {
    left: 0;
  }
  
  .hamburger {
    display: block;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }
}
