/* =========================================
   GoExpress 2026 - Estilos Modernos
   CSS con efectos avanzados, 3D y animaciones
   ========================================= */

/* ===== CASCADE LAYERS - Control de Especificidad ===== */
@layer reset, base, components, utilities, overrides;

/* ===== VARIABLES CSS MODERNAS ===== */
:root {
    /* Colores */
    --color-primary: #6366f1;
    --color-primary-dark: #4f46e5;
    --color-primary-glow: rgba(99, 102, 241, 0.5);
    --color-secondary: #0ea5e9;
    --color-accent: #f472b6;
    --color-dark: #0f172a;
    --color-dark-light: #1e293b;
    --color-light: #f8fafc;
    --color-gray: #94a3b8; /* Ajustado para mejor visibilidad en oscuro */
    --color-success: #22c55e;

    /* Configuración de Fondo y Texto por Defecto (Dark Mode Forzado) */
    --bg-main: var(--color-dark);
    --text-main: var(--color-light);
    --bg-card: var(--color-dark-light);
    --navbar-bg-scrolled: rgba(255, 255, 255, 0.85); 

    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    --gradient-dark: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);

    /* Sombras */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 20px var(--color-primary-glow), 0 0 40px var(--color-primary-glow);
    --shadow-3d: 0 25px 50px -12px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;

    /* Bordes */
    --border-radius: 16px;
    --border-radius-lg: 24px;
    --border-radius-full: 9999px;

    /* Transiciones */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Tipografía */
    --font-sans: 'Outfit', system-ui, -apple-system, sans-serif;
    --font-display: 'Space Grotesk', 'Outfit', sans-serif;

    /* Espaciado */
    --container-padding: 2rem;
    --section-padding: 6rem 0;

    /* Z-index */
    --z-navbar: 1000;
    --z-cursor: 9999;
    --z-whatsapp: 999;
    --z-toast: 1001;

    /* Navbar Config */
    --navbar-bg-scrolled: rgba(255, 255, 255, 0.7); /* Puedes ajustar este valor (0.0 a 1.0) */
}

/* ===== RESET ===== */
@layer reset {
    *,
    *::before,
    *::after {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }
}

/* ===== BASE ===== */
@layer base {
    html {
        scroll-behavior: smooth;
        scroll-padding-top: 80px;
        overflow-x: hidden;
        width: 100%;
    }

    body {
        font-family: var(--font-sans);
        font-size: 1rem;
        line-height: 1.6;
        color: var(--text-main);
        background: var(--bg-main);
        overflow-x: hidden;
        cursor: auto;
    }
}

/* ===== CURSOR PERSONALIZADO ===== */
@layer components {
    .cursor-dot,
    .cursor-outline {
        position: fixed;
        top: 0;
        left: 0;
        transform: translate(-50%, -50%);
        border-radius: 50%;
        z-index: var(--z-cursor);
        pointer-events: none;
        transition: transform var(--transition-fast), opacity var(--transition-fast);
    }

    .cursor-dot {
        width: 8px;
        height: 8px;
        background: var(--color-primary);
    }

    .cursor-outline {
        width: 40px;
        height: 40px;
        border: 2px solid var(--color-primary);
        opacity: 0.5;
    }

    body.hovering .cursor-outline {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0.2;
    }

    body.hovering .cursor-dot {
        opacity: 0;
    }

    /* Desactivar cursor en móviles y tablets */
    @media (max-width: 1024px) {
        .cursor-dot,
        .cursor-outline {
            display: none !important;
        }
    }

/* ===== NAVBAR GLASSMORPHISM ===== */
    .navbar-glass {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: var(--z-navbar);
        padding: 1.25rem 0;
        background: transparent;
        /* Se mantiene transparente al inicio */
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    }

    .navbar-glass.scrolled {
        padding: 0.75rem 0;
        background: var(--navbar-bg-scrolled);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    /* Color oscuro al hacer SCROLL (Navbar blanca) */
    .navbar-glass.scrolled .nav-brand {
        color: var(--color-dark) !important;
    }

    .navbar-glass.scrolled .nav-toggle span {
        background: var(--color-dark) !important;
    }

    /* En escritorio, los enlaces del menú también cambian a oscuro al hacer scroll */
    @media (min-width: 769px) {
        .navbar-glass.scrolled .nav-link:not(.nav-cta) {
            color: var(--color-dark) !important;
        }
    }

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

    .nav-brand {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        text-decoration: none;
        color: white; /* Blanco por defecto para modo oscuro forzado */
        font-family: var(--font-display);
        font-weight: 700;
        font-size: 1.25rem;
    }

    .nav-logo {
        height: 40px;
        width: auto;
        transition: transform var(--transition-normal);
    }

    .nav-brand:hover .nav-logo {
        transform: scale(1.05) rotate(2deg);
    }

    .nav-brand-text {
        background: var(--gradient-primary);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .nav-menu {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .nav-link {
        position: relative;
        padding: 0.75rem 1rem;
        text-decoration: none;
        color: white; /* Blanco por defecto para modo oscuro forzado */
        font-weight: 500;
        border-radius: var(--border-radius);
        transition: all var(--transition-fast);
        overflow: hidden;
    }

    .nav-link::before {
        content: attr(data-text);
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: var(--gradient-primary);
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: var(--border-radius);
        transform: translateY(100%);
        transition: transform var(--transition-normal);
        font-weight: 600;
    }

    .nav-link:hover::before {
        transform: translateY(0);
    }

    .nav-link.nav-cta {
        background: var(--gradient-primary);
        color: white;
        padding: 0.75rem 1.5rem;
    }

    .nav-link.nav-cta::before {
        display: none;
    }

    .nav-toggle {
        display: none;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        padding: 0.5rem;
        cursor: pointer;
    }

    .nav-toggle span {
        width: 24px;
        height: 2px;
        background: var(--color-dark);
        border-radius: 2px;
        transition: all var(--transition-normal);
    }

/* ===== HERO SECTION ===== */
    .hero {
        position: relative;
        height: 70vh;
        min-height: 500px;
        max-height: 800px;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }

    .hero-slider {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .hero-slide {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        transition: opacity var(--transition-slow);
    }

    .hero-slide.active {
        opacity: 1;
        z-index: 1;
    }

    .hero-media {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    .hero-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg,
                rgba(15, 23, 42, 0.7) 0%,
                rgba(15, 23, 42, 0.4) 50%,
                rgba(15, 23, 42, 0.2) 100%);
    }

    .hero-content {
        position: relative;
        z-index: 2;
        max-width: 800px;
        padding: 2rem;
        text-align: center;
        color: white;
    }

    .hero-badge {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem 1rem;
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: var(--border-radius-full);
        font-size: 0.875rem;
        font-weight: 500;
        margin-bottom: 1.5rem;
        animation: fadeInUp 0.6s ease forwards;
    }

    .hero-badge i {
        color: var(--color-accent);
    }

    .hero-title {
        font-family: var(--font-display);
        font-size: clamp(1.8rem, 8vw, 4rem);
        font-weight: 800;
        line-height: 1.1;
        margin-bottom: 1.5rem;
        animation: fadeInUp 0.6s ease forwards;
        animation-delay: var(--delay, 0s);
        opacity: 0;
    }

    .title-line {
        display: block;
    }

    .gradient-text {
        background: var(--gradient-primary);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .hero-description {
        font-size: 1.25rem;
        opacity: 0.9;
        margin-bottom: 2rem;
        animation: fadeInUp 0.6s ease forwards;
        animation-delay: var(--delay, 0s);
        opacity: 0;
    }

    .hero-description strong {
        color: var(--color-accent);
    }

    .hero-actions {
        display: flex;
        gap: 1rem;
        justify-content: center;
        flex-wrap: wrap;
        margin-bottom: 3rem;
        animation: fadeInUp 0.6s ease forwards;
        animation-delay: var(--delay, 0s);
        opacity: 0;
    }

/* Botones Modernos */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--border-radius-full);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
    translate: 0 0;
    transition: translate 0.2s ease, box-shadow var(--transition-normal);
}

.btn-primary:hover {
    translate: 0 -2px;
    box-shadow: var(--shadow-glow);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::after {
    left: 100%;
}

.btn-glow {
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {

    0%,
    100% {
        box-shadow: var(--shadow-md);
    }

    50% {
        box-shadow: var(--shadow-glow);
    }
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    translate: 0 0;
    transition: translate 0.2s ease, background var(--transition-fast), border-color var(--transition-fast);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    translate: 0 -2px;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: var(--delay, 0s);
    opacity: 0;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Navegación del Hero */
.hero-nav {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 2;
}

.hero-nav-btn {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-full);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.hero-nav-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.hero-indicators {
    display: flex;
    gap: 0.5rem;
}

.indicator {
    width: 12px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.indicator.active {
    background: white;
    width: 24px;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    z-index: 2;
}

.scroll-line {
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), transparent);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {

    0%,
    100% {
        transform: scaleY(1);
        opacity: 0.5;
    }

    50% {
        transform: scaleY(0.5);
        opacity: 1;
    }
}

/* ===== SECCIONES GENERALES ===== */
    .section {
        padding: var(--section-padding);
        position: relative;
        overflow: hidden;
    }

    .section-bg-grid {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image:
            linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
            linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
        background-size: 50px 50px;
        pointer-events: none;
    }

    .section-bg-dots {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: radial-gradient(rgba(99, 102, 241, 0.1) 1px, transparent 1px);
        background-size: 30px 30px;
        pointer-events: none;
    }

    .section-bg-gradient {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: var(--gradient-dark);
        opacity: 0.05;
        pointer-events: none;
    }

    .container {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 var(--container-padding);
        position: relative;
        z-index: 1;
    }

    .section-header {
        text-align: center;
        max-width: 700px;
        margin: 0 auto 4rem;
    }

    .section-tag {
        display: inline-block;
        padding: 0.5rem 1rem;
        background: var(--gradient-primary);
        color: white;
        border-radius: var(--border-radius-full);
        font-size: 0.875rem;
        font-weight: 600;
        margin-bottom: 1rem;
    }

    .section-title {
        font-family: var(--font-display);
        font-size: clamp(2rem, 4vw, 3rem);
        font-weight: 800;
        margin-bottom: 1rem;
        color: white;
    }

    .section-description {
        font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ===== TARJETAS 3D CON EFECTO TILT ===== */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

.tilt-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    transform-style: preserve-3d;
    transform: perspective(1000px);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    box-shadow: var(--shadow-lg);
    cursor: pointer;
}

.tilt-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--border-radius-lg);
    padding: 2px;
    background: var(--gradient-primary);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.tilt-card:hover::before {
    opacity: 1;
}

.tilt-card:hover {
    transform: perspective(1000px) translateZ(20px) rotateX(2deg) rotateY(2deg);
    box-shadow: var(--shadow-3d);
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(99, 102, 241, 0.15), transparent 40%);
    border-radius: var(--border-radius-lg);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.tilt-card:hover .card-glow {
    opacity: 1;
}

.card-content {
    position: relative;
    z-index: 1;
    transform: translateZ(30px);
}

.card-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--border-radius);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    color: white;
    box-shadow: var(--shadow-md);
    translate: 0 0;
    rotate: 0deg;
    scale: 1;
    transition: translate 0.3s cubic-bezier(0.4, 0, 0.2, 1), rotate 0.3s cubic-bezier(0.4, 0, 0.2, 1), scale 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tilt-card:hover .card-icon {
    translate: 0 0;
    rotate: 5deg;
    scale: 1.1;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.card-description {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.card-features {
    list-style: none;
    margin-bottom: 2rem;
}

.card-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    color: white;
    font-weight: 500;
}

.card-features i {
    color: var(--color-success);
    font-size: 1.125rem;
}

.card-cta {
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    transition: gap var(--transition-fast);
}

.card-link:hover {
    gap: 0.75rem;
}


/* ===== PRODUCTOS CON CARRUSEL (MODULARIZADO en carousels.css) ===== */

/* Grid original como fallback */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.product-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    translate: 0 0;
    transition: translate var(--transition-normal), box-shadow var(--transition-normal);
    cursor: pointer;
}

.product-card:hover {
    translate: 0 -8px;
    box-shadow: var(--shadow-xl);
}

.product-image-wrapper {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--color-dark);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    scale: 1;
    transition: scale var(--transition-slow);
}

.product-card:hover .product-image {
    scale: 1.05;
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.8), transparent);
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius-full);
    font-weight: 600;
    font-size: 0.875rem;
    scale: 1;
    transition: scale var(--transition-fast);
}

.product-btn:hover {
    scale: 1.05;
}

.product-info {
    padding: 1rem;
    text-align: center;
}

.product-name {
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 0.25rem;
}

.product-category {
    font-size: 0.875rem;
    color: var(--color-gray);
}


/* ===== TESTIMONIOS CON CARRUSEL (MODULARIZADO en carousels.css) ===== */

.trust-stat {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.trust-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.trust-stat-number {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-dark);
}

.trust-stat-label {
    font-size: 0.875rem;
    color: var(--color-gray);
}

/* Grid original como fallback */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.testimonials .section-title {
    color: white;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.testimonial-card {
    position: relative;
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    transform-style: preserve-3d;
    transform: perspective(1000px);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    box-shadow: var(--shadow-lg);
    cursor: pointer;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--border-radius-lg);
    padding: 2px;
    background: var(--gradient-primary);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.testimonial-card:hover::before {
    opacity: 1;
}

.testimonial-card:hover {
    transform: perspective(1000px) translateZ(20px) rotateX(2deg) rotateY(2deg);
    box-shadow: var(--shadow-3d);
}

.testimonial-content {
    position: relative;
    z-index: 1;
    translate: 0 0 30px;
}

.testimonial-rating {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
    color: #fbbf24;
    font-size: 1.25rem;
}

.testimonial-text {
    font-style: italic;
    color: var(--color-dark);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.testimonial-text::before {
    content: '"';
    position: absolute;
    left: 0;
    top: -0.5rem;
    font-size: 3rem;
    color: var(--color-primary);
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-full);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 700;
    color: white;
    font-style: normal;
}

.author-role {
    font-size: 0.875rem;
    color: var(--color-gray);
}

/* Stats de confianza */
.trust-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.trust-stat {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.trust-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.trust-stat-number {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-dark);
}

.trust-stat-label {
    font-size: 0.875rem;
    color: var(--color-gray);
}

/* ===== CONTACTO ===== */
.contact {
    background: var(--gradient-dark);
    color: white;
}

.contact .section-title {
    color: white;
}

.contact .section-description {
    color: rgba(255, 255, 255, 0.8);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info {
    padding-right: 2rem;
}

.contact-description {
    margin-bottom: 2rem;
    opacity: 0.9;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--color-primary);
}

.contact-item-content {
    display: flex;
    flex-direction: column;
}

.contact-item-label {
    font-size: 0.875rem;
    opacity: 0.7;
}

.contact-item-content a,
.contact-item-content span {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.contact-item-content a:hover {
    color: var(--color-accent);
}

/* Formulario Moderno */
.contact-form-wrapper {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    color: white;
    font-size: 1rem;
    transition: all var(--transition-fast);
    outline: none;
}

.form-input::placeholder {
    color: transparent;
}

.form-input:focus {
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.15);
}

.form-label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    pointer-events: none;
    transition: all var(--transition-fast);
    background: transparent;
    padding: 0 0.25rem;
}

.form-input:focus~.form-label,
.form-input:not(:placeholder-shown)~.form-label {
    top: -0.625rem;
    left: 0.75rem;
    font-size: 0.75rem;
    color: var(--color-primary);
    background: var(--color-dark-light);
    border-radius: 4px;
}

.form-highlight {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-normal);
    border-radius: 2px;
}

.form-input:focus~.form-highlight {
    width: 100%;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--color-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center; /* Centramos para un look más "Luxury" ahora que solo hay logo y redes */
    flex-wrap: wrap;
    gap: 4rem; /* Un poco más de espacio entre logo y redes */
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    height: 40px;
    filter: brightness(0) invert(1);
}

.footer-tagline {
    font-size: 0.875rem;
    opacity: 0.8;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-full);
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--gradient-primary);
    transform: translateY(-3px);
}

.footer-bottom {
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    opacity: 0.6;
}

/* ===== WHATSAPP FLOTANTE ===== */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 64px;
    height: 64px;
    border-radius: var(--border-radius-full);
    background: #25d366;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: var(--z-whatsapp);
    scale: 1;
    rotate: 0deg;
    transition: scale var(--transition-normal), rotate var(--transition-normal), box-shadow var(--transition-normal);
    animation: whatsappPulse 2s ease-in-out infinite;
}

.whatsapp-float:hover {
    scale: 1.1;
    rotate: 5deg;
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

.whatsapp-tooltip {
    position: absolute;
    right: 75px;
    background: var(--color-dark);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    translate: 10px 0;
    transition: all var(--transition-fast);
    pointer-events: none;
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    translate: 0 -50%;
    border: 5px solid transparent;
    border-left-color: var(--color-dark);
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    translate: 0 0;
}

@keyframes whatsappPulse {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }

    50% {
        box-shadow: 0 4px 30px rgba(37, 211, 102, 0.8), 0 0 0 10px rgba(37, 211, 102, 0.1);
    }
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    top: 100px;
    right: 2rem;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 350px;
}

.toast {
    padding: 1rem 1.5rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInRight 0.3s ease forwards;
    border-left: 4px solid var(--color-primary);
}

.toast.success {
    border-left-color: var(--color-success);
}

.toast.error {
    border-left-color: #ef4444;
}

.toast i {
    font-size: 1.25rem;
}

.toast.success i {
    color: var(--color-success);
}

.toast.error i {
    color: #ef4444;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: var(--color-dark);
}

.toast-message {
    font-size: 0.875rem;
    color: var(--color-gray);
}

.toast-close {
    background: none;
    border: none;
    color: var(--color-gray);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1.25rem;
    transition: color var(--transition-fast);
}

.toast-close:hover {
    color: var(--color-dark);
}

}

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

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

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: var(--delay, 0s);
}

/* Reveal on Scroll */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-info {
        padding-right: 0;
        text-align: center;
    }

    .contact-items {
        align-items: center;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
        --section-padding: 3rem 0;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(10, 15, 25, 0.95); /* Cristal Oscuro Lujo */
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        flex-direction: column;
        padding: 1.5rem 0;
        gap: 0;
        transform: translateY(-150%);
        transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu .nav-link {
        color: white !important; /* Asegurar visibilidad sobre el cristal */
        border-radius: 0;
        padding: 1.25rem 2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-menu .nav-link:last-child {
        border-bottom: none;
    }

    .nav-menu.active {
        transform: translateY(0);
    }

    .nav-link {
        width: 100%;
        padding: 1rem;
        text-align: center;
        border-radius: var(--border-radius);
    }

    .nav-toggle {
        display: flex;
    }

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

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero {
        height: 65vh;
        min-height: 450px;
    }

    .hero-content {
        padding: 1rem;
    }

    .hero-title {
        font-size: clamp(1.8rem, 10vw, 2.5rem);
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .hero-nav {
        bottom: 1rem;
    }

    .scroll-indicator {
        display: none;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }

    .product-image-wrapper {
        aspect-ratio: 1;
    }

    .whatsapp-float {
        width: 56px;
        height: 56px;
        font-size: 1.75rem;
        bottom: 1.5rem;
        right: 1.5rem; /* Margen de seguridad para pantallas curvas */
    }

    .whatsapp-tooltip {
        display: none;
    }

    .toast-container {
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

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

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== PREFERENCIAS DE MOVIMIENTO ===== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* MODO OSCURO PERMANENTE Y LIMPIEZA FINAL CONCLUIDA */

/* ========================================
   PRELOADER
   ======================================== */
.preloader {
    position: fixed;
    inset: 0;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.preloader-logo {
    animation: preloaderPulse 1.5s ease-in-out infinite;
}

.preloader-img {
    width: 80px;
    height: auto;
    filter: brightness(0) invert(1);
}

@keyframes preloaderPulse {

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

    50% {
        transform: scale(1.08);
        opacity: 0.85;
    }
}

.preloader-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 9999px;
    overflow: hidden;
}

.preloader-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
    border-radius: 9999px;
    transition: width 0.3s ease;
    animation: preloaderFill 1.8s ease forwards;
}

@keyframes preloaderFill {
    0% {
        width: 0%;
    }

    40% {
        width: 60%;
    }

    80% {
        width: 85%;
    }

    100% {
        width: 100%;
    }
}

.preloader-text {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    font-family: var(--font-sans);
    letter-spacing: 0.05em;
    animation: preloaderBlink 1.2s ease-in-out infinite;
}

@keyframes preloaderBlink {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* ========================================
   MICRO-INTERACCIONES MEJORADAS
   ======================================== */

/* Efecto ripple en botones */
.btn {
    isolation: isolate;
}

.btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    transform: scale(0);
    animation: rippleEffect 0.6s linear;
    pointer-events: none;
}

@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Links de nav con subrayado animado */
.nav-link.nav-active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--color-primary);
    border-radius: 50%;
}

/* Icono WhatsApp flotante - efecto más vivo */
.whatsapp-float {
    animation: whatsappBounce 3s ease-in-out infinite;
}

@keyframes whatsappBounce {

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

    30% {
        transform: translateY(-8px) scale(1.05);
    }

    60% {
        transform: translateY(-4px) scale(1.02);
    }
}

/* Micro-animación en cards al hacer click */
.tilt-card:active {
    transform: scale(0.97) !important;
}

.product-card:active {
    transform: scale(0.97);
}

/* Hover mejorado en redes sociales */
.social-link {
    transition: transform var(--transition-bounce), color var(--transition-fast), background var(--transition-fast);
}

.social-link:hover {
    transform: translateY(-4px) rotate(-5deg) scale(1.2);
}

/* Indicadores de carrusel con micro-animación */
.carousel-indicator {
    transition: all var(--transition-bounce);
}

.carousel-indicator:hover {
    transform: scale(1.4);
}

/* Transición suave body al cambiar de tema */
body {
    transition: background-color 0.4s ease, color 0.4s ease;
}

.navbar-glass,
.tilt-card,
.product-card,
.testimonial-card,
.contact-form-wrapper,
.footer {
    transition: background 0.4s ease, background-color 0.4s ease,
        border-color 0.4s ease, box-shadow 0.4s ease,
        transform var(--transition-normal);
}

/* Efecto entrada escalonada para secciones */
.reveal.active>* {
    animation: staggerFadeIn 0.5s ease forwards;
}

@keyframes staggerFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Highlight en formulario activo */
.form-input:focus {
    transform: scale(1.01);
    transition: transform 0.2s ease, border-color var(--transition-normal),
        box-shadow var(--transition-normal);
}

/* MODIFICACIONES MOBILE FIRST (FIXES) */
@media (max-width: 768px) {
    .trust-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
        padding: 1.5rem 1rem !important;
    }
    
    .hero-actions {
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
    }
    
    .hero-actions .btn {
        width: 100% !important;
        max-width: 300px !important;
    }
    
    .products-carousel-wrapper, 
    .testimonials-carousel-wrapper {
        overflow: hidden !important;
    }
    
    /* Asegurar que el botón de WhatsApp sea visible incluso con scroll horizontal accidental */
    .whatsapp-float {
        right: 1.5rem !important;
        bottom: 1.5rem !important;
        z-index: 10000 !important;
    }
}

/* FINAL DARK MODE OVERRIDES */
@layer overrides {
    .product-name { color: white !important; }
    .trust-stats {
        background: rgba(255, 255, 255, 0.05) !important;
        border-color: rgba(255, 255, 255, 0.1) !important;
    }
    .trust-stat-number { color: white !important; }
    .testimonial-card { background: var(--bg-card) !important; }
    .testimonial-text { color: white !important; }
}