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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9;
    color: #333333;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center {
    text-align: center;
}

/* ========================================== */
/* HEADER Y NAVEGACIÓN                        */
/* ========================================== */
header {
    background: #2e1065; 
    border-bottom: 3px solid #f97316;
    padding: 20px 0;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.nav-logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ffffff;
    cursor: pointer;
    letter-spacing: 0.5px;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 28px;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    transition: 0.3s;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.main-nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: #f97316;
}

/* Dropdown Menú */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #2e1065;
    min-width: 180px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-radius: 6px;
    padding: 10px 0;
    z-index: 1001;
    flex-direction: column;
    gap: 0;
}

.dropdown-menu li a {
    padding: 8px 15px;
    display: block;
}

.dropdown-menu li a:hover {
    background: #431407;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.header-text {
    text-align: center;
    margin-top: 25px;
}

.header-text h1 {
    font-size: 2.2rem;
    color: #ffffff;
    margin-bottom: 8px;
}

.header-text .tagline {
    font-size: 1.1rem;
    color: #cbd5e1;
}

/* ========================================== */
/* TARJETAS Y CONTENIDO PRINCIPAL             */
/* ========================================== */
main {
    padding: 40px 0;
}

.card {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.card h2, .card h3 {
    color: #1e3a8a;
    margin-bottom: 15px;
}

.card p {
    color: #475569;
    margin-bottom: 15px;
    line-height: 1.7;
}

.hero-img, .footer-img {
    width: 100%;
    max-height: 350px;
    object-fit: cover;
    border-radius: 8px;
    margin: 15px 0;
}

/* Botones principales */
.btn-primary {
    background-color: #f97316;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.btn-primary:hover {
    background-color: #ea580c;
    transform: translateY(-2px);
}

.cta-container {
    text-align: center;
    margin-top: 20px;
}

/* ========================================== */
/* GRILLAS (PAÍSES, SALAS Y NOMBRES)           */
/* ========================================== */
.grid-salas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.btn-sala {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 600;
    color: #1e3a8a;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-sala:hover {
    background: #2e1065;
    color: #ffffff;
    border-color: #2e1065;
    transform: translateY(-2px);
}

.grid-nombres-seo {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.caja-nombre {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 15px;
    border-radius: 8px;
}

.caja-nombre h4 {
    color: #2e1065;
    margin-bottom: 5px;
}

/* ========================================== */
/* MINI JUEGO: TRES EN LÍNEA                  */
/* ========================================== */
.tic-tac-toe-board {
    display: grid;
    grid-template-columns: repeat(3, 80px);
    grid-template-rows: repeat(3, 80px);
    gap: 8px;
    justify-content: center;
    margin: 20px auto;
}

.cell {
    background: #f1f5f9;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    font-size: 2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.cell:hover {
    background: #e2e8f0;
}

.cell.x {
    color: #2563eb;
}

.cell.o {
    color: #dc2626;
}

/* ========================================== */
/* FORMULARIOS Y SUSCRIPCIÓN                  */
/* ========================================== */
#form-suscripcion {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 15px auto 0 auto;
    flex-wrap: wrap;
}

.input-terra {
    flex: 1;
    min-width: 250px;
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1rem;
}

.btn-terra-submit {
    background-color: #2e1065;
    color: white;
    border: none;
    padding: 12px 20px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-terra-submit:hover {
    background-color: #431407;
}

/* ========================================== */
/* COOKIE BANNER Y PANTALLA COMPLETA CHAT     */
/* ========================================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, #2e1065, #431407);
    color: #ffffff;
    padding: 15px 20px;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.4);
    z-index: 999999;
    display: none;
    box-sizing: border-box;
    border-top: 3px solid #f97316;
}

.cookie-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

@media (min-width: 768px) {
    .cookie-container {
        flex-direction: row;
        justify-content: space-between;
        gap: 30px;
    }
}

.cookie-text {
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    color: #cbd5e1;
}

.cookie-text a {
    color: #f97316;
    text-decoration: underline;
    font-weight: bold;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.btn-cookie-accept {
    background: #2ecc71;
    color: #ffffff;
    border: none;
    padding: 10px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.85rem;
    transition: background 0.2s ease;
}

.btn-cookie-accept:hover {
    background: #27ae60;
}

.btn-cookie-reject {
    background: #e74c3c;
    color: #ffffff;
    border: none;
    padding: 10px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.85rem;
    transition: background 0.2s ease;
}

.btn-cookie-reject:hover {
    background: #c0392b;
}

/* Chat Fullscreen Overlay */
.chat-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 9999999;
    display: flex;
    flex-direction: column;
}

.chat-fullscreen-overlay iframe {
    width: 100%;
    height: 100%;
    border: none;
    flex: 1;
}

.chat-fullscreen-close {
    position: absolute;
    top: 10px;
    right: 15px;
    z-index: 10000000;
    background: #f97316;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    font-weight: bold;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    transition: background 0.2s;
}

.chat-fullscreen-close:hover {
    background: #ea580c;
}

/* ========================================== */
/* FOOTER                                     */
/* ========================================== */
footer {
    background: #c2410c; 
    border-top: 3px solid #2e1065;
    color: #ffffff;
    padding: 30px 0;
    text-align: center;
}

footer p, footer small {
    color: #ffffff;
}

/* ========================================== */
/* RESPONSIVE DESIGN (MÓVILES)                */
/* ========================================== */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .main-nav {
        display: none;
        width: 100%;
        margin-top: 15px;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .main-nav li {
        width: 100%;
        text-align: center;
    }

    .main-nav a {
        display: block;
        padding: 8px 0;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        background: #3b1479;
        width: 100%;
    }

    .header-text h1 {
        font-size: 1.6rem;
    }

    .card {
        padding: 20px 15px;
    }
}