/* ----- ENCABEZADO ----- */
.encabezado {
    text-align: center;
    background-color: #003366;
    color: #fff;
    padding: 60px 20px;
    border-radius: 0 0 20px 20px;
}

.encabezado h1 {
    font-size: 36px;
    margin-bottom: 15px;
    font-weight: bold;
}

.encabezado p {
    font-size: 18px;
    margin: 0;
    font-style: italic;
}

/* ----- CONTENEDOR PRINCIPAL ----- */
.contenedor {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ----- TARJETAS ----- */

.tarjeta {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 250px;
    min-height: 200px;
    padding: 20px;
    box-sizing: border-box;
    background-color: #f5f5f5;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    position: relative;

}

.tarjeta:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    background-color: #e6f0ff;
}

.tarjeta:active {
    transform: scale(0.98);
}

.tarjeta i,
.tarjeta h2,
.tarjeta p {
    pointer-events: auto;
}

.icono {
    font-size: 40px;
    color: #003366;
    margin-bottom: 15px;
}

.tarjeta h2 {
    font-size: 20px;
    color: #003366;
    margin-bottom: 10px;
}

.tarjeta p {
    font-size: 14px;
    color: #555;
}

/* ----- MODAL ----- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s;
}

.modal-contenido {
    background: #fff;
    margin: 80px auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    max-height: 80vh;
    overflow-y: auto;
}

.cerrar {
    float: right;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    color: #333;
}

.cerrar:hover {
    color: red;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ----- GALERÍA DE PERSONAS ----- */
.galeria-personal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    margin-top: 20px;
}

.persona {
    width: 180px;
    background-color: #fafafa;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    display: none;
}

.persona:hover {
    transform: translateY(-4px);
}

.persona img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
}

.persona h3 {
    color: #0d47a1;
    margin: 8px 0 4px 0;
}

.persona p {
    color: #333;
    font-size: 0.9em;
}

.persona.mostrar {
    display: block;
    animation: aparecer 0.4s ease;
}

@keyframes aparecer {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* ===== CORRECCIÓN DE VISUALIZACIÓN ===== */

/* Asegura que el body y html ocupen toda la ventana */
html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* evita desplazamiento lateral */
  background-color: #f9f9f9; /* color de fondo claro */
}

/* Corrige el contenedor principal */
main.contenedor {
  display: block;
  width: 100%;
  min-height: 100vh; /* ocupa al menos toda la altura visible */
  box-sizing: border-box;
  padding: 20px;
}

/* Asegura que las tarjetas se adapten bien */
.tarjetas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

/* Ajuste general de las tarjetas */
.tarjeta {
  width: 300px;
  min-height: 250px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  padding: 20px;
  text-align: center;
  transition: transform 0.3s ease;
}

.tarjeta:hover {
  transform: translateY(-8px);
}
