/* =========================================
   1. RESETEO Y ESTILOS GLOBALES
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%); /* Fondo verde suave */
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #333;
}

/* =========================================
   2. CONTENEDOR PRINCIPAL
   ========================================= */
.container {
    background-color: #ffffff;
    width: 100%;
    max-width: 600px; /* Más angosto para que parezca un formulario */
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* =========================================
   3. ENCABEZADO
   ========================================= */
.header-practica {
    text-align: center;
    margin-bottom: 30px;
}

.header-practica h1 {
    font-size: 2rem;
    color: #166534; /* Verde oscuro */
    margin-bottom: 5px;
}

.header-practica p {
    color: #64748b;
    font-size: 0.95rem;
}

/* =========================================
   4. FORMULARIO Y CATEGORÍAS (Fieldset)
   ========================================= */
.lista-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.categoria {
    border: none; /* Quitamos el borde por defecto del fieldset */
}

.categoria legend {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* =========================================
   5. OPCIONES INTERACTIVAS (Labels)
   ========================================= */
.opcion {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background-color: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

/* Efecto al pasar el ratón (Hover) */
.opcion:hover {
    background-color: #f1f5f9;
    border-color: #94a3b8;
    transform: translateX(5px); /* Se mueve ligeramente a la derecha */
}

/* Ocultamos el checkbox real */
.opcion input[type="checkbox"] {
    display: none;
}

/* Creamos un checkbox personalizado (el cuadrito) */
.checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    margin-right: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: transparent; /* El check ✓ está oculto por defecto */
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.texto {
    font-size: 1rem;
    color: #334155;
    font-weight: 400;
    transition: color 0.2s;
}

/* =========================================
   6. ESTADO SELECCIONADO (:has & :checked)
   ========================================= */
/* Cuando el checkbox está marcado, cambiamos el estilo del label */
.opcion:has(input:checked) {
    background-color: #eff6ff;
    border-color: #3b82f6;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.15);
}

/* Estilo del cuadrito cuando está seleccionado */
.opcion:has(input:checked) .checkmark {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: white; /* Aparece el check ✓ */
}

/* Texto en negrita cuando está seleccionado */
.opcion:has(input:checked) .texto {
    color: #1e3a8a;
    font-weight: 600;
}

/* =========================================
   7. BOTÓN DE ENVÍO
   ========================================= */
.btn-enviar {
    margin-top: 15px;
    padding: 15px;
    background-color: #10b981; /* Verde esmeralda */
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.btn-enviar:hover {
    background-color: #059669;
    transform: scale(1.02);
}

/* =========================================
   8. RESPONSIVO
   ========================================= */
@media (max-width: 480px) {
    .container {
        padding: 20px;
    }
    .header-practica h1 {
        font-size: 1.6rem;
    }
    .opcion {
        padding: 12px 15px;
    }
}