/* === BASE === */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Cinzel', serif;
  color: #ffffff;
  background: linear-gradient(120deg, #0f0f0f, #1a1a2e);
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* === HEADER === */
header {
  background-color: #223f5e;
  color: white;
  padding: 20px 0;
  text-align: center;
  border-bottom: 2px solid #FFD700;
}

.logo-area img {
  width: 80px;
  max-width: 100%;
  height: auto;
  margin-bottom: 10px;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 30px;
  padding: 0;
  margin: 10px 0 0;
  flex-wrap: wrap;
}

nav a {
  color: #ccc;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

nav a:hover {
  color: white;
}

/* === VIDEO & IMÁGENES === */
.habilidad {
  display: block;
  margin: 40px auto;
  width: 100%;
  max-width: 600px;
  height: auto;
  box-shadow: 0 0 20px rgba(5, 183, 210, 0.6);
  animation: floatInRight 1.5s ease-out, gentleFloat 4s ease-in-out infinite, glowPulse 2s infinite alternate;
}

.video {
  display: block;
  margin: 40px auto;
  width: 100%;
  max-width: 600px;
  height: auto;
  box-shadow: 0 0 20px rgba(5, 183, 210, 0.6);
  animation: floatInRight 1.5s ease-out, gentleFloat 4s ease-in-out infinite, glowPulse 2s infinite alternate;
}

.character.right {
  display: block;
  margin: 40px auto;
  max-width: 500px;
  width: 100%;
  height: auto;
  animation: floatInRight 1.5s ease-out, gentleFloat 4s ease-in-out infinite;
}

/* === ANIMACIONES === */
@keyframes floatInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0%); opacity: 1; }
}

@keyframes gentleFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes glowPulse {
  0% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }
  100% { box-shadow: 0 0 25px rgba(255, 215, 0, 0.8); }
}

/* === SECCIÓN PRINCIPAL (hover reveal) === */
.container {
  position: relative;
  width: 90%;
  max-width: 800px;
  margin: 40px auto;
}

.image {
  display: block;
  width: 100%;
  height: auto;
  transition: 0.5s ease;
  backface-visibility: hidden;
}

.container:hover .image {
  opacity: 0.15;
  filter: brightness(50%);
}

.middle {
  transition: 0.5s ease;
  opacity: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 20px;
}

.container:hover .middle {
  opacity: 1;
}

.text {
  background-color: rgba(0, 0, 0, 0.85);
  color: #f0f0f0;
  font-size: 18px;
  font-family: 'Georgia', serif;
  padding: 24px;
  border-radius: 12px;
  line-height: 1.6;
  text-align: justify;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.7);
  max-height: 100%;
  overflow-y: auto;
  max-width: 80%;
  width: 100%;
}

h2 {
  text-align: center;
  margin-top: 40px;
  font-size: 32px;
}

/* === SECCIÓN INFERIOR (no usada acá, la dejamos) === */
/* === HEXÁGONOS (PANAL 3×3) === */
.hexagon-section {
  background: linear-gradient(160deg, #0f0f0f, #1a1a2e);
  padding: 80px 20px;
  color: white;
  text-align: center;
}

.hexagon-section h2 {
  font-size: 36px;
  margin-bottom: 20px;
  color: #FFD700;
}

.hexagon-section p {
  font-size: 18px;
  max-width: 700px;
  margin: 0 auto 60px;
  line-height: 1.6;
  color: #ddd;
}

/* --- Panal --- */
.hexagon-grid{
  --w: 200px;        /* ancho del hexágono */
  --h: 240px;        /* alto del hexágono */
  --gap-x: 60px;     /* separación horizontal entre columnas */
  --overlap: 30px;   /* cuánto se solapan verticalmente las filas */

  display: grid;
  grid-template-columns: repeat(3, var(--w)); /* 3 por fila */
  justify-content: center;
  column-gap: var(--gap-x);
  row-gap: 0;
  max-width: calc(3 * var(--w) + 2 * var(--gap-x));
  margin: 0 auto;
}

.hex{
  width: var(--w);
  height: var(--h);
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  background:#222;
  overflow: hidden;
  box-shadow: 0 0 12px rgba(255,255,255,.25);
  transition: transform .3s, box-shadow .3s;
  margin-top: calc(var(--overlap) * -1);
}

.hex:nth-child(-n+3){ margin-top: 0; }




.hex:hover{
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255,255,255,.5);
}

/* --- Ajuste de las imágenes dentro del hexágono --- */
.hex img {
  width: 80%;  /* Reduce el tamaño de la imagen al 80% del contenedor */
  height: auto; /* Mantiene la proporción original */
  object-fit: cover; /* Asegura que la imagen cubra bien el espacio sin distorsionarse */
  display: block;
  margin: auto; /* Centra la imagen dentro del hexágono */
}

/* --- Responsivo --- */
@media (max-width: 1024px){
  .hexagon-grid{ --w:160px; --h:180px; --gap-x:32px; --overlap:48px; }

  .hex img {
    width: 70%;  /* Reduce aún más las imágenes en pantallas más pequeñas */
  }
}

@media (max-width: 768px){
  .hexagon-grid{
    grid-template-columns: repeat(2, var(--w));
    --w:120px; --h:138px; --gap-x:24px; --overlap:36px;
  }
  
  .hex:nth-child(2n){
    transform: translateX(calc((var(--w) + var(--gap-x)) / 2));
  }

  .hex:nth-child(-n+2){
    transform:none;
    margin-top:0;
  }

  .hex img {
    width: 60%;  /* Ajusta aún más las imágenes en dispositivos móviles */
  }
}

.hex .hex-img-small {
  width: 110%;  /* Ajusta el tamaño de esta imagen al 50% */
  height: auto;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}


@media (max-width: 480px){
  .hexagon-grid{
    grid-template-columns: 1fr;
    --w: 260px;  
    --h: 300px;
    --gap-x: 0;
    --overlap: 0;
  }

  .hex img {
    width: auto;  /* Ajusta aún más las imágenes en pantallas muy pequeñas */
  }

  .hex {
    width: var(--w);
    height: var(--h);
    margin: 0 auto;
    transform: none !important;
  }
}


  /* FOOTER */
.footer-buttons {
  margin-top: 10px;
}

.footer-buttons button {
  margin: 5px;
  padding: 8px 14px;
  background-color: #1e1e1d;
  color: #ffee00;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.3s ease;
}

footer {
  background-color: #12121f;
  text-align: center;
  padding: 15px 0;
  color: #aaa;
  font-size: 0.9rem;
  border-top: 2px solid #FFD700;
}

/* Modal ya está definido en tu CSS, pero agrego por claridad */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}

.modal-contenido {
  background-color: #fff;
  margin: 5% auto;
  padding: 20px;
  width: 90%;
  max-width: 600px;
  color: black;
  border-radius: 10px;
  max-height: 80vh;
  overflow: hidden;
  position: relative;
}

.contenido-scrollable {
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 10px;
}

.cerrar {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 24px;
  cursor: pointer;
}

.redes-sociales {
  margin-top: 15px;
}

.redes-sociales a {
  color: #f0f0f0;
  text-decoration: none;
  margin: 0 8px;
  font-size: 1rem;
  transition: color 0.3s ease, transform 0.3s ease;
}

.redes-sociales a:hover {
  color: #FFD700;
  transform: scale(1.2);
}