/* ---------- GENERAL ---------- */
body {
    margin: 0;
    font-family: "Helvetica Neue", Arial, sans-serif;
    background-color: #f9f9f9;
    color: #222;
}

/* ---------- HEADER ---------- */
header {
    background-color: #003366; /* Azul */
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 1rem;
}

header h1 {
    font-size: 1.8rem;
    text-align: center;
    flex-grow: 1;
    margin: 0;
}

/* centrado absoluto del título */
.header-container h1 {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    font-size: 1.5rem;
}

.left-section {
  display: flex;
  align-items: center;
  gap: 0.6rem; /* espacio entre logo y flags */
}

.logo {
    height: 100px;
    width: auto;
    max-width: 100%;
}

.logo-izquierda {
    margin-right: 1rem;
}

.logo-derecha {
    margin-left: 1rem;
}

/* ---------- NAVBAR ---------- */
nav {
    background-color: #003d7a; /* tono azul más oscuro */
}

.navbar {
    list-style: none;
    margin: 0;
    padding: 0.4rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.navbar a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.navbar a:hover {
    color: #ffd500; /* Amarillo solar */
}

/* ---------- MAIN ---------- */
main {
    padding: 2rem;
    text-align: center;
}

main h2 {
    color: #003d7a;
}

/* ---------- FOOTER ---------- */
footer {
    background-color: #e9e9e9;
    color: #333;
    text-align: center;
    padding: 1rem 0;
    font-size: 0.9rem;
    margin-top: 2rem;
}

/* ---------- AJUSTES RESPONSIVOS PARA CELULARES POR EJEMPLO ---------- */
@media (max-width: 768px) {
    .logo {
        height: 60px;
        max-width: 80%;
        margin: 10px 0;
    }

    .navbar {
        flex-direction: column;
        align-items: center;
    }

    .noaa-flags {
    margin-top: 0.5rem;
    justify-content: center;
    }
}

/* --- Slider sol.html--- */
.slider-container {
  position: relative;
  max-width: 600px;
  margin: auto;
  overflow: hidden;
}

.slide {
  display: none;
}

.slide-img {
  width: 100%;
  border-radius: 8px;
}

.nav-btn {
  cursor: pointer;
  position: absolute;
  top: 45%;
  padding: 12px;
  background-color: rgba(0,0,0,0.3);
  color: white;
  font-size: 20px;
  border: none;
  border-radius: 50%;
  transition: 0.3s;
}

.nav-btn:hover {
  background-color: rgba(0,0,0,0.6);
}

.prev { left: 0; }
.next { right: 0; }

.imagetitle {
  margin: 10px 0;
  font-weight: bold;
}

.info-icon {
  vertical-align: middle;
  cursor: pointer;
}

/* --- Modales sol.html --- */
.modal {
  display: none;
  position: fixed;
  z-index: 5;
  padding-top: 80px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.6);
}

.modal-content {
  background-color: #fefefe;
  margin: auto;
  padding: 20px;
  border-radius: 10px;
  width: 80%;
  max-width: 600px;
  text-align: left;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  cursor: pointer;
}

.close:hover { color: black; }

.noaa-flags {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: 1rem;
}

.noaa-flag {
    height: 60px;    
    width: auto;
    border-radius: 4px;
}

.modal-text {
    color: black;
}


/* ==== GRID INVESTIGADORES ==== */
.investigadores-section {
  max-width: 1200px;
  margin: 18px auto;
  padding: 0 12px;
}

.investigadores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  align-items: start;
}

.investigador {
  background: #ffffff;
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(10,10,10,0.06);
  transition: transform 180ms ease, box-shadow 180ms ease;
  overflow: hidden;
}

.investigador:focus,
.investigador:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 14px 30px rgba(10,10,10,0.12);
}

.investigador img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  margin: 0 auto 10px;
  background: #f0f0f0;
}

.investigador .nombre {
  margin: 6px 0 4px;
  font-size: 1rem;
}

.investigador .cargo {
  margin: 0;
  color: #444;
  font-size: 0.95rem;
}

.investigador .afiliacion {
  margin-top: 6px;
  color: #666;
  font-size: 0.9rem;
  line-height: 1.2;
}

/* headings spacing */
.investigadores-section h2,
.investigadores-section h1 {
  text-align: center;
  color: #003366;
  margin-top: 18px;
  margin-bottom: 10px;
}

/* responsive tweaks */
@media (max-width: 520px) {
  .investigador img {
    width: 140px;
    height: 140px;
  }
  .investigador {
    padding: 12px;
  }
}

/* ==== ESTILO PARA rTable (TABLAS FLEXIBLES) ==== */

.rTable {
    width: 90%;
    margin: 20px auto;
    display: table;
    border-collapse: separate;
    border-spacing: 0 12px;
    color: black;
    font-size: 1rem;
}

.rTableRow {
    display: table-row;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0px 2px 8px rgba(0,0,0,0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rTableRow:hover {
    transform: scale(1.01);
    box-shadow: 0px 4px 14px rgba(0,0,0,0.18);
}

.rTableCell {
    display: table-cell;
    padding: 16px 20px;
    vertical-align: top;
    line-height: 1.4rem;
    color: #222;
}

/* ==== preview de nosotros: pub e inv ==== */


.preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.preview-card {
    border: 1px solid #ccc;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.preview-header {
    background: #f5f5f5;
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
}

.preview-header h4 {
    margin: 0;
}

.preview-header a {
    color: #0055aa;
    font-weight: bold;
    text-decoration: none;
}

.preview-header a:hover {
    text-decoration: underline;
}

.preview-card iframe {
    width: 100%;
    height: 300px;
    border: none;

    /* === RECORTAR EL HEADER === */
    margin-top: -170px;     /* mueve el contenido hacia arriba */
    height: calc(300px + 170px); /* compensar el recorte para no achicar */
    clip-path: inset(170px 0 0 0); /* recorta los primeros 90px (el header) */
}
