:root {
  --primario: #2c3e50;
  --secundario: #e0c6a0;
  --fondo: #f9f9f9;
  --blanco: #ffffff;
  --verde-suave: #e6f9e6;
  --amarillo-suave: #fff8e1;
  --rojo-suave: #ffe6e6;
  --sombra: rgba(0,0,0,0.1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Montserrat', sans-serif; background: var(--fondo); color: var(--primario); line-height: 1.6; }
header nav { display: flex; align-items: center; justify-content: space-between; padding: 1rem; background: var(--blanco); box-shadow: 0 2px 4px var(--sombra); position: fixed; top: 0; width: 100%; z-index: 1000; transition: top 0.3s ease-in-out; }
.logo { height: 48px; }
.nav-links { list-style: none; display: flex; gap: 1.5rem; }
.nav-links a { color: var(--primario); text-decoration: none; font-weight: 700; font-size: 1rem; }
.menu-toggle { display: none; flex-direction: column; align-items: center; cursor: pointer; gap: 0.2rem; }
.menu-toggle .bars span { display: block; width: 30px; height: 4px; background: var(--primario); border-radius: 2px; margin-bottom: 6px; }
.menu-toggle .bars span:last-child { margin-bottom: 0; }
.menu-label { font-size: 0.75rem; font-weight: 600; color: var(--primario); text-transform: uppercase; margin-top: 4px; }
.hero { background: linear-gradient(135deg, #e0f7fa, #fffde7, #fbeedb); background-size: 400% 400%; animation: aireAnimado 5s ease infinite; color: var(--primario); text-align: center; padding: 2rem 1rem 1rem; margin-top: 80px; }
@keyframes aireAnimado { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.hero h1 { font-size: 2.2rem; margin-bottom: 0.8rem; }
.alerta {
  /* Propiedades existentes */
  padding: 1.2rem;
  text-align: center;
  font-weight: 700;
  transition: background 0.3s ease;
  position: relative;

  /* Propiedad añadida para ocultar por defecto */
  display: none; 
}.alerta.leve { background: var(--verde-suave); color: #2d7a2d; }
.alerta.moderada { background: var(--amarillo-suave); color: #a87b00; }
.alerta.fuerte { background: var(--rojo-suave); color: #b30000; }
/* Oculta TODAS las alertas por defecto al cargar la página */

/* Nueva regla para centrar filas */
.grid-centered {
  display: flex;
  justify-content: center;
  flex-wrap: wrap; /* Para que se adapte en móviles */
  gap: 1.5rem; /* Mismo espaciado que la grilla */
  margin-top: 1.5rem;
}

.info-tooltip { display: inline-block; margin-left: 10px; width: 22px; height: 22px; line-height: 22px; border-radius: 50%; background: rgba(0,0,0,0.1); color: currentColor; font-style: italic; font-weight: 700; cursor: pointer; position: relative; }
/* Reemplaza la regla vieja por esta en tu archivo styles.css */
.info-tooltip .tooltip-text {
  visibility: hidden;
  opacity: 0;
  
  /* --- AJUSTES DE ANCHO Y POSICIÓN --- */
  width: 90vw;
  max-width: 300px;
  position: absolute;
  z-index: 1;
  
  /* === CAMBIOS CLAVE PARA MOVERLO HACIA ABAJO === */
  top: 120%;      /* ANTES: 'bottom'. Ahora lo posicionamos desde arriba. */
  right: 0;       /* Mantenemos el alineado a la derecha del ícono (i). */
  transform: none;/* Ya no es necesario transformar su posición. */
  
  /* --- AJUSTES DE TEXTO Y APARIENCIA --- */
  background-color: var(--primario);
  color: var(--blanco);
  padding: 12px;
  border-radius: 6px;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 400;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: opacity 0.3s ease-in-out;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.info-tooltip:hover .tooltip-text { visibility: visible; opacity: 1; }


/* =================================
   ESTILOS PARA LA CLASE .section
==================================== */

/* 1. ESTILO BASE (lo que todas las secciones comparten) */
/* Se encarga del padding básico y de centrar horizontalmente. */
.section {
  width: 100%; /* Asegura que ocupe el ancho disponible */
  padding: 1rem;
  margin-left: auto;
  margin-right: auto;
}

/* 2. ESTILOS ESPECÍFICOS POR PÁGINA */

/* --- Para la página de Inicio (index.html) --- */
/* Esta sección necesita un margen superior pequeño o nulo */
.page-home .section {
  max-width: 1200px;
  padding-top: 50px;  /* Mantiene el espacio con el menú fijo en escritorio */
  margin-top: 0;       /* ELIMINA el espacio extra que veías */
  margin-bottom: 2rem; /* Espacio antes del footer */
}

/* --- Para la página de Proyecto (proyecto.html) --- */
.page-project .section {
  max-width: 900px;
  padding-top: 100px;
  margin-top: 0rem;    /* Le da un poco de espacio arriba */
  margin-bottom: 2rem;
}

/* --- Para la página de Contacto (contacto.html) --- */
.page-contact .section {
  max-width: 1200px; /* O el ancho que prefieras para esta página */
  padding-top: 100px;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

/* --- Para la página de Visualización (visualizacion.html) --- */
.page-visualization .section {
  max-width: 1200px; /* Un ancho amplio para los gráficos */
  padding-top: 100px;
  margin-top: -5rem;
  margin-bottom: 0rem;
}

/* --- Para la página de team (visualizacion.html) --- */
.page-team .section {
  max-width: 1200px; /* Un ancho amplio para los gráficos */
  padding-top: 100px;
  margin-top: 0rem;
  margin-bottom: 0rem;
}

.section-title { font-size: 1.8rem; text-align: center; margin-bottom: 2rem; color: var(--primario); }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  justify-items: center; /* <-- AÑADE ESTA LÍNEA */
}
.card-grid > .section-title { grid-column: 1 / -1; margin-top: 2rem; margin-bottom: 0; }
/* --- CAMBIO 1: Añadir position: relative a la tarjeta --- */
.card {
  background: var(--blanco);
  border-radius: 15px;
  box-shadow: 0 4px 12px var(--sombra);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  text-align: center;
  width: 340px;
  position: relative; /* <-- AÑADE ESTA LÍNEA */
}

/* --- CAMBIO 2: Añadir este nuevo bloque de código al final de tu CSS --- */
.card-watermark {
  position: absolute;         /* Se posiciona respecto a la tarjeta */
  bottom: 95px;                /* A 8px del borde inferior */
  right: 200px;                /* A 12px del borde derecho */
  font-size: 1.1rem;          /* Tamaño de letra pequeño */
  font-weight: 600;           /* Un poco de negrita para que sea legible */
  color: rgba(44, 62, 80, 0.4); /* Usa tu color primario (--primario) pero con 40% de opacidad */
  text-decoration: none;
  pointer-events: none;       /* Evita que el texto sea clickeable o bloquee otros elementos */
  user-select: none;          /* Evita que el usuario pueda seleccionar el texto fácilmente */
}

/* ESTILOS PARA EL TÍTULO Y EL ÍCONO DE INFO EN LAS TARJETAS (VERSIÓN FINAL) */
.card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  position: relative; 
  text-align: center; 
}

.card h3 .info-tooltip {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 10px; /* Posiciona el ícono a 25px del borde derecho de la tarjeta */
}

.afinsa-info {
  display: block;
  font-size: 0.9em;
  color: gray;
  font-weight: bold;
  margin-top: 2px;
}

.afinsa-info a {
  color: gray;
  text-decoration: underline; /* opcional: subrayado para indicar que es un enlace */
  font-weight: bold;
}


.mini-graph { background: #f0f0f0; height: 180px; display: flex; align-items: center; justify-content: center; border-radius: 8px; margin-bottom: 1rem; overflow: hidden; }
.mini-graph iframe, .mini-graph img { width: 100%; height: 100%; object-fit: cover; border: none; }
.card .pg-value { font-size: 2.5rem; font-weight: 700; }
.card .pg-trend { font-weight: 700; margin-bottom: 1rem; }
.card .btn { display: block; background: var(--primario); color: var(--blanco); text-align: center; padding: 0.8rem; text-decoration: none; border-radius: 8px; font-weight: 700; margin-top: auto; transition: background-color 0.3s ease; }
.card .btn:hover { background-color: #1a2531; }
.camera-card { position: relative; cursor: pointer; }
.camera-card .zoom-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 4rem; color: white; opacity: 0; transition: opacity 0.3s ease; text-shadow: 0 0 10px black; pointer-events: none; }
.camera-card:hover .zoom-icon { opacity: 0.8; }
.camera-card img { width: 100%; border-radius: 8px; background: #f0f0f0; }
.modal { display: none; position: fixed; z-index: 2000; padding-top: 50px; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.9); }
.modal-content { margin: auto; display: block; max-width: 90%; max-height: 90%; }
.modal-close { position: absolute; top: 15px; right: 35px; color: #f1f1f1; font-size: 40px; font-weight: bold; transition: 0.3s; cursor: pointer; }
.modal-close:hover, .modal-close:focus { color: #bbb; }
/* Estilo para el texto dentro de un gráfico vacío */
.placeholder-text {
  color: #b0b0b0;
  font-size: 0.9rem;
}

/* Estilo para los títulos de los gráficos grandes */
.grafico-titulo {
  background: white;
  padding: 0.75rem 1.5rem;
  text-align: center;
  border-radius: 20px 20px 0 0;
  border-bottom: 1px solid #eee;
  font-size: 1.2rem;
}


footer { background: #f1f1f1; text-align: center; padding: 1.5rem 1rem; font-size: 0.9rem; color: #777; }
.pg-trend span { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.wind-card-content {
  flex-grow: 1; /* <-- ASEGÚRATE DE QUE ESTA LÍNEA EXISTA */
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

/* CÓDIGO MODIFICADO */
.wind-speed-value {
  font-size: 2.3rem;
  font-weight: 700;
  line-height: 1.2;
}
.wind-direction-value {
  font-size: 1.2rem;
  font-weight: 400;
  color: #555;
}
.wind-category-alert {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-weight: 700;
  margin: 0.5rem auto 0;
  max-width: 200px;
}

@media (max-width: 768px) {
  header nav { top: auto; bottom: 0; height: 65px; }
  body { padding-bottom: 65px; }
  .hero { margin-top: 0; }
  .nav-links { display: none; flex-direction: column; position: absolute; bottom: 75px; right: 1rem; background: var(--blanco); padding: 1rem; border-radius: 8px; box-shadow: 0 -3px 8px var(--sombra); width: 200px; gap: 1rem; }
  .menu-toggle { display: flex; }
  .nav-links.active { display: flex; }
  .hero h1 { font-size: 1.8rem; }

  /* Resetea el padding-top para TODAS las secciones en móvil, ya que el menú está abajo */
  .section {
    padding-top: 2rem !important; /* Usamos !important aquí para asegurar que esta regla anule a las de escritorio, que son más específicas. */
  }
  .section {
    margin-top: 0rem !important; /* Usamos !important aquí para asegurar que esta regla anule a las de escritorio, que son más específicas. */
  }

}


/* --- ESTILOS PARA LA PÁGINA DE CONTACTO (Añadir a styles.css) --- */

.section h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section p.intro {
    text-align: center;
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 2.5rem;
}

.contact-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  background: var(--blanco);
  padding: 2.5rem;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 700;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid #ccc; /* Se usó --borde-input, pero puede ser directo */
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primario);
  box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

.submit-btn {
  display: block;
  width: 100%;
  padding: 1rem;
  background: var(--primario);
  color: var(--blanco);
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.submit-btn:hover {
  background-color: #1a2531;
}

.contact-info h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--secundario);
  padding-bottom: 0.5rem;
}

.contact-info p {
  margin-bottom: 1rem;
}

.contact-info a {
  color: var(--primario);
  text-decoration: none;
  font-weight: 600;
  word-break: break-all;
}

.contact-info a:hover {
  text-decoration: underline;
}

/* Media query para el contenedor del formulario */
@media (max-width: 992px) {
  .contact-container {
    grid-template-columns: 1fr;
    padding: 2rem;
  }
}



/* --- ESTILOS PARA LA PÁGINA DE PROYECTO (Añadir a styles.css) --- */

/* Adaptamos el ancho máximo para la página de proyecto */
.page-project .section {
  max-width: 900px;
}


.project-title-desc {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 2.5rem;
  max-width: 700px; /* Ajuste para mejor lectura */
  margin-left: auto;
  margin-right: auto;
}

.project-section {
  background: var(--blanco);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 4px 15px var(--sombra);
  margin-bottom: 2rem;
}

.project-section h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--secundario);
  padding-bottom: 0.5rem;
}

.project-section p, .project-section li {
  margin-bottom: 1rem;
  text-align: justify;
}

.project-section ul {
  list-style-position: inside;
  padding-left: 0.5rem;
  margin-bottom: 1rem;
}

/* Estilos para el Acordeón */
.accordion {
  background-color: var(--fondo);
  color: var(--primario);
  cursor: pointer;
  padding: 1rem;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  transition: background-color 0.4s ease;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.accordion:after {
  content: '\002B'; /* + */
  color: var(--primario);
  font-weight: bold;
  float: right;
  margin-left: 5px;
}

.accordion.active:after {
  content: '\2212'; /* - */
}

.accordion.active, .accordion:hover {
  background-color: #e9e9e9;
}

.panel {
  padding: 0 1rem;
  background-color: white;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.panel p, .panel ul {
  padding: 1rem 0;
}

/* Otros estilos específicos */
.map-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding-top: 75%; /* Ratio 4:3 */
  border-radius: 8px;
}

.map-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.btn-link {
  display: inline-block;
  background-color: var(--primario);
  color: var(--blanco);
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: background-color 0.3s ease;
}

.btn-link:hover {
  background-color: #1a2531;
}

/* Media query para móviles */
@media (max-width: 768px) {
  .project-section {
    padding: 1.5rem;
  }
}


/* --- ESTILOS PARA VISUALIZACIÓN --- */

.grafico-container {
  margin-bottom: 2.5rem; /* <-- ESTO AÑADE EL ESPACIO VERTICAL */
  box-shadow: 0 4px 15px rgba(0,0,0,0.08); /* Sombra suave opcional */
  border-radius: 20px; /* Bordes redondeados para el contenedor */
}

/* También he movido el estilo del título del gráfico de "inline" a esta clase para que esté más limpio */
.grafico-titulo {
  background: white;
  padding: 1rem 1.5rem;
  text-align: center;
  border-radius: 20px 20px 0 0;
  border-bottom: 1px solid #eee;
  font-size: 1.2rem;
}

/* --- ESTILOS PARA LA SECCIÓN DE EQUIPO --- */
.team-grid {
    display: grid;
    gap: 2rem;
}

.team-row {
    display: grid;
    gap: 2rem;
}

.team-row-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    max-width: 820px; /* Centra la fila de 2 miembros */
    margin: 0 auto;
}

.team-row-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.team-card {
    background: var(--blanco);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    text-align: center;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.team-card .avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.5rem;
    border: 4px solid var(--secundario);
}

.team-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    color: var(--primario);
}

.team-card .role {
    font-size: 0.9rem;
    font-weight: 700;
    color: #555;
    margin-bottom: 0.25rem;
}

.team-card .affiliation {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 0.75rem;
}

.card-links {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem; /* Empuja los botones hacia abajo */
}

.profile-link {
    display: inline-block;
    color: var(--blanco);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

.profile-link:hover {
    transform: scale(1.05);
}

.orcid { background-color: #a6ce39; }
.concytec { background-color: #0077b5; }
.linkedin { background-color: #0e76a8; }
.web { background-color: #34495e; }

.camera-direction {
    font-size: 0.9em;
    font-style: italic;
    color: #555;
    margin-top: -20px; /* Ajusta el espacio superior para que esté más cerca del título */
    margin-bottom: 5px; /* Añade espacio antes de la imagen */
}

/* Ajuste responsive para las filas del equipo */
@media (max-width: 768px) {
  .team-row-2, .team-row-3 {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
}


/* --- ESTILOS PARA EL CRÉDITO DEL DESARROLLADOR EN EL FOOTER --- */

.developer-credit {
  margin-top: 1rem;      /* Añade un poco de espacio arriba */
  font-size: 0.8rem;     /* Letra más pequeña que el copyright */
  color: #888;          /* Un color gris suave para que no sea tan prominente */
}

.developer-credit a {
  color: #555;          /* Un gris un poco más oscuro para el enlace */
  font-weight: 700;      /* Texto en negrita para tu nombre */
  text-decoration: none; /* Sin subrayado por defecto */
  transition: color 0.3s ease;
}

.developer-credit a:hover {
  color: var(--primario); /* Al pasar el cursor, toma el color primario del sitio */
  text-decoration: underline;
}
/* === ESTILO PARA LA MARCA DE AGUA GLOBAL === */
.marca-agua {
  position: fixed; /* Fija el elemento en la ventana del navegador */
  bottom: 15px;      /* Distancia desde la parte inferior */
  right: 20px;       /* Distancia desde la derecha */
  font-size: 1.25rem;/* Tamaño de la fuente */
  color: #aaa;      /* Color gris semi-transparente */
  font-weight: bold;
  opacity: 0.7;
  z-index: 9999;     /* Asegura que esté por encima de otros elementos */
  pointer-events: none; /* Evita que se pueda hacer clic en ella */
  user-select: none;    /* Evita que el texto se pueda seleccionar */
}