/* ==========================================================================
   VIAFOLIO CONSULTORÍA GLOBAL - HOJA DE ESTILOS EJECUTIVA Y MODERNA (site.css)
   ========================================================================== */

:root {
    --bg-primary: #0A0D14;
    --bg-surface: #121824;
    --bg-card: rgba(18, 24, 36, 0.75);
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --accent-coral: #FE3A4A;
    --accent-coral-hover: #E02837;
    --accent-gold: #FEC501;
    --border-color: rgba(254, 197, 1, 0.15);
    --border-hover: rgba(254, 58, 74, 0.4);
    --shadow-executive: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --disclaimer-bg: #2B0D12;
    --disclaimer-border: #FE3A4A;
    --disclaimer-text: #FFD8DC;
    --font-primary: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --header-height: 90px;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: var(--font-primary);
    line-height: 1.8;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ==========================================================================
   LOADER INICIAL (Solo Index)
   ========================================================================== */
#initialLoader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-circle {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(254, 197, 1, 0.1);
    border-top: 4px solid var(--accent-gold);
    border-radius: 50%;
    animation: spinLoader 0.8s linear infinite;
}

@keyframes spinLoader {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   AVISO LEGAL Y HEADER
   ========================================================================== */
.private-disclaimer-banner {
    background-color: var(--disclaimer-bg);
    border-bottom: 2px solid var(--disclaimer-border);
    color: var(--disclaimer-text);
    padding: 12px 20px;
    font-size: 0.85rem;
    text-align: center;
    position: relative;
    z-index: 1000;
    letter-spacing: 0.3px;
}

.private-disclaimer-banner strong {
    color: var(--accent-coral);
    text-transform: uppercase;
}

.site-header-structural {
    background-color: rgba(10, 13, 20, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 900;
    display: flex;
    align-items: center;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-box h1 {
    font-size: 1.65rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--text-main);
    text-transform: uppercase;
}

.brand-subtitle {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent-gold);
    font-weight: 700;
}

/* Animaciones de lista escalonada para Navbar */
.structural-nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
}

.structural-nav li {
    opacity: 0;
    transform: translateY(-15px);
    animation: navStaggerEntrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.structural-nav li:nth-child(1) { animation-delay: 0.1s; }
.structural-nav li:nth-child(2) { animation-delay: 0.2s; }
.structural-nav li:nth-child(3) { animation-delay: 0.3s; }
.structural-nav li:nth-child(4) { animation-delay: 0.4s; }
.structural-nav li:nth-child(5) { animation-delay: 0.5s; }

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

.structural-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    transition: var(--transition-smooth);
    padding: 8px 14px;
    border-radius: 4px;
}

.structural-nav a:hover, .structural-nav a.active {
    color: var(--accent-gold);
    background-color: rgba(254, 197, 1, 0.06);
}

/* ==========================================================================
   BOTONES E INTERACTIVIDAD CON CLIC COMPARTIDO
   ========================================================================== */
.cta-header-btn, .btn-primary, .btn-secondary {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition-smooth);
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
}

.cta-header-btn, .btn-primary {
    background: linear-gradient(135deg, var(--accent-coral), #D92B3A);
    color: #FFFFFF;
    padding: 14px 28px;
    box-shadow: 0 4px 20px rgba(254, 58, 74, 0.35);
}

.cta-header-btn:hover, .btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-coral-hover), #B51E2B);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(254, 58, 74, 0.5);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    border: 2px solid var(--accent-gold);
    padding: 12px 26px;
}

.btn-secondary:hover {
    background-color: rgba(254, 197, 1, 0.08);
    color: var(--accent-gold);
    transform: translateY(-2px);
}

/* Patrón de alternancia compartido para retroalimentación por clic */
.btn-clicked-alt-1 {
    animation: clickFeedbackPulse 0.3s ease;
}

.btn-clicked-alt-2 {
    animation: clickFeedbackBounce 0.3s ease;
}

@keyframes clickFeedbackPulse {
    0% { transform: scale(1); }
    50% { transform: scale(0.94); filter: brightness(1.2); }
    100% { transform: scale(1); }
}

@keyframes clickFeedbackBounce {
    0% { transform: translateY(0); }
    50% { transform: translateY(3px) scale(0.97); }
    100% { transform: translateY(0); }
}

/* ==========================================================================
   EFECTO DE TEXTO ANIMADO EN TÍTULOS
   ========================================================================== */
.glitch-text-animated {
    font-size: 3.4rem;
    font-weight: 900;
    line-height: 1.15;
    color: var(--text-main);
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
    animation: titleColorShift 6s ease-in-out infinite;
}

@keyframes titleColorShift {
    0%, 100% { color: var(--text-main); }
    50% { color: var(--accent-gold); text-shadow: 0 0 25px rgba(254, 197, 1, 0.4); }
}

/* ==========================================================================
   DISEÑO ASIMÉTRICO Y FLUIDO (Evitando cajas cuadradas rígidas)
   ========================================================================== */
.main-content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px;
}

/* Sección Hero Asimétrica */
.hero-asymmetric {
    padding: 80px 0 120px 0;
    position: relative;
}

.hero-layout-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 60px;
    align-items: center;
}

.hero-text-side {
    position: relative;
    z-index: 2;
}

.eyebrow-tag {
    display: inline-block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--accent-gold);
    font-weight: 800;
    margin-bottom: 20px;
}

.lead-text {
    font-size: 1.12rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

/* Composición de imágenes asimétricas flotantes */
.hero-visual-side {
    position: relative;
    height: 520px;
}

.floating-img-card-1 {
    position: absolute;
    top: 0;
    right: 0;
    width: 340px;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-executive);
    border: 1px solid var(--border-color);
    transform: rotate(3deg);
    transition: var(--transition-smooth);
}

.floating-img-card-2 {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 260px;
    height: 280px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-executive);
    border: 1px solid var(--border-color);
    transform: rotate(-4deg);
    transition: var(--transition-smooth);
}

.floating-img-card-1 img, .floating-img-card-2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-visual-side:hover .floating-img-card-1 {
    transform: rotate(0deg) translateY(-10px);
}

.hero-visual-side:hover .floating-img-card-2 {
    transform: rotate(0deg) translateY(10px);
}

/* ==========================================================================
   BRILLO DE MOSAICO GLASSMORPHIC CON HOVER EFECTOS
   ========================================================================== */
.glassmorphic-mosaic-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 80px 0;
}

.mosaic-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px 30px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-glass);
    transition: var(--transition-smooth);
}

/* Efecto de Brillo (Gleam/Shimmer) al pasar el cursor */
.mosaic-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 45%,
        rgba(254, 197, 1, 0.12) 50%,
        transparent 55%
    );
    transform: rotate(25deg) translateY(-100%);
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.mosaic-card:hover::before {
    transform: rotate(25deg) translateY(100%);
}

.mosaic-card:hover {
    border-color: var(--accent-coral);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(254, 58, 74, 0.15);
}

.mosaic-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.mosaic-card h4 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--text-main);
}

.mosaic-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ==========================================================================
   SECCIONES ADICIONALES (Densidad Masiva y Alta Informacion)
   ========================================================================== */
.executive-split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 90px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.executive-split-section.reverse {
    direction: rtl;
}

.executive-split-section.reverse > * {
    direction: ltr;
}

.split-img-box {
    border-radius: 16px;
    overflow: hidden;
    height: 420px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-executive);
    position: relative;
}

.split-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.split-img-box:hover img {
    transform: scale(1.05);
}

.split-text-box h3 {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 20px;
    color: var(--text-main);
    line-height: 1.2;
}

.split-text-box h3 span {
    color: var(--accent-gold);
}

.split-text-box p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 1.05rem;
}

/* Sección de Métricas Analíticas de Alta Densidad */
.metrics-banner-section {
    background: linear-gradient(135deg, var(--bg-surface), #0F1522);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 60px 40px;
    margin: 80px 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.metric-item h4 {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--accent-coral);
    margin-bottom: 10px;
}

.metric-item p {
    color: var(--text-muted);
    font-size: 0.95text;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Footer Ejecutivo */
.site-main-footer {
    padding: 80px 0 40px 0;
    background-color: #07090F;
    border-top: 1px solid var(--border-color);
    margin-top: 80px;
}

.footer-grid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    margin-bottom: 50px;
}

.footer-col h5 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    color: var(--text-main);
    font-weight: 800;
}

.footer-col p, .footer-col li a {
    color: var(--text-muted);
    font-size: 0.95rem;
    text-decoration: none;
}

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

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

.footer-col li a:hover {
    color: var(--accent-gold);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 40px 0 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media(max-width: 1024px) {
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 20px;
    }
    .structural-nav ul {
        flex-direction: column;
        gap: 15px;
        margin: 20px 0;
        text-align: center;
    }
    .hero-layout-grid, .glassmorphic-mosaic-grid, .executive-split-section, .metrics-banner-section, .footer-grid {
        grid-template-columns: 1fr;
    }
    .hero-visual-side {
        height: 380px;
    }
}