/* =====================================================
   HUMANPRO - ARCHIVO DE CORRECCIONES VISUALES
   Este archivo contiene todos los fixes para problemas
   visuales detectados en el sitio
   ===================================================== */

/* ============ FIX 1: LOGO - Tamaños consistentes ============ */
.logo img {
    height: 45px !important;
    width: auto !important;
    max-width: 200px !important;
}

/* Logo en header */
.main-header .logo img {
    height: 42px !important;
}

/* Logo en footer - MÁS PEQUEÑO */
.footer-brand-section .logo img,
.footer-brand .logo img,
.mega-footer .logo img {
    height: 50px !important;
    max-width: 180px !important;
    width: auto !important;
}

/* ============ FIX 2: FOOTER GRID - 5 columnas correctas ============ */
.footer-main {
    display: grid !important;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr 1fr !important;
    gap: 2.5rem !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
}

/* Footer brand section */
.footer-brand-section {
    max-width: 280px;
}

.footer-brand-section > p {
    font-size: 0.9rem !important;
    line-height: 1.6 !important;
}

/* Footer sections - títulos */
.footer-section h4 {
    font-size: 1rem !important;
    margin-bottom: 1.25rem !important;
    white-space: nowrap;
}

/* Footer links */
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.6rem !important;
}

.footer-links a {
    font-size: 0.85rem !important;
    color: rgba(255,255,255,0.7) !important;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.footer-links a:hover {
    color: #00d4ff !important;
    padding-left: 5px;
}

.footer-links a i {
    font-size: 0.65rem !important;
    margin-right: 0.4rem;
    opacity: 0.5;
}

/* Footer social icons - más pequeños */
.footer-social {
    gap: 0.75rem !important;
}

.footer-social a {
    width: 42px !important;
    height: 42px !important;
    font-size: 1.1rem !important;
}

/* Footer contact info */
.footer-contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
}

.contact-item i {
    color: #00d4ff;
    width: 18px;
    text-align: center;
}

/* Footer tags - más compactos */
.footer-tags {
    gap: 0.5rem !important;
    margin-bottom: 1.5rem !important;
}

.footer-tag {
    padding: 0.4rem 0.75rem !important;
    font-size: 0.75rem !important;
}

/* Footer bottom */
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
}

/* ============ FIX 3: FOOTER RESPONSIVE ============ */
@media (max-width: 1200px) {
    .footer-main {
        grid-template-columns: 1.5fr 1fr 1fr 1fr !important;
    }
    
    .footer-section:last-child {
        grid-column: span 1;
    }
}

@media (max-width: 1024px) {
    .footer-main {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 2rem !important;
    }
    
    .footer-brand-section {
        grid-column: span 3;
        max-width: 100%;
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .footer-brand-section .footer-social {
        justify-content: center;
    }
    
    .footer-brand-section .footer-tags {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .footer-main {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .footer-brand-section {
        grid-column: span 2;
    }
}

@media (max-width: 500px) {
    .footer-main {
        grid-template-columns: 1fr !important;
        text-align: center;
    }
    
    .footer-brand-section {
        grid-column: span 1;
    }
    
    .footer-links {
        align-items: center;
    }
    
    .contact-item {
        justify-content: center;
    }
}

/* ============ FIX 4: NEURAL BACKGROUND ============ */
.neural-bg {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: -2 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    background: linear-gradient(135deg, #050a30 0%, #0a1628 50%, #050a30 100%) !important;
}

.neural-bg canvas {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    opacity: 0.55 !important;
}

/* ============ FIX 5: HEADER ============ */
.main-header {
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
}

/* ============ FIX 6: BOTONES CTA ============ */
.cta-button {
    white-space: nowrap !important;
    padding: 0.7rem 1.5rem !important;
    font-size: 0.9rem !important;
}

@media (max-width: 1100px) {
    .cta-button {
        padding: 0.6rem 1rem !important;
        font-size: 0.85rem !important;
    }
    
    .cta-button i {
        display: none;
    }
}

/* ============ FIX 7: DROPDOWN MENUS ============ */
.dropdown {
    min-width: 220px !important;
}

.dropdown a {
    padding: 0.75rem 1rem !important;
    font-size: 0.9rem !important;
    white-space: nowrap;
}

/* ============ FIX 8: SECTION BADGES ============ */
.section-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.8rem !important;
    border-radius: 25px !important;
    background: linear-gradient(135deg, rgba(35,61,255,0.2), rgba(0,212,255,0.1)) !important;
    border: 1px solid rgba(35,61,255,0.3) !important;
    color: #00d4ff !important;
    font-weight: 600 !important;
    margin-bottom: 1rem !important;
}

/* ============ FIX 9: URGENCY BANNER ============ */
.urgency-banner {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    padding: 0.75rem 1rem !important;
}

.urgency-content {
    max-width: 1200px !important;
    margin: 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1rem !important;
    flex-wrap: wrap !important;
}

/* ============ FIX 10: SCROLL TO TOP & WHATSAPP ============ */
.scroll-to-top,
#scrollToTop {
    position: fixed !important;
    bottom: 25px !important;
    left: 25px !important;
    z-index: 996 !important;
}

.whatsapp-float {
    position: fixed !important;
    bottom: 25px !important;
    right: 25px !important;
    z-index: 997 !important;
}

/* ============ FIX 11: CARDS Y PANELES ============ */
.tool-panel,
.service-card,
.city-service-card {
    background: rgba(5,10,48,0.95) !important;
    border: 2px solid rgba(35,61,255,0.3) !important;
}

/* ============ FIX 12: TEXTOS Y TIPOGRAFÍA ============ */
h1, h2, h3 {
    line-height: 1.2 !important;
}

p {
    line-height: 1.7 !important;
}

/* ============ FIX 13: FORMULARIOS ============ */
input, select, textarea {
    font-family: inherit !important;
}

input:focus, select:focus, textarea:focus {
    outline: none !important;
    border-color: #00d4ff !important;
}

/* ============ FIX 14: ANIMACIONES SUAVES ============ */
* {
    scroll-behavior: smooth;
}

a, button, input, select, textarea {
    transition: all 0.3s ease !important;
}

/* ============ FIX 15: MEGA FOOTER PADDING ============ */
.mega-footer {
    padding: 4rem 5% 2rem !important;
}

body {
    padding-bottom: 0 !important;
}

/* Cuando hay banner de urgencia */
body.has-urgency-banner {
    padding-bottom: 60px !important;
}

/* ============ FOOTER COMPACTO PARA ARTÍCULOS Y PÁGINAS SIMPLES ============ */
.footer-simple {
    background: rgba(5,10,48,0.98);
    border-top: 1px solid rgba(35,61,255,0.2);
    padding: 2rem 5%;
    text-align: center;
}

.footer-simple p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    margin: 0;
}

.footer-simple a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-simple a:hover {
    color: #00d4ff;
}

/* ============ SCROLL TO TOP BUTTON ============ */
.scroll-to-top,
#scrollToTop {
    position: fixed !important;
    bottom: 25px !important;
    left: 25px !important;
    width: 50px !important;
    height: 50px !important;
    background: linear-gradient(135deg, #233dff, #00d4ff) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    font-size: 1.25rem !important;
    text-decoration: none !important;
    z-index: 996 !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease !important;
    box-shadow: 0 5px 20px rgba(35,61,255,0.4);
}

.scroll-to-top.visible,
#scrollToTop.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover,
#scrollToTop:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 30px rgba(35,61,255,0.5);
}

/* WhatsApp Float - asegurar que no se superponga */
.whatsapp-float {
    position: fixed !important;
    bottom: 25px !important;
    right: 25px !important;
    z-index: 997 !important;
}

.whatsapp-float a,
.whatsapp-button {
    width: 60px !important;
    height: 60px !important;
    background: #25D366 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    font-size: 1.75rem !important;
    text-decoration: none !important;
    box-shadow: 0 5px 25px rgba(37,211,102,0.5) !important;
    transition: all 0.3s ease !important;
}

.whatsapp-float a:hover,
.whatsapp-button:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 10px 35px rgba(37,211,102,0.6) !important;
}

/* ============ MEJORAS DE VALIDACIÓN DE FORMULARIOS ============ */
.form-input:invalid:not(:placeholder-shown),
.form-group input:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown),
.form-group select:invalid:not(:placeholder-shown) {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

.form-input:valid:not(:placeholder-shown),
.form-group input:valid:not(:placeholder-shown),
.form-group textarea:valid:not(:placeholder-shown) {
    border-color: #10b981 !important;
}

/* Tooltip styles */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    background: rgba(5,10,48,0.95);
    border: 1px solid rgba(0,212,255,0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
}

/* Loading states */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* ============ SKIP LINK ACCESIBILIDAD ============ */
.skip-link {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: #233dff;
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 0 0 12px 12px;
    z-index: 10000;
    transition: top 0.3s ease;
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid #00d4ff;
    outline-offset: 2px;
}

/* Mejorar contraste en textos claros */
.footer-links a,
.footer-contact-info span {
    color: rgba(255,255,255,0.75) !important;
}

.footer-links a:hover {
    color: #00d4ff !important;
}

/* Focus visible para todos los elementos interactivos */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #00d4ff !important;
    outline-offset: 2px !important;
}

/* ============ EXIT INTENT POPUP ============ */
.exit-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.exit-popup-content {
    background: linear-gradient(135deg, #050a30, #0a1628);
    border: 2px solid #00d4ff;
    border-radius: 24px;
    padding: 2.5rem;
    max-width: 400px;
    text-align: center;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.exit-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.exit-popup-close:hover {
    color: #fff;
}

.exit-popup-content h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: #fff;
}

.exit-popup-content p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 1.5rem;
}

.exit-popup-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border-radius: 30px;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.exit-popup-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(37,211,102,0.4);
}

.exit-popup-disclaimer {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    margin-top: 1rem;
    margin-bottom: 0;
}

/* ============ SOCIAL PROOF NOTIFICATIONS ============ */
.social-proof-toast {
    position: fixed;
    bottom: 100px;
    left: 25px;
    background: rgba(5,10,48,0.98);
    border: 1px solid rgba(0,212,255,0.3);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 9998;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    transform: translateX(-120%);
    transition: transform 0.3s ease;
    max-width: 320px;
}

.social-proof-toast.show {
    transform: translateX(0);
}

.toast-icon {
    font-size: 1.5rem;
}

.toast-content {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
    color: #fff;
}

.toast-content strong {
    color: #00d4ff;
}

.toast-content em {
    color: #10b981;
    font-style: normal;
    font-weight: 600;
}

.toast-time {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
}

.toast-close {
    position: absolute;
    top: 5px;
    right: 8px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    font-size: 1rem;
}

.toast-close:hover {
    color: #fff;
}

@media (max-width: 500px) {
    .social-proof-toast {
        left: 10px;
        right: 10px;
        max-width: none;
    }
}

/* ============ THEME TOGGLE BUTTON ============ */
.theme-toggle {
    position: fixed;
    top: 100px;
    right: 25px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(35,61,255,0.2);
    border: 1px solid rgba(0,212,255,0.3);
    color: #00d4ff;
    cursor: pointer;
    z-index: 995;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    background: rgba(0,212,255,0.2);
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(0,212,255,0.3);
}

/* ============ LIGHT THEME ============ */
[data-theme="light"] {
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --border-color: rgba(35,61,255,0.2);
}

[data-theme="light"] body {
    background: var(--bg-primary) !important;
}

[data-theme="light"] .main-header {
    background: rgba(255,255,255,0.95) !important;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

[data-theme="light"] .main-header a,
[data-theme="light"] .nav-menu a {
    color: #1a1a2e !important;
}

[data-theme="light"] .hero-section,
[data-theme="light"] .tool-page,
[data-theme="light"] main {
    background: var(--bg-primary) !important;
}

[data-theme="light"] h1, 
[data-theme="light"] h2, 
[data-theme="light"] h3,
[data-theme="light"] h4 {
    color: #1a1a2e !important;
}

[data-theme="light"] p,
[data-theme="light"] span,
[data-theme="light"] li {
    color: #4a4a6a !important;
}

[data-theme="light"] .tool-panel,
[data-theme="light"] .service-card,
[data-theme="light"] .pricing-card,
[data-theme="light"] .testimonial-card {
    background: #ffffff !important;
    border-color: rgba(35,61,255,0.15) !important;
    box-shadow: 0 5px 30px rgba(0,0,0,0.08) !important;
}

[data-theme="light"] .mega-footer {
    background: linear-gradient(180deg, #1a1a2e, #0a0a1a) !important;
}

[data-theme="light"] .neural-bg {
    opacity: 0.3;
}

[data-theme="light"] .highlight,
[data-theme="light"] .highlight-cyan {
    color: #233dff !important;
}

[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
    background: #f8f9fa !important;
    border-color: #ddd !important;
    color: #1a1a2e !important;
}

[data-theme="light"] .theme-toggle {
    background: rgba(26,26,46,0.1);
    color: #1a1a2e;
}

@media (max-width: 768px) {
    .theme-toggle {
        top: auto;
        bottom: 160px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
}

/* ============ WHEEL POPUP ============ */
.wheel-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    animation: fadeIn 0.3s ease;
}

.wheel-popup-content {
    background: linear-gradient(135deg, #050a30, #0a1628);
    border: 2px solid #00d4ff;
    border-radius: 24px;
    padding: 2rem;
    max-width: 380px;
    text-align: center;
    position: relative;
}

.wheel-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.5rem;
    cursor: pointer;
}

.wheel-popup-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.wheel-popup-content > p {
    color: rgba(255,255,255,0.7);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.wheel-container {
    position: relative;
    width: 250px;
    height: 250px;
    margin: 0 auto 1.5rem;
}

.wheel-pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: #00d4ff;
    z-index: 10;
    filter: drop-shadow(0 0 10px #00d4ff);
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    background: conic-gradient(
        #233dff 0deg 72deg,
        #10b981 72deg 144deg,
        #f59e0b 144deg 216deg,
        #ec4899 216deg 288deg,
        #6366f1 288deg 360deg
    );
    box-shadow: 0 0 30px rgba(0,212,255,0.3);
    border: 4px solid #00d4ff;
}

.wheel-segment {
    position: absolute;
    width: 50%;
    height: 50%;
    top: 0;
    left: 50%;
    transform-origin: 0% 100%;
    transform: rotate(var(--rotation)) translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 20px;
}

.wheel-segment span {
    transform: rotate(36deg);
    color: #fff;
    font-weight: 700;
    font-size: 0.7rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.wheel-spin-btn {
    background: linear-gradient(135deg, #233dff, #00d4ff);
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 30px;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wheel-spin-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(35,61,255,0.4);
}

.wheel-spin-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.wheel-result h4 {
    color: #10b981;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.wheel-result .prize-won {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.wheel-result .prize-code {
    background: rgba(0,212,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 1rem;
}

.wheel-result .prize-code strong {
    color: #00d4ff;
}

.wheel-claim-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #25D366;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.wheel-claim-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(37,211,102,0.4);
}

@media (max-width: 400px) {
    .wheel-container {
        width: 200px;
        height: 200px;
    }
}

/* ============ PROGRESS WIDGET ============ */
.progress-widget {
    position: fixed;
    top: 160px;
    right: 25px;
    background: rgba(5,10,48,0.98);
    border: 1px solid rgba(0,212,255,0.3);
    border-radius: 16px;
    padding: 0.75rem;
    z-index: 994;
    width: 220px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.progress-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.progress-icon {
    font-size: 1.25rem;
}

.progress-info {
    flex: 1;
}

.progress-label {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.6);
    display: block;
}

.progress-bar-mini {
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    margin-top: 4px;
    overflow: hidden;
}

.progress-fill-mini {
    height: 100%;
    background: linear-gradient(90deg, #233dff, #00d4ff);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.progress-percent {
    font-weight: 700;
    color: #00d4ff;
    font-size: 0.9rem;
}

.progress-toggle {
    color: rgba(255,255,255,0.4);
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.progress-widget.expanded .progress-toggle {
    transform: rotate(180deg);
}

.progress-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.progress-widget.expanded .progress-details {
    max-height: 400px;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.progress-subtitle {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 0.75rem;
}

.progress-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.progress-checklist li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
}

.progress-checklist li.completed {
    color: #10b981;
}

.progress-checklist li.completed i {
    color: #10b981;
}

.progress-checklist li i {
    color: rgba(255,255,255,0.3);
    font-size: 0.7rem;
}

.progress-checklist a {
    color: inherit;
    text-decoration: none;
    flex: 1;
}

.progress-checklist a:hover {
    color: #00d4ff;
}

.progress-checklist .points {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.4);
}

.progress-badge {
    text-align: center;
    padding: 0.5rem;
    background: linear-gradient(135deg, rgba(251,191,36,0.2), rgba(245,158,11,0.2));
    border-radius: 8px;
    color: #fbbf24;
    font-weight: 600;
    font-size: 0.8rem;
    margin-top: 0.75rem;
}

/* Achievement Popup */
.achievement-popup {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: linear-gradient(135deg, #050a30, #0a1628);
    border: 2px solid #fbbf24;
    border-radius: 16px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 10003;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(251,191,36,0.3);
}

.achievement-popup.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.achievement-icon {
    font-size: 2rem;
}

.achievement-text {
    display: flex;
    flex-direction: column;
}

.achievement-text strong {
    color: #fbbf24;
    font-size: 0.9rem;
}

.achievement-text span {
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .progress-widget {
        display: none; /* Ocultar en móvil para no molestar */
    }
}

/* ============ CHATBOT WIDGET ============ */
.chatbot-widget {
    position: fixed;
    bottom: 100px;
    right: 25px;
    z-index: 998;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #233dff, #00d4ff);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 25px rgba(35,61,255,0.4);
    transition: all 0.3s ease;
    position: relative;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 35px rgba(35,61,255,0.5);
}

.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 22px;
    height: 22px;
    background: #ef4444;
    border-radius: 50%;
    color: #fff;
    font-size: 0.75rem;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.chatbot-window {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 340px;
    background: rgba(5,10,48,0.98);
    border: 1px solid rgba(0,212,255,0.3);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
}

.chatbot-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chatbot-header {
    background: linear-gradient(135deg, #233dff, #1a2d99);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.chatbot-title {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chatbot-title strong {
    color: #fff;
    font-size: 0.95rem;
}

.chatbot-title span {
    color: #10b981;
    font-size: 0.75rem;
}

.chatbot-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 1.5rem;
    cursor: pointer;
}

.chatbot-messages {
    padding: 1rem;
    max-height: 250px;
    overflow-y: auto;
}

.chat-message {
    margin-bottom: 0.75rem;
}

.chat-message.bot p {
    background: rgba(35,61,255,0.2);
    border-radius: 15px 15px 15px 5px;
    padding: 0.75rem 1rem;
    color: #fff;
    font-size: 0.9rem;
    line-height: 1.5;
}

.chatbot-options {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.2);
}

.chatbot-options button,
.chatbot-options .chatbot-link {
    background: rgba(35,61,255,0.2);
    border: 1px solid rgba(0,212,255,0.3);
    padding: 0.6rem 1rem;
    border-radius: 10px;
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    text-decoration: none;
    display: block;
}

.chatbot-options button:hover,
.chatbot-options .chatbot-link:hover {
    background: rgba(0,212,255,0.2);
    border-color: #00d4ff;
}

@media (max-width: 400px) {
    .chatbot-window {
        width: calc(100vw - 30px);
        right: -10px;
    }
}
/* ============ MENÚ FLOTANTE UNIFICADO ============ */
/* Ocultar elementos individuales antiguos */
.chatbot-widget,
.theme-toggle,
.whatsapp-float {
    display: none !important;
}

/* Nuevo menú flotante */
.floating-menu {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9999;
}

.floating-menu-trigger {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #233dff, #00d4ff);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 25px rgba(35,61,255,0.5);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.floating-menu-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 35px rgba(35,61,255,0.6);
}

.floating-menu-trigger .icon-open,
.floating-menu-trigger .icon-close {
    position: absolute;
    transition: all 0.3s ease;
}

.floating-menu-trigger .icon-close {
    opacity: 0;
    transform: rotate(-90deg);
}

.floating-menu.active .floating-menu-trigger .icon-open {
    opacity: 0;
    transform: rotate(90deg);
}

.floating-menu.active .floating-menu-trigger .icon-close {
    opacity: 1;
    transform: rotate(0deg);
}

/* Badge de notificación */
.floating-menu-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 22px;
    height: 22px;
    background: #ef4444;
    border-radius: 50%;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Opciones del menú */
.floating-menu-options {
    position: absolute;
    bottom: 75px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.floating-menu.active .floating-menu-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.floating-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.floating-option-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.floating-option-btn:hover {
    transform: scale(1.15);
}

.floating-option-label {
    background: rgba(5,10,48,0.95);
    padding: 8px 14px;
    border-radius: 8px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    pointer-events: none;
    border: 1px solid rgba(0,212,255,0.3);
}

.floating-option:hover .floating-option-label {
    opacity: 1;
    transform: translateX(0);
}

/* Colores de cada opción */
.floating-option-whatsapp .floating-option-btn {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.floating-option-chat .floating-option-btn {
    background: linear-gradient(135deg, #233dff, #00d4ff);
}

.floating-option-theme .floating-option-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.floating-option-top .floating-option-btn {
    background: linear-gradient(135deg, #10b981, #059669);
}

/* Efecto de aparición escalonado */
.floating-menu.active .floating-option:nth-child(1) { transition-delay: 0.05s; }
.floating-menu.active .floating-option:nth-child(2) { transition-delay: 0.1s; }
.floating-menu.active .floating-option:nth-child(3) { transition-delay: 0.15s; }
.floating-menu.active .floating-option:nth-child(4) { transition-delay: 0.2s; }

/* Ventana del chatbot integrada */
.floating-chat-window {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 340px;
    background: rgba(5,10,48,0.98);
    border: 1px solid rgba(0,212,255,0.3);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
}

.floating-chat-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Responsive */
@media (max-width: 500px) {
    .floating-menu {
        bottom: 15px;
        right: 15px;
    }
    
    .floating-menu-trigger {
        width: 55px;
        height: 55px;
    }
    
    .floating-option-btn {
        width: 45px;
        height: 45px;
    }
    
    .floating-option-label {
        display: none;
    }
    
    .floating-chat-window {
        width: calc(100vw - 30px);
        right: 0;
    }
}

/* ═══════════════════════════════════════════════════════════════
   AVATARES DE TESTIMONIOS
   ═══════════════════════════════════════════════════════════════ */

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: #fff;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.testimonial-avatar.avatar-1 { background: linear-gradient(135deg, #667eea, #764ba2); }
.testimonial-avatar.avatar-2 { background: linear-gradient(135deg, #f093fb, #f5576c); }
.testimonial-avatar.avatar-3 { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.testimonial-avatar.avatar-4 { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.testimonial-avatar.avatar-5 { background: linear-gradient(135deg, #fa709a, #fee140); }
.testimonial-avatar.avatar-6 { background: linear-gradient(135deg, #a8edea, #fed6e3); color: #333; }

.testimonial-avatar::after {
    content: '';
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 14px;
    height: 14px;
    background: #10b981;
    border-radius: 50%;
    border: 2px solid #050a30;
}

.testimonial-verified {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    color: #10b981;
    margin-top: 0.25rem;
}

.testimonial-verified i {
    font-size: 0.7rem;
}

/* Mejoras adicionales testimonios */
.testimonial-card {
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 4rem;
    color: rgba(0,212,255,0.1);
    font-family: Georgia, serif;
    line-height: 1;
}

/* Contador animado */
.stat-number[data-count] {
    transition: all 0.3s;
}

.stat-number.counted {
    animation: countPulse 0.5s ease;
}

@keyframes countPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Trust badges animation */
.trust-badge {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.trust-badge:nth-child(1) { animation-delay: 0.1s; }
.trust-badge:nth-child(2) { animation-delay: 0.2s; }
.trust-badge:nth-child(3) { animation-delay: 0.3s; }
.trust-badge:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ═══════════════════════════════════════════════════════════════
   MEJORAS EBOOKS Y BLOG
   ═══════════════════════════════════════════════════════════════ */

/* Ebook Cards - Mejoras */
.ebook-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ebook-card:hover {
    transform: translateY(-10px);
}

.ebook-card .book-badge.gratis {
    background: linear-gradient(135deg, #10b981, #059669);
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
    50% { box-shadow: 0 0 20px 5px rgba(16,185,129,0.2); }
}

/* Blog Cards - Más atractivas */
.blog-card {
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #233dff, #00d4ff, #10b981);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.blog-card:hover::before {
    transform: scaleX(1);
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(35,61,255,0.2);
}

/* Blog featured tag */
.blog-featured {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 5;
}

/* Reading time badge */
.reading-time {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    margin-top: 0.5rem;
}

.reading-time i {
    color: #00d4ff;
}

/* New badge */
.badge-new {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ef4444;
    color: #fff;
    padding: 0.25rem 0.6rem;
    border-radius: 15px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Blog category tags */
.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.blog-tag {
    background: rgba(35,61,255,0.1);
    color: #00d4ff;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Ebook download counter */
.download-count {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    margin-top: 0.5rem;
}

.download-count i {
    color: #10b981;
}

/* Blog view counter */
.view-count {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}

.view-count i {
    color: #00d4ff;
}

/* Mejora para el banner de oferta en ebooks */
.ebook-promo-banner {
    background: linear-gradient(135deg, rgba(245,158,11,0.2), rgba(234,88,12,0.1));
    border: 2px solid #f59e0b;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    margin: 3rem auto;
    max-width: 800px;
    position: relative;
    overflow: hidden;
}

.ebook-promo-banner::before {
    content: '📚';
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 8rem;
    opacity: 0.1;
}

.ebook-promo-banner h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #f59e0b;
}

/* Blog newsletter section */
.blog-newsletter {
    background: linear-gradient(135deg, rgba(35,61,255,0.1), rgba(0,212,255,0.05));
    border: 1px solid rgba(35,61,255,0.3);
    border-radius: 24px;
    padding: 3rem;
    text-align: center;
    margin: 4rem 0;
}

.blog-newsletter h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.blog-newsletter p {
    color: rgba(255,255,255,0.7);
    margin-bottom: 1.5rem;
}

/* ═══════════════════════════════════════════════════════════════
   FIX CHATBOT - ASEGURAR VISIBILIDAD
   ═══════════════════════════════════════════════════════════════ */

.chatbot-container {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 9997 !important;
    display: block !important;
}

.chatbot-toggle {
    width: 60px !important;
    height: 60px !important;
    background: linear-gradient(135deg, #7c3aed, #a855f7) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4) !important;
    transition: all 0.3s ease !important;
}

.chatbot-toggle:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 30px rgba(124, 58, 237, 0.6) !important;
}

.chatbot-toggle i {
    font-size: 1.5rem !important;
    color: #fff !important;
}

.chatbot-window {
    position: absolute !important;
    bottom: 70px !important;
    right: 0 !important;
    width: 350px !important;
    max-height: 500px !important;
    background: #0a0f2c !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5) !important;
    display: none !important;
    flex-direction: column !important;
    overflow: hidden !important;
    border: 1px solid rgba(124, 58, 237, 0.3) !important;
}

.chatbot-window.active {
    display: flex !important;
}

/* Separación con Tawk.to */
/* Tawk.to normalmente está en la esquina derecha, mover chatbot un poco a la izquierda */
.chatbot-container {
    right: 90px !important;
}

@media (max-width: 768px) {
    .chatbot-container {
        right: 20px !important;
        bottom: 80px !important;
    }
    .chatbot-window {
        width: calc(100vw - 40px) !important;
        right: -60px !important;
    }
}

/* ============ BLOG SEARCH STYLES ============ */
.blog-search-container {
    margin-top: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.blog-search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(35, 61, 255, 0.3);
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.blog-search-box:focus-within {
    border-color: #233dff;
    background: rgba(35, 61, 255, 0.1);
    box-shadow: 0 0 30px rgba(35, 61, 255, 0.2);
}

.blog-search-box i {
    color: #233dff;
    font-size: 1.1rem;
    margin-right: 0.75rem;
}

.blog-search-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    outline: none;
}

.blog-search-box input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.blog-search-box .clear-search {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.5);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-search-box .clear-search:hover {
    background: rgba(239, 68, 68, 0.5);
    color: #fff;
}

/* No results message */
.no-results-message {
    text-align: center;
    padding: 3rem 1rem;
    color: rgba(255, 255, 255, 0.7);
}

.no-results-message i {
    font-size: 3rem;
    color: rgba(35, 61, 255, 0.5);
    margin-bottom: 1rem;
    display: block;
}

.no-results-message h3 {
    color: #fff;
    margin-bottom: 0.5rem;
}

/* Article card highlight on search */
.article-card.search-highlight {
    animation: highlightPulse 0.5s ease;
}

@keyframes highlightPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); box-shadow: 0 0 30px rgba(35, 61, 255, 0.3); }
}

/* Hide elements during search filter */
.article-card.hidden-by-search,
.job-card.hidden-by-search {
    display: none !important;
}

/* ============ EBOOKS PAGE FIXES ============ */
.ebook-modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

.preview-page {
    cursor: pointer;
    transition: all 0.3s ease;
}

.preview-page:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(35, 61, 255, 0.3);
}

.preview-page.active {
    border: 2px solid #00d4ff;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}
