* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
}

html,
body {
  overflow-x: hidden;
  width: 100%;
}

body {
  background-image: url("fondoPG.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: white;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

h2 {
  color: #8b0000;
}

h3 {
  color: black;
}

/* HEADER */

header {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: rgba(153, 1, 1, 0.8);
  flex-wrap: wrap;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: white;
  padding: 8px;
  object-fit: cover;
}

/* MENÚ */

.menu {
  position: absolute;
  top: 25px;
  right: 35px;
  z-index: 1000;
}

.boton-menu {
  background: rgba(255,255,255,0.15);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 15px;
  font-size: 17px;
  font-weight: bold;
  cursor: pointer;
}

.opciones-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 45px;
  background: #990101;
  padding: 15px;
  border-radius: 15px;
  gap: 10px;
  flex-direction: column;
  box-shadow: 0 8px 25px rgba(0,0,0,.4);
}

.opciones-menu.mostrar {
  display: flex;
}

.opciones-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 16px;
  cursor: pointer;
  white-space: nowrap;
}

.opciones-menu a:hover {
  background: white;
  color: #990101;
}

.opciones-menu svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: white;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.opciones-menu a:hover svg {
  stroke: #990101;
}

/* SECCIONES */

.seccion {
  display: none;
  padding: 50px;
  animation: fade 0.5s ease;
}

.activa {
  display: block;
}

/* INICIO */

.hero {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.hero div {
  width: 100%;
  max-width: 320px;
  text-align: center;
}

.hero img {
  width: 300px;
  height: 220px;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  transition: 0.3s;
}

.hero img:hover {
  transform: scale(1.05);
}

.bienvenida {
  width: 95%;
  max-width: 1000px;
  margin: 30px auto;
  padding: 35px;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 25px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.bienvenida h2 {
  font-size: 38px;
  color: black;
  margin-bottom: 20px;
}

.bienvenida p {
  font-size: 22px;
  line-height: 1.8;
  color: black;
  margin-bottom: 15px;
}

.bienvenida strong {
  color: #8b0000;
  font-weight: bold;
}

/* UBICACIONES */

.ubicaciones {
  margin-top: 50px;
  text-align: center;
}

.ubicaciones h2 {
  font-size: 36px;
  margin-bottom: 30px;
  color: rgb(122, 9, 9);
}

.sedes-container {
  display: flex;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
}

.sede-card {
  width: 100%;
  max-width: 360px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  transition: 0.3s;
}

.sede-card:hover {
  transform: translateY(-8px);
}

.sede-card p {
  padding: 18px;
  font-size: 18px;
  font-weight: bold;
  color: black;
}

/* ===== LIBROS PROFESIONAL ===== */

#libros .botones-info{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
    gap:30px;
    max-width:1150px;
    margin:50px auto;
}

#libros .botones-info a{
    position:relative;
    display:flex;
    flex-direction:column;
    justify-content:center;

    min-height:180px;
    padding:28px;

    text-decoration:none;

    background:linear-gradient(135deg,#061f3f,#0b4b77);
    border-radius:25px;

    box-shadow:
    0 12px 30px rgba(0,0,0,.35);

    overflow:hidden;

    transition:.35s;
}

#libros .botones-info a:hover{
    transform:translateY(-8px);
    box-shadow:
    0 18px 40px rgba(0,0,0,.45);
}

#libros .botones-info a::after{
    position:absolute;
    top:18px;
    right:25px;

    font-size:58px;

    color:#d4af37;

    opacity:.18;
}

/* PIEZAS */

#libros .botones-info a:nth-child(1)::after{
    content:"♜";
}

#libros .botones-info a:nth-child(2)::after{
    content:"♞";
}

#libros .botones-info a:nth-child(3)::after{
    content:"♝";
}

#libros .botones-info a:nth-child(4)::after{
    content:"♚";
}

#libros .botones-info a:nth-child(5)::after{
    content:"♛";
}

#libros .botones-info a:nth-child(6)::after{
    content:"♟";
}

#libros .botones-info a{
    font-size:34px;
    font-weight:800;
    color:white;
}

#libros .botones-info a span{
    margin-top:12px;
    font-size:17px;
    color:#dceeff;
}

#libros .botones-info a strong{
    margin-top:20px;
    font-size:18px;
    color:#5fd3ff;
}
#libros .botones-info a{
  border:1px solid rgba(212,175,55,.35);
  background:linear-gradient(135deg,#061a33,#082f55,#0b4b77);
}

#libros .botones-info a::before{
  content:"";
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:5px;
  background:linear-gradient(90deg,#d4af37,#5fd3ff);
}

#libros .botones-info a:hover{
  transform:translateY(-8px) scale(1.02);
  box-shadow:
    0 18px 40px rgba(0,0,0,.45),
    0 0 18px rgba(95,211,255,.25);
}

#libros .botones-info a:hover::after{
  opacity:.32;
  transform:scale(1.08);
}
/* ARREGLO HISTORIA */
.historia-container{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:50px;
  flex-wrap:wrap;
}

.historia-imagen img{
  width:420px;
  max-width:100%;
  height:500px;
  object-fit:cover;
  border-radius:30px;
}

.historia-texto{
  max-width:750px;
  background:rgba(255,255,255,.9);
  padding:35px;
  border-radius:25px;
}

.historia-texto h2,
.historia-texto p{
  color:black;
}

.historia-texto p{
  font-size:20px;
  line-height:1.7;
  text-align:justify;
}

.fundador{
  background:white;
  color:black;
  padding:12px;
  border-radius:15px;
  text-align:center;
  font-weight:bold;
}

/* GALERÍA */

.galeria {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  justify-items: center;
  margin-top: 30px;
}

.card-galeria {
  width: 100%;
  max-width: 360px;
  background-color: #afaaec;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(12, 0, 0, 0.35);
  text-align: center;
  transition: transform 0.3s ease;
}

.card-galeria:hover {
  transform: translateY(-8px);
}

.card-galeria img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
/* ===== PLATAFORMAS PREMIUM ===== */

.titulo-plataformas{
    text-align:center;
    font-size:42px;
    color:#8b0000;
    margin-bottom:45px;
}

.plataformas-container{
    display:flex;
    justify-content:center;
    gap:45px;
    flex-wrap:wrap;
}

.plataforma-card{
    position:relative;
    width:380px;
    background:rgba(255,255,255,.95);
    border-radius:30px;
    padding:35px 30px;
    text-align:center;
    text-decoration:none;

    border-top:7px solid #d4af37;

    box-shadow:
    0 15px 35px rgba(0,0,0,.18);

    overflow:hidden;

    transition:.4s;
}

.plataforma-card:hover{
    transform:translateY(-12px);
    box-shadow:
    0 25px 50px rgba(0,0,0,.28);
}

.plataforma-card img{
    width:240px;
    height:140px;
    object-fit:contain;
    margin:0 auto 30px;
    transition:.4s;
}

.plataforma-card:hover img{
    transform:scale(1.05);
}

.plataforma-card h3{
    font-size:38px;
    color:black;
    margin-bottom:18px;
    font-weight:800;
}

.plataforma-card p{
    font-size:20px;
    color:#444;
    line-height:1.8;
}
/* ARREGLO PLATAFORMAS */

.titulo-plataformas{
  text-align:center;
  font-size:40px;
  color:#8b0000;
  margin-bottom:35px;
}

.plataformas-container{
  display:flex;
  justify-content:center;
  gap:35px;
  flex-wrap:wrap;
}

.plataforma-card{
  width:360px;
  background:rgba(255,255,255,.93);
  border-radius:25px;
  padding:25px;
  text-align:center;
  text-decoration:none;
  box-shadow:0 10px 28px rgba(0,0,0,.25);
  transition:.3s;
}

.plataforma-card:hover{
  transform:translateY(-8px);
}

.plataforma-card img{
  width:280px;
  height:220px;
  object-fit:contain;
  margin:0 auto 20px;
}

.plataforma-card h3{
  font-size:28px;
  color:black;
  margin-bottom:12px;
}

.plataforma-card p{
  font-size:18px;
  color:#333;
  line-height:1.6;
}
.plataforma-card:nth-child(1){
    border-top:7px solid #d4af37; /* Lichess */
}

.plataforma-card:nth-child(2){
    border-top:7px solid #2d8cff; /* Zoom */
}
/* ===== REDES SOCIALES PRO ===== */

.titulo-redes{
  text-align:center;
  font-size:42px;
  color:#8b0000;
  margin-bottom:45px;
}

.redes-container{
  display:flex;
  justify-content:center;
  gap:40px;
  flex-wrap:wrap;
}

.red-card{
  width:330px;
  background:rgba(255,255,255,.95);
  border-radius:28px;
  padding:35px 25px;
  text-align:center;
  text-decoration:none;
  box-shadow:0 12px 30px rgba(0,0,0,.22);
  transition:.35s;
  overflow:hidden;
}

.red-card:hover{
  transform:translateY(-10px);
}

.red-card img{
  width:90px !important;
  height:90px !important;
  object-fit:contain;
  margin:0 auto 25px;
}

.red-card h3{
  font-size:30px;
  color:black;
  margin-bottom:12px;
}

.red-card p{
  font-size:18px;
  color:#444;
  line-height:1.6;
}

.instagram{
  border-top:7px solid #e1306c;
}

.facebook{
  border-top:7px solid #1877f2;
}

.tiktok{
  border-top:7px solid #000;
}
/* ================= WHATSAPP ================= */

.whatsapp-container{
  position:fixed;
  right:25px;
  bottom:25px;
  z-index:500;
}

.whatsapp-btn{
  width:70px;
  height:70px;
  border-radius:50%;
  background:#25d366;
  display:flex;
  justify-content:center;
  align-items:center;
  box-shadow:0 8px 25px rgba(0,0,0,.3);
  transition:.3s;
}

.whatsapp-btn:hover{
  transform:scale(1.08);
}

.whatsapp-btn img{
  width:38px;
  height:38px;
}

.whatsapp-popup{
  position:absolute;
  right:0;
  bottom:90px;
  width:420px;
  background:#f0f2f5;
  border-radius:22px;
  overflow:hidden;
  box-shadow:0 10px 30px rgba(0,0,0,.25);

  opacity:0;
  visibility:hidden;
  transform:translateY(20px);

  transition:.3s;
}

.whatsapp-container:hover .whatsapp-popup{
  opacity:1;
  visibility:visible;
  transform:translateY(0);
}

.popup-header{
  background:#25d366;
  color:white;
  padding:18px;
  font-size:22px;
  font-weight:bold;
}

.popup-body{
  padding:20px;
}

.popup-body p{
  background:white;
  color:#333;
  padding:18px;
  border-radius:18px;
}

.popup-btn{
  display:block;
  margin:20px;
  padding:15px;
  text-align:center;
  text-decoration:none;
  background:#25d366;
  color:white;
  font-weight:bold;
  border-radius:15px;
}

.popup-btn{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:10px;
}

.chat-icon{
  font-size:18px;
  animation:moverIcono 1s infinite ease-in-out;
}

@keyframes moverIcono{
  0%{ transform:translateX(0); }
  50%{ transform:translateX(6px); }
  100%{ transform:translateX(0); }
}
.send-icon{
  display:flex;
  align-items:center;
}

.send-icon svg{
  width:58px;
  height:58px;

  fill:none;
  stroke:white;
  stroke-width:2.3;
  stroke-linecap:round;
  stroke-linejoin:round;

  animation:enviar 1.5s ease-in-out infinite;
}

@keyframes enviar{

  0%{
    transform:translateX(0) rotate(0deg);
  }

  50%{
    transform:translateX(8px) rotate(10deg);
  }

  100%{
    transform:translateX(0) rotate(0deg);
  }

}
/* ================= VISOR DE IMÁGENES ================= */

#visor{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.95);
  justify-content:center;
  align-items:center;
  z-index:99999999;
}

#visor img{
  max-width:90vw;
  max-height:90vh;
  object-fit:contain;
}

#cerrar{
  position:absolute;
  top:90px;
  right:30px;

  width:55px;
  height:55px;

  border:none;
  border-radius:50%;

  background:white;
  color:black;

  font-size:30px;
  cursor:pointer;

  z-index:100000000;
}


/* ================= PANTALLA DE CARGA ================= */

#pantalla-carga{
  position:fixed;
  inset:0;
  background:white;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  z-index:999999;
  transition:.3s;
}

#pantalla-carga img{
  width:220px;
  height:220px;
}

#pantalla-carga h2{
  margin-top:20px;
  color:#8b0000;
}

.cargando{
  width:50px;
  height:50px;
  border-radius:50%;
  border:5px solid #ddd;
  border-top:5px solid #8b0000;
  margin-top:20px;
  animation:girar 1s linear infinite;
}

@keyframes girar{
  from{
    transform:rotate(0deg);
  }
  to{
    transform:rotate(360deg);
  }
}


/* ================= RESPONSIVE ================= */

@media(max-width:768px){

  .whatsapp-popup{
    width:270px;
  }

  .logo{
    width:80px;
    height:80px;
  }

  h1{
    font-size:22px;
  }

}
