/* ================================
   VISUAL OSCART - Estilos CSS
   Video Background Loop
   ================================ */

/* Variables CSS */
:root {
    --bg-primary: transparent; /* Transparente para dejar brillar el 3D en el fondo */
    --bg-secondary: rgba(10, 4, 16, 0.6); /* Morado muy oscuro y ligeramente transparente para revelar el holograma */
    --bg-tertiary: #111111;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #666666;
    --accent: #6100F9;
    --accent-dark: #3b00a3;
    --accent-secondary: #F76319;
    --accent-glow: rgba(97, 0, 249, 0.3);
    --gradient-1: #F76319; /* Naranja unificado sin degradados extraños */
    --gradient-2: linear-gradient(135deg, var(--accent) 0%, transparent 100%);
    --border-color: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(255, 255, 255, 0.02);
    --font-title: 'Anton', sans-serif;
    --font-body: 'Poppins', sans-serif;
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s ease;
}

/* Reset y Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: #000000; /* Fondo base absoluto para apagar el espacio debajo de las transparencias */
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: clip; /* Fix: Evitar que 'hidden' rompa el 'position: sticky' del video */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ================================
   SCROLL PROGRESS BAR
   ================================ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.1);
}

.scroll-progress-bar {
    height: 100%;
    background: var(--gradient-1);
    width: 0%;
    transition: width 0.05s linear;
}

/* ================================
   NAVEGACIÓN
   ================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    padding: 1rem 5%;
}

.logo {
    font-family: var(--font-title);
    font-size: 1.8rem;
    letter-spacing: 0.05em;
    z-index: 1001;
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: var(--transition-smooth);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: var(--transition-fast);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition-smooth);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

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

.btn-contact {
    background: var(--gradient-1);
    padding: 0.75rem 1.5rem !important;
    border-radius: 50px;
    color: var(--text-primary) !important;
}

.btn-contact::after {
    display: none !important;
}

.btn-contact:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--accent-glow);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-smooth);
}

/* ================================
   HERO SECTION - VIDEO LOOP FIJO
   ================================ */
.hero-section {
    position: relative;
    height: 250vh; /* Reducido para acelerar la transición */
    min-height: 1200px;
}

.video-sticky-container {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    z-index: 1;
    overflow: hidden;
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

#hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Canvas oculto (ya no se usa) */
#video-canvas {
    display: none;
}

/* Overlay oscuro que se activa con scroll */
.video-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.98) 100%);
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
    z-index: 2;
}

/* Overlay activo con scroll */
.video-wrapper.overlay-active::after {
    opacity: 1;
}

/* ================================
   ESFERAS FLOTANTES SOBRE EL VIDEO
   ================================ */
.floating-spheres {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    overflow: hidden;
    z-index: 5;
    pointer-events: none;
}

.sphere {
    position: absolute;
    bottom: -200px;
    background: rgba(158, 108, 255, 0.4); /* Morado base */
    border-radius: 50%;
    filter: blur(10px);
    animation: floatUp 20s linear infinite;
    mix-blend-mode: screen;
}

/* Configuración asimétrica de cada esfera (velocidad, delay, tamaño y blur) */
.sphere:nth-child(1) { left: 10%; width: 100px; height: 100px; animation-duration: 25s; animation-delay: 0s; filter: blur(12px); }
.sphere:nth-child(2) { left: 25%; width: 160px; height: 160px; animation-duration: 28s; animation-delay: 4s; filter: blur(18px); background: rgba(110, 50, 255, 0.3); }
.sphere:nth-child(3) { left: 45%; width: 80px; height: 80px; animation-duration: 20s; animation-delay: 2s; filter: blur(8px); }
.sphere:nth-child(4) { left: 60%; width: 200px; height: 200px; animation-duration: 35s; animation-delay: 9s; filter: blur(25px); }
.sphere:nth-child(5) { left: 75%; width: 120px; height: 120px; animation-duration: 24s; animation-delay: 1s; filter: blur(15px); }
.sphere:nth-child(6) { left: 85%; width: 70px; height: 70px; animation-duration: 18s; animation-delay: 12s; filter: blur(10px); background: rgba(247, 99, 25, 0.15); /* Toque naranja */ }
.sphere:nth-child(7) { left: 15%; width: 140px; height: 140px; animation-duration: 32s; animation-delay: 15s; filter: blur(20px); }
.sphere:nth-child(8) { left: 35%; width: 90px; height: 90px; animation-duration: 22s; animation-delay: 7s; filter: blur(12px); }
.sphere:nth-child(9) { left: 55%; width: 180px; height: 180px; animation-duration: 30s; animation-delay: 18s; filter: blur(22px); }
.sphere:nth-child(10) { left: 95%; width: 110px; height: 110px; animation-duration: 26s; animation-delay: 5s; filter: blur(16px); }
.sphere:nth-child(11) { left: 5%; width: 60px; height: 60px; animation-duration: 15s; animation-delay: 11s; filter: blur(8px); }
.sphere:nth-child(12) { left: 80%; width: 130px; height: 130px; animation-duration: 27s; animation-delay: 21s; filter: blur(18px); }

@keyframes floatUp {
    0% { transform: translateY(0) scale(0.8) translateX(0); opacity: 0; }
    15% { opacity: 0.7; }
    50% { transform: translateY(-60vh) scale(1.3) translateX(40px); opacity: 0.9; }
    85% { opacity: 0.7; }
    100% { transform: translateY(-120vh) scale(0.9) translateX(-40px); opacity: 0; }
}

/* Indicadores ocultos (ya no se usan) */
.video-progress-indicator,
.scroll-instruction {
    display: none;
}

/* Contenido del Hero - Oculto al inicio */
.hero-content-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    text-align: center;
    padding: 0 2rem;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease 0.2s, visibility 0.6s ease 0.2s;
}

.hero-content-overlay.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.hero-content-inner {
    max-width: 900px;
    transform: translateY(40px);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}

.hero-content-overlay.visible .hero-content-inner {
    transform: translateY(0);
}

.hero-subtitle {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--accent);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-title {
    font-family: var(--font-title);
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-weight: 300;
    line-height: 1.8;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--text-primary);
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.cta-button svg {
    transition: transform 0.3s ease;
}

.cta-button:hover {
    background: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 15px 40px var(--accent-glow);
}

.cta-button:hover svg {
    transform: translateY(3px);
}

/* ================================
   CINTA ANIMADA DEBAJO DEL HERO
   ================================ */
.hero-strip-marquee {
    background-color: var(--accent); /* Color morado exacto */
    color: white;
    width: 100%;
    padding: 12px 0;
    overflow: hidden;
    position: relative;
    display: flex;
    white-space: nowrap;
    z-index: 10;
}

.hero-strip-marquee .marquee-track {
    display: flex;
    align-items: center;
    gap: 30px;
    padding-right: 30px;
    animation: scrollHeroStrip 35s linear infinite;
}

.hero-strip-marquee span {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 1px;
}

.hero-strip-marquee .dot {
    opacity: 0.6;
    font-size: 1.2rem;
}

@keyframes scrollHeroStrip {
    100% { transform: translateX(-100%); }
}

/* ================================
   SECCIÓN SERVICIOS
   ================================ */
.services-section {
    padding: 4.5rem 5%;
    background: var(--bg-secondary); /* Alternancia */
    position: relative;
}

.services-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    filter: blur(60px);
    opacity: 0.5;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    z-index: 1;
}

.section-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--accent);
    margin-bottom: 1rem;
    font-weight: 500;
}

.section-title {
    font-family: var(--font-title);
    font-size: clamp(2.5rem, 5vw, 4rem);
    text-transform: uppercase;
    line-height: 1.2;
}

.highlight {
    color: var(--accent);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.service-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 50%);
    opacity: 0;
    transition: var(--transition-smooth);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(97, 0, 249, 0.2); /* Resplandor morado alineado a la marca en vez del naranja */
}

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

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.service-icon svg {
    width: 30px;
    height: 30px;
    fill: var(--text-primary);
}

.service-card h3 {
    font-family: var(--font-title);
    font-size: 1.5rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
    position: relative;
    z-index: 1;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.service-expand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: var(--transition-fast);
}

.service-expand:hover {
    gap: 1rem;
}

/* ================================
   SECCIÓN CONÓCENOS
   ================================ */
.about-section {
    padding: 4.5rem 5%;
    background: var(--bg-primary); /* Alternancia */
    position: relative;
    overflow: hidden;
}

.about-bg-gradient {
    position: absolute;
    width: 60vmax;
    height: 60vmax;
    top: 50%;
    left: 40%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(110, 28, 252, 0.15) 0%, rgba(97, 0, 249, 0.05) 40%, transparent 70%);
    filter: blur(80px);
    border-radius: 50%;
    animation: pulseGradient 20s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes pulseGradient {
    0% { transform: translate(-50%, -50%) scale(1) translateX(-10%); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1.4) translateY(-10%); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(0.9) translateX(15%); opacity: 0.4; }
}

.about-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

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

.about-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 3rem;
}

.stats-container {
    display: flex;
    gap: 3rem;
}

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

.stat-number {
    font-family: var(--font-title);
    font-size: 3.5rem;
    color: var(--accent);
    display: inline;
}

.stat-suffix {
    font-family: var(--font-title);
    font-size: 3.5rem;
    color: var(--accent);
    transition: all 0.3s ease;
    display: inline-block;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

@keyframes softNeonExplosion {
    0% { text-shadow: 0 0 0px transparent; transform: scale(1); color: var(--accent); }
    15% { text-shadow: 0 0 20px #ffffff, 0 0 40px #ffffff; transform: scale(1.15); color: #ffffff; }
    85% { text-shadow: 0 0 20px #ffffff, 0 0 40px #ffffff; transform: scale(1.15); color: #ffffff; }
    100% { text-shadow: 0 0 0px transparent; transform: scale(1); color: var(--accent); }
}

.neon-explode {
    animation: softNeonExplosion 3.5s ease forwards;
}

.about-visual {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-deck {
    position: relative;
    width: 260px;
    height: 360px;
    perspective: 1000px;
    z-index: 10;
}

.team-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.6s ease, filter 0.6s ease, z-index 0s;
    transform-origin: center bottom;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    background: #000;
    border: 1px solid var(--border-color);
}

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
}

.team-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
    opacity: 0.8;
}

.team-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 60%, transparent 100%);
    transform: translateY(110px);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.team-info h3 {
    font-family: var(--font-title);
    font-size: 1.6rem;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
    letter-spacing: 1px;
}

.team-info h4 {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.team-info p {
    font-size: 0.8rem;
    color: #e0e0e0;
    line-height: 1.5;
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Efecto Baraja - Default offsets (Oscar al centro, Anne izquierda, Mario derecha) */
.team-card:nth-child(1) { transform: rotate(0deg) translateX(0px) translateY(0px); z-index: 3; } /* Oscar (Centro) */
.team-card:nth-child(2) { transform: rotate(-10deg) translateX(-40px) translateY(15px); z-index: 2; } /* Anne (Izquierda) */
.team-card:nth-child(3) { transform: rotate(10deg) translateX(40px) translateY(15px); z-index: 1; } /* Mario (Derecha) */

/* Efecto Baraja - Hover */
.team-deck:hover .team-card:nth-child(1) { transform: rotate(0deg) translateY(-20px); }
.team-deck:hover .team-card:nth-child(2) { transform: rotate(-15deg) translateX(-80px) translateY(5px); }
.team-deck:hover .team-card:nth-child(3) { transform: rotate(15deg) translateX(80px) translateY(5px); }

/* Efecto Baraja - Tarjeta Clicked (Selected) */
.team-deck.has-active .team-card {
    filter: blur(5px) brightness(0.5);
    pointer-events: none;
}

.team-deck.has-active .team-card.active {
    transform: scale(1.15) translateY(-10px) rotate(0) !important;
    z-index: 100;
    filter: blur(0) brightness(1);
    box-shadow: 0 20px 50px rgba(158, 108, 255, 0.4);
    pointer-events: auto;
    border-color: var(--accent);
}

.team-card.active .team-info {
    transform: translateY(0);
}

.team-card.active .team-info p {
    opacity: 1;
}

.team-card.active img {
    opacity: 1;
}

/* ================================
   SECCIÓN CONTACTO Y PORTAFOLIO
   ================================ */
.portfolio-section {
    padding: 4.5rem 5%;
    background: var(--bg-secondary);
    position: relative;
    text-align: center;
    overflow: hidden; /* Evita que el vórtice o los floatings traspasen a otras secciones */
}

/* ================================
   PORTFOLIO FLOATING IMAGES (PARALLAX)
   ================================ */
.floating-port-img {
    position: absolute;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.85); /* Sombra completamente negra */
    z-index: 5; /* Crucial: encima de portfolio-bg-circles */
    opacity: 0.9;
    object-fit: cover;
    pointer-events: none;
    transition: transform 0.1s ease-out; /* Suavizar el update del scroll de JS */
}

/* 2 en el lado izquierdo */
.floating-port-img.img-1 {
    width: 15vw;
    max-width: 180px;
    top: 22%;
    left: 8%;
    transform-origin: center;
}
.floating-port-img.img-2 {
    width: 18vw;
    max-width: 220px;
    top: 60%;
    left: 12%;
    transform-origin: center;
}

/* 2 en el lado derecho */
.floating-port-img.img-3 {
    width: 16vw;
    max-width: 200px;
    top: 28%;
    right: 10%;
    transform-origin: center;
}
.floating-port-img.img-4 {
    width: 13vw;
    max-width: 160px;
    top: 70%;
    right: 8%;
    transform-origin: center;
}

/* Extras para profundidad (Fondo Difuminado) */
.floating-port-img.img-5 {
    width: 10vw;
    max-width: 120px;
    top: 5%;
    left: 20%;
    opacity: 0.6;
    filter: blur(3px) brightness(0.6);
}
.floating-port-img.img-6 {
    width: 12vw;
    max-width: 140px;
    top: 10%;
    right: 25%;
    opacity: 0.5;
    filter: blur(4px) brightness(0.5);
}
.floating-port-img.img-7 {
    width: 14vw;
    max-width: 170px;
    top: 85%;
    left: 22%;
    opacity: 0.5;
    filter: blur(2px) brightness(0.7);
}
.floating-port-img.img-8 {
    width: 11vw;
    max-width: 130px;
    top: 88%;
    right: 20%;
    opacity: 0.4;
    filter: blur(5px) brightness(0.4);
}

@media (max-width: 768px) {
    .floating-port-img {
        opacity: 0.4; /* Menos distracciones en tablets */
    }
    .floating-port-img.img-1 { left: 2%; }
    .floating-port-img.img-2 { left: 4%; }
    .floating-port-img.img-3 { right: 2%; }
    .floating-port-img.img-4 { right: 4%; }
}

@media (max-width: 768px) {
    .floating-port-img {
        display: none; /* En celular el espacio es muy angosto, podrían chocar con el texto principal */
    }
}

.portfolio-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    filter: blur(70px);
    opacity: 0.5;
}

.portfolio-bg-circles {
    position: absolute;
    /* Usamos vmax para asegurar que sea un cuadrado perfecto enorme que nunca muestre bordes sin importar si es móvil o ultra-wide */
    width: 300vmax; 
    height: 300vmax;
    top: 50%; 
    left: 50%;
    /* Centramos el div madre y dentro de él calculamos el desfase excéntrico de los círculos */
    background: repeating-radial-gradient(
        circle at 46% 46%, /* Desfase suave para la gravedad orbital */
        #111111 0px,
        #111111 60px,
        #161616 60px,
        #161616 120px
    );
    animation: orbitCircles 45s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes orbitCircles {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ================================
   SECCIÓN TESTIMONIOS (CARRUSEL MÁGICO)
   ================================ */
.testimonials-section {
    padding: 6rem 0; /* Padding lateral 0 para que la marquesina toque los bordes */
    background: var(--bg-primary);
    overflow: hidden;
    position: relative;
}

.testimonials-section {
    background: #4A00D8; /* Tono poco más oscuro que var(--accent) #6100F9 */
    padding-top: 1rem;
    padding-bottom: 3rem;
}

.testimonials-marquee {
    position: relative;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    padding: 2rem 0;
}

/* Sombras en los bordes para difuminar entrada/salida */
.testimonials-marquee::before,
.testimonials-marquee::after {
    content: "";
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}
.testimonials-marquee::before {
    left: 0;
    background: linear-gradient(to right, #4A00D8 0%, transparent 100%);
}
.testimonials-marquee::after {
    right: 0;
    background: linear-gradient(to left, #4A00D8 0%, transparent 100%);
}

.testimonials-track {
    display: inline-flex;
    gap: 3rem;
    padding-left: 3rem; /* Arranca respetando el gap */
    animation: scrollMarquee 35s linear infinite;
}

.testimonials-track:hover {
    animation-play-state: paused; /* Se frena al ver un testimonio detalladamente */
}

@keyframes scrollMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 1.5rem)); } /* -50% empuja la primera mitad hacia la salida */
}

.testimonial-card {
    display: inline-block;
    width: 380px;
    background: rgba(0, 0, 0, 0.3); /* Traslúcido y muy oscuro para que resalte vs el fondo morado */
    border: 1px solid rgba(255, 255, 255, 0.05); /* Más sutil */
    border-radius: 12px;
    padding: 2rem;
    white-space: normal; /* Para que el texto baje de línea */
    transition: var(--transition-smooth);
}

.testimonial-card:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.testimonial-card .stars {
    color: #ffffff;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.testimonial-card .review {
    color: #ffffff;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-card .client-name {
    font-family: var(--font-title);
    color: #ffffff;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.portfolio-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.portfolio-container h2 {
    font-family: var(--font-title);
    font-size: clamp(2.5rem, 5vw, 4rem);
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.contact-section {
    padding: 4.5rem 5%;
    background: var(--bg-primary);
    position: relative;
}

#webgl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0; /* Fundamental: ponerlo tras todo el texto HTML */
    pointer-events: none;
}

.contact-section::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    filter: blur(80px);
    opacity: 0.3;
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    position: relative;
    z-index: 1;
}

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

.contact-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.contact-methods {
    margin-bottom: 2rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-primary);
    text-decoration: none;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.contact-method:hover {
    color: var(--accent);
}

.contact-method svg {
    width: 24px;
    height: 24px;
    fill: var(--accent);
}

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

.social-link {
    width: 50px;
    height: 50px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.social-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-primary);
    transform: translateY(-5px);
}

.social-link svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.contact-form-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem;
}

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

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--border-color);
    padding: 1rem 0;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-smooth);
    resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group label {
    position: absolute;
    left: 0;
    top: 1rem;
    color: var(--text-muted);
    font-size: 1rem;
    transition: var(--transition-smooth);
    pointer-events: none;
}

.form-group input:focus + label,
.form-group input:valid + label,
.form-group textarea:focus + label,
.form-group textarea:valid + label {
    top: -0.75rem;
    font-size: 0.8rem;
    color: var(--accent);
}

.submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: var(--gradient-1);
    color: var(--text-primary);
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    margin-top: 1rem;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3); /* Sombra suave oscura en vez de morada */
}

.submit-btn svg {
    transition: transform 0.3s ease;
}

.submit-btn:hover svg {
    transform: translateX(5px);
}

/* ================================
   FOOTER
   ================================ */
.footer {
    padding: 3rem 5%;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-logo {
    font-family: var(--font-title);
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* ================================
   MODALES INMERSIVOS SERVICIOS
   ================================ */
.modals-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.modals-overlay.active {
    opacity: 1;
    visibility: visible;
}

.service-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%) scale(0.95);
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    background: var(--bg-secondary);
    border: 1px solid var(--accent-glow);
    border-radius: 20px;
    z-index: 2001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0,0,0,0.8);
}

.service-modal.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 2rem;
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--accent);
    transform: rotate(90deg);
}

.modal-content {
    padding: 3rem;
    overflow-y: auto;
}

.modal-title {
    font-family: var(--font-title);
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 1rem;
}

.modal-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--gradient-1);
    border-radius: 2px;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.modal-immersive-visual {
    width: 100%;
    height: 300px;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--accent-glow) 0%, rgba(0,0,0,0) 100%);
    border: 1px solid var(--border-color);
    position: relative;
}

.modal-immersive-visual::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.5;
    filter: blur(20px);
}

.modal-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.modal-text ul {
    list-style: none;
}

.modal-text ul li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1rem;
}

.modal-text ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr;
    }
    .modal-content {
        padding: 2rem;
    }
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */
@media (max-width: 768px) {
    .about-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-visual {
        display: none;
    }

    .stats-container {
        justify-content: center;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

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

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem 5%;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transform: translateX(100%);
        transition: var(--transition-smooth);
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .hamburger {
        display: flex;
    }

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

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

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

    .hero-title {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }

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

    .stats-container {
        flex-direction: column;
        gap: 2rem;
    }

    .contact-form-container {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-content-overlay {
        padding: 0 1rem;
    }

    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .service-card {
        padding: 2rem;
    }
}

/* ================================
   MEGA MODAL COMPAÑÍA & ÓRBITAS
   ================================ */

/* Órbitas Conócenos */
.parallax-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.parallax-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    box-shadow: 0 0 40px rgba(0,0,0,0.5) inset;
    transition: margin 0.3s ease-out;
}
.circle-1 { width: 280px; height: 280px; border-top: 2px solid var(--accent); border-bottom: 2px solid var(--accent); animation: rotateOrbit 15s linear infinite; }
.circle-2 { width: 420px; height: 420px; border-right: 2px solid var(--accent-secondary); border-left: 2px solid var(--accent-secondary); animation: rotateOrbit 25s linear infinite reverse; }
.circle-3 { width: 560px; height: 560px; border-bottom: 2px solid var(--accent-dark); animation: rotateOrbit 35s linear infinite; }

@keyframes rotateOrbit {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Mega Modal Contenido */
.mega-modal-content {
    max-width: 1400px !important;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 3rem !important;
}

.mega-title {
    font-family: var(--font-title);
    font-size: 3rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.philosophy-title {
    font-family: var(--font-title);
    font-size: 2.2rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.philosophy-block {
    margin-bottom: 2.5rem;
    background: rgba(255,255,255,0.03);
    padding: 1.5rem;
    border-radius: 10px;
}

.philosophy-block p {
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
    font-size: 1rem;
    line-height: 1.6;
}

.values-title {
    font-family: var(--font-title);
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    letter-spacing: 5px;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.value-card {
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--border-color);
    padding: 1.5rem 1rem;
    border-radius: 8px;
    text-align: center;
    transition: var(--transition-fast);
}

.value-card:hover {
    border-color: var(--accent-secondary);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(247, 99, 25, 0.2);
}

.value-card h5 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.value-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Ajuste de Deck en Mega Modal */
.mega-deck {
    margin: 0 auto;
    transform: scale(1);
    margin-top: 4rem;
}

@media (max-width: 768px) {
    .mega-modal-content {
        grid-template-columns: 1fr;
        height: 80vh;
        overflow-y: auto;
    }
    .mega-deck {
        transform: scale(0.9);
        margin: 2rem auto;
    }
    .values-grid {
        grid-template-columns: 1fr;
    }
}

/* Mega Modal Contenido */
.mega-modal-content {
    max-width: 1600px !important;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 4rem;
    align-items: stretch;
    padding: 3rem !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.modal-team-section {
    position: relative;
    text-align: center;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Oscurecimiento global al seleccionar una carta */
.deck-overlay {
    position: fixed;
    top: 0; bottom: 0; left: 0; right: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    z-index: 50; /* Aislado del resto de contenidos para oscurecer TODO */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}
.team-deck.has-active ~ .deck-overlay,
.modal-team-section:has(.team-deck.has-active) .deck-overlay {
    opacity: 1;
}

/* El deck debe posicionarse sobre el oscurecimiento GLOBAL */
.team-deck.mega-deck {
    position: relative;
    z-index: 60; 
    margin: 0 auto;
    transform: scale(0.9);
    transform-origin: center center; /* Centrado y un poco más reducido para no crear overflow horizontal */
}

/* Desenfoque extra para las cartas inactivas de la baraja */
.team-deck.has-active .team-card:not(.active) {
    filter: blur(6px) brightness(0.4);
    pointer-events: none;
    transform: translateY(20px) scale(0.9);
}

/* Órbita detrás de la carta activa */
.card-active-orbit {
    position: absolute;
    top: 50%; left: 50%;
    width: 600px; height: 600px;
    border-radius: 50%;
    border: 2px solid rgba(247, 99, 25, 0.3);
    border-top-color: var(--accent);
    border-bottom-color: var(--accent-secondary);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    pointer-events: none;
    z-index: -1; /* Dentro de mega-deck, pero detrás de las cartas */
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.6s ease;
    animation: rotateOrbit 15s linear infinite;
}
.team-deck.has-active .card-active-orbit {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Mantener la carta activa gloriosa al frente */
.team-card.active {
    z-index: 100 !important;
}

.mega-title {
    font-family: var(--font-title);
    font-size: 3rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.philosophy-title {
    font-family: var(--font-title);
    font-size: 2.2rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.philosophy-block {
    margin-bottom: 2.5rem;
    background: rgba(255,255,255,0.03);
    padding: 1.5rem;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.philosophy-block p {
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
    font-size: 1rem;
    line-height: 1.6;
    flex-grow: 1;
}

.values-title {
    font-family: var(--font-title);
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    letter-spacing: 5px;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.value-card {
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--border-color);
    padding: 1.5rem 1rem;
    border-radius: 8px;
    text-align: center;
    transition: var(--transition-fast);
}

.value-card:hover {
    border-color: var(--accent-secondary);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(247, 99, 25, 0.2);
}

.value-card h5 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.value-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Ajuste de Deck en Mega Modal */
.mega-deck {
    margin: 0 auto;
    transform: scale(1);
    margin-top: 4rem;
}

/* ================================
   FOOTER ANIMADO MÁGICO
   ================================ */
.footer {
    padding: 3rem 5% 2rem;
    background: #0d041c; /* Base morado ultra oscuro por si acaso */
    text-align: center;
}

.footer-bg-orbit {
    position: absolute;
    width: 200vmax;
    height: 200vmax;
    top: 50%;
    left: 50%;
    background: repeating-radial-gradient(
        circle at 48% 48%,
        #3b00a3 0px,
        #3b00a3 40px,
        #2a0075 40px,
        #2a0075 80px
    );
    animation: orbitCircles 35s linear infinite;
    pointer-events: none;
    z-index: 0;
    opacity: 0.25; /* Efecto sublime para que resalte la marca y textos */
}

.legal-link:hover {
    color: var(--text-primary) !important;
}

/* ================================
   SECCIÓN PREGUNTAS FRECUENTES (FAQ)
   ================================ */
.faq-section {
    padding: 4.5rem 5%;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden; /* Evita desborde de signos de interrogación */
}

.faq-mark {
    position: absolute;
    font-family: var(--font-title);
    color: var(--text-primary);
    opacity: 0.1;
    z-index: 0;
    pointer-events: none;
    transition: transform 0.1s ease-out;
}
.faq-mark.mark-1 { font-size: 15rem; top: 10%; left: 5%; opacity: 0.02; transform-origin: center; }
.faq-mark.mark-2 { font-size: 8rem; top: 70%; left: 15%; opacity: 0.04; transform-origin: center; }
.faq-mark.mark-3 { font-size: 20rem; top: -5%; right: -2%; opacity: 0.01; transform-origin: center; }
.faq-mark.mark-4 { font-size: 12rem; top: 50%; right: 10%; opacity: 0.03; transform-origin: center; }
.faq-mark.mark-5 { font-size: 6rem; top: 85%; right: 40%; opacity: 0.05; transform-origin: center; }

.section-header, .faq-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
}

.faq-item:first-child {
    border-top: 1px solid var(--border-color);
}

.faq-question {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1.1rem;
    padding: 1.5rem 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: var(--accent);
}

.faq-question svg {
    width: 24px;
    height: 24px;
    transition: transform 0.4s ease;
}

.faq-item.active .faq-question svg {
    transform: rotate(180deg);
    color: var(--accent);
}

.faq-answer-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s ease;
}

.faq-item.active .faq-answer-wrapper {
    grid-template-rows: 1fr;
}

.faq-answer {
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.faq-answer p {
    padding-bottom: 1rem;
}

.faq-answer p:first-child {
    padding-top: 0.5rem;
}

.faq-answer strong {
    color: var(--accent);
}

@media (max-width: 768px) {
    .mega-modal-content {
        grid-template-columns: 1fr;
        height: 80vh;
        overflow-y: auto;
    }
    .mega-deck {
        transform: scale(0.9);
        margin: 2rem auto;
    }
    .values-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================
   OPITMIZACIÓN MOBILE (768px)
   ================================ */
@media (max-width: 768px) {
    /* 1. Evitar que el video tenga barras negras o espacios muertos gigantes */
    .hero-section {
        height: auto; /* Anulamos los 250vh */
        min-height: unset; /* Anulamos los 1200px */
    }
    
    .video-sticky-container {
        position: relative; /* Quitar sticky para que no atrape scroll en el celular */
        height: auto;
        width: 100%;
        aspect-ratio: 16 / 9; /* Encapsulamos el tamaño al rectángulo nativo del video */
    }

    #hero-video {
        object-fit: cover; /* Al tener el aspect-ratio del container a 16:9, rellenará perfecto sin bordes */
    }

    /* 2. Reducir los espacios gigantes entre las secciones */
    .about-section,
    .portfolio-section,
    .contact-section,
    #servicios {
        padding: 4rem 5%;
    }

    /* Reducción general de títulos para que calcen bien */
    .section-title {
        font-size: 2.2rem;
    }

    /* 3. Tarjetas de servicios: mostrar de 2 en 2 en mobile */
    .services-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    .service-card {
        padding: 1.5rem;
    }
    .service-card h3 {
        font-size: 1.2rem;
    }
    /* Ocultar la sinopsis en mobile para mantener todo súper prolijo hasta que abren el modal */
    .service-card p {
        display: none;
    }

    /* 4. Contadores estáticos de la app: forzarlos a ser Múltiples horizontales */
    .stats-container {
        flex-direction: row;
        justify-content: space-between;
        gap: 0.5rem;
        flex-wrap: nowrap; /* Evita que caigan abajo */
    }
    .stat-number, .stat-suffix {
        font-size: 2rem;
    }
    .stat-label {
        font-size: 0.65rem;
    }

    /* 5. Contacto Mobile: Rediseño visual (Email e íconos debajo del form) */
    .contact-container {
        display: flex;
        flex-direction: column;
    }
    .contact-info {
        display: contents; /* Desempaqueta y permite el order css directo */
    }
    .contact-info > .section-title { order: 1; text-align: center; }
    .contact-info > .about-description { order: 2; text-align: center; margin-bottom: 2rem; }
    .contact-form-container { order: 3; }
    
    .contact-methods { 
        order: 4; 
        margin-top: 2.5rem;
        padding-top: 1.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1); 
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .contact-info .social-links { 
        order: 5; 
        margin-top: 1.5rem;
        justify-content: center;
        gap: 1.5rem;
    }
    .contact-info .social-link {
        width: 48px;
        height: 48px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
    }
    .contact-info .social-link svg {
        width: 20px;
        height: 20px;
    }
    
    /* Pequeños ajustes a la baraja en modal para evitar choques en móviles puros */
    .mega-deck {
        transform: scale(0.65);
    }
}

/* ================================
   MODAL PORTAFOLIO INMERSIVO
   ================================ */

/* Modal contenedor */
.portfolio-modal {
    background: transparent !important;
    border: none !important;
    max-width: 100vw !important;
    width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    transform: none !important;
    top: 0 !important;
    left: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, #1a0a2e 0%, #0d0515 50%, #050208 100%) !important;
    overflow: hidden;
}

.portfolio-modal.active {
    transform: none !important;
}

/* Fondo de órbitas moradas */
.portfolio-orbits-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
}

.portfolio-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.portfolio-orbit.orbit-1 {
    width: 300px;
    height: 300px;
    border: 2px solid rgba(147, 51, 234, 0.4);
    border-top-color: #a855f7;
    border-bottom-color: #7c3aed;
    animation: orbitRotate 20s linear infinite;
}

.portfolio-orbit.orbit-2 {
    width: 500px;
    height: 500px;
    border: 2px solid rgba(168, 85, 247, 0.3);
    border-right-color: #c084fc;
    border-left-color: #9333ea;
    animation: orbitRotate 30s linear infinite reverse;
}

.portfolio-orbit.orbit-3 {
    width: 700px;
    height: 700px;
    border: 1.5px solid rgba(192, 132, 252, 0.2);
    border-bottom-color: #a855f7;
    animation: orbitRotate 45s linear infinite;
}

.portfolio-orbit.orbit-4 {
    width: 900px;
    height: 900px;
    border: 1px solid rgba(147, 51, 234, 0.15);
    border-top-color: #7c3aed;
    animation: orbitRotate 60s linear infinite reverse;
}

@keyframes orbitRotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Esferas flotantes desenfocadas */
.portfolio-spheres {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.floating-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.6;
    animation: floatSphere 8s ease-in-out infinite;
}

.floating-sphere.sphere-1 {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, #a855f7 0%, transparent 70%);
    top: 10%;
    left: 15%;
    animation-delay: 0s;
    animation-duration: 10s;
}

.floating-sphere.sphere-2 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, #7c3aed 0%, transparent 70%);
    top: 60%;
    right: 10%;
    animation-delay: 2s;
    animation-duration: 12s;
}

.floating-sphere.sphere-3 {
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, #c084fc 0%, transparent 70%);
    bottom: 20%;
    left: 25%;
    animation-delay: 4s;
    animation-duration: 9s;
}

.floating-sphere.sphere-4 {
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, #9333ea 0%, transparent 70%);
    top: 30%;
    right: 25%;
    animation-delay: 1s;
    animation-duration: 11s;
}

.floating-sphere.sphere-5 {
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, #a855f7 0%, transparent 70%);
    bottom: 35%;
    right: 15%;
    animation-delay: 3s;
    animation-duration: 8s;
}

.floating-sphere.sphere-6 {
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, #7c3aed 0%, transparent 70%);
    top: 50%;
    left: 8%;
    animation-delay: 5s;
    animation-duration: 13s;
}

@keyframes floatSphere {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
    }
    25% {
        transform: translateY(-30px) translateX(20px) scale(1.1);
    }
    50% {
        transform: translateY(-15px) translateX(-15px) scale(0.95);
    }
    75% {
        transform: translateY(25px) translateX(10px) scale(1.05);
    }
}

/* Contenido del modal */
.portfolio-modal-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    max-width: 940px; /* Tamaño intermedio perfecto y más recogido a petición */
    width: 100%;
}

/* Logo */
.portfolio-logo-container {
    margin-bottom: 1rem;
    animation: logoFloat 4s ease-in-out infinite;
}

.portfolio-logo {
    width: 140px;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(168, 85, 247, 0.5));
    transition: transform 0.3s ease;
}

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

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

/* Título */
.portfolio-title {
    font-family: var(--font-title);
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    white-space: nowrap;
}

.portfolio-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* Imágenes parallax laterales - estilo portafolio */
.portfolio-parallax-left,
.portfolio-parallax-right {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}

.portfolio-parallax-left {
    left: 0;
}

.portfolio-parallax-right {
    right: 0;
}

.parallax-card {
    position: absolute;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
    transition: transform 0.2s ease-out;
}

/* Lado izquierdo - frontal nítido */
.parallax-card.pcard-1 {
    width: 13vw;
    max-width: 150px;
    top: 18%;
    left: 6%;
    opacity: 0.9;
    animation: cardFloatSoft 8s ease-in-out infinite;
}

.parallax-card.pcard-2 {
    width: 15vw;
    max-width: 170px;
    top: 55%;
    left: 8%;
    opacity: 0.85;
    animation: cardFloatSoft2 10s ease-in-out infinite;
}

.parallax-card.pcard-3 {
    width: 11vw;
    max-width: 130px;
    top: 82%;
    left: 4%;
    opacity: 0.8;
    animation: cardFloatSoft3 9s ease-in-out infinite;
}

/* Lado izquierdo - fondo desenfocado */
.parallax-card.pcard-7 {
    width: 9vw;
    max-width: 110px;
    top: 8%;
    left: 15%;
    opacity: 0.5;
    filter: blur(3px) brightness(0.7);
    animation: cardFloatSoft 12s ease-in-out infinite;
}

.parallax-card.pcard-8 {
    width: 10vw;
    max-width: 120px;
    top: 40%;
    left: 2%;
    opacity: 0.45;
    filter: blur(4px) brightness(0.6);
    animation: cardFloatSoft2 11s ease-in-out infinite;
}

/* Lado derecho - frontal nítido */
.parallax-card.pcard-4 {
    width: 14vw;
    max-width: 160px;
    top: 25%;
    right: 6%;
    opacity: 0.9;
    animation: cardFloatSoft4 9s ease-in-out infinite;
}

.parallax-card.pcard-5 {
    width: 12vw;
    max-width: 140px;
    top: 65%;
    right: 8%;
    opacity: 0.85;
    animation: cardFloatSoft 8s ease-in-out infinite;
}

.parallax-card.pcard-6 {
    width: 10vw;
    max-width: 120px;
    top: 88%;
    right: 4%;
    opacity: 0.8;
    animation: cardFloatSoft3 10s ease-in-out infinite;
}

/* Lado derecho - fondo desenfocado */
.parallax-card.pcard-9 {
    width: 8vw;
    max-width: 100px;
    top: 5%;
    right: 18%;
    opacity: 0.45;
    filter: blur(4px) brightness(0.6);
    animation: cardFloatSoft4 13s ease-in-out infinite;
}

.parallax-card.pcard-10 {
    width: 11vw;
    max-width: 130px;
    top: 48%;
    right: 2%;
    opacity: 0.5;
    filter: blur(3px) brightness(0.65);
    animation: cardFloatSoft2 12s ease-in-out infinite;
}

@keyframes cardFloatSoft {
    0%, 100% { transform: translateY(0) rotate(-4deg); }
    50% { transform: translateY(-12px) rotate(-2deg); }
}

@keyframes cardFloatSoft2 {
    0%, 100% { transform: translateY(0) rotate(3deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

@keyframes cardFloatSoft3 {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-10px) rotate(-4deg); }
}

@keyframes cardFloatSoft4 {
    0%, 100% { transform: translateY(0) rotate(4deg); }
    50% { transform: translateY(-14px) rotate(2deg); }
}

/* Grid de botones */
.portfolio-categories {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    width: 100%;
    max-width: 520px;
}

/* Botones de categoría */
.portfolio-cat-btn {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 1.2rem;
    padding: 0.8rem 1.5rem;
    min-height: 75px;
    background: rgba(147, 51, 234, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 16px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
}

.portfolio-cat-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.portfolio-cat-btn:hover::before {
    opacity: 1;
}

.portfolio-cat-btn:hover {
    transform: translateY(-5px);
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 12px 30px rgba(147, 51, 234, 0.2),
                0 0 50px rgba(168, 85, 247, 0.1);
}

.portfolio-cat-btn:active {
    transform: translateY(-2px) scale(0.98);
}

/* Icono */
.cat-btn-icon {
    position: relative;
    z-index: 2;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.cat-btn-icon svg {
    width: 100%;
    height: 100%;
    color: #c084fc;
    transition: all 0.3s ease;
}

.portfolio-cat-btn:hover .cat-btn-icon {
    transform: scale(1.15);
}

.portfolio-cat-btn:hover .cat-btn-icon svg {
    color: #e9d5ff;
    filter: drop-shadow(0 0 8px rgba(192, 132, 252, 0.6));
}

/* Texto */
.cat-btn-text {
    position: relative;
    z-index: 2;
    font-family: var(--font-title);
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    line-height: 1.3;
    transition: all 0.3s ease;
}

.portfolio-cat-btn:hover .cat-btn-text {
    color: #fff;
}

/* Efecto glow */
.cat-btn-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.25) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: all 0.5s ease;
    pointer-events: none;
    z-index: 0;
}

.portfolio-cat-btn:hover .cat-btn-glow {
    transform: translate(-50%, -50%) scale(2.5);
    opacity: 1;
}

/* Responsive */
@media (max-width: 1024px) {
    .portfolio-parallax-left,
    .portfolio-parallax-right {
        display: none;
    }
}

@media (max-width: 768px) {
    .portfolio-categories {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        padding: 0 1rem;
        max-width: 260px;
    }

    .portfolio-cat-btn {
        min-height: 85px;
        padding: 1rem 0.8rem;
        flex-direction: row;
        justify-content: flex-start;
        gap: 1rem;
    }

    .cat-btn-icon {
        width: 28px;
        height: 28px;
        flex-shrink: 0;
    }

    .cat-btn-text {
        font-size: 0.7rem;
        text-align: left;
    }

    .portfolio-logo {
        width: 100px;
    }

    .portfolio-title {
        font-size: 1.5rem;
        white-space: normal;
        text-align: center;
    }

    .portfolio-orbit.orbit-3,
    .portfolio-orbit.orbit-4 {
        display: none;
    }

    .floating-sphere {
        filter: blur(30px);
        opacity: 0.4;
    }
}

/* =========================================
   MARCAS & BRAND DETAILS DYNAMIC SYSTEM
========================================= */

.brands-grid-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 2rem;
    animation: fadeIn 0.5s ease forwards;
    height: 75vh; /* Ajustado para que no se corte al fondo */
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 8rem; /* Mayor colchón abajo */
}

.brands-grid-container::-webkit-scrollbar {
    display: none;
}

.btn-back-categories {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.btn-back-categories:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.brand-val-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1.5rem;
}

.brand-val-grid img {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
}

/* Close btn for brand details so it doesn't trigger global modal closes */
.brand-close-btn {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
}

.brand-close-btn:hover {
    background: var(--primary);
    transform: rotate(90deg);
}

/* BRAND MODAL MOBILE RESPONSIVE OVERRIDES */
@media (max-width: 768px) {
    .brand-close-btn {
        top: 1rem;
        right: 1rem;
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
    }
    
    .carousel-track img {
        height: 120px; /* Mas pequeno el fondo carrusel en celular */
        margin-right: 10px;
    }

    .versions-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* 3 columnas en celular */
        gap: 10px;
    }
}

.brands-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* Espacio reducido entre tarjetas */
    width: 100%;
}

.brand-card-item {
    background: #1e1e24; /* Base dark color like in the image */
    background: linear-gradient(135deg, #2a2a30 0%, #1a1a20 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem 1.5rem; /* Menor padding para hacerla mas delgada */
    cursor: pointer;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    min-height: 110px; /* Tarjeta mucho mas delgada */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    text-align: left;
    transition: border-color 0.3s ease; /* Transición muy ligera solo por estética, sin lag */
}

.brand-card-item:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.bc-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top right, transparent 50%, rgba(255,255,255,0.03) 100%);
    pointer-events: none;
}

.bc-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Anton', sans-serif;
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.02);
    white-space: nowrap;
    z-index: 0;
    pointer-events: none;
    user-select: none;
}

.bc-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    width: 100%;
}

.bc-logo {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.15);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.bc-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bc-info h3 {
    font-family: 'Anton', sans-serif;
    color: #ffffff;
    font-size: 1.8rem;
    margin: 0;
    letter-spacing: 1px;
    line-height: 1;
}

.bc-divider {
    height: 2px;
    width: 30px;
    background: #ff5500; /* Orange highlight line from image */
    margin: 10px 0;
}

.bc-info span {
    font-family: 'Poppins', sans-serif;
    color: rgba(255,255,255,0.5);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 2px;
}

/* Modal Detalle de Marca */
.brand-details-modal .modal-content,
.brand-details-content {
    background: #161616;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.brand-details-content::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.brand-hero {
    position: relative;
    width: 100%;
    height: 60vh;
    overflow: hidden;
}

.brand-hero video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.brand-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #161616, transparent);
}

.brand-overlay-title {
    position: absolute;
    bottom: 40px;
    left: 5%;
    font-size: clamp(3rem, 8vw, 6rem);
    color: var(--text-primary);
    z-index: 2;
    text-shadow: 0 5px 15px rgba(0,0,0,0.5);
    margin: 0;
    opacity: 0;
    transform: translateY(20px);
    animation: slideUpFade 0.8s ease 0.5s forwards;
}

.brand-body-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 5%;
    position: relative;
    z-index: 2;
}

.brand-concept-section {
    margin-bottom: 3rem;
    animation: fadeUp 0.8s ease 0.7s both;
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: space-between;
}

.brand-concept-text-container {
    flex: 1;
}

.brand-concept-text-container h3 {
    font-size: 1.6rem;
    color: #ffffff;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

.brand-concept-text-container p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.brand-concept-img-container {
    flex-shrink: 0;
    width: 160px;
}

.brand-concept-img-container img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    object-fit: cover;
}

.brand-mockups-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.brand-mockup-img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.brand-mockup-img.in-view {
    opacity: 1;
    transform: translateY(0);
}

.brand-carousel-section {
    width: 100%;
    margin-left: -5%;
    width: 110vw;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
    padding: 1.5rem 0;
    background: #0d0d0d;
}

.infinite-carousel {
    display: flex;
    width: fit-content;
    animation: scrollTrack 30s linear infinite;
}

.carousel-track {
    display: flex;
    gap: 2rem;
    padding-right: 2rem;
}

.carousel-track img {
    height: 200px;
    width: auto;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

@keyframes scrollTrack {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.brand-versions-section h3,
.brand-values-section h3 {
    font-size: 1.8rem;
    color: #ffffff;
    text-transform: uppercase;
    margin-bottom: 1.2rem;
    text-align: center;
}

.versions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.values-img-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    grid-column: 1 / -1;
    margin-top: 1rem;
}

.versions-grid img, .values-img-grid img {
    width: 100%;
    border-radius: 12px;
    background: rgba(255,255,255,0.02);
    padding: 0.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.versions-grid img:hover, .values-img-grid img:hover {
    transform: translateY(-5px) scale(1.02);
}

.brand-philosophy-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
    background: rgba(255,255,255,0.02);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
    overflow: hidden;
}

/* Modifiers for levitating spheres inside brand modal */
.brand-spheres-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 0; /* Behind all content */
    overflow: hidden;
}

.brand-sphere {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, #2a2a2a 0%, transparent 70%);
    filter: blur(15px);
    opacity: 0.8;
    animation: levitateUp 15s linear infinite;
    bottom: -20vh;
}

@keyframes levitateUp {
    0% { transform: translateY(0) scale(1); opacity: 0; }
    20% { opacity: 0.8; }
    80% { opacity: 0.8; }
    100% { transform: translateY(-120vh) scale(1.5); opacity: 0; }
}

.b-sphere-1 { width: 300px; height: 300px; left: 5%; animation-duration: 25s; animation-delay: 0s; }
.b-sphere-2 { width: 200px; height: 200px; left: 80%; animation-duration: 20s; animation-delay: 5s; }
.b-sphere-3 { width: 400px; height: 400px; left: 40%; animation-duration: 28s; animation-delay: 10s; }
.b-sphere-4 { width: 150px; height: 150px; left: 20%; animation-duration: 18s; animation-delay: 15s; }
.b-sphere-5 { width: 250px; height: 250px; left: 60%; animation-duration: 22s; animation-delay: 7s; }

.brand-phil-block {
    background: transparent;
    padding: 0;
    border: none;
}

.brand-phil-block h4 {
    font-family: 'Anton', sans-serif;
    font-size: 1.4rem;
    color: #ffffff;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
    letter-spacing: 1px;
}

.brand-phil-block p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .brand-concept-section {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .brand-concept-img-container {
        width: 100px;
    }

    .brand-philosophy-section {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }
    
    .carousel-track img {
        height: 120px;
        margin-right: 10px;
    }

    .versions-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}

/* =========================================
   GESTIÓN DE REDES SOCIALES DETAILS MODAL
========================================= */

.redes-details-modal .modal-content,
.redes-details-modal .brand-details-content {
    background: #161616;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.redes-details-modal .brand-details-content::-webkit-scrollbar {
    display: none;
}

/* Reducir altura del Hero en Redes y remover degradado */
.redes-details-modal .brand-hero {
    height: 50vh;
    min-height: 400px;
}
.redes-details-modal .brand-hero::after {
    background: none !important;
}

/* Ícono Dashboard/Target - convertido a Orbita */
.redes-stat-icon {
    width: 48px;
    height: 48px;
    color: #fff;
    margin-right: 1.5rem;
    animation: spinOrbit 10s linear infinite;
    transform-origin: center;
}

@keyframes spinOrbit {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Grid de 3 Animaciones (4:5) */
.redes-animations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}

.redes-anim-grid-video {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Recuadro de Estadísticas */
.redes-stats-strip {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 3rem 2rem;
    backdrop-filter: blur(10px);
}

.redes-stats-content {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 3rem;
}

.redes-stat-counter-block h4,
.redes-stat-social-block h4 {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: rgba(255,255,255,0.7);
    letter-spacing: 1.5px;
    margin-bottom: 1rem;
    text-align: center;
}

.counter-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.redes-count-text,
.redes-count-plus {
    font-family: var(--font-title);
    font-size: 4.5rem;
    color: #fff;
    line-height: 1;
}

.redes-icon-boxes {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.redes-icon-box {
    width: 65px;
    height: 65px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: floatIcon 3.5s infinite ease-in-out;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.redes-icon-box svg {
    width: 30px;
    height: 30px;
    color: #fff;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

.redes-icon-box:nth-child(2) { animation-delay: 0.4s; }
.redes-icon-box:nth-child(3) { animation-delay: 0.8s; }
.redes-icon-box:nth-child(4) { animation-delay: 1.2s; }

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

.redes-iframe-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    width: 100%;
}

.redes-iframe-grid iframe {
    width: 100%;
    height: 520px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: none;
}

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

@media (max-width: 768px) {
    .redes-iframe-grid {
        grid-template-columns: 1fr;
    }
    .redes-stats-section {
        flex-direction: column;
    }
}

/* =========================================
   ANIMACIÓN DIGITAL MODAL
   ========================================= */

.animacion-side-by-side {
    display: flex;
    gap: 2rem;
    align-items: stretch;
}

.animacion-iframe-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0; /* Prevents overflow issues */
}

.animacion-software-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    backdrop-filter: blur(10px);
}

.animacion-software-box h4 {
    margin: 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
    font-weight: 400;
}

.animacion-icons-flex {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.animacion-icon-wrapper {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: none;
    border: none;
    padding: 0;
}

.animacion-icon-wrapper:hover {
    transform: translateY(-8px) scale(1.1);
}

.animacion-icon-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.6));
}

.animacion-iframe-container {
    width: 100%;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 ratio */
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    background: #000;
}

.animacion-iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.animacion-concepto-box {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.animacion-concepto-box h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.animacion-dual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.animacion-dual-videos-grid {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto; /* Centrado absoluto respecto a la seccion */
}

.video-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.video-card.proceso {
    flex: 0 1 24%;
}

.video-card.renders {
    flex: 0 1 76%;
}

.video-card.proceso video {
    aspect-ratio: 9 / 16;
    height: auto;
    width: 100%;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: block;
}

.video-card.renders video {
    aspect-ratio: 16 / 9;
    height: auto;
    width: 100%;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: block;
}

.photo-card img {
    width: 100%;
    height: auto;
    object-fit: contain; /* Para que no se corten */
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: block;
}

.video-card h4 {
    margin-bottom: 1rem;
    color: #fff;
    text-align: center;
    font-family: var(--font-title);
    letter-spacing: 1px;
}

/* Glass Moodboard Scatter */
.animacion-moodboard-wrapper {
    background: rgba(255, 255, 255, 0.03); /* Fondo glass base */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 1.5rem 2.5rem; /* Menos padding vertical para reducir altura */
    backdrop-filter: blur(15px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

/* Overlay con desvanecimiento radial para evitar el efecto de "marco" en los bordes */
.animacion-moodboard-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    /* Degradado radial que oscurece los bordes y enfoca el centro de la portada */
    background: radial-gradient(circle at center, 
        rgba(20, 20, 20, 0.6) 0%, 
        rgba(20, 20, 20, 0.95) 85%);
    z-index: -1;
}

.animacion-moodboard-grid {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 200px; /* Reducción de altura */
    margin-top: 1.5rem;
    gap: 12px;
    justify-content: center;
    align-items: center;
    position: relative;
}

.moodboard-piece {
    position: relative;
    height: 100%;
    flex: 1 1 25px; /* Más compactas */
    min-width: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    transition: flex 0.7s cubic-bezier(0.25, 1, 0.5, 1), filter 0.5s ease, transform 0.4s ease;
    cursor: default;
    user-select: none;
    filter: brightness(0.4) grayscale(0.7);
    will-change: flex, filter;
}

.moodboard-piece img {
    width: 110%;
    height: 100%;
    object-fit: cover;
    object-position: center 50%;
    display: block;
    pointer-events: none;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.moodboard-piece:hover {
    flex: 0 0 200px; /* Forzado a 1:1 total con la nueva altura de 200px */
    filter: brightness(1.2) grayscale(0);
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0,0,0,1);
    z-index: 10;
}

.moodboard-piece:hover img {
    transform: scale(1.05);
}

/* Lightbox Base */
.lightbox-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-overlay.active img {
    transform: scale(1);
}

.lightbox-overlay img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .animacion-side-by-side { flex-direction: column; }
    .animacion-iframe-container { padding-bottom: 56.25%; } /* Full 16:9 */
    .animacion-dual-videos-grid { flex-direction: column; gap: 2rem; }
    .video-card.proceso video, .video-card.renders video { width: 100%; height: auto; }
    .animacion-dual-grid { grid-template-columns: 1fr; }
    .animacion-moodboard-grid { height: 250px; flex-direction: row; gap: 8px; }
    .moodboard-piece { width: 10%; border-radius: 12px; }
    .moodboard-piece:hover { width: 60%; transform: translateY(-5px); }
}