/* ===================== RESET ===================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', Arial, sans-serif;
    color: #333;
    background: 
        linear-gradient(rgba(255,255,255,0.92), rgba(255,255,255,0.92)),
        url("https://images.unsplash.com/photo-1529699211952-734e80c4d42b") center/cover no-repeat;
    background-attachment: scroll;
}

/* ===================== HEADER ===================== */
header {
    background: linear-gradient(135deg, #111, #333);
    color: white;
    text-align: center;
    padding: 20px 15px;
}

header h1 {
    font-size: 38px;
    font-weight: 700;
    margin: 5px 0;
}

header p {
    font-size: 14px;
    opacity: 0.85;
    letter-spacing: 2px;
}

/* ===================== NAV ===================== */
nav {
    background: rgba(34, 34, 34, 0.95);
    text-align: center;
    padding: 14px;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(6px);
}

nav a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 6px;
    transition: 0.3s;
}

nav a:hover {
    background: #ffcc00;
    color: #111;
}

/* ===================== HERO ===================== */
.hero {
    background: 
        linear-gradient(rgba(0,0,0,0.65), rgba(0,0,0,0.65)),
        url("ajedrez1.png") center/cover no-repeat;
    color: white;
    text-align: center;
    padding: 140px 20px;
    min-height: 80vh;
}

.hero h2 {
    font-size: 36px;
    margin-bottom: 10px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 20px;
}

/* ===================== SECCIONES ===================== */
section {
    padding: 70px 20px;
    text-align: center;
    animation: fadeIn 0.8s ease-in-out;
}

/* ===================== CARDS ===================== */
.cards {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.card {
    background: white;
    padding: 25px;
    width: 260px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.10);
    transition: 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

/* ===================== BOTONES ===================== */
button {
    background: #ffcc00;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 6px;
    font-weight: bold;
    transition: 0.3s ease;
}

button:hover {
    background: #e6b800;
    transform: scale(1.05);
}

/* Botón WhatsApp / inscripción */
.btn-inscribir {
    display: inline-block;
    margin-top: 15px;
    background: #25D366;
    color: white;
    padding: 12px 25px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 6px;
    transition: 0.3s;
}

.btn-inscribir:hover {
    background: #1ebe5d;
    transform: scale(1.05);
}

/* ===================== FORMULARIO ===================== */
.formulario {
    max-width: 500px;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.formulario input,
.formulario select,
.formulario textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

.formulario textarea {
    resize: none;
    height: 80px;
}

.formulario button {
    background: linear-gradient(135deg, #25D366, #1ebe5d);
    color: white;
    padding: 14px;
    border-radius: 10px;
    font-weight: bold;
}

.formulario button:hover {
    background: #ffcc00;
    color: #111;
}

/* ===================== WHATSAPP FLOAT ===================== */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 58px;
    height: 58px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    transition: 0.25s;
    z-index: 1000;
}

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

//* ===================== LOGO ===================== */
.logo {
    display: flex;
    flex-direction: row !important;
    align-items: center;
    justify-content: center;
    gap: 15px;
    animation: aparecerLogo 1.5s ease forwards;
    opacity: 0;
}

.logo-img {
    width: 80px;
    filter: drop-shadow(0 0 8px gold);
}

.logo-text h1 {
    font-size: 34px;
    font-weight: 800;
    background: linear-gradient(180deg,#fff6b7,#ffd700,#d4af37,#b8962e);
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-stroke: 1px #222;
    animation: brilloLujo 3s infinite alternate;
}

.logo-text p {
    font-size: 14px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 3px;
}

/* Ajuste específico para que el logo se vea pequeño y perfecto en celulares */
@media screen and (max-width: 768px) {
    .logo-img {
        width: 55px !important;
        max-width: 55px !important;
    }
    .logo-text h1 {
        font-size: 1.8rem !important;
    }
}

/* ===================== TABLERO ===================== */
.tablero-mini {
    width: 44px;
    height: 44px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    border: 2px solid #d4af37;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(255,215,0,0.4);
    animation: flotar 2s ease-in-out infinite;
}

.tablero-mini div:nth-child(odd) {
    background: #d4af37;
}

.tablero-mini div:nth-child(even) {
    background: #111;
}

/* ===================== ANIMACIONES ===================== */
@keyframes fadeIn {
    from {opacity: 0; transform: translateY(20px);}
    to {opacity: 1; transform: translateY(0);}
}

@keyframes flotar {
    0% {transform: translateY(0);}
    50% {transform: translateY(-5px);}
    100% {transform: translateY(0);}
}

@keyframes aparecerLogo {
    from {opacity: 0; transform: translateY(20px);}
    to {opacity: 1; transform: translateY(0);}
}

@keyframes brilloLujo {
    0% {filter: brightness(1);}
    100% {filter: brightness(1.3);}
}
/* ===================== RESPONSIVE ===================== */
/* ===================== RESPONSIVE UNIFICADO ===================== */
@media screen and (max-width: 768px) {
    nav {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    nav a {
        display: block !important;
        margin: 6px 0 !important;
        width: 80% !important;
        text-align: center !important;
    }

    header h1 {
        font-size: 24px;
    }

    .cards {
        flex-direction: column;
        align-items: center;
    }

    .card {
        width: 95%;
    }

    section {
        padding: 40px 15px;
    }

    .hero {
        height: 70vh;
        padding: 20px;
    }

    .hero h2 {
        font-size: 20px;
    }

    .hero p {
        font-size: 14px;
    }
}
@media screen and (max-width: 768px) {
    body, html {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Solo contenedores globales, sin tocar los divs internos */
    header, nav, section, footer {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

   nav {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }

    nav a {
        display: block !important;
        width: 90% !important;
        margin: 5px auto !important;
        text-align: center !important;
    }
}

/* Restaurar el diseño original: imagen al lado del texto */
.desc-contenedor, #descripcion .desc-contenedor, .about-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Controlar la imagen para que recupere su tamaño original proporcionado al lado del texto */
section#descripcion img, .desc-imagen img {
    width: 100% !important;
    max-width: 450px !important;
    height: auto !important;
    display: block !important;
    margin: 0 !important;
}

/* En celulares, la imagen pasa arriba y el texto abajo de forma ordenada */
@media screen and (max-width: 768px) {
    .desc-contenedor, #descripcion .desc-contenedor, .about-container {
        flex-direction: column !important;
        text-align: center !important;
    }
    
    section#descripcion img, .desc-imagen img {
        max-width: 100% !important;
        margin: 0 auto 20px auto !important;
    }
}
@media screen and (max-width: 768px) {
    /* Ajustar tamaño y alineación del logo principal en móvil */
    header img, .logo img, img.logo {
        max-width: 70px !important; /* Puedes cambiar este valor a 60px o 80px según prefieras */
        height: auto !important;
        display: inline-block !important;
        vertical-align: middle !important;
    }
}
@media screen and (max-width: 768px) {
    /* Reducir el tamaño del logo en dispositivos móviles */
    .logo-img {
        max-width: 70px !important; /* Cambia a 60px o 80px si lo prefieres más pequeño o más grande */
        width: 100% !important;
        height: auto !important;
    }
}
/* Forzar que en el celular el logo y el texto vayan uno debajo del otro */
@media screen and (max-width: 768px) {
    .logo {
        flex-direction: column !important;
    }
}
/* Alinear el texto del logo de forma horizontal en PC */
.logo {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
}

.logo-text {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    text-align: left !important;
}

/* En celular volvemos al modo vertical para que no se amontone */
@media screen and (max-width: 768px) {
    .logo {
        flex-direction: column !important;
    }
    .logo-text {
        align-items: center !important;
        text-align: center !important;
    }
}
/* --- ESTILOS PARA EL MENÚ RESPONSIVE (MÓVIL) --- */

/* Ocultar el botón hamburguesa por defecto en computadoras */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    padding: 10px;
}

/* Diseño para pantallas de celulares (menos de 768px de ancho) */
@media (max-width: 768px) {
    /* Mostrar el botón hamburguesa en móviles */
    .menu-toggle {
        display: block;
        position: absolute;
        top: 15px;
        right: 20px;
        z-index: 1001;
    }

    /* Ocultar los enlaces de navegación por defecto en celulares */
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #1a1a1a; /* El mismo fondo oscuro de tu web */
        position: absolute;
        top: 60px; /* Ajusta según la altura de tu barra */
        left: 0;
        padding: 20px 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
        z-index: 1000;
    }

    /* Clase que activaremos con JavaScript para mostrar el menú al hacer clic */
    .nav-links.active {
        display: flex;
    }

    /* Estilo de los enlaces individuales dentro del menú móvil */
    .nav-links a {
        padding: 12px 20px;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }
}
/* --- INDICADORES DE CASILLAS PARA CREADOR DE DIAGRAMAS --- */
.square-55d63 {
    position: relative;
}

/* Estilos base centrados para todos los indicadores */
.square-55d63.indicador-mas::after,
.square-55d63.indicador-circulo::after,
.square-55d63.indicador-menos::after {
    position: absolute;
    top: 51%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    z-index: 10;
    pointer-events: none;
    line-height: 1;
}

/* Símbolo + */
.square-55d63.indicador-mas::after {
    content: "+";
    font-size: 60px;
    color: #d9534f;
}

/* CÍRCULO GIGANTE CENTRADO */
.square-55d63.indicador-circulo::after {
    content: ""; /* Vacío para dibujarlo como elemento geométrico */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    
    /* Ocupa el 75% del tamaño de la casilla (puedes subirlo a 80% si lo quieres más grande) */
    width: 90%;  
    height: 90%; 
    
    /* Propiedades del círculo */
    border: 3px solid #0275d8; /* Grosor y color azul del círculo */
    border-radius: 50%;      /* Lo vuelve completamente redondo */
    
    z-index: 10;
    pointer-events: none;
    box-sizing: border-box; 
}

/* Símbolo - */
.square-55d63.indicador-menos::after {
    content: "-";
    font-size: 60px;
    color: #f0ad4e;
}