        /* ===== Variables y reset ===== */
        /* Cargar la fuente si es necesaria */
        @font-face {
            font-family: 'Simplified Arabic';
            src: url('fonts/Simplified-Arabic-Bold.ttf') format('truetype'),
                url('fonts/Simplified-Arabic-Bold.woff') format('woff');
            font-weight: bold;
            font-style: normal;
            font-display: swap;
        }

        * {
            box-sizing: border-box;
            font-family: 'Simplified Arabic', 'Lexend', sans-serif;
            font-weight: bold;
        }

        /* ===== Variables y reset ===== */
        :root {
            --primary-color: #7E57C2;
            --secondary-color: #FF6B9F;
            --accent-color: #4FC3F7;
            --success-color: #36d2b5;
            --continue-color: #FF6B9F;
            --progress-fill: #36d2b5;
            --brand-purple: #6452c0;

            --text-light: #ffffff;
            --text-muted: rgba(255, 255, 255, 0.85);

            --card-bg: rgba(126, 87, 194, 0.2);
            --card-hover: rgba(126, 87, 194, 0.3);

            --teen-color: #FF9D5C;
            --adult-color: #5c8dff;

            --gradient-primary: linear-gradient(135deg, #7E57C2, #5E35B1);
            --gradient-secondary: linear-gradient(135deg, #FF6B9F, #FF4081);
            --gradient-accent: linear-gradient(135deg, #4FC3F7, #29B6F6);
        }

        * {
            box-sizing: border-box;
        }

        html,
        html,
        body {
            height: 100%;
            margin: 0;
            font-family: 'Simplified Arabic Bold', 'Lexend', system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
        }

        body {
            overflow-x: hidden;
            overflow-y: auto;
            background: #000;
            color: var(--text-light);
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        /* Video de fondo con menor opacidad */
        .bg-illustration {
            position: fixed;
            inset: 0;
            z-index: -50;
            pointer-events: none;
            display: block;
            overflow: hidden;
        }

        .bg-illustration video {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
            min-width: 100%;
            min-height: 100%;
        }

        /* Contenedor principal */
        .main-container {
            position: relative;
            z-index: 10;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 5px;
        }

        /* Logo */
        .main-logo {
            position: relative;
            margin-bottom: 8px;
            z-index: 20;
        }

        .main-logo img {
            height: 140px;
            width: auto;
            display: block;
            filter: brightness(1.2);
            max-width: 90%;
        }

        /* Panel principal (encabezado sobre video: TRANSPARENTE) */
        .panel {
            background: #ffffff;
            /* carta blanca grande */
            color: var(--brand-purple);
            /* texto por defecto morado */
            border-radius: 14px;
            padding: 22px;
            /* suficiente padding interno */
            width: min(680px, 92vw);
            max-width: 720px;
            box-shadow: 0 18px 44px rgba(8, 12, 30, 0.08);
            border: 1px solid rgba(20, 20, 40, 0.04);
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-top: 6px;
            align-items: stretch;
            justify-content: center;
        }

        /* Encabezado: texto claro sobre video */
        .panel-head .sub-title {
            color: #4FC3F7;
            font-weight: 700;
            font-size: 14px;
            letter-spacing: 0.5px;
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
        }

        /* Encabezado: texto en morado, menos sombras fuertes */
        .panel-head h1 {
            color: #7E57C2;
            text-shadow: none;
            /* quitar sombras para limpieza */
            font-size: clamp(24px, 4vw, 32px);
            margin: 6px 0 0;
            font-weight: 800;
        }

        /* Descripción en morado suave (menos intenso) */
        .panel-head p {
            color: rgba(100, 82, 192, 0.9);
            /* morado un poco atenuado */
            font-size: 15px;
            margin: 6px 0 10px;
            line-height: 1.45;
            text-shadow: none;
        }

        /* Línea de progreso (visible sobre el video) */
        .progress-line {
            height: 6px;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.16);
            overflow: hidden;
        }

        .progress-fill {
            background: var(--gradient-accent);
            height: 100%;
            width: 33%;
            transition: width .45s ease;
        }

        /* CARD BLANCA SOLO PARA LAS PREGUNTAS */
        .questions-card {
            background: #ffffff;
            color: #222;
            border-radius: 12px;
            padding: 12px;
            box-shadow: 0 12px 30px rgba(8, 12, 30, 0.06);
            border: 1px solid rgba(20, 20, 40, 0.04);
            margin-top: 8px;
        }

        /* PANEL BODY ahora contiene la card blanca */
        .panel-body {
            margin-top: 0;
        }

        /* Grid de opciones dentro de la card */
        .options-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 12px;
            width: 100%;
        }

        /* Tarjeta de opción: blanca, compacta */
        .option-card {
            background: #ffffff;
            color: #222;
            border-radius: 12px;
            padding: 12px 14px;
            cursor: pointer;
            border: 1px solid rgba(30, 30, 60, 0.06);
            display: flex;
            gap: 8px;
            min-height: 62px;
            align-items: center;
            transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
            box-shadow: 0 6px 18px rgba(10, 12, 30, 0.04);
        }

        /* hover & focus */
        .option-card:hover,
        .option-card:focus {
            transform: translateY(-4px);
            box-shadow: 0 14px 30px rgba(10, 12, 30, 0.08);
            outline: none;
        }

        /* estado seleccionado */
        .option-card.selected {
            border-color: rgba(126, 87, 194, 0.9);
            box-shadow: 0 18px 40px rgba(126, 87, 194, 0.10);
            background: linear-gradient(90deg, rgba(126, 87, 194, 0.06), rgba(79, 195, 247, 0.03));
        }

        /* texto dentro tarjeta */
        .option-card .title {
            font-weight: 700;
            font-size: 15px;
            color: #111;
        }

        .option-card .subtitle {
            font-size: 13px;
            color: rgba(34, 34, 34, 0.65);
        }

        /* Emoji grande para opciones de sentimiento */
        .option-card .emoji {
            font-size: 32px;
            margin-right: 6px;
        }

        /* Slider para pregunta 3 */
        .slider-container {
            width: 100%;
            padding: 20px;
        }

        .slider-wrapper {
            position: relative;
            margin: 30px 0;
        }

        input[type="range"] {
            width: 100%;
            height: 8px;
            border-radius: 5px;
            background: linear-gradient(to right, #FF6B9F 0%, #7E57C2 50%, #4FC3F7 100%);
            outline: none;
            -webkit-appearance: none;
        }

        input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: white;
            cursor: pointer;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
            border: 3px solid #7E57C2;
        }

        input[type="range"]::-moz-range-thumb {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: white;
            cursor: pointer;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
            border: 3px solid #7E57C2;
        }

        .slider-labels {
            display: flex;
            justify-content: space-between;
            margin-top: 12px;
            font-size: 13px;
            color: #666;
        }

        .slider-value {
            text-align: center;
            margin-top: 16px;
            font-size: 18px;
            font-weight: 700;
            color: #7E57C2;
        }

        /* Footer fijo (BLANCO) */
        .site-footer {
            position: fixed;
            left: 50%;
            transform: translateX(-50%);
            bottom: 18px;
            width: min(720px, 92vw);
            padding: 10px 16px;
            border-radius: 999px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: #ffffff;
            box-shadow: 0 12px 40px rgba(8, 12, 30, 0.06);
            border: 1px solid rgba(20, 20, 40, 0.04);
            color: var(--primary-color);
        }

        /* Botones dentro del footer */
        .btn-footer {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            font-weight: 700;
            font-size: 15px;
            cursor: pointer;
            border: none;
            border-radius: 999px;
            padding: 10px 16px;
            transition: all 0.18s ease;
        }

        .btn-back {
            background: transparent;
            color: var(--primary-color);
            border: 2px solid rgba(126, 87, 194, 0.14);
            padding: 8px 12px;
            border-radius: 999px;
        }

        .btn-back:hover {
            color: #fff;
            background: linear-gradient(90deg, rgba(126, 87, 194, 1), rgba(255, 107, 159, 1));
            border-color: transparent;
        }

        /* Botón Continuar: relleno primario */
        .btn-primary {
            background: linear-gradient(90deg, #be7ac5, #6452c0);
            color: #fff;
            border-radius: 28px;
            padding: 10px 22px;
            font-weight: 800;
            border: none;
            box-shadow: 0 10px 28px rgba(255, 107, 159, 0.16);
        }

        .btn-primary:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        /* Responsive */
        @media (max-width:600px) {
            .panel {
                padding: 10px 12px;
            }

            .panel-head h1 {
                font-size: 22px;
            }

            .questions-card {
                padding: 10px;
                border-radius: 10px;
            }

            .option-card {
                padding: 10px 12px;
                min-height: 56px;
            }

            .btn-primary {
                padding: 9px 16px;
                font-size: 14px;
            }

            .site-footer {
                bottom: 12px;
                padding: 8px 12px;
            }
        }

        /* ===== Estilos específicos para preguntas binarias - VERSIÓN MÁS SUTIL ===== */
        .binary-options {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 14px;
            width: 100%;
            margin-top: 8px;
        }

        .binary-card {
            background: #ffffff;
            color: #222;
            border-radius: 14px;
            padding: 20px 16px;
            cursor: pointer;
            border: 2px solid rgba(30, 30, 60, 0.08);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 10px;
            min-height: 100px;
            transition: all 0.3s ease;
            box-shadow: 0 6px 20px rgba(10, 12, 30, 0.06);
            text-align: center;
            position: relative;
        }

        .binary-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 12px 30px rgba(10, 12, 30, 0.12);
            border-color: rgba(126, 87, 194, 0.15);
        }

        .binary-card.selected {
            border: 2px solid rgba(126, 87, 194, 0.4);
            background: rgba(126, 87, 194, 0.02);
            box-shadow: 0 8px 25px rgba(126, 87, 194, 0.1);
            transform: translateY(-4px);
        }

        /* Efecto MUY sutil de borde */
        .binary-card.selected::before {
            content: '';
            position: absolute;
            top: -2px;
            left: -2px;
            right: -2px;
            bottom: -2px;
            border-radius: 16px;
            background: linear-gradient(135deg, rgba(126, 87, 194, 0.3), rgba(156, 119, 212, 0.2));
            z-index: -1;
            opacity: 0.3;
        }

        .binary-card .emoji {
            font-size: 42px;
            margin-bottom: 4px;
            filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
            transition: transform 0.3s ease;
        }

        .binary-card.selected .emoji {
            transform: scale(1.03);
        }

        .binary-card .title {
            font-weight: 700;
            font-size: 16px;
            color: #333;
            letter-spacing: 0.3px;
            transition: color 0.3s ease;
        }

        .binary-card.selected .title {
            color: #7E57C2;
            font-weight: 700;
        }

        /* Mejoras responsive para opciones binarias */
        @media (max-width: 480px) {
            .binary-options {
                grid-template-columns: 1fr;
                gap: 12px;
            }

            .binary-card {
                padding: 18px 14px;
                min-height: 90px;
                flex-direction: row;
                justify-content: flex-start;
                text-align: left;
            }

            .binary-card .emoji {
                font-size: 36px;
                margin-bottom: 0;
                margin-right: 12px;
            }
        }

        /* Añade esto para mejorar el título de las preguntas */
        .panel-body h2 {
            color: #222;
            font-size: 20px;
            font-weight: 700;
            margin: 0 0 20px 0;
            text-align: center;
            line-height: 1.4;
            padding: 0 10px;
        }

        @media (max-width: 600px) {
            .panel-body h2 {
                font-size: 18px;
                margin-bottom: 16px;
            }
        }

        /* Estilos para la ventana de advertencia */
        .warning-container {
            position: fixed;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 100;
            padding: 18px;
            text-align: center;
            pointer-events: auto;
        }

        .warning-content {
            position: relative;
            width: min(600px, 90vw);
            max-width: 650px;
            border-radius: 20px;
            padding: 30px 28px;
            box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
            background: #ffffff;
            /* Fondo blanco sólido sin transparencia */
            border: 1px solid rgba(255, 255, 255, 0.2);
            color: #333;
            /* Eliminado: backdrop-filter, max-height, overflow */
        }

        .warning-image {
            font-size: 70px;
            margin: 0 auto 20px;
            display: block;
            filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.15));
        }

        .warning-title {
            font-size: 28px;
            font-weight: 800;
            margin: 0 0 16px;
            color: #7E57C2;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .warning-subtitle {
            font-size: 16px;
            margin-bottom: 24px;
            color: #555;
            line-height: 1.5;
            padding: 0 10px;
        }

        .warning-info {
            background: rgba(126, 87, 194, 0.08);
            border-radius: 14px;
            padding: 20px 22px;
            margin: 20px 0 28px;
            text-align: left;
            border-left: 4px solid #7E57C2;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        }

        .warning-info h3 {
            margin-top: 0;
            font-size: 17px;
            color: #7E57C2;
            margin-bottom: 12px;
            font-weight: 700;
        }

        .warning-info ul {
            padding-left: 20px;
            margin: 0;
        }

        .warning-info li {
            margin-bottom: 10px;
            font-size: 15px;
            color: #444;
            line-height: 1.4;
        }

        .warning-btn {
            background: linear-gradient(90deg, rgb(155, 81, 163), #6452c0);
            color: white;
            border: none;
            border-radius: 30px;
            padding: 14px 36px;
            font-size: 16px;
            font-weight: 700;
            cursor: pointer;
            margin-top: 10px;
            box-shadow: 0 8px 20px rgba(126, 87, 194, 0.3);
            transition: all 0.25s ease;
            position: relative;
            z-index: 2;
            letter-spacing: 0.5px;
        }

        .warning-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 12px 25px rgba(126, 87, 194, 0.4);
            background: linear-gradient(135deg, #8a67cc, #6a40c2);
        }

        .warning-btn:active {
            transform: translateY(-1px);
        }

        @media (max-width: 600px) {
            .warning-container {
                padding: 12px;
            }

            .warning-content {
                padding: 24px 20px;
                border-radius: 18px;
            }

            .warning-title {
                font-size: 24px;
            }

            .warning-subtitle {
                font-size: 15px;
                padding: 0 5px;
            }

            .warning-image {
                font-size: 60px;
                margin-bottom: 16px;
            }

            .warning-info {
                padding: 18px 20px;
                margin: 18px 0 24px;
            }

            .warning-info li {
                font-size: 14px;
            }

            .warning-btn {
                padding: 12px 30px;
                font-size: 15px;
            }
        }

        @media (max-width: 400px) {
            .warning-content {
                padding: 20px 16px;
            }

            .warning-title {
                font-size: 22px;
            }

            .warning-info {
                padding: 16px 18px;
            }
        }

        @media (max-width: 760px) {
            .warning-container {
                overflow: auto;
                -webkit-overflow-scrolling: touch;
            }

            .warning-content {
                max-height: calc(100vh - 40px);
                overflow-y: auto;
                -webkit-overflow-scrolling: touch;
            }
        }


        /* Estilos para la pantalla de selección de edad */
        /* =========================
   Variables (colores / gradientes)
   ========================= */
        :root {
            --gradient-accent: linear-gradient(90deg, #be7ac5, #6452c0);
            --text-muted: #6b6b6b;
            --panel-bg: #ffffff;
            --card-radius: 20px;
        }

        /* =========================
   Contenedor principal / tarjeta blanca central
   ========================= */
        .age-screen {
            width: min(680px, 92vw);
            max-width: 720px;
            text-align: center;
            margin: 10px auto 0;
            background: var(--panel-bg);
            border-radius: 18px;
            padding: 36px 36px 30px;
            box-shadow: 0 20px 50px rgba(8, 12, 30, 0.12);
        }

        /* Título con texto en gradiente (recortado) */
        .age-title {
            font-size: 32px;
            font-weight: 800;
            margin-bottom: 15px;
            background: #7E57C2;
            ;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        /* Subtítulo / descripción */
        .age-subtitle {
            font-size: 18px;
            margin-bottom: 30px;
            color: var(--text-muted);
            line-height: 1.6;
        }

        /* Contenedor de tarjetas (responsive) */
        .age-cards {
            display: flex;
            flex-wrap: wrap;
            gap: 25px;
            justify-content: center;
            margin-bottom: 30px;
        }

        /* Tarjeta individual */
        .age-card {
            flex: 1;
            min-width: 260px;
            max-width: 320px;
            background: #fff;
            border-radius: var(--card-radius);
            padding: 28px 20px;
            cursor: pointer;
            transition: transform 0.28s ease, box-shadow 0.28s ease;
            border: 1px solid rgba(8, 12, 30, 0.06);
            display: flex;
            flex-direction: column;
            align-items: center;
            position: relative;
            overflow: visible;
            z-index: 1;
            box-shadow: 0 8px 20px rgba(12, 18, 40, 0.05);
        }

        /* ----------- QUITADA la barra superior al hover ----------
   (Se eliminó la pseudo ::before que mostraba la línea al pasar) */

        /* Hover: solo elevación y movimiento limpio (sin barra ni cambio de fondo) */
        .age-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 20px 40px rgba(8, 12, 40, 0.10);
        }

        /* Título interno de la tarjeta */
        .age-card h3 {
            font-size: 20px;
            margin: 14px 0 0;
            font-weight: 700;
            color: #373352;
            z-index: 2;
            position: relative;
        }

        /* Imagen / contenedor de la imagen (tarjetita interna) */
        .age-card>div[style],
        .age-card .img-wrap {
            z-index: 2;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 140px;
            height: 140px;
            border-radius: 14px;
            background: #fff;
            /* mantiene la imagen sobre un panel blanco */
            box-shadow: 0 8px 18px rgba(12, 18, 40, 0.06);
            overflow: hidden;
        }

        /* Si el HTML no tiene la clase .img-wrap, la regla anterior igual aplica al div inline */
        .age-card img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
            display: block;
            transition: transform 0.28s ease, opacity 0.22s ease;
        }

        /* Efecto sutil al pasar sobre la imagen */
        .age-card:hover img {
            transform: translateY(-6px) scale(1.03);
        }

        /* =========================
   ESTADO SELECCIONADO: solo borde/perímetro marcado con gradiente
   ========================= */

        /* La tarjeta NO cambia de fondo. Solo aplicamos un marco externo degradado mediante ::after */
        .age-card.selected {
            transform: translateY(-6px);
            box-shadow: 0 18px 36px rgba(100, 82, 192, 0.07);
        }

        /* pseudo-elemento que crea el marco gradiente exterior (borde) */
        .age-card.selected::after {
            content: "";
            position: absolute;
            top: -4px;
            left: -4px;
            right: -4px;
            bottom: -4px;
            border-radius: calc(var(--card-radius) + 4px);
            background: var(--gradient-accent);
            z-index: 0;
            /* queda detrás de la tarjeta blanca */
            /* ligera difusión para suavizar el borde */
            filter: blur(0.8px);
            pointer-events: none;
        }

        /* Aseguramos que el contenido de la tarjeta esté por encima del pseudo-elemento */
        .age-card>* {
            position: relative;
            z-index: 2;
        }

        /* =========================
   Nota / aviso (usa el degradado; texto blanco)
   ========================= */
        .age-note {
            font-size: 16px;
            color: #ffffff;
            margin-top: 16px;
            padding: 12px 14px;
            background: linear-gradient(90deg, rgb(155, 81, 163), #6452c0);
            border-radius: 10px;
            font-style: italic;
            box-shadow: 0 8px 20px rgba(100, 82, 192, 0.09);
            border: 0;
        }

        /* =========================
   Ajustes de contenedores (tu regla existente)
   ========================= */
        #ageContainer.main-container,
        #quizContainer.main-container {
            justify-content: flex-start;
            padding-top: 18px;
            padding-bottom: 90px;
            min-height: calc(100vh - 40px);
        }

        /* Footer por encima si corresponde */
        .site-footer {
            z-index: 80;
        }

        /* =========================
   Media queries para móviles
   ========================= */
        @media (max-width: 600px) {
            .age-screen {
                padding: 22px 18px 20px;
                width: calc(100% - 28px);
                margin-top: 8px;
            }

            .age-cards {
                flex-direction: column;
                gap: 16px;
                align-items: stretch;
            }

            .age-card {
                width: 100%;
                min-width: 0;
                padding: 20px;
            }

            .age-title {
                font-size: 26px;
            }

            .age-subtitle {
                font-size: 15px;
            }
        }

        /* =========================
   Pequeños ajustes estéticos
   ========================= */
        .img-fallback {
            font-size: 48px;
            line-height: 1;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .age-screen,
        .age-card {
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        /* ---------------------
   Posicionar el cerebrito para que quede medio sobre la tarjeta
   --------------------- */

        /* Aseguramos que el contenedor pueda usar solapamientos */
        #ageContainer.main-container {
            position: relative;
            /* necesario para referencias seguras si se necesita */
        }

        .main-logo {
            display: flex;
            justify-content: center;
            align-items: center;
            width: 100%;
            margin-bottom: -48px;
            /* ajusta cuánto "entra" sobre la tarjeta */
            z-index: 120;
            /* por encima de la tarjeta */
            pointer-events: none;
            /* evita que el emoji bloquee clicks */
        }

        /* Estilo del contenedor que tiene el emoji (tu div interno) */
        .main-logo>div {
            width: 96px;
            /* tamaño del "pastillito" */
            height: 96px;
            border-radius: 18px;
            /* redondeado agradable */
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 48px;
            /* tamaño del emoji */
            position: relative;
            z-index: 130;
            /* encima de la tarjeta */
        }

        /* Ajustes para pantallas pequeñas: reducir tamaño y el solapamiento */
        @media (max-width: 600px) {
            .main-logo {
                margin-bottom: -34px;
            }

            .main-logo>div {
                width: 76px;
                height: 76px;
                font-size: 36px;
                border-radius: 14px;
                border-width: 5px;
            }
        }

        /* ===========================
   ESTILOS PARA RESULTADOS - MEJORADOS
   =========================== */

        .results-screen {
            width: min(680px, 92vw);
            max-width: 720px;
            text-align: center;
            margin-top: 10px;
        }

        /* TARJETA DE RESULTADO - FONDO BLANCO CON BORDE GRADIENTE */
        .results-card {
            background: #ffffff;
            border-radius: 20px;
            padding: 35px 30px;
            margin-bottom: 30px;
            border: 2px solid transparent;
            background-clip: padding-box;
            position: relative;
            box-shadow: 0 15px 40px rgba(126, 87, 194, 0.15);
        }

        /* Borde con gradiente sutil */
        .results-card::before {
            content: '';
            position: absolute;
            top: -2px;
            left: -2px;
            right: -2px;
            bottom: -2px;
            background: linear-gradient(135deg, #7E57C2, #4F358B);
            border-radius: 22px;
            z-index: -1;
            opacity: 0.8;
        }

        /* TÍTULO MÁS GRANDE Y CON GRADIENTE */
        .results-title {
            font-size: 40px;
            font-weight: 800;
            margin-bottom: 20px;
            background: linear-gradient(135deg, #7E57C2, #4F358B);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            line-height: 1.2;
        }

        /* MENSAJE MÁS LEGIBLE */
        .results-message {
            font-size: 18px;
            line-height: 1.7;
            color: #4a4a4a;
            margin-bottom: 10px;
            text-align: center;
        }

        /* SECCIÓN DE RECURSOS */
        .resources-section {
            margin-top: 35px;
            padding: 25px;
            background: rgba(255, 255, 255, 0.95);
            border-radius: 18px;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(126, 87, 194, 0.1);
        }

        /* TÍTULO "EXPLORA MÁS INFORMACIÓN" MÁS VISIBLE */
        .resources-title {
            font-size: 24px;
            font-weight: 700;
            margin-bottom: 25px;
            background: linear-gradient(135deg, #7E57C2, #4F358B);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            text-align: center;
            padding: 0 10px;
        }

        /* MEJORAS RESPONSIVE */
        @media (max-width: 600px) {
            .results-card {
                padding: 25px 20px;
                margin-bottom: 20px;
            }

            .results-title {
                font-size: 26px;
            }

            .results-message {
                font-size: 16px;
            }

            .resources-section {
                padding: 20px 15px;
                margin-top: 25px;
            }

            .resources-title {
                font-size: 20px;
            }
        }

        /* ESTILOS EXISTENTES PARA TARJETAS DE RECURSOS (MANTENER) */
        .resource-card {
            background: white;
            border-radius: 12px;
            padding: 20px;
            margin-bottom: 15px;
            text-align: left;
            color: #222;
            cursor: pointer;
            transition: all 0.3s ease;
            border: 2px solid transparent;
        }

        .resource-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            border-color: #7E57C2;
        }

        .resource-card h4 {
            margin: 0 0 10px;
            font-size: 18px;
            color: #7E57C2;
        }

        .resource-card p {
            margin: 0;
            font-size: 14px;
            color: #666;
            line-height: 1.5;
        }

        /* Estilos para recursos con logo */
        /* ===========================
   ESTILOS PARA RECURSOS - CORREGIDOS
   =========================== */

        /* Variables para consistencia */
        :root {
            --result-purple: #6452c0;
            --muted-text: #4b4b57;
            --card-bg: #ffffff;
            --card-radius-lg: 14px;
        }

        /* Contenedor principal de cada recurso */
        .resource-card {
            position: relative;
            display: block;
            background: var(--card-bg);
            border-radius: var(--card-radius-lg);
            padding: 18px;
            margin: 12px 0;
            border: 1px solid rgba(20, 20, 40, 0.04);
            box-shadow: 0 12px 30px rgba(8, 12, 30, 0.06);
            transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
            cursor: pointer;
            overflow: visible;
        }

        .resource-card:hover {
            transform: translateY(-6px);
            box-shadow: 0 22px 48px rgba(8, 12, 30, 0.09);
            border-color: rgba(100, 82, 192, 0.12);
        }

        /* Layout: Logo a la izquierda (40%), Contenido a la derecha (60%) */
        .resource-card .resource-header {
            display: block;
            position: relative;
            min-height: 140px;
        }

        /* --- LADO IZQUIERDO: Logo --- */
        .resource-card .resource-left {
            position: absolute;
            left: 18px;
            top: 0;
            width: 40%;
            max-width: 260px;
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            pointer-events: none;
            z-index: 10;
        }

        /* Logo transparente sin fondos */
        .resource-card .resource-logo-large {
            width: 100%;
            height: auto;
            max-height: 140px;
            border-radius: 8px;
            background: transparent !important;
            border: none !important;
            box-shadow: none !important;
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }

        .resource-card .resource-logo-large img {
            width: 100%;
            height: auto;
            max-height: 140px;
            object-fit: contain;
            display: block;
            background: transparent;
        }

        /* --- LADO DERECHO: Título + Descripción --- */
        .resource-card .resource-description {
            margin-left: calc(40% + 28px);
            padding-right: 12px;
            min-height: 120px;
        }

        /* TÍTULO CORREGIDO: Ahora está encima del concepto */
        .resource-card .resource-title-large {
            color: var(--result-purple);
            font-size: 22px;
            font-weight: 800;
            line-height: 1.08;
            margin: 0 0 16px 0;
            text-align: left;
            display: block;
        }

        /* Descripción del concepto debajo del título */
        .resource-card .resource-description p {
            margin: 0;
            font-size: 15px;
            color: var(--muted-text);
            line-height: 1.6;
            text-align: justify;
        }

        /* Mensaje de redirección */
        .redirect-message {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
            backdrop-filter: blur(5px);
        }

        .redirect-content {
            background: white;
            border-radius: 20px;
            padding: 30px;
            text-align: center;
            max-width: 400px;
            width: 90%;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            border: 3px solid #7E57C2;
        }

        .redirect-icon {
            font-size: 50px;
            margin-bottom: 15px;
        }

        .redirect-content h3 {
            color: #333;
            margin-bottom: 10px;
            font-size: 18px;
        }

        .resource-name {
            color: #7E57C2;
            font-size: 22px;
            font-weight: 800;
            margin: 15px 0;
            padding: 10px;
            background: rgba(126, 87, 194, 0.1);
            border-radius: 10px;
        }

        .redirect-confirm {
            background: linear-gradient(90deg, #be7ac5, #6452c0);
            color: white;
            border: none;
            padding: 12px 30px;
            border-radius: 25px;
            font-weight: 700;
            font-size: 16px;
            cursor: pointer;
            margin-top: 15px;
            transition: transform 0.2s ease;
        }

        .redirect-confirm:hover {
            transform: translateY(-2px);
        }

        /* Responsive: Apilamos en móviles */
        @media (max-width: 760px) {
            .resource-card {
                padding: 14px;
            }

            .resource-card .resource-header {
                min-height: auto;
            }

            .resource-card .resource-left {
                position: relative;
                width: 100%;
                max-width: none;
                top: 0;
                left: 0;
                margin-bottom: 12px;
                pointer-events: auto;
            }

            .resource-card .resource-description {
                margin-left: 0;
                padding-top: 0;
                min-height: auto;
            }

            .resource-card .resource-title-large {
                text-align: center;
                font-size: 20px;
                margin-bottom: 12px;
            }

            .resource-card .resource-description p {
                text-align: center;
                font-size: 14px;
            }

            .resource-card .resource-logo-large img {
                max-height: 110px;
            }
        }

        /* Estilos para la sección de recursos */
        .resources-section {
            width: min(680px, 92vw);
            max-width: 720px;
            text-align: center;
        }

        .resources-title {
            font-size: 24px;
            font-weight: 700;
            margin-bottom: 25px;
            color: #373352;
        }

        /* Aseguramos que no haya reglas conflictivas */
        .resource-card .resource-logo-large,
        .resource-card .resource-logo-large img {
            background: transparent !important;
            border: none !important;
            box-shadow: none !important;
        }

        /* --- LADO IZQUIERDO: Logo --- */
        .resource-card .resource-left {
            position: absolute;
            left: 18px;
            top: 0;
            width: 40%;
            max-width: 200px;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            pointer-events: none;
            z-index: 10;
        }

        /* Logo adaptable - AQUÍ ESTÁ EL CAMBIO PRINCIPAL */
        .resource-card .resource-logo-large {
            width: 100%;
            height: auto;
            max-height: 120px;
            max-width: 180px;
            border-radius: 8px;
            background: transparent !important;
            border: none !important;
            box-shadow: none !important;
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .resource-card .resource-logo-large img {
            width: 100%;
            height: auto;
            max-height: 120px;
            max-width: 180px;
            object-fit: contain;
            display: block;
            background: transparent;
        }

        /* ESTILOS ESPECÍFICOS PARA LOGOS PEQUEÑOS */
        .resource-card .resource-logo-large img[src*="logo_familia"],
        .resource-card .resource-logo-large img[src*="salud_mental_bago"] {
            max-height: 140px !important;
            max-width: 200px !important;
            transform: scale(1.1);
        }

        /* Estilo específico para el logo de pro mujer (mantener tamaño actual) */
        .resource-card .resource-logo-large img[src*="logo5"] {
            max-height: 120px !important;
            max-width: 180px !important;
        }

        /* FIX MÓVIL: evita que el logo flote sobre el texto */
        @media (max-width: 760px) {

            /* tarjeta: columna y centrado */
            .resource-card {
                display: flex;
                flex-direction: column;
                align-items: center;
                text-align: center;
                gap: 12px;
                padding: 16px;
                width: 100%;
                box-sizing: border-box;
                overflow: visible;
            }

            /* header vertical */
            .resource-card .resource-header {
                display: flex;
                flex-direction: column;
                align-items: center;
                width: 100%;
                gap: 8px;
                padding: 0;
                /* asegúrate que no haya positioning extraño heredado */
                position: static !important;
            }

            /* contenedor del logo: sin posicionamiento absoluto */
            .resource-card .resource-left {
                order: 1;
                width: 100%;
                max-width: 160px;
                margin: 0 auto;
                padding: 6px 0 0;
                box-sizing: border-box;
                display: flex;
                justify-content: center;
                align-items: center;
                position: static !important;
                /* anula absolute/relative previas */
            }

            /* asegúrate que la imagen sea estática (no flotante) */
            .resource-card .resource-logo-large,
            .resource-card .resource-logo-large img {
                display: block !important;
                position: static !important;
                transform: none !important;
                top: auto !important;
                left: auto !important;
                right: auto !important;
                bottom: auto !important;
                margin: 0 auto !important;
                width: auto !important;
                max-width: 140px !important;
                height: auto !important;
                max-height: 110px !important;
                object-fit: contain !important;
                z-index: 1 !important;
                /* texto encima si hubiese superposición con z-index */
            }

            /* título y descripción debajo del logo, sin solapamiento */
            .resource-card .resource-description {
                order: 2;
                width: 100%;
                box-sizing: border-box;
                padding: 6px 12px 14px;
                position: static !important;
                z-index: 2 !important;
                /* asegurar que texto quede por encima si hay solapamiento inesperado */
            }

            .resource-card .resource-title-large {
                font-size: 20px;
                font-weight: 800;
                color: #4f358b;
                margin: 8px 0 6px;
                text-align: center;
                line-height: 1.15;
                word-break: break-word;
            }

            .resource-card .resource-description p {
                margin: 0;
                font-size: 14px;
                line-height: 1.6;
                color: #555;
                text-align: center;
            }
        }




        /* ===== FONDO CON IMAGEN ===== */
        .bg-illustration {
            position: fixed;
            inset: 0;
            z-index: -50;
            pointer-events: none;
            display: block;
            overflow: hidden;
        }

        .bg-image {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
            display: block;
            min-width: 100%;
            min-height: 100%;
            filter: brightness(0.9) contrast(1.1);
        }

        /* Mejorar contraste del texto sobre la imagen */
        .panel-head .sub-title,
        .panel-head h1,
        .panel-head p {
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
        }
