/* --- ESTILOS GENERALES DE LA INTRO --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  background-color: #1a1410; /* Fondo oscuro cálido colonial */
  font-family: "Georgia", serif;
  color: #fcf8f2;
  overflow-x: hidden;
  overflow-y: auto !important; /* Habilita el scroll vertical cuando haga falta */
}

.splash-container {
  width: 100vw;
  min-height: 100vh;
  height: auto !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 30px 15px 40px 15px; /* Padding inferior para dar aire a los botones */
  cursor: pointer;
  perspective: 1000px; /* Habilita perspectiva 3D */
  position: relative;
}

/* --- CABECERA --- */
.intro-header {
  text-align: center;
  z-index: 10;
}

.intro-header h1 {
  color: #d4af37; /* Dorado */
  font-size: 2.2rem;
  letter-spacing: 2px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.intro-header p {
  color: #c5a059;
  font-size: 1.1rem;
  font-style: italic;
  margin-top: 5px;
}

/* --- REJILLA TIPO ROMPECABEZAS (GRID) --- */
.puzzle-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 columnas */
  grid-template-rows: repeat(3, 1fr); /* 3 filas */
  gap: 10px;
  width: 90%;
  max-width: 800px;
  height: 55vh;
  min-height: 350px;
  margin: 10px 0;
}

.puzzle-piece {
  width: 100%;
  height: 100%;
  background-size: contain; /* Escala la imagen completa dentro del cuadro */
  background-position: center; /* Centra la imagen en el contenedor */
  background-repeat: no-repeat; /* Evita que la imagen se duplique */
  background-color: #1a1816;
  border: 1px solid #c5a059;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  transition:
    transform 1.2s cubic-bezier(0.25, 1, 0.5, 1),
    opacity 1s ease;
  opacity: 0; /* Estado inicial para la animación JS */
}

/* ESTADO FINAL (Ensamble perfecto) */
.puzzle-grid.assembled .puzzle-piece {
  transform: translate(0, 0) rotate(0deg) scale(1) !important;
  opacity: 1 !important;
}

/* --- BOTÓN Y PIE --- */
.intro-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 10;
  width: 100%;
  margin-top: 15px;
}

.btn-entrar {
  background: linear-gradient(135deg, #b38f43, #8b6b23);
  color: #fff;
  border: none;
  padding: 12px 28px;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(179, 143, 67, 0.4);
  transition:
    transform 0.3s,
    background 0.3s;
}

.btn-entrar:hover {
  transform: scale(1.08);
  background: linear-gradient(135deg, #d4af37, #a27b2c);
}

.click-hint {
  font-size: 0.85rem;
  color: #888;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* BOTÓN "ACERCA DEL PROYECTO" (Integrado al flujo) */
.btn-about-trigger {
  position: relative;
  background: linear-gradient(135deg, #1f1a14 0%, #3d3122 100%);
  color: #c5a059;
  border: 1px solid #c5a059;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: bold;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  transition: all 0.3s ease;
  width: auto;
  max-width: 280px;
  text-align: center;
}

.btn-about-trigger:hover {
  background: linear-gradient(135deg, #c5a059 0%, #9e7b3b 100%);
  color: #111;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(197, 160, 89, 0.4);
}

/* OVERLAY DEL MODAL */
.about-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.about-modal-overlay.active {
  display: flex;
  opacity: 1;
}

/* TARJETA DEL MODAL */
.about-modal-card {
  background: #141210;
  border: 1px solid #c5a059;
  border-radius: 12px;
  max-width: 850px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
  padding: 25px;
  color: #e0e0e0;
}

/* BOTÓN CERRAR MODAL */
.about-modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: transparent;
  border: none;
  color: #c5a059;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}

.about-modal-close:hover {
  color: #fff;
}

/* ESTRUCTURA DEL CONTENIDO DEL MODAL */
.about-modal-body {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 25px;
  align-items: start;
  margin-top: 10px;
}

.about-image-container {
  width: 100%;
  border: 1px solid #c5a059;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.about-project-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* TEXTOS Y BLOQUES DE AUTOR EN MODAL */
.about-title {
  color: #c5a059;
  font-size: 1.4rem;
  margin: 0 0 4px 0;
  text-transform: uppercase;
}

.about-subtitle {
  display: block;
  color: #a89f91;
  font-size: 0.85rem;
  font-style: italic;
  margin-bottom: 15px;
  border-bottom: 1px solid #2a241d;
  padding-bottom: 8px;
}

.about-paragraph {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 15px;
}

.about-author-box {
  background: #1c1915;
  border-left: 3px solid #c5a059;
  padding: 12px 15px;
  margin-bottom: 12px;
  border-radius: 0 6px 6px 0;
}

.about-author-box h3 {
  color: #c5a059;
  font-size: 0.95rem;
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.about-author-box p {
  font-size: 0.85rem;
  line-height: 1.4;
  margin: 0;
  color: #ccc;
}

.about-author-box strong {
  color: #ffffff;
}

.about-footer-text {
  font-size: 0.85rem;
  color: #a89f91;
  font-style: italic;
  margin-top: 15px;
  border-top: 1px solid #2a241d;
  padding-top: 10px;
}

/* --- ADAPTACIÓN RESPONSIVE (MÓVILES Y TABLETS) --- */
@media (max-width: 768px) {
  .puzzle-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
    height: auto;
    min-height: 300px;
  }

  .intro-header h1 {
    font-size: 1.5rem;
  }

  /* Modal responsive */
  .about-modal-body {
    grid-template-columns: 1fr;
  }

  /* Ubicación segura para el botón en móviles */
  .btn-about-trigger {
    position: relative;
    bottom: auto;
    right: auto;
    margin-top: 10px;
    width: 80%;
    max-width: 280px;
    text-align: center;
    padding: 10px 16px;
    font-size: 0.85rem;
  }
}


/* ==========================================================================
   ESTILOS PARA EL MODAL PROFESIONAL (CARLOS URDANETA) y (BERNARDO OLIVA)
   ========================================================================= */

/* Fondo oscuro translúcido que cubre toda la pantalla */
.p-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.75); /* Oscurece el fondo */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999; /* Asegura que flote sobre absolutamente todo */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Cuando el modal tiene la clase .active se muestra */
.p-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* La tarjeta blanca/crema flotante (Estilo Base) */
.p-modal-container {
  background-color: #fcf8f2; /* Tono crema acorde a la web */
  border: 2px solid #b38f43; /* Borde dorado colonial */
  border-radius: 8px;
  width: 90%;
  max-width: 450px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 25px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  position: relative;
  text-align: center;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

/* Modificadores de tamaño manteniendo la estética crema/dorada */
.p-modal-lg {
  max-width: 580px;
}

.p-modal-scrollable {
  max-width: 720px;
}

/* Animación de entrada para la tarjeta */
.p-modal-overlay.active .p-modal-container {
  transform: translateY(0);
}

/* Botón de cerrar (X) */
.p-modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  color: #888;
  cursor: pointer;
  transition: color 0.2s;
}

.p-modal-close:hover {
  color: #dc3545;
}

/* Contenido interno */
.p-modal-body h2 {
  color: #2b1d0c; /* Marrón oscuro */
  margin-bottom: 5px;
  font-size: 24px;
  font-family: serif;
}

.p-modal-subtitle {
  color: #666;
  font-size: 14px;
  font-style: italic;
  margin-bottom: 15px;
}

.p-modal-body hr {
  border: 0;
  border-top: 1px solid #b38f43;
  margin: 15px 0;
  opacity: 0.4;
}

.p-modal-body p {
  color: #444;
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 20px;
}

/* Contenedor de botones (WhatsApp y Email) */
.p-modal-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.p-modal-buttons a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  transition:
    transform 0.2s,
    background-color 0.2s;
}

.p-modal-buttons a:hover {
  transform: translateY(-2px);
}

/* Botón específico de WhatsApp */
.p-btn-whatsapp {
  background-color: #25d366;
  color: #fff !important;
}

.p-btn-whatsapp:hover {
  background-color: #20ba5a;
}

/* Botón específico de Email */
.p-btn-email {
  background-color: #b38f43;
  color: #fff !important;
}

.p-btn-email:hover {
  background-color: #967635;
}

/* --- ESTILOS PARA LA FOTO DE PERFIL --- */
.p-modal-avatar-container {
  display: flex;
  justify-content: center;
  margin-bottom: 15px;
}

.p-modal-avatar {
  width: 100px; /* Tamaño ideal para la tarjeta */
  height: 100px;
  border-radius: 50%; /* Hace la imagen completamente circular */
  object-fit: cover; /* Evita que la foto se deforme o se estire */
  border: 3px solid #b38f43; /* Lindo borde dorado colonial a juego */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  object-position: top; /* Ancla la imagen desde la parte superior */
}

#open-developer,
#open-bernardo {
  text-decoration: none !important;
  cursor: pointer;
}

/* ==========================================================================
   ESTILOS EXCLUSIVOS: BERNARDO OLIVA & TRAYECTORIA (DISPOSICIÓN HORIZONTAL)
   ========================================================================= */

/* Botón para abrir Submodal Trayectoria */
.p-btn-trayectoria {
  background-color: #2b1d0c;
  color: #fcf8f2;
  border: 1px solid #b38f43;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition:
    transform 0.2s,
    background-color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.p-btn-trayectoria:hover {
  background-color: #422b12;
  transform: translateY(-2px);
}

/* Título de la sección de cargos */
.cargos-title {
  font-size: 15px;
  color: #2b1d0c;
  font-family: serif;
  margin-top: 15px;
  margin-bottom: 20px;
  font-weight: bold;
}

/* Contenedor principal: Disposición Horizontal */
.cargos-lista-horizontal {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap; /* Permite adaptarse en pantallas pequeñas */
  justify-content: center;
  align-items: flex-start;
  gap: 20px 15px; /* Espaciado entre columnas y filas */
  margin-top: 15px;
}

/* Cada tarjeta individual */
.cargo-item-horizontal {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 130px; /* Ancho fijo para alineación uniforme */
}

/* Imagen / Moneda en Círculo Único */
.cargo-img-h {
  width: 90px; /* Tamaño único (ancho) */
  height: 90px; /* Tamaño único (alto) */
  border-radius: 50%; /* Hace la figura un círculo perfecto */
  object-fit: cover; /* Ajusta la imagen al círculo sin deformarla */
  object-position: center; /* Centra la imagen adentro */
  overflow: hidden; /* Evita que cualquier parte se desborde */
  border: 2px solid #b38f43; /* Borde dorado colonial uniforme */
  background-color: #ffffff; /* Fondo blanco para imágenes con transparencia */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Sombra elegante */
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  margin-bottom: 8px;
}

/* Efecto Hover al pasar el cursor */
.cargo-img-h:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

/* Descripción / Cargo (ABAJO) */
.cargo-desc-h {
  font-size: 12px;
  color: #333;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}

/* Formato justificado para el texto largo de Trayectoria */
.trayectoria-texto {
  text-align: justify;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}

.trayectoria-texto p {
  margin-bottom: 14px;
  text-indent: 15px;
}

/* ==========================================================================
   ESTILO PARA AMPLIAR IMÁGENES (VISOR GENERAL)
   ========================================================================= */

/* Cursor para indicar que la imagen es interactiva */
.img-ampliable {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.img-ampliable:hover {
  transform: scale(1.01);
}

/* Fondo oscuro del modal */
.modal-visor {
  display: none;
  position: fixed;
  z-index: 99999;
  padding-top: 50px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(4px); /* EFECTO DE DESENFOQUE DE FONDO */
}

/* Imagen dentro del modal */
.modal-contenido {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  animation: zoomModal 0.3s ease;
}

/* Leyenda descriptiva bajo la imagen */
.modal-caption {
  margin: 15px auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #cccccc;
  font-size: 0.95rem;
}

/* Botón de cierre (X) */
.modal-cerrar {
  position: absolute;
  top: 15px;
  right: 25px;
  color: #ffffff;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}

.modal-cerrar:hover {
  color: #b38f43;
}

/* Animación de apertura */
@keyframes zoomModal {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Adaptación a móviles */
@media (max-width: 600px) {
  .modal-contenido {
    max-width: 95%;
    max-height: 75vh;
  }
  .modal-cerrar {
    top: 10px;
    right: 15px;
    font-size: 40px;
  }
}

/* ==========================================================================
   ESTILOS PARA EL MODAL PROFESIONAL (CARLOS URDANETA) y (BERNARDO OLIVA)
   ========================================================================= */

