/* Variables y estilos base */
:root {
  --muted: #555c69;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #f0f2f5;
  position: relative; /* Necesario para que el ::before se posicione correctamente */

  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  margin: 0;
  padding: 0;
  color: #333;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;

  background-image: url("resources/fondo.jpg");
  background-size: cover;
  background-position: center;

  filter: blur(10px) brightness(0.9);

  /* Evita bordes difuminados en los extremos de la pantalla */
  transform: scale(1.05);
}

/* --- ESTILOS DEL FOLIO --- */
.wrap {
  max-width: 960px; /* Un ancho máximo para que no ocupe toda la pantalla en monitores grandes */
  margin: 40px auto; /* Centrar el folio horizontalmente y darle un margen arriba y abajo */

  background-color: white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); /* La sombra que crea el efecto de "estar por encima" del fondo */
  border-radius: 8px;
  overflow: hidden; /* Evita que los hijos (como la columna azul) se salgan de las esquinas redondeadas */

  display: grid;
  grid-template-columns: 320px 1fr;
}

/* --- COLUMNA IZQUIERDA --- */
.izquierda {
  background-color: #335392;
  color: white;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.izquierda .info {
  display: flex;
  flex-direction: column;
  justify-content: center; /* centra h1 + role verticalmente */
}

.foto {
  width: 160px;
  height: 160px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(11, 18, 32, 0.25);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02)
  );
  display: inline-block;
  flex-shrink: 0; /* Evita que la foto se encoja */
}
.foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
h1 {
  margin: 12px 0 0;
  font-size: 1.8rem;
  letter-spacing: 0.2px;
}
p.role {
  margin: 0.25rem 0 0;
  font-weight: 600;
  opacity: 0.95;
}
.contacto {
  width: 100%;
  margin-top: 20px;
  font-size: 0.95rem;
}
.contacto a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  transition: opacity 0.2s;
}
.contacto a:hover {
  opacity: 0.8;
}

.descargar {
  margin-top: 12px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: white;
  font-weight: 600;
  transition: background-color 0.2s;
}
.descargar:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* --- COLUMNA DERECHA --- */
.derecha {
  padding: 32px 34px;
}
.meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.resumen {
  margin-top: -5px;
  color: var(--muted);
  line-height: 1.5;
}

section {
  margin-top: 24px;
}
section h2 {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 10px;
  color: #0b1220;
  border-bottom: 1px solid #eee;
  padding-bottom: 4px;
}

#otros {
  margin-top: 50px;
  text-align: center;
}

.grandes {
  font-size: 1.2rem;
  margin-top: 0;
  margin-bottom: 6px;
  color: #0b1220;
  place-content: center;
}

.item {
  margin-bottom: 14px;
}
.item .title {
  font-weight: 700;
  color: #2b6df6;
}
.item .when {
  font-size: 0.86rem;
  color: var(--muted);
}
.item .where {
  font-size: 0.86rem;
  color: var(--muted);
  padding-top: 10px;
}
.item p {
  margin: 6px 0 0;
  color: #3c465d;
  line-height: 1.4;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  background: #f1f5ff;
  color: #2b6df6;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
}

.item-header {
  display: flex;
  align-items: baseline; /* Alinea el texto por la base si tienen tamaños de fuente distintos */
  gap: 1em;
}

/* --- RESPONSIVIDAD --- */
@media (max-width: 960px) {
  .wrap {
    /* En móvil se elimina el efecto folio para aprovechar toda la pantalla */
    grid-template-columns: 1fr;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .izquierda {
    flex-direction: column; /* Elementos en vertical */
    align-items: center;
    text-align: left;
    padding: 18px;
    gap: 4px; /* Espacio entre la foto y el texto */
  }
  .izquierda .info {
    min-height: 84px; /* igual altura que la foto */
    justify-content: center;
  }

  .izquierda .info h1 {
    margin: 0;
    font-size: 1.5rem;
  }

  .izquierda .info p.role {
    margin: 4px 0 0;
  }
  .izquierda .foto {
    width: 84px;
    height: 84px;
    border-radius: 12px;
  }
  .izquierda .contacto {
    width: 100%;
    display: block;     /* asegúrate de quitar la regla previa que lo ocultaba */
    margin-top: 1px;
    font-size: 0.95rem;
    text-align: center; /* mantener centrado en móvil */
  }
  .derecha {
    padding: 15px 20px;
    margin-top: 0%;
  }

  #otros {
    margin-top: 30px;
    text-align: center;
  }
}
