/* ── Jaspe Creative — Shared Footer Styles ── */

/* Footer */
        footer {
            background: #0a0a0a;
            color: var(--jaspe-white);
            padding: 36px 5% 20px;
        }

        .footer-content {
            display: grid;
            grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
            gap: 30px;
            max-width: 1200px;
            margin: 0 auto 24px;
            align-items: start;
        }

        .footer-brand .logo {
            margin-bottom: 12px;
            display: inline-flex;
        }

        .footer-brand p {
            color: rgba(255, 255, 255, 0.6);
            line-height: 1.6;
            margin-bottom: 14px;
            font-size: 0.88rem;
        }

        .social-links {
            display: flex;
            gap: 10px;
        }

        .social-links a {
            width: 34px;
            height: 34px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--jaspe-white);
            text-decoration: none;
            transition: var(--transition-smooth);
            font-size: 0.85rem;
        }

        .social-links a:hover {
            background: var(--jaspe-red);
            transform: translateY(-3px);
        }

        .footer-links h4 {
            font-size: 0.95rem;
            margin-bottom: 12px;
            color: var(--jaspe-white);
        }

        .footer-links ul {
            list-style: none;
        }

        .footer-links li {
            margin-bottom: 8px;
        }

        .footer-links a {
            color: rgba(255, 255, 255, 0.6);
            text-decoration: none;
            transition: var(--transition-smooth);
            font-size: 0.88rem;
        }

        .footer-links a:hover {
            color: var(--jaspe-red);
            padding-left: 5px;
        }

        /* Legal column: items in one row */
        .footer-links.footer-legal ul {
            display: flex;
            flex-direction: row;
            flex-wrap: wrap;
            gap: 8px 16px;
        }

        .footer-links.footer-legal li {
            margin-bottom: 0;
        }

        .footer-bottom {
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            padding-top: 16px;
            text-align: center;
            color: rgba(255, 255, 255, 0.4);
            font-size: 0.82rem;
        }

        /* Reveal Animation */
        .reveal {
            opacity: 0;
            transform: translateY(50px);
            transition: all 0.8s ease-out;
        }

        .reveal.active {
            opacity: 1;
            transform: translateY(0);
        }

        /* Logo image in header/footer (declarada antes de las media queries
           de abajo para que sí puedan achicarla en móvil/tablet) */
        .logo-img {
            height: 132px; /* larger on desktop */
            width: auto;
            object-fit: contain;
            display: inline-block;
            vertical-align: middle;
        }

        /* Mobile Responsive */
        @media (max-width: 968px) {
            .nav-links {
                position: fixed;
                top: 0;
                right: -100%;
                width: 100%;
                height: 100vh;
                background: var(--jaspe-white);
                flex-direction: column;
                justify-content: center;
                align-items: center;
                gap: 30px;
                transition: var(--transition-smooth);
            }

            .nav-links.active {
                right: 0;
            }

            .mobile-menu {
                display: flex;
            }

            .mobile-menu.active span:nth-child(1) {
                transform: rotate(45deg) translate(5px, 5px);
            }

            .mobile-menu.active span:nth-child(2) {
                opacity: 0;
            }

            .mobile-menu.active span:nth-child(3) {
                transform: rotate(-45deg) translate(7px, -6px);
            }

            .about-grid,
            .contact-content {
                grid-template-columns: 1fr;
            }

            .about-image-accent {
                display: none;
            }

            .footer-content {
                grid-template-columns: 1fr 1fr;
            }

            .portfolio-grid {
                grid-template-columns: 1fr;
            }

            /* Reduce logo size on medium screens */
            .logo-img {
                height: 86px;
            }
        }

        @media (max-width: 576px) {
            .stats {
                grid-template-columns: 1fr;
                text-align: center;
            }

            /* Footer compacto en móvil: la marca ocupa todo el ancho arriba,
               y los enlaces se acomodan en 2 columnas en vez de una sola
               columna larga (evita un footer kilométrico). */
            footer {
                padding: 28px 6% 16px;
            }

            .footer-content {
                grid-template-columns: 1fr 1fr;
                gap: 26px 16px;
            }

            .footer-brand {
                grid-column: 1 / -1;
            }

            .footer-brand p {
                margin-bottom: 12px;
            }

            .footer-links h4 {
                font-size: 0.85rem;
                margin-bottom: 10px;
            }

            .footer-links li {
                margin-bottom: 6px;
            }

            .footer-links a {
                font-size: 0.82rem;
            }

            .footer-bottom {
                margin-top: 4px;
                padding-top: 14px;
                font-size: 0.72rem;
                line-height: 1.5;
            }

            .contact-form {
                padding: 30px;
            }

            /* Smaller logo on small screens */
            .logo-img {
                height: 48px;
            }

            /* Smaller loader on small screens */
            .loader-img {
                width: 110px;
                height: 110px;
            }
            .loader-logo {
                height: 88px;
            }
        }

        /* Loading Animation */
        .loader {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--jaspe-white);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            transition: opacity 0.5s, visibility 0.5s;
        }

        .loader.hidden {
            opacity: 0;
            visibility: hidden;
        }

        .loader-text {
            font-size: 3rem;
            font-weight: 900;
            color: var(--jaspe-red);
            animation: pulse 1.5s infinite;
        }

        /* Loader image (Jaz) - floating, no circle crop/ring */
        .loader-img {
            width: 160px;
            height: 160px;
            object-fit: contain;
            margin-bottom: 20px;
            filter: drop-shadow(0 16px 20px rgba(0,0,0,0.18));
            animation: loaderFloat 2.4s ease-in-out infinite;
        }

        @keyframes loaderFloat {
            0%, 100% { transform: translateY(0); }
            50%      { transform: translateY(-18px); }
        }

        /* Loader logo (replaces JASPE text) */
        .loader-logo {
            height: 144px;
            width: auto;
            object-fit: contain;
        }

        .logo-text {
            display: inline-block;
            vertical-align: middle;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.5; transform: scale(0.95); }
        }

        .footer-brand .logo {
            margin-bottom: 20px;
            display: inline-flex;
        }

        .footer-brand p {
            color: rgba(255, 255, 255, 0.6);
            line-height: 1.8;
            margin-bottom: 20px;
        }

        .social-links {
            display: flex;
            gap: 15px;
        }

        .social-links a {
            width: 40px;
            height: 40px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--jaspe-white);
            text-decoration: none;
            transition: var(--transition-smooth);
        }

        .social-links a:hover {
            background: var(--jaspe-red);
            transform: translateY(-3px);
        }

        .footer-links h4 {
            font-size: 1.1rem;
            margin-bottom: 20px;
            color: var(--jaspe-white);
        }

        .footer-links ul {
            list-style: none;
        }

        .footer-links li {
            margin-bottom: 12px;
        }

        .footer-links a {
            color: rgba(255, 255, 255, 0.6);
            text-decoration: none;
            transition: var(--transition-smooth);
        }

        .footer-links a:hover {
            color: var(--jaspe-red);
            padding-left: 5px;
        }

        .footer-bottom {
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            padding-top: 30px;
            text-align: center;
            color: rgba(255, 255, 255, 0.4);
            font-size: 0.9rem;
        }

        /* Reveal Animation */
        .reveal {
            opacity: 0;
            transform: translateY(50px);
            transition: all 0.8s ease-out;
        }

        .reveal.active {
            opacity: 1;
            transform: translateY(0);
        }

        /* Logo image in header/footer (declarada antes de las media queries
           de abajo para que sí puedan achicarla en móvil/tablet) */
        .logo-img {
            height: 132px; /* larger on desktop */
            width: auto;
            object-fit: contain;
            display: inline-block;
            vertical-align: middle;
        }

        /* Mobile Responsive */
        @media (max-width: 968px) {
            .nav-links {
                position: fixed;
                top: 0;
                right: -100%;
                width: 100%;
                height: 100vh;
                background: var(--jaspe-white);
                flex-direction: column;
                justify-content: center;
                align-items: center;
                gap: 30px;
                transition: var(--transition-smooth);
            }

            .nav-links.active {
                right: 0;
            }

            .mobile-menu {
                display: flex;
            }

            .mobile-menu.active span:nth-child(1) {
                transform: rotate(45deg) translate(5px, 5px);
            }

            .mobile-menu.active span:nth-child(2) {
                opacity: 0;
            }

            .mobile-menu.active span:nth-child(3) {
                transform: rotate(-45deg) translate(7px, -6px);
            }

            .about-grid,
            .contact-content {
                grid-template-columns: 1fr;
            }

            .about-image-accent {
                display: none;
            }

            .footer-content {
                grid-template-columns: 1fr 1fr;
            }

            .portfolio-grid {
                grid-template-columns: 1fr;
            }

            /* Reduce logo size on medium screens */
            .logo-img {
                height: 86px;
            }
        }

        @media (max-width: 576px) {
            .stats {
                grid-template-columns: 1fr;
                text-align: center;
            }

            /* Footer compacto en móvil: la marca ocupa todo el ancho arriba,
               y los enlaces se acomodan en 2 columnas en vez de una sola
               columna larga (evita un footer kilométrico). */
            footer {
                padding: 28px 6% 16px;
            }

            .footer-content {
                grid-template-columns: 1fr 1fr;
                gap: 26px 16px;
            }

            .footer-brand {
                grid-column: 1 / -1;
            }

            .footer-brand p {
                margin-bottom: 12px;
            }

            .footer-links h4 {
                font-size: 0.85rem;
                margin-bottom: 10px;
            }

            .footer-links li {
                margin-bottom: 6px;
            }

            .footer-links a {
                font-size: 0.82rem;
            }

            .footer-bottom {
                margin-top: 4px;
                padding-top: 14px;
                font-size: 0.72rem;
                line-height: 1.5;
            }

            .contact-form {
                padding: 30px;
            }

            /* Smaller logo on small screens */
            .logo-img {
                height: 48px;
            }

            /* Smaller loader on small screens */
            .loader-img {
                width: 110px;
                height: 110px;
            }
            .loader-logo {
                height: 88px;
            }
        }

        /* Loading Animation */
        .loader {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--jaspe-white);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            transition: opacity 0.5s, visibility 0.5s;
        }

        .loader.hidden {
            opacity: 0;
            visibility: hidden;
        }

        .loader-text {
            font-size: 3rem;
            font-weight: 900;
            color: var(--jaspe-red);
            animation: pulse 1.5s infinite;
        }

        /* Loader image (Jaz) - floating, no circle crop/ring */
        .loader-img {
            width: 160px;
            height: 160px;
            object-fit: contain;
            margin-bottom: 20px;
            filter: drop-shadow(0 16px 20px rgba(0,0,0,0.18));
            animation: loaderFloat 2.4s ease-in-out infinite;
        }

        @keyframes loaderFloat {
            0%, 100% { transform: translateY(0); }
            50%      { transform: translateY(-18px); }
        }

        /* Loader logo (replaces JASPE text) */
        .loader-logo {
            height: 144px;
            width: auto;
            object-fit: contain;
        }

        .logo-text {
            display: inline-block;
            vertical-align: middle;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.5; transform: scale(0.95); }
        }

        /* Botón flotante de Jaz — asistente virtual */
        .jaz-widget {
            --jaz-red: var(--jaspe-red, #C41E3A);
            --jaz-red-dark: #9c1730;
            --jaz-dark: var(--jaspe-dark, #1a1a1a);
        }

        .jaz-whatsapp-float {
            position: fixed;
            right: 20px;
            bottom: 24px;
            z-index: 10001;
            display: flex;
            align-items: center;
            gap: 12px;
            text-decoration: none;
            animation: jazFloat 2.6s ease-in-out infinite;
            background: none;
            border: none;
            padding: 0;
            font: inherit;
            cursor: pointer;
        }

        .jaz-whatsapp-img-wrap {
            position: relative;
            flex-shrink: 0;
        }

        .jaz-whatsapp-img-wrap::before {
            content: '';
            position: absolute;
            inset: -6px;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(196,30,58,0.35) 0%, rgba(196,30,58,0) 70%);
            animation: jazPulseRing 2.6s ease-out infinite;
        }

        .jaz-whatsapp-img {
            position: relative;
            width: 74px;
            height: 74px;
            object-fit: contain;
            flex-shrink: 0;
            filter: drop-shadow(0 6px 14px rgba(0,0,0,0.35));
            transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .jaz-status-dot {
            position: absolute;
            bottom: 2px;
            right: 2px;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: #2ecc71;
            border: 2px solid #fff;
            box-shadow: 0 0 0 rgba(46,204,113,0.6);
            animation: jazStatusPulse 2s ease-in-out infinite;
        }

        @media (hover: hover) {
            .jaz-whatsapp-float:hover .jaz-whatsapp-img {
                transform: scale(1.15) rotate(-4deg);
            }
        }

        .jaz-whatsapp-float.jaz-active .jaz-whatsapp-img {
            transform: scale(1.15) rotate(-4deg);
        }

        .jaz-whatsapp-bubble {
            background: var(--jaz-dark, #141414);
            color: #fff;
            padding: 10px 14px;
            border-radius: 12px;
            font-size: 0.8rem;
            font-weight: 600;
            line-height: 1.35;
            white-space: nowrap;
            box-shadow: 0 4px 14px rgba(0,0,0,0.2);
            position: relative;
        }

        .jaz-whatsapp-bubble::after {
            content: '';
            position: absolute;
            left: 100%;
            top: 50%;
            transform: translateY(-50%);
            border: 7px solid transparent;
            border-left-color: var(--jaz-dark, #141414);
        }

        @keyframes jazFloat {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-8px); }
        }

        @keyframes jazPulseRing {
            0% { transform: scale(0.8); opacity: 0.8; }
            100% { transform: scale(1.6); opacity: 0; }
        }

        @keyframes jazStatusPulse {
            0%, 100% { box-shadow: 0 0 0 0 rgba(46,204,113,0.55); }
            50% { box-shadow: 0 0 0 4px rgba(46,204,113,0); }
        }

        @media (max-width: 576px) {
            .jaz-whatsapp-float {
                right: 14px;
                bottom: 16px;
                gap: 8px;
            }

            .jaz-whatsapp-img {
                width: 56px;
                height: 56px;
            }

            .jaz-whatsapp-bubble {
                font-size: 0.7rem;
                padding: 8px 10px;
                white-space: normal;
                max-width: 118px;
                line-height: 1.25;
            }
        }

        /* Panel de chat de Jaz — preguntas predefinidas con respuestas automáticas */
        .jaz-chat-panel {
            position: fixed;
            right: 20px;
            bottom: 112px;
            z-index: 10002;
            width: 400px;
            max-width: calc(100vw - 32px);
            height: min(640px, calc(100vh - 140px));
            max-height: min(640px, calc(100vh - 140px));
            background: #fff;
            border-radius: 20px;
            box-shadow: 0 24px 60px -12px rgba(0,0,0,0.35), 0 0 0 1px rgba(0,0,0,0.04);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            opacity: 0;
            transform-origin: bottom right;
            transform: translateY(24px) scale(0.92);
            pointer-events: none;
            visibility: hidden;
            transition: opacity 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
                        transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
                        visibility 0s linear 0.32s;
        }

        .jaz-chat-panel.jaz-open {
            opacity: 1;
            transform: translateY(0) scale(1);
            pointer-events: auto;
            visibility: visible;
            transition: opacity 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
                        transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
                        visibility 0s linear 0s;
        }

        .jaz-chat-header {
            position: relative;
            display: flex;
            align-items: center;
            gap: 12px;
            background: linear-gradient(135deg, var(--jaz-dark, #141414) 0%, #2a2a2a 100%);
            color: #fff;
            padding: 16px 18px;
            flex-shrink: 0;
            overflow: hidden;
        }

        .jaz-chat-header::after {
            content: '';
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            height: 3px;
            background: linear-gradient(90deg, var(--jaz-red, #C41E3A), var(--jaz-red-dark, #9c1730));
        }

        .jaz-chat-header-avatar {
            position: relative;
            flex-shrink: 0;
        }

        .jaz-chat-header img {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            object-fit: cover;
            flex-shrink: 0;
            border: 2px solid rgba(255,255,255,0.2);
        }

        .jaz-chat-header-avatar .jaz-status-dot {
            width: 12px;
            height: 12px;
            border-width: 2px;
        }

        .jaz-chat-title {
            font-weight: 700;
            font-size: 1rem;
            line-height: 1.25;
        }

        .jaz-chat-subtitle {
            font-size: 0.72rem;
            opacity: 0.7;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .jaz-chat-close {
            margin-left: auto;
            background: rgba(255,255,255,0.08);
            border: none;
            color: #fff;
            font-size: 1rem;
            line-height: 1;
            cursor: pointer;
            padding: 7px;
            width: 30px;
            height: 30px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease;
        }

        .jaz-chat-close:hover {
            background: var(--jaz-red, #C41E3A);
            transform: rotate(90deg);
        }

        .jaz-chat-body {
            flex: 1;
            overflow-y: auto;
            padding: 18px;
            display: flex;
            flex-direction: column;
            gap: 12px;
            background: #f4f4f6;
            scrollbar-width: thin;
            scrollbar-color: #d4d4d8 transparent;
        }

        .jaz-chat-body::-webkit-scrollbar {
            width: 6px;
        }

        .jaz-chat-body::-webkit-scrollbar-thumb {
            background: #d4d4d8;
            border-radius: 10px;
        }

        .jaz-chat-body::-webkit-scrollbar-track {
            background: transparent;
        }

        .jaz-msg {
            max-width: 86%;
            padding: 11px 14px;
            border-radius: 16px;
            font-size: 0.86rem;
            line-height: 1.55;
            animation: jazMsgIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
        }

        .jaz-msg-bot {
            background: #fff;
            color: #1a1a1a;
            align-self: flex-start;
            border-bottom-left-radius: 4px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.07);
        }

        .jaz-msg-user {
            background: linear-gradient(135deg, var(--jaz-red, #C41E3A), var(--jaz-red-dark, #9c1730));
            color: #fff;
            align-self: flex-end;
            border-bottom-right-radius: 4px;
            box-shadow: 0 3px 10px rgba(196,30,58,0.28);
        }

        @keyframes jazMsgIn {
            from { opacity: 0; transform: translateY(10px) scale(0.97); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }

        .jaz-typing {
            display: flex;
            align-items: center;
            gap: 4px;
            padding: 14px 16px;
        }

        .jaz-typing span {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: #b9b9c0;
            animation: jazTypingBounce 1.1s ease-in-out infinite;
        }

        .jaz-typing span:nth-child(2) { animation-delay: 0.15s; }
        .jaz-typing span:nth-child(3) { animation-delay: 0.3s; }

        @keyframes jazTypingBounce {
            0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
            30% { transform: translateY(-5px); opacity: 1; }
        }

        .jaz-chat-options {
            display: flex;
            flex-direction: column;
            gap: 7px;
        }

        .jaz-opt-btn {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            text-align: left;
            background: #fff;
            border: 1px solid #e6e6ea;
            border-radius: 12px;
            padding: 10px 14px;
            font-size: 0.8rem;
            font-weight: 500;
            font-family: inherit;
            color: #1a1a1a;
            cursor: pointer;
            opacity: 0;
            animation: jazMsgIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
            transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
        }

        .jaz-chat-options .jaz-opt-btn:nth-child(1) { animation-delay: 0.05s; }
        .jaz-chat-options .jaz-opt-btn:nth-child(2) { animation-delay: 0.1s; }
        .jaz-chat-options .jaz-opt-btn:nth-child(3) { animation-delay: 0.15s; }
        .jaz-chat-options .jaz-opt-btn:nth-child(4) { animation-delay: 0.2s; }
        .jaz-chat-options .jaz-opt-btn:nth-child(5) { animation-delay: 0.25s; }
        .jaz-chat-options .jaz-opt-btn:nth-child(6) { animation-delay: 0.3s; }

        .jaz-opt-btn::after {
            content: '›';
            color: #c6c6cc;
            font-size: 1rem;
            font-weight: 700;
            transition: transform 0.2s ease, color 0.2s ease;
            flex-shrink: 0;
        }

        .jaz-opt-btn:hover {
            border-color: var(--jaz-red, #C41E3A);
            background: #fff8f9;
            transform: translateX(2px);
            box-shadow: 0 4px 12px rgba(196,30,58,0.1);
        }

        .jaz-opt-btn:hover::after {
            color: var(--jaz-red, #C41E3A);
            transform: translateX(2px);
        }

        .jaz-opt-btn:active {
            transform: translateX(2px) scale(0.98);
        }

        .jaz-chat-footer {
            padding: 12px 16px;
            border-top: 1px solid #ececec;
            background: #fff;
            flex-shrink: 0;
        }

        .jaz-wa-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            width: 100%;
            background: linear-gradient(135deg, #25D366, #1fa855);
            color: #fff;
            text-decoration: none;
            padding: 11px;
            border-radius: 12px;
            font-size: 0.82rem;
            font-weight: 600;
            box-shadow: 0 4px 12px rgba(37,211,102,0.3);
            transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
        }

        .jaz-wa-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 18px rgba(37,211,102,0.4);
        }

        .jaz-wa-btn:active {
            transform: translateY(0) scale(0.98);
        }

        @media (max-width: 576px) {
            .jaz-chat-panel {
                right: 14px;
                bottom: 88px;
                width: calc(100vw - 28px);
                height: calc(100vh - 120px);
                max-height: calc(100vh - 120px);
            }
        }

        @media (prefers-reduced-motion: reduce) {
            .jaz-whatsapp-float,
            .jaz-whatsapp-img-wrap::before,
            .jaz-status-dot,
            .jaz-msg,
            .jaz-opt-btn,
            .jaz-typing span {
                animation: none !important;
            }

            .jaz-chat-panel {
                transition-duration: 0.01s !important;
            }
        }