/* --- Windows 11 Dark Theme Variables --- */
:root {
    --bg-desktop: #0c0c0c;
    --win-bg: rgba(32, 32, 32, 0.85);
    --win-border: rgba(255, 255, 255, 0.08);
    --taskbar-bg: rgba(20, 20, 20, 0.9);
    --accent: #60cdff;
    --accent-hover: #4cc2ff;
    --corporate-blue: #0078d4;
    --text-main: #ffffff;
    --text-muted: #aeb2b6;
    --glass-blur: blur(25px);
    --radius-lg: 12px;
    --shadow-win: 0 20px 50px rgba(0, 0, 0, 0.6);
    --font-sys: "Segoe UI Variable", "Segoe UI", "Inter", sans-serif;
    --whatsapp-color: #25D366;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sys);
    background-color: var(--bg-desktop);
    color: var(--text-main);
    overflow-x: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?q=80&w=2072&auto=format&fit=crop&fm=webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.desktop-area {
    flex: 1;
    overflow-y: auto;
    padding: 85px 15px 40px 15px;
    scroll-behavior: smooth;
    /* AÑADIDO: Clave para scroll suave nativo */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* --- LOGO STYLES --- */
.logo-container-hero {
    margin-bottom: 25px;
    min-height: 60px;
}

.logo-img-hero {
    max-width: 180px;
    display: block;
}

.logo-img-taskbar {
    height: 35px;
    width: auto;
    filter: invert(1) brightness(10);
    mix-blend-mode: screen;
}

.logo-fallback {
    display: none;
    font-size: 2rem;
    font-weight: 800;
    color: white;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(90deg, #fff, #60cdff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- VENTANAS --- */
.window-panel {
    background: var(--win-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--win-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-win);
    padding: 35px;
    margin-bottom: 25px;
    position: relative;
    animation: openWindow 0.6s cubic-bezier(0.1, 0.9, 0.2, 1);
}

.window-titlebar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    border-bottom: 1px solid var(--win-border);
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.win-controls {
    display: flex;
    gap: 8px;
}

.win-btn {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.win-btn.close {
    background: #ff5f56;
}

.win-btn.min {
    background: #ffbd2e;
}

.win-btn.max {
    background: #27c93f;
}

@keyframes openWindow {
    from {
        opacity: 0;
        transform: scale(0.98) translateY(15px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* --- Hero Section --- */
.hero-split {
    display: flex;
    align-items: center;
    gap: 60px;
    padding-top: 10px;
}

.hero-text {
    flex: 1;
}

.badge-corp {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(96, 205, 255, 0.1);
    border: 1px solid rgba(96, 205, 255, 0.3);
    color: var(--accent);
    border-radius: 4px;
    font-size: 0.8rem;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.hero-text h1 {
    font-size: 2.8rem;
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 15px;
    color: #ffffff;
    /* Aseguramos visibilidad inmediata */
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.5;
    max-width: 95%;
}

.btn-corp-primary {
    background: var(--corporate-blue);
    color: white;
    padding: 12px 28px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-corp-primary:hover {
    background: #0063b1;
    transform: translateY(-2px);
}

.btn-corp-secondary {
    background: transparent;
    color: white;
    padding: 12px 28px;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--win-border);
    margin-left: 10px;
    transition: 0.2s;
}

.btn-corp-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
}

/* --- Tech Stack --- */
.tech-stack {
    display: flex;
    gap: 20px;
    margin-top: 25px;
    align-items: center;
    opacity: 0.8;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.tech-item i {
    font-size: 1.2rem;
    color: var(--accent);
}

/* --- Widgets / Servicios --- */
.widget-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.widget-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--win-border);
    border-radius: 8px;
    padding: 25px;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.widget-card:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--accent);
    transform: translateY(-5px);
}

.widget-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.w-icon {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
    background: linear-gradient(135deg, #1e1e1e, #333);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.w-icon.blue {
    box-shadow: 0 0 15px rgba(0, 120, 212, 0.2);
    border-color: rgba(0, 120, 212, 0.5);
}

.w-icon.purple {
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.5);
}

.w-icon.green {
    box-shadow: 0 0 15px rgba(16, 124, 16, 0.2);
    border-color: rgba(16, 124, 16, 0.5);
}

.widget-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
}

.widget-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 15px;
}

.widget-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.w-tag {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 4px;
    color: #ccc;
}

/* --- Teléfono Demo --- */
/* --- Teléfono Demo Refinado (Moderno) --- */
.phone-wrapper {
    flex: 0 0 320px;
    position: relative;
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.phone-frame {
    background: #000;
    border: 4px solid #2a2a2a;
    border-radius: 45px;
    width: 100%;
    height: 620px;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 0 0 2px #111,
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(96, 205, 255, 0.08);
    transition: transform 0.5s ease;
}

.phone-wrapper:hover .phone-frame {
    transform: translateY(-5px) rotateY(-2deg);
    box-shadow:
        0 0 0 2px #111,
        0 30px 60px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(96, 205, 255, 0.12);
}

.phone-notch {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 26px;
    background: #000;
    z-index: 20;
    border-radius: 20px;
}

.status-bar {
    display: flex;
    justify-content: space-between;
    padding: 14px 28px 0 28px;
    font-size: 0.75rem;
    color: #fff;
    font-weight: 600;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 15;
}

.status-icons i {
    font-size: 0.75rem;
    margin-left: 6px;
}

.chat-screen {
    background: linear-gradient(180deg, #0e0e11 0%, #15151a 100%);
    height: 100%;
    padding: 65px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.app-header {
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.avatar-bot {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--corporate-blue), #60cdff);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    margin-right: 12px;
    box-shadow: 0 4px 10px rgba(0, 120, 212, 0.3);
}

.header-info h4 {
    font-size: 0.95rem;
    color: white;
    font-weight: 600;
    margin-bottom: 3px;
}

.header-info span {
    font-size: 0.75rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-info span::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #27c93f;
    border-radius: 50%;
    box-shadow: 0 0 5px #27c93f;
}

.chat-msg {
    max-width: 82%;
    padding: 14px 18px;
    margin-bottom: 12px;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.5;
    position: relative;
    opacity: 0;
    transform: translateY(10px);
}

.msg-ai {
    background: rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.msg-user {
    background: linear-gradient(135deg, var(--corporate-blue), #005a9e);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 90, 158, 0.3);
}

.typing-indicator {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 16px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    margin-bottom: 12px;
    display: flex;
    gap: 4px;
    width: fit-content;
    border: 1px solid rgba(255, 255, 255, 0.05);
    opacity: 0;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #888;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* --- Chat Sequences --- */
.msg-1 {
    animation: flow1 22s infinite;
}

.msg-2 {
    animation: flow2 22s infinite;
}

.typ-1 {
    animation: flowTyp1 22s infinite;
    display: flex;
}

.msg-3 {
    animation: flow3 22s infinite;
}

.typ-2 {
    animation: flowTyp2 22s infinite;
    display: flex;
}

.msg-4 {
    animation: flow4 22s infinite;
}

@keyframes flow1 {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    2% {
        opacity: 1;
        transform: translateY(0);
    }

    90% {
        opacity: 1;
    }

    95% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

@keyframes flow2 {

    0%,
    15% {
        opacity: 0;
    }

    17% {
        opacity: 1;
        transform: translateY(0);
    }

    90% {
        opacity: 1;
    }

    95% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

@keyframes flowTyp1 {

    0%,
    25% {
        opacity: 0;
        display: none;
    }

    26% {
        opacity: 1;
        display: flex;
    }

    35% {
        opacity: 1;
        display: flex;
    }

    36% {
        opacity: 0;
        display: none;
    }

    100% {
        opacity: 0;
        display: none;
    }
}

@keyframes flow3 {

    0%,
    35% {
        opacity: 0;
    }

    37% {
        opacity: 1;
        transform: translateY(0);
    }

    90% {
        opacity: 1;
    }

    95% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

@keyframes flowTyp2 {

    0%,
    45% {
        opacity: 0;
        display: none;
    }

    46% {
        opacity: 1;
        display: flex;
    }

    55% {
        opacity: 1;
        display: flex;
    }

    56% {
        opacity: 0;
        display: none;
    }

    100% {
        opacity: 0;
        display: none;
    }
}

@keyframes flow4 {

    0%,
    55% {
        opacity: 0;
    }

    57% {
        opacity: 1;
        transform: translateY(0);
    }

    90% {
        opacity: 1;
    }

    95% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

/* --- WhatsApp --- */
.wa-btn-big {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    padding: 15px 40px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3);
    transition: 0.3s;
}

.wa-btn-big:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(37, 211, 102, 0.5);
}

/* --- Floating WhatsApp Button (NUEVO) --- */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

/* --- Modern Top Navigation --- */
.navbar-glass {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(12, 12, 12, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 0;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.nav-logo img {
    height: 40px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.logo-text {
    font-family: var(--font-sys);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-main-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
    line-height: 1;
}

.logo-sub-text {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--accent);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 3px;
}

.nav-logo:hover img {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: color 0.3s ease;
    position: relative;
    padding: 5px 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
    text-shadow: 0 0 15px rgba(96, 205, 255, 0.5);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--accent);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* --- Process / Methodology Section --- */
.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 30px;
}

@media (max-width: 1024px) {
    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .process-grid {
        grid-template-columns: 1fr;
    }
}

.process-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 30px;
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

.process-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.step-number {
    position: absolute;
    top: -20px;
    right: -10px;
    font-size: 6rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.03);
    z-index: 0;
    font-family: var(--font-sys);
    transition: color 0.3s;
}

.process-card:hover .step-number {
    color: rgba(96, 205, 255, 0.08);
}

.process-content {
    position: relative;
    z-index: 1;
}

.process-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(96, 205, 255, 0.1), rgba(0, 120, 212, 0.1));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--accent);
    margin-bottom: 20px;
    border: 1px solid rgba(96, 205, 255, 0.2);
    box-shadow: 0 0 15px rgba(96, 205, 255, 0.1);
}

.process-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: white;
    font-weight: 700;
}

.process-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Mobile */
@media (max-width: 900px) {
    .navbar-glass {
        padding: 10px 15px;
    }

    .nav-links {
        display: none;
    }

    /* Simplified mobile handling for now */
    .hero-split {
        flex-direction: column;
        text-align: center;
    }

    .phone-wrapper {
        display: none;
    }

    .tech-stack {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .whatsapp-float {
        bottom: 80px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 25px;
    }
}

/* --- BlurText Animation --- */
.blur-word {
    display: inline-block;
    opacity: 0;
    filter: blur(8px);
    transform: translateY(10px);
    will-change: transform, filter, opacity;
    transition: all 0.6s cubic-bezier(0.2, 0.65, 0.3, 0.9);
}

.blur-word.visible {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* --- Modern Contact Form --- */
.contact-wrapper {
    display: grid;
    /* Default grid layout */
    gap: 30px;
}

@media (min-width: 768px) {
    .contact-wrapper {
        grid-template-columns: 1fr 1fr;
        gap: 50px;
        align-items: center;
    }
}

.contact-info {
    text-align: left;
}

.form-grid {
    display: grid;
    gap: 20px;
    background: rgba(23, 23, 28, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 35px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 15px 20px;
    color: white;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #25D366;
    background: rgba(37, 211, 102, 0.05);
    box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.1);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-submit-btn {
    width: 100%;
    background: #25D366;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.form-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.25);
}

/* --- Infinite Logo Loop (Replaces Tabs) --- */
.logo-loop-section {
    padding: 20px 0;
    overflow: hidden;
    /* Prevent horizontal scrollbar on page */
}

/* Row Container */
.loop-row {
    position: relative;
    display: flex;
    overflow: hidden;
    user-select: none;
    gap: var(--gap);
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    margin-bottom: 25px;
    /* Spacing between rows */
    --gap: 50px;
    /* Gap between logos */
    --logo-h: 40px;
    /* Logo height */
}

/* The Moving Track */
.loop-track {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: var(--gap);
    min-width: 100%;
    /* Animation duration controlled by JS or class */
}

/* Scroll Animations */
.scroll-left {
    animation: scrollLeft 40s linear infinite;
}

.scroll-right {
    animation: scrollRight 40s linear infinite;
}

@keyframes scrollLeft {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(-100% - var(--gap)));
    }
}

@keyframes scrollRight {
    from {
        transform: translateX(calc(-100% - var(--gap)));
    }

    to {
        transform: translateX(0);
    }
}

/* Individual Item */
.loop-item {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: grayscale(100%) opacity(0.5);
    cursor: pointer;
    /* Ensure height container */
    height: 80px;
    width: 140px;
    /* Uniform width for spacing consistency */
}

.loop-item img {
    height: var(--logo-h);
    width: auto;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover Effects (Interactividad) */
.loop-row:hover .loop-track {
    animation-play-state: paused;
}

.loop-item:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.1);
    z-index: 10;
}

/* --- AI Chatbot Interface --- */
#ai-chat-container {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 3000;
    font-family: var(--font-sys);
}

#ai-chat-launcher {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--corporate-blue), var(--accent));
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 120, 212, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

#ai-chat-launcher:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(0, 120, 212, 0.6);
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--accent);
    animation: launcherPulse 2s infinite;
    pointer-events: none;
}

@keyframes launcherPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

#ai-chat-window {
    position: absolute;
    bottom: 80px;
    left: 0;
    width: 350px;
    height: 500px;
    background: rgba(20, 20, 23, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: bottom left;
}

.chat-window-hidden {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    pointer-events: none;
}

.chat-header {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(45deg, #202020, #404040);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    position: relative;
}

.status-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: #27c93f;
    border: 2px solid #141417;
    border-radius: 50%;
}

.chat-header h4 {
    font-size: 0.95rem;
    margin: 0;
    line-height: 1;
}

.chat-header span {
    font-size: 0.7rem;
    color: var(--text-muted);
}

#close-chat {
    background: transparent;
    border: none;
    color: white;
    opacity: 0.5;
    cursor: pointer;
    padding: 5px;
    transition: 0.2s;
}

#close-chat:hover {
    opacity: 1;
}

#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Scrollbar para el chat */
#chat-messages::-webkit-scrollbar {
    width: 4px;
}

#chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.chat-msg-ai,
.chat-msg-user {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
    animation: msgIn 0.3s ease-out;
}

@keyframes msgIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-msg-ai {
    background: rgba(255, 255, 255, 0.05);
    color: #efefef;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-msg-user {
    background: var(--corporate-blue);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

#chat-input-area {
    padding: 15px;
    display: flex;
    gap: 10px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

#ai-user-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 15px;
    color: white;
    font-size: 0.9rem;
    resize: none;
    font-family: inherit;
}

#ai-user-input:focus {
    outline: none;
    border-color: var(--accent);
}

#send-ai-msg {
    width: 40px;
    height: 40px;
    background: var(--corporate-blue);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: 0.2s;
}

#send-ai-msg:hover {
    background: var(--accent-hover);
}

.chat-footer {
    padding: 8px;
    text-align: center;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    #ai-chat-window {
        width: calc(100vw - 40px);
        height: 450px;
        bottom: 70px;
        left: -10px;
    }
}

.typing-dots::after {
    content: '...';
    display: inline-block;
    width: 20px;
    animation: dots 1.5s infinite;
    text-align: left;
}

@keyframes dots {

    0%,
    20% {
        content: '.';
    }

    40% {
        content: '..';
    }

    60%,
    100% {
        content: '...';
    }
}