/* ===========================================
   CONTENEDOR GENERAL
   =========================================== */

.legion-votacion-2025 {
    max-width: 960px;
    margin: 0 auto 4rem;
    padding: 0 1rem;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #f5f5f5;
}

/* ===========================================
   TARJETA DE CABECERA
   =========================================== */

.legion-v-card-header {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    background: radial-gradient(circle at top left, #5b0000 0%, #130006 60%, #050505 100%);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
    margin-bottom: 1.5rem;
}

.legion-v-logo img {
    width: 110px;
    height: auto;
    border-radius: 50%;
    border: 2px solid #d7b56d;
    box-shadow: 0 0 20px rgba(215, 181, 109, 0.4);
}

.legion-v-header-text h1 {
    margin: 0 0 0.4rem;
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
}

.legion-v-header-text p {
    margin: 0.15rem 0;
    font-size: 0.95rem;
    color: #f0f0f0;
}

.legion-v-fecha {
    margin-top: 0.4rem;
    font-size: 0.95rem;
    color: #ffdddd;
}

/* ===========================================
   MENSAJES
   =========================================== */

.legion-votacion-msg {
    margin: 1rem 0;
    padding: 0.9rem 1.2rem;
    border-radius: 12px;
    font-size: 0.95rem;
}

.legion-votacion-msg.ok {
    background: rgba(0, 120, 40, 0.18);
    border: 1px solid rgba(46, 204, 113, 0.8);
    color: #c8f7c5;
}

.legion-votacion-msg.error {
    background: rgba(120, 0, 0, 0.25);
    border: 1px solid rgba(231, 76, 60, 0.9);
    color: #f1a7a7;
}

/* ===========================================
   FORMULARIO BASE
   =========================================== */

.legion-votacion-form {
    background: #060606;
    border-radius: 16px;
    padding: 1.5rem 1.5rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.7);
}

/* ===========================================
   SECCIONES (BASE)
   =========================================== */

.legion-section {
    margin-bottom: 2.3rem;
    padding: 1.5rem 1.5rem 1.8rem;
    border-radius: 16px;
    background: rgba(15, 15, 15, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative; /* para títulos flotantes */
}

/* ===========================================
   SECCIONES: GENERALES / ESCUELITA
   =========================================== */

/* Generales → difuminado dorado + borde rojo */
.legion-section.general {
    background: radial-gradient(
        circle at top,
        rgba(215, 181, 109, 0.18),
        #050505 65%,
        #000000 100%
    );
    border-left: 4px solid #8b0000;
    border-right: 4px solid #8b0000;
    box-shadow: 0 0 22px rgba(215, 181, 109, 0.20);
}

/* Escuelita → difuminado rojo + borde rojo */
.legion-section.escuelita {
    background: radial-gradient(
        circle at top,
        rgba(255, 80, 80, 0.22),
        #050505 65%,
        #000000 100%
    );
    border-left: 4px solid #b30000;
    border-right: 4px solid #b30000;
    margin-top: 2.4rem;
}

/* TITULOS FLOTANTES DE SECCIÓN */

.legion-section.general::before,
.legion-section.escuelita::before {
    position: absolute;
    top: -0.9rem;
    left: 1.6rem;
    padding: 0.18rem 0.85rem;
    border-radius: 999px;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 600;
    z-index: 2;
}

.legion-section.general::before {
    content: "Generales";
    background: linear-gradient(90deg, #b30000, #ff3b3b, #d7b56d);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(215, 181, 109, 0.6);
}

.legion-section.escuelita::before {
    content: "Escuelita";
    background: linear-gradient(90deg, #ff6b6b, #b30000);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(255, 80, 80, 0.6);
}

/* BLOQUE DEL MAIL → SIN TÍTULO FLOTANTE */
.legion-section.no-title::before {
    content: none !important;
}

/* Ocultamos legend visualmente pero lo dejamos para accesibilidad */
.legion-section legend {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ===========================================
   INPUT DE EMAIL
   =========================================== */

.legion-section input[type="email"] {
    width: 100%;
    max-width: 280px;
    background: #111;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 0.8rem;
    color: #f5f5f5;
}

.legion-section input[type="email"]:focus {
    outline: none;
    border-color: #ff3b3b;
    box-shadow: 0 0 0 1px rgba(255, 59, 59, 0.7);
}

.legion-help {
    font-size: 0.85rem;
    color: #cccccc;
    margin-top: 0.3rem;
}

/* ===========================================
   TÍTULOS DE TERNA
   =========================================== */

.legion-terna {
    margin-bottom: 1.6rem;
}

.legion-terna h2 {
    font-weight: 700;
    font-size: 1.28rem;
    letter-spacing: 0.045em;
    margin: 3rem 0 0.9rem;  /* espacio con la terna anterior */
    text-transform: uppercase;
    color: #ffffff;
    position: relative;
}

/* Primera terna dentro de una sección: menos margen superior */
.legion-section .legion-terna:first-of-type h2 {
    margin-top: 1.6rem;
}

/* Barra decorativa rojo–dorado bajo el título */
.legion-terna h2::after {
    content: "";
    display: block;
    width: 70px;
    height: 3px;
    margin-top: 6px;
    background: linear-gradient(90deg, #b30000, #ff3b3b, #d7b56d);
    border-radius: 3px;
    box-shadow: 0 0 8px rgba(255, 59, 59, 0.6);
}

/* ===========================================
   GRID DE JUGADORES
   =========================================== */

.legion-terna-opciones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 1rem;
}

/* ===========================================
   TARJETAS DE JUGADOR
   =========================================== */

.legion-card {
    display: block;
    cursor: pointer;
}

.legion-card input[type="radio"] {
    display: none;
}

/* Tarjeta fija */
.legion-card-inner {
    border-radius: 16px;
    background: linear-gradient(145deg, #121212, #060606);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.8rem 0.8rem 0.9rem;
    text-align: center;
    transition: all 0.18s ease-out;

    height: 225px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

/* contenedor de la foto/avatar */
.legion-card-foto {
    width: 120px;
    height: 120px;
    margin-bottom: 0.30rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* foto / avatar circular */
.legion-card-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 20%;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.6);
}

/* nombre */
.legion-card-nombre {
    font-size: 0.86rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.2;
    margin-top: auto;        /* empuja hacia abajo */
    padding-bottom: 0.45rem; /* unos mm por encima del borde */
    text-align: center;
    max-width: 90%;
}

/* Hover y selección */
.legion-card-inner:hover {
    border-color: #d7b56d;
    box-shadow: 0 0 14px rgba(215, 181, 109, 0.6);
    transform: translateY(-3px);
}

.legion-card input[type="radio"]:checked + .legion-card-inner {
    border-color: #ff3b3b;
    box-shadow: 0 0 18px rgba(255, 59, 59, 0.75);
    background: radial-gradient(circle at top, #320000, #080808);
}

/* ===========================================
   TERNAS DE TEXTO LIBRE
   =========================================== */

.legion-terna-texto input.legion-text-input {
    width: 100%;
    max-width: 360px;
    background: #111;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 0.5rem 0.7rem;
    color: #f5f5f5;
}

.legion-terna-texto input.legion-text-input:focus {
    outline: none;
    border-color: #ff3b3b;
    box-shadow: 0 0 0 1px rgba(255, 59, 59, 0.7);
}

/* ===========================================
   BOTÓN DE ENVÍO
   =========================================== */

.legion-submit-wrapper {
    text-align: center;
    margin-top: 1.6rem;
}

.legion-submit-button {
    display: inline-block;
    padding: 0.6rem 1.8rem;
    border-radius: 999px;
    border: none;
    font-size: 0.95rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ff3b3b, #b30000);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 0 18px rgba(255, 59, 59, 0.6);
    transition: all 0.18s ease-out;
}

.legion-submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 24px rgba(255, 59, 59, 0.85);
}

/* ===========================================
   RESPONSIVE (TABLET / MOBILE)
   =========================================== */

/* Tablet y celulares grandes: 2 columnas, todo un poco más chico */
@media (max-width: 900px) {

    .legion-v-card-header {
        flex-direction: column;
        text-align: center;
        padding: 1.1rem 1rem;
    }

    .legion-v-header-text h1 {
        font-size: 1.35rem;
    }

    .legion-v-header-text p {
        font-size: 0.9rem;
    }

    .legion-section {
        padding: 1.2rem 1.1rem 1.5rem;
        margin-bottom: 1.8rem;
    }

    .legion-terna h2 {
        font-size: 1.05rem;
        margin: 2.1rem 0 0.7rem;
    }

    .legion-terna-opciones-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.6rem;
    }

    .legion-card-inner {
        height: 200px;
        padding: 0.6rem 0.5rem 0.8rem;
    }

    .legion-card-foto {
        width: 100px;
        height: 100px;
        margin-bottom: 0.25rem;
    }

    .legion-card-nombre {
        font-size: 0.8rem;
        padding-bottom: 0.35rem;
    }
}

/* Celular normal / angosto: 1 columna, tarjetas más livianas */
@media (max-width: 600px) {

    .legion-terna-opciones-grid {
        grid-template-columns: 1fr;          /* UNA columna */
        max-width: 360px;
        margin: 0 auto;
        gap: 0.7rem;
    }

    .legion-card-inner {
        height: auto;                        /* deja de ser ladrillo fijo */
        min-height: 210px;
        padding: 0.7rem 0.6rem 0.9rem;
    }

    .legion-card-foto {
        width: 110px;
        height: 110px;
        margin-bottom: 0.3rem;
    }

    .legion-card-nombre {
        font-size: 0.82rem;
        margin-top: 0.35rem;
        padding-bottom: 0.4rem;
    }

    .legion-section.general::before,
    .legion-section.escuelita::before {
        left: 1rem;
        font-size: 0.72rem;
    }
}
