/* ========================================= */
/* 1. VARIABLES GLOBALES Y RESET BÁSICO      */
/* ========================================= */
:root {
    --primary-red: #cc0000;
    --dark: #121212;
    --light: #f8f9fa;
    --white: #ffffff;
}

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

body { 
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
    color: #333; 
    line-height: 1.6; 
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ========================================= */
/* 2. SISTEMA MULTI-IDIOMA (OCULTACIÓN)      */
/* ========================================= */
.lang-en .es { display: none !important; }
.lang-es .en { display: none !important; }

/* ========================================= */
/* 3. CLASES DE UTILIDAD Y LAYOUT            */
/* ========================================= */
.container { 
    width: 90%; 
    max-width: 1200px; 
    margin: 0 auto; 
}

.section { padding: 80px 0; }
.center-text { text-align: center; }
.bg-light { background: var(--light); }
.mt-2 { margin-top: 20px; }
.mt-4 { margin-top: 40px; }
.mb-4 { margin-bottom: 40px; }
.shadow { box-shadow: 0 10px 40px rgba(0,0,0,0.15); }
.rounded-img { border-radius: 12px; }

.badge { 
    background: var(--primary-red); 
    color: #fff; 
    padding: 5px 15px; 
    border-radius: 20px; 
    font-size: 0.8rem; 
    font-weight: bold; 
    text-transform: uppercase; 
    margin-bottom: 15px; 
    display: inline-block;
    letter-spacing: 1px;
}
.badge-dark { background: var(--dark); }

/* ========================================= */
/* 4. NAVEGACIÓN Y CABECERA                  */
/* ========================================= */
.main-header { 
    background: var(--white); 
    padding: 10px 0; 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
}

.nav-container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.logo { height: 50px; }

.main-nav { 
    display: flex; 
    align-items: center; 
}

.main-nav a { 
    margin-left: 20px; 
    font-weight: 600; 
    color: var(--dark);
    transition: color 0.3s; 
}

.main-nav a:not(.btn):hover { color: var(--primary-red); }

/* Selector de Idiomas */
.lang-switcher { 
    margin-left: 25px; 
    display: flex; 
    border: 1px solid #ddd; 
    border-radius: 4px; 
    overflow: hidden; 
}
.lang-switcher button { 
    padding: 6px 12px; 
    border: none; 
    background: #fff; 
    cursor: pointer; 
    font-size: 12px; 
    font-weight: bold; 
    transition: 0.3s;
}
.lang-switcher button.active { 
    background: var(--dark); 
    color: #fff; 
}

/* ========================================= */
/* 5. BOTONES GLOBALES                       */
/* ========================================= */
.btn { 
    padding: 12px 25px; 
    border-radius: 4px; 
    font-weight: bold; 
    transition: all 0.3s ease; 
    display: inline-block; 
    cursor: pointer; 
    text-align: center; 
}

.btn-primary { 
    background-color: var(--dark) !important; 
    color: #ffffff !important; 
    border: 2px solid var(--dark);
}
.btn-primary:hover { 
    background-color: #333 !important; 
    border-color: #333;
}

.btn-red { 
    background-color: var(--primary-red) !important; 
    color: #ffffff !important; 
    border: 2px solid var(--primary-red);
}
.btn-red:hover { 
    background-color: #a30000 !important;
    border-color: #a30000;
    transform: scale(1.05); 
}

.btn-secondary { 
    border: 2px solid var(--primary-red); 
    color: var(--primary-red) !important; 
    background: transparent;
}
.btn-secondary:hover { 
    background: var(--primary-red) !important; 
    color: #fff !important; 
}

.btn-large { 
    padding: 16px 35px; 
    font-size: 1.1rem; 
}

/* ========================================= */
/* 6. HERO SECTION (Estándar para Home y Pinya)*/
/* ========================================= */
.hero { 
    position: relative; 
    height: 90vh; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    overflow: hidden; 
    color: var(--white); 
    text-align: center; 
}

.video-background { 
    position: absolute; 
    top: 0; left: 0; 
    width: 100%; height: 100%; 
    z-index: -1; 
}
.video-background video, .video-background img { 
    width: 100%; height: 100%; 
    object-fit: cover; 
}

.video-overlay { 
    position: absolute; 
    top: 0; left: 0; 
    width: 100%; height: 100%; 
    background: rgba(0, 0, 0, 0.6); 
}

.hero-content { 
    position: relative; 
    z-index: 2; 
    max-width: 850px; 
    padding: 20px;
}
.hero h1 { 
    font-size: 3.5rem; 
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8); 
    margin-bottom: 20px; 
    line-height: 1.1;
}
.hero p { 
    font-size: 1.4rem; 
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8); 
    max-width: 800px; 
    margin: 0 auto 30px; 
}

/* ========================================= */
/* 7. HERO ANIMADO ORGÁNICO (La Colla)       */
/* ========================================= */
.animation-hero {
    background-color: var(--dark) !important; 
    height: 80vh; 
}
.network-animation-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1;
}
.animation-overlay { 
    background: rgba(0, 0, 0, 0.7); 
    z-index: 2; 
}
.animation-container {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100%; height: auto; max-width: 1200px;
    z-index: 1; 
}
.vna-animation-svg {
    width: 100%; height: auto;
}
.animation-content { z-index: 3; }

/* Estilos de la Red Biológica */
.organic-container {
    opacity: 0.8; 
    filter: drop-shadow(0 0 15px rgba(0,0,0,0.5));
}

/* El "Latido" Biológico de los Nodos */
.node-organic {
    transform-origin: center;
    animation: organicPulse infinite ease-in-out alternate;
}

/* Desincronización de los latidos para que parezca vivo */
.core-node    { animation-duration: 4s; animation-delay: 0s; }
.client-node  { animation-duration: 5.5s; animation-delay: 0.5s; }
.tech-node    { animation-duration: 4.8s; animation-delay: 1.2s; }
.support-node { animation-duration: 6s; animation-delay: 0.8s; }
.sales-node   { animation-duration: 5.2s; animation-delay: 0.3s; }
.mgmt-node    { animation-duration: 7s; animation-delay: 2s; }
.partner-node { animation-duration: 6.5s; animation-delay: 1.5s; }

/* Brillos del Metabolismo Organizacional (Flujos) */
.tangible-data {
    filter: drop-shadow(0 0 6px cyan) drop-shadow(0 0 2px white);
}

.intangible-data {
    filter: drop-shadow(0 0 8px #ff4444) drop-shadow(0 0 4px #ff0000);
}

/* Efecto visual de latido suave (respiración celular) */
@keyframes organicPulse {
    0% {
        transform: scale(0.97);
        filter: brightness(0.9) drop-shadow(0 0 0px transparent);
    }
    100% {
        transform: scale(1.03);
        filter: brightness(1.2) drop-shadow(0 0 10px currentColor);
    }
}

/* ========================================= */
/* 8. LAYOUTS GENERALES Y LISTAS             */
/* ========================================= */
.split-layout { 
    display: flex; align-items: center; gap: 50px; 
}
.split-layout.reverse { flex-direction: row-reverse; }
.content-text { flex: 1; }
.content-media { flex: 1; width: 100%; }

.feature-list { list-style: none; margin: 20px 0; }
.feature-list li { margin-bottom: 12px; padding-left: 25px; position: relative; }
.feature-list li::before { 
    content: '✓'; 
    color: var(--primary-red); 
    position: absolute; left: 0; font-weight: bold; 
}

/* ========================================= */
/* 9. CARRUSEL FENT PINYA                    */
/* ========================================= */
.slideshow-container { 
    position: relative; width: 100%; height: 450px; overflow: hidden; background: #000; 
}
.slide { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    object-fit: cover; opacity: 0; transition: opacity 1s ease-in-out; z-index: 1; 
}
.slide.active { opacity: 1; z-index: 2; }

/* ========================================= */
/* 10. COMPONENTES DE PÁGINA "PINYA.HTML"    */
/* ========================================= */
/* Grid de 10 Valores */
.values-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 30px; }
.value-card { background: #fff; padding: 20px; border-radius: 8px; border-left: 4px solid var(--primary-red); box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.value-card h4 { color: var(--dark); margin-bottom: 10px; }

/* Guión Timeline */
.timeline { max-width: 800px; margin: 40px auto 0; text-align: left; position: relative; padding-left: 30px; border-left: 3px solid var(--primary-red); }
.step { margin-bottom: 30px; position: relative; }
.step::before { content: ''; position: absolute; left: -39px; top: 0; width: 15px; height: 15px; background: var(--white); border: 3px solid var(--primary-red); border-radius: 50%; }
.step h4 { color: var(--primary-red); font-size: 1.2rem; margin-bottom: 5px; }

/* FAQ */
.faq-item { margin-bottom: 20px; text-align: left; background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.faq-item h4 { color: var(--dark); margin-bottom: 8px; }

/* ========================================= */
/* 11. COMPONENTES DE PÁGINA "LACOLLA.HTML"  */
/* ========================================= */
/* Tarjetas de Metodología */
.methodology-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 40px; }
.methodology-card { background: #fff; padding: 30px; border-radius: 8px; border-top: 4px solid var(--primary-red); box-shadow: 0 5px 15px rgba(0,0,0,0.05); text-align: left; }
.methodology-card h3 { color: var(--dark); font-size: 1.3rem; margin-bottom: 15px; display: flex; align-items: center; gap: 10px; }
.number-badge { background: var(--primary-red); color: white; width: 30px; height: 30px; display: flex; justify-content: center; align-items: center; border-radius: 50%; font-weight: bold; font-size: 1rem; }

/* Banner de IA Automations */
.ai-banner { background: linear-gradient(135deg, var(--dark) 0%, #333 100%); color: white; padding: 40px; border-radius: 12px; margin-top: 60px; text-align: left; display: flex; align-items: center; gap: 30px; }
.ai-banner-content { flex: 2; }
.ai-banner h2 { color: white; margin-bottom: 15px; }

/* Destacado IKEA */
.ikea-highlight { background: #f4f6f8; border-left: 4px solid #0051ba; padding: 20px; border-radius: 0 8px 8px 0; margin: 30px 0; text-align: left; }

/* Diagrama Estático SVG (Home y La Colla) */
.vna-advanced { padding: 40px; text-align: center; background: #fff; border: 1px solid #eee; margin-top: 40px; }
.vna-svg { width: 100%; height: auto; max-width: 900px; filter: drop-shadow(0 5px 15px rgba(0,0,0,0.05)); }
.vna-legend { display: flex; justify-content: center; gap: 30px; margin-top: 20px; font-size: 0.9rem; }
.legend-item { display: flex; align-items: center; gap: 10px; }
.line { width: 30px; height: 3px; display: inline-block; }
.line.solid { background: #333; }
.line.dashed { border-top: 3px dashed #cc0000; height: 0; width: 30px; }

/* ========================================= */
/* 12. CLIENTES Y FOOTER                     */
/* ========================================= */
/* Logos Grilla Básica */
.logo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 30px; align-items: center; justify-items: center; margin-top: 40px; }
.client-logo { max-width: 140px; max-height: 70px; filter: grayscale(1); opacity: 0.6; transition: 0.4s; }
.client-logo:hover { filter: grayscale(0); opacity: 1; transform: scale(1.05); }

/* Etiquetas de Clientes Ampliada (Pinya/LaColla) */
.client-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; margin-top: 30px; }
.client-tag { background: #e9ecef; color: #555; padding: 8px 18px; border-radius: 20px; font-size: 0.95rem; font-weight: 600; }

.main-footer { background: var(--dark); color: #fff; padding: 80px 0; }

/* ========================================= */
/* 13. RESPONSIVE DESIGN (MÓVILES Y TABLETS) */
/* ========================================= */
@media (max-width: 992px) {
    .split-layout { flex-direction: column; }
    .ai-banner { flex-direction: column; text-align: center; }
    .ai-banner svg { margin-top: 20px; }
    .vna-legend { flex-direction: column; align-items: center; gap: 10px; }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1.1rem; }
    
    /* En móviles, ocultamos el menú de texto y dejamos solo el selector de idioma y el botón */
    .main-nav a:not(.btn) { display: none; }
    .lang-switcher { margin-left: 0; margin-right: 15px; }
    
    .logo { height: 40px; }
    
    .timeline::before { left: 15px; }
    .timeline { padding-left: 15px; }
    
    .animation-hero { height: 60vh; }
}
