/* 
   Configuración Inicial y Variables
   Aquí definimos colores y fuentes para reciclarlas más fácilmente después
*/
:root {
    --bg-color: #ffffff; /* Blanco Pristino */
    --text-primary: #020617; /* Deep Slate casi negro */
    --text-secondary: #334155; /* Slate 700 - Mucho más legible */
    
    /* Luxury Palette - Premium & Vibrant */
    --accent: #0ea5e9; /* Sky Blue - Primario */
    --accent-rgb: 14, 165, 233;
    --accent-lime: #10b981;
    --accent-magenta: #f43f5e;
    --accent-gold: #f59e0b;
    
    --glass-bg: rgba(255, 255, 255, 0.92); /* Ligeramente más translúcido */
    --glass-border: rgba(14, 165, 233, 0.2);
    --glass-blur: blur(24px) saturate(200%);
    
    /* Sombras Elevadas (Premium) */
    --neon-glow: 0 8px 32px rgba(15, 23, 42, 0.08);
    --neon-glow-strong: 0 12px 48px rgba(15, 23, 42, 0.12);
    
    --cyber-cyan: #00ffe0; /* Neon Cyan para máxima visibilidad */
    --cyber-glow: 0 0 20px rgba(0, 255, 224, 0.4);
}

/* Ajustes específicos para Páginas de Fondo Oscuro (Profesional/CPD) */
body.profesional-page {
    --text-primary: #ffffff;
    --text-secondary: #e2e8f0; /* Slate 200 - Muy claro */
}

body.profesional-page .hero h1,
body.profesional-page section h2,
body.profesional-page section h3,
body.profesional-page section h4 {
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

body.profesional-page p,
body.profesional-page li,
body.profesional-page span:not(.tag):not(.fecha) {
    color: #e2e8f0 !important;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

body.profesional-page .glass-card {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
}

body.profesional-page .skill-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

body.profesional-page .skill-name {
    color: #ffffff !important;
}

body.profesional-page .skill-level {
    color: var(--accent) !important;
}

body.profesional-page .exp-info b,
body.profesional-page .about b {
    color: var(--cyber-cyan) !important;
}

body.profesional-page .festivos-list li {
    color: #cbd5e1 !important;
}

body.profesional-page .festivos-list li span.fecha {
    color: #ffffff !important;
}

body.profesional-page .form-group label {
    color: #ffffff !important;
}

body.profesional-page .footer {
    background: rgba(15, 23, 42, 0.95);
    color: #f1f5f9;
}

body.profesional-page .glass-header {
    background: rgba(15, 23, 42, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.profesional-page .logo {
    color: #ffffff;
}

body.profesional-page .nav-links a {
    color: #f1f5f9;
}

body.profesional-page .nav-links a:hover,
body.mascotas-page .nav-links a:hover,
body.ocio-page .nav-links a:hover,
body.familia-page .nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* --- TEMA OSCURO UNIFICADO (PROFESIONAL / FAMILIA / MASCOTAS / OCIO) --- */
body.profesional-page, 
body.familia-page,
body.mascotas-page, 
body.ocio-page {
    --text-primary: #ffffff;
    --text-secondary: #e2e8f0;
    --glass-bg: rgba(15, 23, 42, 0.85);
    --glass-border: rgba(255, 255, 255, 0.15);
    background-color: #020617;
}

body.profesional-page .hero h1, body.familia-page .hero h1, body.mascotas-page .hero h1, body.ocio-page .hero h1,
body.profesional-page section h2, body.familia-page section h2, body.mascotas-page section h2, body.ocio-page section h2,
body.profesional-page section h3, body.familia-page section h3, body.mascotas-page section h3, body.ocio-page section h3,
body.profesional-page section h4, body.familia-page section h4, body.mascotas-page section h4, body.ocio-page section h4 {
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

body.profesional-page p, body.familia-page p, body.mascotas-page p, body.ocio-page p,
body.profesional-page li, body.familia-page li, body.mascotas-page li, body.ocio-page li,
body.profesional-page span:not(.tag):not(.fecha), body.familia-page span:not(.tag):not(.fecha), body.mascotas-page span:not(.tag):not(.fecha), body.ocio-page span:not(.tag):not(.fecha) {
    color: #e2e8f0 !important;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

body.profesional-page .glass-card, body.familia-page .glass-card, body.mascotas-page .glass-card, body.ocio-page .glass-card,
body.profesional-page .ayuda-card, body.familia-page .ayuda-card, body.mascotas-page .ayuda-card, body.ocio-page .ayuda-card {
    background: rgba(15, 23, 42, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

body.profesional-page .logo, body.familia-page .logo, body.mascotas-page .logo, body.ocio-page .logo {
    color: #ffffff;
}

body.profesional-page .nav-links a, body.familia-page .nav-links a, body.mascotas-page .nav-links a, body.ocio-page .nav-links a {
    color: #f1f5f9;
}

body.profesional-page .glass-header, body.familia-page .glass-header, body.mascotas-page .glass-header, body.ocio-page .glass-header {
    background: rgba(15, 23, 42, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}




/* Reset básico para que todos los navegadores partan de cero igual */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    /* Usamos la fuente moderna de Google */
}

/* Custom Scrollbar Premium */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #ffffff;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1; /* Slate 300 */
    border-radius: 10px;
    border: 2px solid #ffffff;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}


/* Scroll suave al hacer click en el menú */
html {
    scroll-behavior: smooth;
}

/* Estilos Generales del Cuerpo (Body) */
body {
    background-color: #ffffff;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    user-select: text; /* Restauramos selección para mejor usabilidad */
    -webkit-font-smoothing: antialiased; /* Mejora calidad de texto */
    -moz-osx-font-smoothing: grayscale; /* Eliminamos textura tech neón para máxima limpieza */
}

.it-card {
    background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.8)), url('../assets/it_master_face_2026.png') !important;
    background-size: cover !important;
    background-position: center !important;
}

.fam-card {
    background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.8)), url('../assets/home_premium_safe.png') !important;
    background-size: cover !important;
    background-position: center !important;
}

.ocio-card {
    background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.8)), url('../assets/ocio_simracing_2026.png') !important;
    background-size: cover !important;
    background-position: center !important;
}

.pet-card {
    background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.8)), url('../assets/pets_uhd_2026.webp') !important;
    background-size: cover !important;
    background-position: center !important;
}

.portal-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    border: 1px solid rgba(255,255,255,0.1);
}

/* Capa de textura tecnológica V8.0 */
body::before {
    display: none;
}

/* Permitir selección solo en campos necesarios para no romper la funcionalidad */
input,
textarea,
[contenteditable="true"],
.chatbot-window,
.skill-details,
.card-details {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}



/* Marca de Agua Discreta en el fondo de secciones críticas */
.reveal::after {
    content: "© 2026 Javier Rubio - Tenfok Portal";
    position: absolute;
    bottom: 10px;
    right: 20px;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.03);
    pointer-events: none;
    z-index: -1;
}

/* Protección de imágenes y máxima calidad visual */
img {
    pointer-events: none;
    -webkit-user-drag: none;
    image-rendering: -webkit-optimize-contrast; /* Máxima nitidez en Chrome/Edge/Safari */
    image-rendering: crisp-edges;
    image-rendering: auto;
    -ms-interpolation-mode: bicubic;
}

/* 
   === MENÚ DE NAVEGACIÓN (HEADER) === 
   Este bloque maneja cómo se ve el menú arriba
*/
.glass-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    /* Lo mantiene siempre por encima del resto */
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
}

.logo span {
    color: var(--accent);
    /* El punto de "MiWeb." será morado */
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid transparent;
    display: inline-block;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: rgba(var(--accent-rgb), 0.05);
}

.nav-links a.active {
    background: rgba(var(--accent-rgb), 0.15);
    color: var(--accent);
    box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.3),
                inset 0 0 10px rgba(var(--accent-rgb), 0.1);
    border: 1px solid rgba(var(--accent-rgb), 0.4);
    border-radius: 100px;
    padding: 0.5rem 1.25rem;
}


/* Botón Hamburguesa (oculto en escritorio) */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1000;
    /* Siempre por encima del menú desplegado */
    transition: color 0.3s;
}

.mobile-menu-btn:hover {
    color: var(--accent);
}

/* 
   === SECCIÓN PRINCIPAL (HERO) === 
   Lo primero que ves al entrar
*/
main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    padding-top: 100px;
    /* Para que el menú no tape el título */
}

.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-content {
    max-width: 600px;
    z-index: 2;
    /* Para que quede encima de las esferas de colores de fondo */
}

.hero h1 span.cyan-text {
    background: linear-gradient(to right, var(--cyber-cyan), #ffffff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(0, 255, 224, 0.3);
}

.btn.primary.cyber-btn {
    background: linear-gradient(135deg, var(--cyber-cyan), var(--fam-accent));
    color: #05070a;
    border: none;
    box-shadow: 0 0 25px rgba(var(--cyber-cyan-rgb), 0.5);
    font-weight: 800;
}

.btn.primary.cyber-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 35px rgba(var(--cyber-cyan-rgb), 0.7);
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 800px;
    line-height: 1.6;
}

/* BOTONES */
.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    /* Transición suave para todos los efectos */
    cursor: pointer;
}

.btn.primary {
    background-color: var(--accent);
    color: #ffffff;
    border: 1px solid var(--accent);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.35);
    /* Sombra esmeralda brillante */
}

.btn.primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-3px);
    /* Pequeño salto hacia arriba al hacer hover */
}

.btn.secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn.secondary:hover {
    background: var(--glass-bg);
    border: 1px solid var(--text-secondary);
}

/* 
   === EFECTO CRISTAL (GLASSMORPHISM) === 
   Cajas para secciones y proyectos
*/
.glass-card, .glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 2px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), var(--glass-glow);
    transition: all 0.4s ease;
    overflow: hidden;
}


.glass-card:hover {
    transform: translateY(-8px) scale(1.01);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: 
        0 40px 80px rgba(0,0,0,0.15), 
        inset 0 0 30px rgba(255,255,255,0.2);
    border-color: var(--accent);
}

/* 
   === SOBRE MÍ Y PROYECTOS === 
*/
section {
    padding: 100px 0;
}

section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    /* Esta línea anterior hace que los proyectos se acomoden según el tamaño de la pantalla (responsive automático) */
    gap: 2rem;
}

.project-card {
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    /* Flota cuando paso el ratón */
    border-color: var(--accent);
}

.project-card h3 {
    margin-bottom: 0.5rem;
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.tag {
    background: rgba(16, 185, 129, 0.15);
    /* Fondo verde oscuro transparente */
    color: #34d399;
    /* Verde esmeralda claro */
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    border: 1px solid rgba(16, 185, 129, 0.3);
    /* Un borde sútil premium */
}

/* 
   === FOOTER (Pie de Página) === 
*/
.footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    text-align: center;
    padding: 0.5rem 0;
    font-size: 0.75rem;
    color: rgba(226, 232, 240, 0.6); /* Slate 200 con más opacidad */
    z-index: 100;
    background: rgba(15, 23, 42, 0.9); /* fondo más sólido */
    pointer-events: none;
}


.footer div,
.footer a {
    pointer-events: auto;
    /* Permitir clics en el texto y enlaces */
}

.footer .dmca-badge img {
    opacity: 0.4;
    transition: opacity 0.3s;
}

.footer .dmca-badge img:hover {
    opacity: 1;
}

/* 
   === FONDOS DINÁMICOS DE PAISAJE (KEN BURNS) === 
*/
.dynamic-bg {
    position: fixed;
    top: -5%;
    left: -5%;
    width: 110vw;
    height: 110vh;
    z-index: -2;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.9;
    /* Ligera opacidad para no competir con el texto */
    /* Filtros eliminados a petición del usuario para mostrar imágenes claras */
    filter: none;
    animation: pan-bg 45s ease-in-out infinite alternate;
    pointer-events: none;
    will-change: transform;
}

/* Base IT - Premium 2026 con cara integrada */
body.profesional-page .dynamic-bg {
    background-image: url('../assets/it_master_face_2026.png');
}

/* Familias - Interior Moderno Premium (Sin personas) */
body.familia-page .dynamic-bg {
    background-image: url('../assets/home_premium_safe.png');
}

/* Mascotas - UHD Premium 2026 */
body.mascotas-page .dynamic-bg {
    background-image: url('../assets/pets_uhd_2026.webp');
}

/* Ocio - SimRacing Premium 2026 */
body.ocio-page .dynamic-bg {
    background-image: url('../assets/ocio_simracing_2026.png');
}

@keyframes pan-bg {
    0% {
        transform: scale(1) translate(0, 0);
    }

    100% {
        transform: scale(1.08) translate(-2%, -1%);
    }
}

/* 
   === SUPERPOSICIONES DINÁMICAS (CORRECCIÓN: LUMINOSAS) === 
*/
body.profesional-page .dynamic-bg::after {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(15, 23, 42, 0.6) 100%);
    mix-blend-mode: normal; /* Cambiado de overlay a normal para oscurecer y dar contraste al texto blanco */
}

.dynamic-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.5) 100%);
    mix-blend-mode: normal;
}

body.familia-page .dynamic-bg::after {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
}

body.mascotas-page .dynamic-bg::after {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
}

body.ocio-page .dynamic-bg::after {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
}



/* Fondo Dinámico Sutil para el Body */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.03), transparent);
    z-index: -1;
    animation: bg-pulse 15s infinite ease-in-out;
}

@keyframes bg-pulse {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.7;
    }
}

/* 
   === ANIMACIONES SIMPLES (Nuevas entradas) === 
*/
.fade-in {
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 
   === FORMULARIO DE CONTACTO === 
*/
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s, background 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
}

/* 
   === ACORDEÓN / TARJETAS EXPANDIBLES === 
*/
.ayuda-card {
    transition: all 0.3s ease;
    /* cursor: pointer; (Lo ponemos solo en el botón toggle) */
    overflow: hidden;
    position: relative;
}

.ayuda-card:hover {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.1);
}

.card-details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s ease-in-out;
    margin-top: 0;
    border-top: 1px solid transparent;
}

.ayuda-card.expanded .card-details {
    max-height: 1200px;
    /* Elevado para permitir gran contenido */
    opacity: 1;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top-color: var(--glass-border);
}

.card-details h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
    border-left: 3px solid var(--accent);
    padding-left: 0.5rem;
}

.card-details ul {
    list-style: none;
    margin-bottom: 1.2rem;
    padding-left: 0;
}

.card-details ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.card-details ul li::before {
    content: '→';
    color: var(--accent);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Botones dentro del Acordeón */
.btn-group {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.btn-small {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-boe {
    background: rgba(250, 204, 21, 0.1);
    color: #fde047; /* Amarillo realzado para contraste */
    border: 1px solid #fde047;
}


.btn-boe:hover {
    background: #facc15;
    color: #000;
}


.btn-action {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn-action:hover {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

/* Botón de despliegue */
.toggle-btn {
    display: block;
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.7rem;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 1.2rem;
    font-weight: 600;
    font-family: 'Outfit';
    transition: all 0.3s;
    text-align: center;
}

.toggle-btn:hover {
    background: rgba(16, 185, 129, 0.08);
    color: var(--accent);
}

/* Caja de Aviso Global (Crisis y En Investigación) */
.notice-box {
    background: rgba(234, 179, 8, 0.08);
    border: 1px dashed rgba(234, 179, 8, 0.5);
    color: #facc15;
    padding: 1.2rem;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 0.95rem;
}

.notice-box span {
    font-weight: bold;
}

/* Estilos extra para Crisis */
#crisis h2 {
    color: #f43f5e;
    /* Rojo premium (rosa fuerte) */
}

.crisis-badge {
    background: rgba(244, 63, 94, 0.1) !important;
    color: #f43f5e !important;
    border: 1px solid rgba(244, 63, 94, 0.3) !important;
}

/* 
   === EFECTO ANTIGRAVEDAD === 
*/
.efecto-antigravedad {
    display: inline-block;
    animation: flotar 3s ease-in-out infinite;
}

@keyframes flotar {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* 
   === CALENDARIO LABORAL (RECURSOS IT) === 
*/
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.calendar-card {
    background: rgba(16, 185, 129, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.calendar-card h3 {
    color: var(--accent);
    margin-bottom: 1rem;
    border-bottom: 2px solid rgba(16, 185, 129, 0.2);
    padding-bottom: 0.5rem;
    font-size: 1.2rem;
}

.festivos-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.festivos-list li {
    padding: 0.6rem 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.festivos-list li span.fecha {
    color: var(--text-primary);
    font-weight: 600;
}

.select-autonomia {
    width: 100%;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--accent);
    color: var(--text-primary);
    border-radius: 6px;
    margin-bottom: 1rem;
    font-family: inherit;
    cursor: pointer;
}

.select-autonomia option {
    background: var(--bg-color);
    color: var(--text-primary);
}

.buscador-pueblo {
    position: relative;
    margin-top: 0.5rem;
}

.buscador-pueblo input {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s;
}

.buscador-pueblo input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.autocomplete-items {
    position: absolute;
    border: 1px solid var(--glass-border);
    border-top: none;
    z-index: 99;
    top: calc(100% - 1rem);
    /* ajustamos a la cajita */
    left: 0;
    right: 0;
    max-height: 220px;
    overflow-y: auto;
    background: rgba(15, 15, 20, 0.95);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    text-align: left;
}

.autocomplete-items div {
    padding: 12px;
    cursor: pointer;
    background-color: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.autocomplete-items div:hover {
    background-color: rgba(14, 165, 233, 0.2);
    color: #fff;
}

.btn-search {
    width: 100%;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    background: var(--accent);
    color: white;
    border: none;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-search:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
}

/* 
   === SPLIT SCREEN (3 SECCIONES) === 
*/
/* 
   === HERO PORTAL (V3 MODERN LAYOUT) === 
*/
.hero-portal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    height: 100vh;
    width: 100vw;
    position: relative;
    overflow: hidden;
    background: #ffffff;
    padding: 1.5rem;
    padding-bottom: 60px;
    gap: 16px;
    box-sizing: border-box;
    perspective: 1200px;
}

.portal-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.2); /* Base transparente para ver el fondo */
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 2;
}

@keyframes flotar-portal-card {
    0% { transform: translateY(0px) rotateX(0deg) rotateY(0deg); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
    50% { transform: translateY(-10px) rotateX(2deg) rotateY(1deg); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
    100% { transform: translateY(0px) rotateX(0deg) rotateY(0deg); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
}

.portal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 1.2s cubic-bezier(0.165, 0.84, 0.44, 1), filter 0.8s ease;
    z-index: -1;
    filter: brightness(0.9) contrast(1.1); /* Ligero toque para que no sea plano */
    transform: scale(1.0);
}

.portal-card:hover::before {
    transform: scale(1.1);
    filter: none;
}

/* Specific backgrounds - Premium 2026 */
.it-card::before { background-image: url('../assets/it_master_face_2026.png'); }
.fam-card::before { background-image: url('../assets/home_premium_safe.png'); }
.ocio-card::before { background-image: url('../assets/ocio_simracing_2026.png'); }
.pet-card::before { background-image: url('../assets/pets_uhd_2026.webp'); }

/* Posicionamiento Original */
.it-card { grid-row: span 1; grid-column: span 1; }
.fam-card { grid-row: span 1; grid-column: span 1; }
.ocio-card { grid-row: span 1; grid-column: span 1; }
.pet-card { grid-row: span 1; grid-column: span 1; }

@media (max-width: 900px) {
    .hero-portal {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
        overflow-y: auto;
    }
}

/* Card Content & Glassmorphism */
.portal-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    pointer-events: none;
    box-sizing: border-box;
    z-index: 5;
}

/* Alineaciones específicas por tarjeta */
.portal-content {
    align-items: flex-start; /* Todo alineado a la izquierda */
    justify-content: flex-end; /* TODO haca abajo como en la foto */
    text-align: left;
}

.fam-card .portal-content, .pet-card .portal-content {
    align-items: flex-end; /* Icono arriba derecha, texto abajo derecha para balancear con la esfera */
    text-align: right;
}

.portal-content h2 {
    color: #ffffff;
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -1.5px;
    text-shadow: 0 2px 15px rgba(0,0,0,0.8);
}

.portal-content p {
    font-size: 1.1rem;
    color: #f1f5f9;
    margin: 0;
    font-weight: 450;
    text-shadow: 0 1px 10px rgba(0,0,0,0.6);
}

.card-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    transition: all 0.5s ease;
}

.it-card .card-icon-wrap {
    width: 90px;
    height: 90px;
    border-radius: 16px; /* Cuadrado con bordes suaves */
    overflow: hidden;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}



.it-card .card-icon-wrap img {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    object-fit: cover;
}

.portal-card:hover .portal-content {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: none;
    transition: all 0.4s ease;
}

.portal-card:hover {
    z-index: 10;
    transform: scale(1.015);
    background: rgba(255, 255, 255, 0.92); /* Se ilumina, no se oscurece */
    border-color: #cbd5e1;
    box-shadow: 0 30px 60px rgba(0,0,0,0.12);
    animation: none !important; /* Eliminamos flotar para que sea más sobrio */
}

.portal-card::after { display: none; }

/* [V7.0] PORTAL SPHERE PREMIUM (Glow, Reflections, Tooltip, Animations) */
@keyframes flotar-esfera {
    0% { transform: translate(-50%, -50%); box-shadow: 0 15px 45px rgba(0,0,0,0.2); }
    50% { transform: translate(-50%, -53%); box-shadow: 0 25px 65px rgba(0,0,0,0.3); }
    100% { transform: translate(-50%, -50%); box-shadow: 0 15px 45px rgba(0,0,0,0.2); }
}

@keyframes universe-pan {
    0% { transform: scale(1.5) rotate(0deg); opacity: 0.3; }
    50% { transform: scale(1.8) rotate(180deg); opacity: 0.5; }
    100% { transform: scale(1.5) rotate(360deg); opacity: 0.3; }
}


/* ═══════════════════════════════════════════════════════
   PORTAL LOGO — Branding superior izquierdo (Nuevo branding)
   ═══════════════════════════════════════════════════════ */
.portal-logo {
    display: none !important;
}
.portal-logo span {
    color: var(--accent);
}

/* ═══════════════════════════════════════════════════════
   INDEX SPHERE — Esfera Glass Centrada (RESTAURADA)
   ═══════════════════════════════════════════════════════ */
body #chatbot-launcher.index-sphere,
body .index-sphere {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    bottom: auto !important;
    right: auto !important;
    transform: translate(-50%, -50%) !important;
    width: clamp(90px, 22vmin, 140px) !important;
    height: clamp(90px, 22vmin, 140px) !important;
    border-radius: 50% !important;
    /* Fondo base: Cristal Líquido / Galaxia */
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.15) 0%, transparent 50%),
                radial-gradient(circle at 50% 50%, #0f172a 0%, #020617 100%) !important;
    background-color: #020617 !important;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    /* Sombras complejas: Brillo exterior y profundidad interior (Cristal) */
    box-shadow: 
        0 20px 80px rgba(0,0,0,0.4), 
        inset 0 0 50px rgba(0,0,0,0.8),
        inset 0 0 20px rgba(255,255,255,0.05),
        0 0 30px rgba(30, 41, 59, 0.2) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    overflow: hidden !important;
    animation: flotar-esfera 8s ease-in-out infinite !important;
    cursor: pointer !important;
    z-index: 15;
    perspective: 1000px;
}

/* Efecto Universo (Reflejos internos) */
.index-sphere::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    /* Simulación de nebulosa y estrellas con gradientes */
    background: 
        radial-gradient(circle at 30% 40%, rgba(124, 58, 237, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 70% 60%, rgba(14, 165, 233, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 20px 20px;
    animation: universe-pan 60s linear infinite;
    pointer-events: none;
    z-index: 1;
    mix-blend-mode: color-dodge;
}

/* Brillo Specular del Cristal (Reflejo de luz frontal) */
.index-sphere::after {
    content: '';
    position: absolute;
    top: 10%; left: 15%;
    width: 45%; height: 25%;
    background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 80%);
    border-radius: 50%;
    transform: rotate(-25deg);
    pointer-events: none;
    z-index: 10;
    filter: blur(2px);
}

.index-sphere h1 {
    font-size: 2rem !important;
    font-weight: 800 !important;
    font-family: 'Outfit', sans-serif !important;
    margin: 0 !important;
    letter-spacing: -1.5px !important;
    /* Texto con efecto Glass/Silver */
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #94a3b8 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.4)) !important;
    position: relative; 
    z-index: 5;
    transform: translateZ(50px); /* Efecto de profundidad */
}

.index-sphere .sphere-tooltip {
    position: absolute !important;
    top: -20px !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(-20px) !important;
    opacity: 0 !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}
.index-sphere:hover .sphere-tooltip {
    opacity: 1 !important;
    transform: translateX(-50%) translateY(0) !important;
}

/* ═══════════════════════════════════════════════════════
   ROBOT HEAD LAUNCHER v9.2 — Cabeza 3D Flotante
   (Reemplaza portal-sphere en todas las subpáginas)
   ═══════════════════════════════════════════════════════ */

.portal-sphere:not(.index-sphere), #chatbot-launcher:not(.index-sphere) {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: 45px !important; /* Reducido ~50% de 80px, dejando margen para el label */
    height: auto !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    backdrop-filter: none !important;
    z-index: 9999 !important;
    cursor: grab !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    animation: robot-float 4s ease-in-out infinite !important;
    overflow: visible !important;
    pointer-events: auto !important;
}

.portal-sphere:not(.index-sphere) h1,
#chatbot-launcher:not(.index-sphere) h1 {
    display: none !important; /* Solo ocultar en subpáginas, no en index */
}

@keyframes robot-float {
    0%, 100% { transform: translateY(0px) rotateY(0deg); filter: drop-shadow(0 20px 15px rgba(0, 0, 0, 0.1)); }
    50%       { transform: translateY(-15px) rotateY(0deg); filter: drop-shadow(0 35px 25px rgba(0, 0, 0, 0.15)); }
}

/* Pulso de la antena */
@keyframes antenna-pulse {
    0%, 100% { opacity: 1; r: 5; }
    50%       { opacity: 0.3; r: 3; }
}

/* Parpadeo de ojos */
@keyframes eye-blink {
    0%, 88%, 100% { transform: scaleY(1); }
    92%            { transform: scaleY(0.05); }
}

.sphere-tooltip,
#chatbot-launcher .robot-tooltip {
    position: absolute !important;
    right: 90px !important;
    top: 50% !important;
    left: auto !important;
    transform: translateY(-50%) translateX(10px) !important;
    background: #ffffff !important;
    color: #1e293b !important;
    padding: 8px 14px !important;
    border-radius: 12px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    pointer-events: none !important;
    opacity: 0 !important;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1) !important;
    border: 1px solid #e2e8f0 !important;
    z-index: 10000 !important;
}

.portal-sphere:hover .sphere-tooltip,
#chatbot-launcher:hover .robot-tooltip {
    opacity: 1 !important;
    transform: translateY(-50%) translateX(0px) !important;
}

/* Ocultar cuando chat activo */
body.chat-open .portal-sphere,
body.chat-open #chatbot-launcher {
    opacity: 0.35 !important;
    transform: scale(0.85) !important;
    animation: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .portal-sphere, #chatbot-launcher {
        bottom: 25px !important;
        right: 20px !important;
        width: 70px !important;
    }
    
    .index-sphere {
        width: clamp(80px, 20vmin, 110px) !important;
        height: clamp(80px, 20vmin, 110px) !important;
    }
    
    .index-sphere h1 {
        font-size: clamp(1.2rem, 5vmin, 1.6rem) !important;
    }
}

@media (max-width: 480px) {
    .portal-sphere:not(.index-sphere), #chatbot-launcher:not(.index-sphere) {
        bottom: 15px !important;
        right: 15px !important;
        width: 60px !important;
    }
    
    .index-sphere {
        width: clamp(70px, 18vmin, 90px) !important;
        height: clamp(70px, 18vmin, 90px) !important;
    }
}



/* Responsividad Móvil */
@media (max-width: 900px) {
    .hero-portal {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
        overflow-y: auto;
    }
    
    .portal-logo {
        font-size: 1.8rem;
        padding: 0.8rem 2rem;
        position: fixed;
        top: 20px;
        transform: translate(-50%, 0);
    }
    
    .portal-content {
        padding: 1.5rem;
    }
}
/* Hero & Content Responsiveness */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-content {
        text-align: center;
        padding: 0 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        text-align: center;
        padding: 1rem;
    }

    .blob {
        display: none;
    }
}

/* 
   === TENFOK.BOT: CHATBOT WIDGET (DÁNDOLE VIDA) === 
*/
#chatbot-launcher {
    position: fixed;
    bottom: 35px;
    right: 35px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    /* Gradiente Púrpura Eléctrico a Cian Neón para máxima visibilidad */
    background: linear-gradient(135deg, #7c3aed 0%, #00ffe0 100%);
    box-shadow: 0 10px 40px rgba(124, 58, 237, 0.4), 
                0 0 20px rgba(0, 255, 224, 0.3),
                inset 0 0 15px rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid #fff;
    overflow: visible;
}

/* --- ROBOT IA ANIMADO --- */
.ia-robot-container {
    position: relative;
    width: 60px;
    height: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    animation: robotFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.1));
}

.robot-head {
    width: 38px;
    height: 28px;
    background: #ffffff;
    border: 2px solid #cbd5e1;
    border-radius: 10px 10px 6px 6px;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.robot-head::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: skewX(-20deg);
    animation: robotShine 3s infinite;
}

.robot-antenna {
    width: 3px;
    height: 12px;
    background: #64748b;
    margin-bottom: -2px;
    position: relative;
    z-index: 1;
}

.robot-antenna::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 9px;
    height: 9px;
    background: #ffffff;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    animation: antennaPulse 1.5s infinite;
}

.robot-eyes {
    display: flex;
    justify-content: space-around;
    width: 100%;
    padding: 6px 4px;
}

.eye {
    width: 6px;
    height: 6px;
    background: #1e293b;
    border-radius: 50%;
    animation: eyeBlink 4s infinite;
}

.robot-body {
    width: 40px;
    height: 26px;
    background: linear-gradient(to bottom, #ffffff, #f1f5f9);
    border: 2px solid #cbd5e1;
    border-radius: 4px 4px 12px 12px;
    margin-top: -2px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: visible;
}

/* === CORAZÓN 3D LEVITANTE (Versión Ceramic Slate) === */
.ia-badge {
    position: relative;
    width: 20px;
    height: 18px;
    animation: heart3dLevitate 2.2s ease-in-out infinite;
    transform-style: preserve-3d;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
}

.ia-badge::before,
.ia-badge::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #64748b 0%, #334155 100%);
    border-radius: 10px 10px 0 0;
    box-shadow: inset -1px -1px 2px rgba(0,0,0,0.2), inset 1px 1px 2px rgba(255,255,255,0.2);
}

@keyframes heart3dLevitate {
    0%, 100% { transform: translateY(0px) rotateY(0deg) scale(1); filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); }
    50% { transform: translateY(-5px) rotateY(15deg) scale(1.1); filter: drop-shadow(0 8px 12px rgba(0,0,0,0.15)); }
}

/* Animaciones Robot */
@keyframes robotFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes antennaPulse {

    0%,
    100% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
        filter: brightness(1.5);
    }

    50% {
        opacity: 0.7;
        transform: translateX(-50%) scale(0.85);
        filter: brightness(1);
    }
}

@keyframes eyeBlink {

    0%,
    45%,
    55%,
    100% {
        transform: scaleY(1);
    }

    50% {
        transform: scaleY(0.1);
    }
}

@keyframes textPulse {
    from {
        transform: scale(0.9);
        opacity: 0.8;
    }

    to {
        transform: scale(1.1);
        opacity: 1;
    }
}

@keyframes robotShine {
    0% {
        left: -100%;
    }

    15%,
    100% {
        left: 100%;
    }
}

#chatbot-launcher::before {
    content: '¿Hablamos?';
    position: absolute;
    right: 85px;
    background: rgba(15, 15, 20, 0.8);
    backdrop-filter: blur(10px);
    color: white;
    padding: 8px 15px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s;
    pointer-events: none;
    border: 1px solid var(--glass-border);
}

#chatbot-launcher:hover::before {
    opacity: 1;
    transform: translateX(0);
}

#chatbot-launcher:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 50px rgba(var(--accent-rgb), 0.4);
}

#chatbot-launcher:active {
    transform: scale(0.9);
}

.chatbot-window {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 400px;
    height: 620px;
    background: #0f172a; /* Deep Slate Dark */
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    display: flex;
    flex-direction: column;
    z-index: 999;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    transform: translateY(30px) scale(0.9);
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    overflow: hidden;
}

.chatbot-window.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: all;
    animation: windowSway 0.6s ease-out;
}

@keyframes windowSway {
    0% {
        transform: translateY(30px) scale(0.9) rotate(-3deg);
    }

    100% {
        transform: translateY(0) scale(1) rotate(0);
    }
}

.chat-header {
    padding: 1.4rem 1.5rem;
    background: rgba(30, 41, 59, 0.8);
    border-bottom: 2px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.chat-header .bot-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.bot-info img {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 2px solid var(--accent);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.bot-info h4 {
    margin: 0;
    font-size: 1.15rem;
    color: #ffffff;
    font-weight: 700;
}

.bot-info span {
    font-size: 0.75rem;
    color: #10b981; /* Esmeralda vivo */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bot-info span::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 10px #10b981;
    animation: pulseStatus 2s infinite;
}

@keyframes pulseStatus {
    0% { transform: scale(1); opacity: 1; text-shadow: 0 0 0px #10b981; }
    50% { transform: scale(1.2); opacity: 0.6; text-shadow: 0 0 10px #10b981; }
    100% { transform: scale(1); opacity: 1; text-shadow: 0 0 0px #10b981; }
}

.chat-body {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: radial-gradient(circle at top right, rgba(30, 41, 59, 0.4), transparent);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

/* --- BURBUJAS DE CHAT ORGÁNICAS --- */
.chat-msg-container {
    display: flex;
    margin-bottom: 8px;
    width: 100%;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.user-container {
    justify-content: flex-end;
}

.bot-container {
    justify-content: flex-start;
    gap: 12px;
}

.bot-avatar {
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.user-bubble,
.bot-bubble {
    max-width: 85%;
    padding: 14px 20px;
    font-size: 0.98rem;
    line-height: 1.6;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.user-bubble {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: #fff;
    border-radius: 20px 20px 4px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bot-bubble {
    background: #1e293b; /* Slate 800 */
    color: #ffffff;
    border-radius: 4px 22px 22px 22px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.btn-speak {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e2e8f0; /* Color claro fijo para burbujas oscuras */

    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    cursor: pointer;
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
}

.btn-speak:hover {
    background: rgba(var(--accent-rgb), 0.15);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.3);
}

.btn-speak i {
    font-size: 0.85rem;
}

/* --- QUICK REPLIES (CHIPS DINÁMICOS) --- */
.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.btn-reply {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-reply:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(16, 185, 129, 0.2);
}

/* --- FOOTER (SOFT INPUT PILL) --- */
.chat-footer {
    padding: 1.5rem;
    background: #0f172a;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    gap: 12px;
    align-items: center;
}

.chat-footer input {
    flex: 1;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 14px 22px;
    border-radius: 34px;
    color: #ffffff !important; 
    font-size: 0.95rem;
    transition: all 0.3s;
}

.chat-footer input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.1);
}

.btn-send {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.btn-send:hover {
    transform: scale(1.1) rotate(-10deg);
    background: var(--accent-hover);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* --- VARIANTES POR PERSONALIDAD (REFINADAS) --- */
.chatbot-window.bot-it {
    --accent: #10b981;
    --accent-hover: #059669;
    --accent-glow: rgba(16, 185, 129, 0.4);
}

.chatbot-window.bot-familias {
    --accent: #0ea5e9;
    --accent-hover: #0284c7;
    --accent-glow: rgba(14, 165, 233, 0.4);
}

.chatbot-window.bot-mascotas {
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --accent-glow: rgba(245, 158, 11, 0.4);
}

.chatbot-window.bot-ocio {
    --accent: #8b5cf6;
    --accent-hover: #7c3aed;
    --accent-glow: rgba(139, 92, 246, 0.4);
}

/* === ARCADE: CLASSIC BOARDS (Chess/Checkers) === */
.classic-board {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    width: 360px;
    height: 360px;
    background: #1e293b;
    border: 2px solid rgba(0,255,224,0.3);
    margin: 0 auto;
}

.chess-cell, .ck-cell {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.8rem;
    transition: background 0.2s;
}

.chess-cell.light, .ck-cell.light { background: #e2e8f0; color: #1e293b; }
.chess-cell.dark, .ck-cell.dark { background: #475569; color: #fff; }

.chess-cell.selected, .ck-cell.selected {
    background: rgba(0, 255, 224, 0.4) !important;
    box-shadow: inset 0 0 15px rgba(0, 255, 224, 0.5);
}

.ck-cell .piece {
    width: 80%;
    height: 80%;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    border: 2px solid rgba(255,255,255,0.2);
}

.ck-cell .piece.r { background: #ef4444; }
.ck-cell .piece.b { background: #1e293b; }
.ck-cell .piece.selected { border: 3px solid #00ffe0; transform: scale(1.1); }

.chess-cell span {
    pointer-events: none;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.bot-familias .bot-avatar {
    border-color: #0ea5e9;
    color: #0ea5e9;
}

.bot-mascotas .bot-avatar {
    border-color: #f59e0b;
    color: #f59e0b;
}

.bot-ocio .bot-avatar {
    border-color: #8b5cf6;
    color: #8b5cf6;
}

/* Acoples de colores por página (Variables Globales) */
body.familia-page {
    --accent: #0ea5e9;
}

body.mascotas-page {
    --accent: #f59e0b;
}

body.ocio-page {
    --accent: #8b5cf6;
}

/* Acordeón Ocio */
.card-details {
    display: none;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 1rem;
    animation: fadeIn 0.4s ease;
}

.ayuda-card.expanded .card-details {
    display: block;
}

body.profesional-page .glass-footer,
body.mascotas-page .glass-footer,
body.ocio-page .glass-footer {
    background: rgba(15, 23, 42, 0.9);
    color: #f1f5f9;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body.profesional-page .glass-footer b,
body.mascotas-page .glass-footer b,
body.ocio-page .glass-footer b {
    color: #ffffff !important;
}


.toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

.toggle-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
}

/* --- SISTEMA DE COLA Y REGISTRO --- */
.name-registration-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 12, 14, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
    transition: all 0.5s ease;
}

.name-registration-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.1);
}

.reg-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.5rem 1.5rem;
    border-radius: 24px;
    width: 100%;
}

.reg-card i {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1rem;
    display: block;
}

.reg-card h3 {
    margin-bottom: 0.5rem;
    color: #fff;
}

.reg-card p {
    font-size: 0.9rem;
    color: #cbd5e1; /* Forzar color claro en overlay oscuro */
    margin-bottom: 1.5rem;
}


.reg-card input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.reg-card input:focus {
    border-color: var(--accent);
    outline: none;
}

.btn-start {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--accent-glow);
}

/* Banner de cola */
.queue-status-banner {
    background: rgba(245, 158, 11, 0.1);
    border-bottom: 1px solid rgba(245, 158, 11, 0.2);
    padding: 8px;
    text-align: center;
    font-size: 0.85rem;
    color: #f59e0b;
    font-weight: 600;
    display: none;
    /* Se activa con JS */
}

@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100% - 30px);
        height: 80vh;
        bottom: 90px;
        right: 15px;
    }

    .user-bubble,
    .bot-bubble {
        max-width: 90%;
    }
}

/* === NAVEGACIÓN MÓVIL (MENÚ HAMBURGUESA) === */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 0;
        /* Cubre desde el inicio de la pantalla */
        right: -100%;
        /* Oculto fuera de pantalla por defecto */
        width: 100vw;
        height: 100vh;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: rgba(15, 15, 20, 0.95);
        /* Color de fondo muy oscuro para leer bien */
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 0;
        margin: 0;
        z-index: 999;
    }

    .nav-links.nav-active {
        right: 0;
    }

    .nav-links li {
        margin: 1.5rem 0;
        opacity: 0;
        transform: translateX(50px);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }

    .nav-links.nav-active li {
        opacity: 1;
        transform: translateX(0);
    }

    /* Efecto escalera para las animaciones del menú */
    .nav-links li:nth-child(1) {
        transition-delay: 0.1s;
    }

    .nav-links li:nth-child(2) {
        transition-delay: 0.15s;
    }

    .nav-links li:nth-child(3) {
        transition-delay: 0.2s;
    }

    .nav-links li:nth-child(4) {
        transition-delay: 0.25s;
    }

    .nav-links li:nth-child(5) {
        transition-delay: 0.3s;
    }

    .nav-links li:nth-child(6) {
        transition-delay: 0.35s;
    }

    .nav-links a {
        font-size: 1.8rem;
    }

    /* Padding extra para que el contenido no quede pegado a los bordes laterales en móvil */
    main {
        padding: 0 1rem;
        padding-top: 100px;
    }

    .logo {
        z-index: 1000;
        /* El logo se queda arriba con el botón de hamburguesa */
    }
}

/* === EFECTOS OCIO & HOBBIES === */
.ocio-page .ayuda-card {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s ease, box-shadow 0.3s ease;
}

.ocio-page .ayuda-card:hover {
    transform: translateY(-8px);
    border-color: rgba(139, 92, 246, 0.6) !important;
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.25);
}

.ocio-page .banner-img {
    transition: transform 0.6s ease;
}

.ocio-page .ayuda-card:hover .banner-img {
    transform: scale(1.08);
}

.ocio-page .card-icon i {
    transition: transform 0.4s ease;
}

.ocio-page .ayuda-card:hover .card-icon i {
    transform: rotate(10deg) scale(1.1);
}

/* ==============================================================================
   OPTIMIZACIÓN MÓVIL ADICIONAL (CHATBOT Y FOOTER)
   ============================================================================== */
@media (max-width: 768px) {
    /* Lanzador del Bot más pequeño para móvil */
    #chatbot-launcher {
        bottom: 20px;
        right: 20px;
        width: 65px;
        height: 65px;
        border-width: 2px;
    }

    .ia-robot-container {
        transform: scale(0.8);
        bottom: -5px;
    }

    /* Ventana del Chat tipo App en móvil */
    #chatbot-window {
        bottom: 0;
        right: 0;
        width: 100%;
        height: 85vh; /* Ocupa casi toda la pantalla para leer mejor */
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    }

    .chat-header {
        padding: 1rem;
    }

    .chat-body {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    .chat-footer {
        padding: 1rem;
    }

    /* Footer más discreto */
    .footer {
        font-size: 0.6rem;
        padding: 0.4rem 0.5rem;
        background: rgba(6, 9, 8, 0.95);
    }

    .dmca-badge {
        display: none !important; /* Ocultamos para que no tape el launcher en pantallas pequeñas */
    }

    /* Ajuste de tarjetas de Skill y Ayuda para Tablets/Móviles */
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 1rem;
    }

    .skill-card {
        padding: 1rem 0.5rem;
    }

    .skill-card .skill-name {
        font-size: 0.8rem;
    }
}

/* 
   === UNIFICACIÓN VISUAL v2.4 === 
   Estilos premium de la esfera central aplicados globalmente
*/

.glass-footer {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--glass-border);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    position: relative;
    z-index: 100;
    margin-top: 0;
    font-family: 'Outfit', sans-serif;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-right {
    text-align: right;
    font-size: 0.75rem;
    line-height: 1.4;
}

/* Botón IA Privada (Píldora) */
.btn-ia-privada {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f8fafc;
    padding: 8px 18px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.btn-ia-privada:hover {
    background: rgba(30, 41, 59, 1);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.2);
}

.btn-ia-privada i {
    font-size: 1rem;
    color: var(--accent);
}

@media (max-width: 768px) {
    .glass-footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 2rem 1.5rem;
    }
    .footer-right {
        text-align: center;
    }
}

.glass-footer .dmca-badge {
    opacity: 0.6;
    transition: 0.3s;
}

.glass-footer .dmca-badge:hover {
    opacity: 1;
}

/* Ocultar footer antiguo si existe */
.footer {
    display: none !important;
}

/* Ajuste general para tarjetas de ayuda en subpáginas */
.ayuda-card {
    background: var(--glass-bg) !important;
    backdrop-filter: var(--glass-blur) !important;
    border: 2px solid var(--glass-border) !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4), var(--glass-glow) !important;
    border-radius: 24px !important;
}

/* ==========================================================================
   SECCIÓN: MASCOTAS & BIENESTAR (MEJORAS PREMIUM)
   ========================================================================== */

/* Animación de Patitas Flotantes */
@keyframes float-paws {
    0% { transform: translateY(0) rotate(0deg); opacity: 0.2; }
    50% { transform: translateY(-20px) rotate(10deg); opacity: 0.5; }
    100% { transform: translateY(0) rotate(0deg); opacity: 0.2; }
}

.mascotas-page .dynamic-bg::after {
    content: "🐾";
    position: fixed;
    font-size: 2rem;
    bottom: 10%;
    right: 5%;
    animation: float-paws 6s ease-in-out infinite;
    z-index: -1;
    filter: blur(2px);
}

/* Semáforo de Alimentación */
.nutrition-traffic-light {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.traffic-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    transition: transform 0.3s ease;
}

.traffic-item:hover {
    transform: translateX(10px);
    background: rgba(255, 255, 255, 0.05);
}

.traffic-light {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

.traffic-red { background: #fee2e2; color: #ef4444; border: 2px solid #ef4444; box-shadow: 0 0 15px rgba(239, 68, 68, 0.2); }
.traffic-yellow { background: #fef3c7; color: #f59e0b; border: 2px solid #f59e0b; box-shadow: 0 0 15px rgba(245, 158, 11, 0.2); }
.traffic-green { background: #dcfce7; color: #10b981; border: 2px solid #10b981; box-shadow: 0 0 15px rgba(16, 185, 129, 0.2); }

/* Calculadora de Edad Interactiva */
.calculator-card {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.1), rgba(0,0,0,0.4)) !important;
    border: 2px solid var(--accent) !important;
}

.calc-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.calc-type-btn {
    padding: 1rem 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.calc-type-btn.active {
    background: var(--accent);
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.4);
    transform: scale(1.05);
}

.age-input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#pet-age-slider {
    width: 100%;
    max-width: 400px;
    accent-color: var(--accent);
    margin: 1.5rem 0;
}

.result-display {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 0 15px var(--accent);
    margin-top: 1rem;
}

/* Botiquín SOS */
.sos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.sos-item {
    padding: 1rem;
    background: rgba(255,255,255,0.05);
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.3s ease;
}

.sos-item:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--accent-magenta);
    transform: translateY(-5px);
}

.sos-item i {
    font-size: 1.5rem;
    color: var(--accent-magenta);
    margin-bottom: 0.5rem;
}

.sos-item span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Recetario Premium */
.recipe-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 0.5rem;
}

.recipe-meta {
    display: flex;
    gap: 10px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
}

.recipe-ingredient-tag {
    background: rgba(var(--accent-rgb), 0.15);
    border: 1px solid var(--accent);
    color: #fff;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 0.75rem;
}

/* Footer Ajuste */
body.mascotas-page .glass-footer {
    background: rgba(15, 23, 42, 0.9) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.mascotas-page .glass-footer b, 
body.mascotas-page .glass-footer div {
    color: #fff !important;
}

/* Alertas Legales y Sanciones */
.legal-alert {
    padding: 1.5rem;
    border-radius: 15px;
    margin: 1.5rem 0;
    border-left: 6px solid;
    background: rgba(255, 255, 255, 0.05);
}

.alert-warning { border-color: var(--accent-gold); background: rgba(245, 158, 11, 0.05); }
.alert-danger { border-color: var(--accent-magenta); background: rgba(244, 63, 94, 0.05); }

.sanciones-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.85rem;
}

.sanciones-table th {
    background: rgba(var(--accent-rgb), 0.2);
    color: var(--accent);
    padding: 12px;
    text-align: left;
    text-transform: uppercase;
}

.sanciones-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #cbd5e1; /* Forzar color legible */
}


.sancion-multa {
    font-weight: 800;
    color: var(--accent-magenta);
}

/* ==========================================================================
   TENFOK UNIFIED PARITY & ACCESSIBILITY (v2.5)
   ========================================================================== */

/* High Contrast Global Overrides */
.dark-theme, .it-page, .familia-page, .mascotas-page, .ocio-page {
    --text-primary: #f8fafc !important; /* White-slate for maximum contrast */
    --text-secondary: #cbd5e1 !important; /* Lighter slate for subtexts */
}

/* Force readability on glass cards */
.glass-card p, .ayuda-card p {
    color: var(--text-secondary) !important;
    line-height: 1.7 !important;
    font-weight: 400 !important;
}

.glass-card h3, .ayuda-card h3 {
    color: var(--text-primary) !important;
    font-weight: 800 !important;
    letter-spacing: -0.5px !important;
}

/* Unified Badge Styling */
span.badge, span.badge-ocio, span.badge-pet {
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.2) !important;
}

/* Chatbot Launcher Label Parity */
#chatbot-launcher span {
    transition: all 0.3s ease !important;
}

#chatbot-launcher:hover span {
    transform: translateY(-2px) !important;
    text-shadow: 0 0 15px rgba(var(--accent-rgb), 0.6) !important;
    color: #fff !important;
}

/* Ensure consistent spacing for BOE and similar dashboards */
.boe-dashboard, .normativa-box, .notice-box {
    margin-top: 2rem !important;
    margin-bottom: 3rem !important;
}

/* Global Smooth Scroll */
html {
    scroll-behavior: smooth !important;
}

/* Floating WhatsApp Button */
#whatsapp-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    border: 2px solid #fff;
}

#whatsapp-btn i {
    color: #fff;
    font-size: 2rem;
}

#whatsapp-btn:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}

#whatsapp-btn .wa-tooltip {
    position: absolute;
    left: 75px;
    background: #fff;
    color: #1e293b;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s;
    pointer-events: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

#whatsapp-btn:hover .wa-tooltip {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 768px) {
    #whatsapp-btn {
        bottom: 20px;
        left: 20px;
        width: 50px;
        height: 50px;
    }
    #whatsapp-btn i { font-size: 1.5rem; }
    #whatsapp-btn .wa-tooltip { display: none; }
}

