/* 
 * MEGRI DIGITAL INTERNAL V3
 * MEDIA HUB - CONTROLLED RECOVERY
 * Styles scoped strictly to .page-media-hub 
 */

/* 1. HERO */
.page-media-hub .media-hero {
    padding: clamp(64px, 6vw, 104px) 0 clamp(80px, 8vw, 140px) 0;
    background-color: #FFFFFF;
    background-image: 
        radial-gradient(circle at 80% 20%, rgba(28, 83, 240, 0.04) 0%, transparent 45%),
        linear-gradient(rgba(28, 83, 240, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(28, 83, 240, 0.02) 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.page-media-hub .media-hero-grid {
    display: grid;
    grid-template-columns: 50fr 50fr;
    gap: var(--spacing-2xl);
    align-items: center;
}

.page-media-hub .media-hero-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    z-index: 10;
    position: relative;
}

.page-media-hub .media-hero-content .eyebrow {
    color: var(--color-primary, #1C53F0);
}

.page-media-hub .media-hero-content h1 {
    font-size: clamp(38px, 4vw, 62px);
    font-weight: 800;
    line-height: 1.1;
    color: var(--color-violet, #281E5F);
    margin: 0;
    max-width: 14ch;
}

.page-media-hub .media-hero-content .hero-lead {
    font-size: clamp(17px, 1.5vw, 20px);
    line-height: 1.6;
    color: #4A5568;
    max-width: 540px;
    margin: 16px 0 0 0;
}

.page-media-hub .media-hero-actions {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    margin-bottom: 24px;
}

.page-media-hub .media-microcopy {
    font-size: 0.75rem;
    font-weight: 700;
    color: #8C99B8;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-media-hub .media-hero-visual {
    position: relative;
    width: 100%;
    padding-bottom: 85%;
    height: 0;
    display: block;
}

.page-media-hub .mh-vis-main {
    position: absolute;
    width: 62%;
    top: 0;
    right: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(40, 30, 95, 0.08);
    z-index: 1; /* Base layer */
    opacity: 0;
    transform: scale(1.02) translateY(10px);
    animation: media-hero-reveal 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    display: flex;
}

.page-media-hub .mh-vis-sub {
    position: absolute;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 16px 32px rgba(40, 30, 95, 0.12);
    border: 2px solid #FFFFFF;
    opacity: 0;
    display: flex;
}

.page-media-hub .mh-vis-sub-1 { /* Cine */
    width: 60%;
    left: 0;
    top: 32%;
    z-index: 3; /* Front layer */
    transform: translateY(20px) translateX(-10px);
    animation: media-hero-reveal-sub 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.4s forwards;
}

.page-media-hub .mh-vis-sub-2 { /* Aeropuertos */
    width: 52%;
    right: 5%;
    top: 55%;
    z-index: 2; /* Middle layer */
    transform: translateY(20px) translateX(10px);
    animation: media-hero-reveal-sub 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.6s forwards;
}

@keyframes media-hero-reveal {
    to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes media-hero-reveal-sub {
    to { opacity: 1; transform: translateY(0) translateX(0); }
}

.page-media-hub .media-hero-visual img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.page-media-hub .mh-vis-main img { aspect-ratio: 4/3; }
.page-media-hub .mh-vis-sub img { aspect-ratio: 16/9; }

.page-media-hub .mh-label {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(26, 19, 64, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #FFFFFF;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(5px);
    animation: media-label-reveal 0.5s ease forwards;
}

.page-media-hub .mh-vis-main .mh-label { animation-delay: 1.2s; }
.page-media-hub .mh-vis-sub-1 .mh-label { animation-delay: 1.4s; }
.page-media-hub .mh-vis-sub-2 .mh-label { animation-delay: 1.6s; }

@keyframes media-label-reveal {
    to { opacity: 1; transform: translateY(0); }
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .page-media-hub .media-hero-grid {
        grid-template-columns: 1fr;
        gap: 64px;
    }
    .page-media-hub .media-hero-content h1 { max-width: 100%; }
    
    .page-media-hub .mh-vis-main { width: 80%; margin: 0 auto; right: auto; left: 10%; }
    .page-media-hub .mh-vis-sub-1 { left: 0%; top: 38%; width: 65%; }
    .page-media-hub .mh-vis-sub-2 { right: 0%; top: 60%; width: 55%; }
}

@media (max-width: 768px) {
    .page-media-hub .media-hero {
        background-size: 100% 100%, 20px 20px, 20px 20px;
        padding: 80px 0 100px 0;
    }
    .page-media-hub .media-hero-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .page-media-hub .media-hero-grid { gap: 48px; }
    .page-media-hub .mh-vis-main { width: 100%; margin-bottom: 24px; }
    
    /* Stack layout for mobile to avoid tiny broken overlaps */
    .page-media-hub .media-hero-visual {
        display: flex;
        flex-direction: column;
        gap: 16px;
        padding-bottom: 0;
        height: auto;
    }
    
    .page-media-hub .mh-vis-main { 
        position: relative;
        width: 100%; 
        margin-bottom: 8px; 
        top: auto; right: auto; 
    }
    
    .page-media-hub .mh-vis-sub {
        position: relative;
        width: 100%;
        bottom: auto;
        left: auto;
        right: auto;
        top: auto;
        transform: translateY(10px);
        animation: media-hero-reveal-sub-mob 0.8s forwards;
    }

    @keyframes media-hero-reveal-sub-mob {
        to { opacity: 1; transform: translateY(0); }
    }
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
    .page-media-hub .mh-vis-main,
    .page-media-hub .mh-vis-sub-1,
    .page-media-hub .mh-vis-sub-2,
    .page-media-hub .mh-label {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
}

/* 2. ECOSISTEMA CONECTADO */
.page-media-hub .media-ecosystem {
    padding: 80px 0; /* 72-88px standard vertical rhythm desktop */
    background-color: rgba(40, 30, 95, 0.035) !important; /* Tinted neutral lavender derived from Megri Violet */
}

.page-media-hub .media-eco-visual-wrapper {
    position: relative;
    width: 85%;
    max-width: 1000px;
    margin: 40px auto 0;
    border-radius: var(--radius-xl);
    
    /* A. Superficie & D. Capa Interna */
    background: radial-gradient(circle at center, #FFFFFF 0%, rgba(248, 249, 255, 0.8) 100%);
    
    /* B. Borde */
    border: 1px solid rgba(40, 30, 95, 0.08);
    
    /* C. Sombra (amplia, difusa, sin ruido negro) + Inner highlight */
    box-shadow: 
        0 40px 100px -10px rgba(28, 83, 240, 0.04),
        0 16px 40px -8px rgba(40, 30, 95, 0.03),
        inset 0 0 0 1px rgba(255, 255, 255, 0.8);
        
    aspect-ratio: 2.4 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    /* overflow: visible to let the halo breathe, nodes are safely inside */
}

/* E. Ancla Visual (Halo/Backplate sutil para dar cuerpo) */
.page-media-hub .media-eco-visual-wrapper::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,255,255,0.6) 0%, rgba(28, 83, 240, 0.03) 100%);
    z-index: -1;
    opacity: 0.8;
}

.page-media-hub .eco-paths-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.page-media-hub .eco-path-line {
    fill: none;
    stroke: var(--color-primary, #1C53F0);
    stroke-width: 2;
    stroke-dasharray: 4 6;
    opacity: 0.3;
    animation: eco-dash-flow 30s linear infinite;
}

@keyframes eco-dash-flow {
    from { stroke-dashoffset: 200; }
    to { stroke-dashoffset: 0; }
}

.page-media-hub .eco-nodes-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
}

.page-media-hub .eco-node {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0;
    animation: eco-node-reveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes eco-node-reveal {
    from { opacity: 0; transform: translate(-50%, -40%) scale(0.95); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.page-media-hub .eco-node-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary, #1C53F0);
    box-shadow: 0 8px 16px rgba(28, 83, 240, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.page-media-hub .eco-node-icon-wrapper .eco-svg-icon {
    /* size is set inline */
}

.page-media-hub .eco-node:hover .eco-node-icon-wrapper {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(28, 83, 240, 0.15);
    border-color: var(--color-primary, #1C53F0);
}

.page-media-hub .eco-node-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--color-violet, #281E5F);
    text-transform: uppercase;
    text-align: center;
    line-height: 1.2;
}

/* Specific Node Positions (based on Stitch geometry: 200, 500, 800 X coords) */
.page-media-hub .eco-node-left { left: 20%; top: 50%; animation-delay: 0.2s; }
.page-media-hub .eco-node-top { left: 50%; top: 20%; animation-delay: 0.6s; }
.page-media-hub .eco-node-center { left: 50%; top: 50%; animation-delay: 0.4s; }
.page-media-hub .eco-node-bottom { left: 50%; top: 80%; animation-delay: 0.8s; }
.page-media-hub .eco-node-right { left: 80%; top: 50%; animation-delay: 1.0s; }

/* The Core Hub (PLANNING) */
.page-media-hub .eco-node-center .core-hub {
    width: 84px;
    height: 84px;
    background: var(--color-navy, #1A1340);
    border: 2px solid var(--color-primary, #1C53F0);
    color: #FFFFFF;
    position: relative;
}

.page-media-hub .eco-node-center .core-hub .eco-svg-icon-core {
    /* size is set inline */
}

.page-media-hub .core-status-dot {
    position: absolute;
    top: 2px;
    right: 6px;
    width: 12px;
    height: 12px;
    background: var(--color-primary, #1C53F0);
    border-radius: 50%;
    border: 2px solid var(--color-navy, #1A1340);
}

/* Continuidad Outline Hub */
.page-media-hub .eco-node-right .outline-hub {
    background: transparent;
    border: 2px dashed var(--color-primary, #1C53F0);
    box-shadow: none;
}
.page-media-hub .eco-node-right:hover .outline-hub {
    background: rgba(28, 83, 240, 0.05);
}

/* Audience Pulses (CSS animation along motion path not fully supported everywhere without SVGs, 
   so we fake it with absolute positioned dots or rely on SVG animations. 
   Actually, let's use simple CSS transforms to simulate a pulse on the left node 
   and small pulses inside the hub to represent audience data.) */
.page-media-hub .eco-pulse {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--color-primary, #1C53F0);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 10px var(--color-primary, #1C53F0);
    opacity: 0;
}

/* We'll just put a pulsing glow behind the Audience node instead of moving dots 
   to keep it robust and purely CSS without hardcoded coordinates that break on resize */
.page-media-hub .eco-node-left::before {
    content: '';
    position: absolute;
    top: 28px;
    left: 50%;
    width: 56px;
    height: 56px;
    transform: translate(-50%, -50%);
    background: var(--color-primary, #1C53F0);
    border-radius: 50%;
    z-index: -1;
    opacity: 0.2;
    animation: eco-audience-pulse 2s ease-out infinite;
}

@keyframes eco-audience-pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
    100% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
}

/* RESPONSIVE ECOSYSTEM */
@media (max-width: 1024px) {
    .page-media-hub .media-eco-visual-wrapper {
        aspect-ratio: auto;
        padding: 48px 24px;
        height: auto;
        display: block; /* Remove flex to let content flow vertically */
    }
    
    .page-media-hub .eco-paths-svg {
        display: none; /* Hide complex paths on mobile */
    }
    
    .page-media-hub .eco-nodes-container {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 40px; /* var(--spacing-xl) equivalent */
        height: auto;
    }
    
    .page-media-hub .eco-node {
        position: relative;
        transform: none;
        left: auto;
        top: auto;
        opacity: 0;
        animation: eco-node-reveal-mobile 0.6s ease-out forwards;
        width: 100%;
    }

    @keyframes eco-node-reveal-mobile {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    /* Connect nodes with vertical line in mobile */
    .page-media-hub .eco-nodes-container::before {
        content: '';
        position: absolute;
        top: 32px;
        bottom: 64px;
        left: 50%;
        width: 2px;
        background-image: linear-gradient(to bottom, var(--color-primary, #1C53F0) 50%, transparent 50%);
        background-size: 2px 8px;
        transform: translateX(-50%);
        z-index: 1;
        opacity: 0.3;
    }
    
    .page-media-hub .eco-node-icon-wrapper,
    .page-media-hub .eco-node-center .core-hub {
        z-index: 2;
    }
    
    .page-media-hub .eco-node-left::before {
        top: 28px;
    }
    
    /* Reorder for mobile storytelling */
    .page-media-hub .eco-node-top { order: 1; animation-delay: 0.1s; } /* CINE */
    .page-media-hub .eco-node-left { order: 2; animation-delay: 0.2s; } /* PROGRAMMATIC */
    .page-media-hub .eco-node-center { order: 3; margin: 16px 0; animation-delay: 0.3s; } /* PLANNING */
    .page-media-hub .eco-node-bottom { order: 4; animation-delay: 0.4s; } /* AEROPUERTOS */
    .page-media-hub .eco-node-right { order: 5; margin-top: 16px; animation-delay: 0.5s; } /* CONTINUIDAD */
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
    .page-media-hub .eco-path-line {
        animation: none;
        stroke-dasharray: none;
    }
    .page-media-hub .eco-node {
        animation: none;
        opacity: 1;
        transform: translate(-50%, -50%);
    }
    @media (max-width: 768px) {
        .page-media-hub .eco-node {
            transform: none;
        }
    }
    .page-media-hub .eco-node-left::before {
        animation: none;
        opacity: 0.1;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* 3. MEDIA SPLITS (Programmatic, Cine, Aeropuertos) */
.page-media-hub .media-split-section {
    padding: var(--spacing-3xl) 0;
}

.page-media-hub .media-split-grid {
    display: grid;
    grid-template-columns: 45fr 55fr;
    gap: var(--spacing-2xl);
    align-items: center;
}

.page-media-hub .media-split-grid.inverted {
    grid-template-columns: 55fr 45fr;
}

@media (max-width: 1024px) {
    .page-media-hub .media-hero-grid {
        grid-template-columns: 1fr;
        gap: 64px;
    }
    .page-media-hub .media-hero-content h1 { max-width: 100%; }
    
    .page-media-hub .mh-vis-main { width: 80%; margin: 0 auto; right: auto; left: 10%; }
    .page-media-hub .mh-vis-sub-1 { left: 0%; top: 38%; width: 65%; }
    .page-media-hub .mh-vis-sub-2 { right: 0%; top: 60%; width: 55%; }
}

@media (max-width: 768px) {
    .page-media-hub .planning-matrix {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--spacing-lg);
    }
}

.page-media-hub .p-step {
    border-top: 4px solid var(--accent-blue);
    padding-top: var(--spacing-md);
}

.page-media-hub .p-num {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

.page-media-hub .p-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.page-media-hub .p-desc {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 5. FÍSICO + DIGITAL */
.page-media-hub .media-physical-digital {
    padding: var(--spacing-3xl) 0;
    background: #281E5F;
    color: #FFFFFF;
}

.page-media-hub .media-physical-digital .editorial-h2,
.page-media-hub .media-physical-digital .editorial-lead {
    color: #FFFFFF;
}

.page-media-hub .media-physical-digital .eyebrow-text {
    color: rgba(255, 255, 255, 0.7);
}

.page-media-hub .media-physical-digital .eyebrow-line {
    background-color: rgba(255, 255, 255, 0.3);
}

.page-media-hub .pd-flow {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    margin-top: var(--spacing-2xl);
    background: rgba(255, 255, 255, 0.05);
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
}

.page-media-hub .pd-node {
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    text-align: center;
}

.page-media-hub .pd-arrow {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.5rem;
}

@media (max-width: 1024px) {
    .page-media-hub .media-hero-grid {
        grid-template-columns: 1fr;
        gap: 64px;
    }
    .page-media-hub .media-hero-content h1 { max-width: 100%; }
    
    .page-media-hub .mh-vis-main { width: 80%; margin: 0 auto; right: auto; left: 10%; }
    .page-media-hub .mh-vis-sub-1 { left: 0%; top: 38%; width: 65%; }
    .page-media-hub .mh-vis-sub-2 { right: 0%; top: 60%; width: 55%; }
}

@media (max-width: 768px) {
    .page-media-hub .pd-flow {
        flex-direction: column;
        align-items: flex-start;
    }
    .page-media-hub .pd-arrow {
        transform: rotate(90deg);
        margin-left: var(--spacing-sm);
    }
}

/* 6. CTA FINAL */
.page-media-hub .media-final-cta {
    padding: var(--spacing-4xl) 0;
    background: #281E5F;
    width: 100%;
}

.page-media-hub .media-final-cta-grid {
    display: grid;
    grid-template-columns: 60fr 40fr;
}

@media (max-width: 1024px) {
    .page-media-hub .media-hero-grid {
        grid-template-columns: 1fr;
        gap: 64px;
    }
    .page-media-hub .media-hero-content h1 { max-width: 100%; }
    
    .page-media-hub .mh-vis-main { width: 80%; margin: 0 auto; right: auto; left: 10%; }
    .page-media-hub .mh-vis-sub-1 { left: 0%; top: 38%; width: 65%; }
    .page-media-hub .mh-vis-sub-2 { right: 0%; top: 60%; width: 55%; }
}

@media (max-width: 768px) {
    .page-media-hub .media-final-cta-copy {
        padding: var(--spacing-xl) var(--spacing-md);
    }
    .page-media-hub .media-final-cta-visual {
        padding: var(--spacing-xl) var(--spacing-md);
    }
}

@media (max-width: 768px) {
    .page-media-hub .media-ecosystem {
        padding: 56px 0; /* 48-64px standard vertical rhythm mobile */
    }
    .page-media-hub .media-eco-visual-wrapper {
        width: 100%;
        margin-top: 32px;
    }
}


/* ==========================================================================
   3. PROGRAMMATIC SIGNAL LAYER (V3 - CONTROLLED ROLLBACK)
   ========================================================================== */

.section-programmatic {
    background-color: #FFFFFF;
    padding: 88px 0;
}

/* OVERRIDE DEL GRID PARA LA PROPORCIÓN APROBADA */
.media-split-grid.programmatic-layout {
    grid-template-columns: 52fr 48fr;
    gap: 80px;
}

/* --------------------------------------------------------------------------
   VISUAL (IZQUIERDO)
   -------------------------------------------------------------------------- */
.prog-visual-col {
    position: relative;
    width: 100%;
}

.prog-image-hero {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 4.5; /* Crop controlado */
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #1A1340;
    box-shadow: 0 24px 48px -12px rgba(40, 30, 95, 0.15); /* Shadow editorial */
}

.prog-image-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.95;
    transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.prog-image-hero:hover img {
    transform: scale(1.02);
}

/* UNA SOLA MICROINTERFACE - SIGNAL TRACE */
.prog-signal-capture {
    position: absolute;
    bottom: 32px;
    left: 32px;
    width: 180px; /* ~25% of width, small and contained */
    background: rgba(26, 19, 64, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    z-index: 10;
    box-shadow: 0 16px 32px rgba(0,0,0,0.3);
}

.prog-trace-flow {
    display: flex;
    flex-direction: column;
}

.trace-node {
    display: flex;
    align-items: center;
    gap: 12px;
}

.node-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
}

.node-dot.active, .node-dot.pulse {
    background: #4ADE80;
    border-color: #4ADE80;
    box-shadow: 0 0 8px #4ADE80;
}

.node-label {
    font-family: var(--font-mono, "JetBrains Mono", monospace);
    font-size: 9px;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.1em;
}

.trace-path {
    width: 1px;
    height: 16px;
    margin-left: 2px; /* align with center of 6px dot */
    margin-top: 4px;
    margin-bottom: 4px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.path-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-primary-fixed, #dbe1ff);
    transform: translateY(-100%);
}

/* --------------------------------------------------------------------------
   COLUMNA DERECHA (CONTENIDO)
   -------------------------------------------------------------------------- */
.prog-content-col h2 {
    font-family: var(--font-headline);
    font-size: clamp(2rem, 3vw, 2.5rem);
    line-height: 1.2;
    margin-top: 16px;
    margin-bottom: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

.prog-content-col p {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

/* ATRIBUTOS (2x2) */
.prog-attributes {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
}

.prog-attr {
    position: relative;
    padding-top: 12px;
    border-top: 1px solid rgba(40, 30, 95, 0.1);
    display: block !important;
}

.prog-attr-indicator {
    position: absolute;
    top: -1px;
    left: 0;
    width: 24px;
    height: 1px;
    background: var(--color-primary);
    transition: width 0.3s ease;
}

.prog-attr:hover .prog-attr-indicator {
    width: 100%;
}

.prog-attr strong {
    display: block;
    font-family: var(--font-mono, "JetBrains Mono", monospace);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--color-primary);
    margin-bottom: 6px;
}

.prog-attr span {
    display: block;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   MOTION (SOLO DECORATIVO - CONTENIDO ESTATICO)
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
    /* Estado inicial visuales (Contenido no se oculta NUNCA) */
    .prog-image-hero img {
        opacity: 0.2;
        transform: scale(0.98);
        transition: opacity 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    }
    .prog-signal-capture {
        opacity: 0;
        transform: translateY(10px);
        transition: opacity 0.6s ease 0.6s, transform 0.6s ease 0.6s;
    }
    .node-dot {
        background: transparent;
        border-color: rgba(255,255,255,0.3);
        box-shadow: none;
        transition: all 0.3s ease;
    }
    
    /* Estado activado (.is-visible en .section-programmatic) */
    .section-programmatic.is-visible .prog-image-hero img {
        opacity: 0.95;
        transform: scale(1.02);
    }
    .section-programmatic.is-visible .prog-signal-capture {
        opacity: 1;
        transform: translateY(0);
    }

    /* Secuencia Interna del Signal Trace */
    .section-programmatic.is-visible .node-intent .node-dot {
        background: var(--color-primary-fixed, #dbe1ff);
        border-color: var(--color-primary-fixed, #dbe1ff);
        transition-delay: 0.9s;
    }
    .section-programmatic.is-visible .fill-1 {
        animation: traceFill 0.4s ease forwards 1.0s;
    }
    .section-programmatic.is-visible .node-context .node-dot {
        background: var(--color-primary-fixed, #dbe1ff);
        border-color: var(--color-primary-fixed, #dbe1ff);
        transition-delay: 1.4s;
    }
    .section-programmatic.is-visible .fill-2 {
        animation: traceFill 0.4s ease forwards 1.5s;
    }
    .section-programmatic.is-visible .node-activation .node-dot.pulse {
        background: #4ADE80;
        border-color: #4ADE80;
        box-shadow: 0 0 8px #4ADE80;
        transition-delay: 1.9s;
    }
}

@keyframes traceFill {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .section-programmatic { padding: 64px 0; }
    .media-split-grid.programmatic-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .prog-content-col { order: -1; } /* COPY -> VISUAL */
}

@media (max-width: 768px) {
    .section-programmatic { padding: 56px 0; }
    .prog-image-hero { aspect-ratio: 4 / 3; }
    .prog-signal-capture {
        bottom: 16px;
        left: 16px;
        width: 160px;
        padding: 12px 16px;
    }
    .prog-attributes {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* ==========================================================================
   4. CINE (DARK CINEMATIC ANCHOR)
   ========================================================================== */
.section-cine {
    position: relative;
    padding: 88px 0;
    color: #ffffff;
    overflow: hidden;
    /* Neutralize the global violet wash by making the base much darker and less purple */
    background-color: #0A0A0E;
}

/* ATMOSPHERIC BACKGROUND */
.cine-bg-atmospheric {
    position: absolute;
    inset: 0;
    background-image: url('../assets/images/media/media-cinema.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.15; /* Subtle background presence */
    filter: blur(4px);
    transform: scale(1.05); /* Avoid edges due to blur */
    transition: opacity 1.5s ease, transform 2s ease;
}

.cine-bg-overlay {
    position: absolute;
    inset: 0;
    /* Pure black to dark neutral gradient, zero violet */
    background: linear-gradient(to bottom, rgba(5, 5, 5, 0.4) 0%, rgba(10, 10, 15, 0.7) 100%);
    z-index: 1;
}

.cine-container {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

/* HEADER & COPY (STATIC & VISIBLE BY DEFAULT) */
.cine-content-anchor {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.cine-header .eyebrow-text {
    color: var(--color-secondary-fixed, #e3dfff); /* Lavender */
    margin-bottom: 24px;
    display: block;
    font-weight: 500;
}

.cine-header h2 {
    font-family: var(--font-headline);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    line-height: 1.15;
    margin-bottom: 24px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5); /* Boost contrast */
}

.cine-header p {
    font-size: 1.125rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85); /* Slightly brighter */
    max-width: 680px;
    margin: 0 auto;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* PANORAMIC VISUAL (CINEMATIC STAGE) */
.cine-panoramic-visual {
    width: 100%;
    max-width: 1200px; /* limits to ~90% on wide screens */
    margin: 0 auto;
}

.cine-panoramic-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 21 / 9;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 40px 100px rgba(0,0,0,0.5), 0 0 40px rgba(28, 83, 240, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Align content to bottom */
}

.cine-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 1.2s ease;
    z-index: 1;
}

.cine-overlay {
    position: absolute;
    inset: 0;
    /* Neutral black gradient strictly at the bottom */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.5) 25%, transparent 45%);
    pointer-events: none;
    z-index: 2;
}

/* CINEMATIC CONTEXT SIGNALS (ATTRIBUTES) */
.cine-signals-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    position: relative;
    z-index: 3;
    padding: 32px 48px;
    text-align: left;
}

.cine-signal {
    position: relative;
    padding-left: 16px;
    border-left: 1px solid rgba(255,255,255,0.2);
}

.cine-signal strong {
    display: block;
    font-family: var(--font-mono, "JetBrains Mono", monospace);
    font-size: 13px; /* Increased from 11px */
    letter-spacing: 0.08em;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.cine-signal span {
    display: block;
    font-size: 1rem; /* Increased from 0.875rem */
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* Micro-frame marks for cinematic feel */
.frame-mark {
    position: absolute;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(255,255,255,0.25);
    z-index: 4;
    pointer-events: none;
    transition: opacity 1.2s ease;
}
.frame-mark.top-left { top: 24px; left: 24px; border-right: none; border-bottom: none; }
.frame-mark.top-right { top: 24px; right: 24px; border-left: none; border-bottom: none; }
.frame-mark.bottom-left { bottom: 24px; left: 24px; border-right: none; border-top: none; }
.frame-mark.bottom-right { bottom: 24px; right: 24px; border-left: none; border-top: none; }

/* MOTION */
@media (prefers-reduced-motion: no-preference) {
    /* Initial state */
    .cine-bg-atmospheric {
        opacity: 0;
        transform: scale(1);
    }
    .cine-panoramic-wrapper {
        clip-path: inset(4% 2% 4% 2% round 16px);
        transition: clip-path 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .cine-photo {
        transform: scale(1.04);
        opacity: 0;
    }
    .frame-mark {
        opacity: 0;
    }
    /* Note: .cine-signals-grid is STATIC, no opacity:0 */
    
    /* Revealed state */
    .section-cine.is-visible .cine-bg-atmospheric {
        opacity: 0.15;
        transform: scale(1.05);
    }
    .section-cine.is-visible .cine-panoramic-wrapper {
        clip-path: inset(0 0 0 0 round 16px); 
    }
    .section-cine.is-visible .cine-photo {
        transform: scale(1);
        opacity: 1;
    }
    .section-cine.is-visible .frame-mark {
        opacity: 1;
        transition-delay: 0.6s;
    }
    
    /* Hover micro-interaction */
    .cine-panoramic-wrapper:hover .cine-photo {
        transform: scale(1.015);
    }
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .cine-panoramic-wrapper {
        aspect-ratio: 16 / 9;
    }
    .cine-signals-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px 24px;
    }
}

@media (max-width: 768px) {
    .section-cine { padding: 64px 0; }
    .cine-container { gap: 32px; }
    
    .cine-header h2 { font-size: 2.25rem; }
    
    .cine-panoramic-wrapper {
        aspect-ratio: auto;
        display: flex;
        flex-direction: column;
        background: rgba(10, 10, 15, 0.4); /* Slight dark surface for text */
        border: 1px solid rgba(255,255,255,0.05);
    }
    
    .cine-photo {
        position: relative;
        inset: auto;
        height: auto;
        aspect-ratio: 4 / 3;
    }
    
    .cine-overlay {
        display: none; /* Text is now below the image, no overlay needed */
    }
    
    .cine-signals-grid {
        position: relative;
        grid-template-columns: repeat(2, 1fr);
        gap: 32px 24px;
        padding: 32px 24px;
        z-index: 3;
    }
    
    .cine-signal {
        padding-left: 16px;
    }
    
    /* Frame marks limited to image height */
    .frame-mark {
        width: 16px; 
        height: 16px;
    }
    .frame-mark.top-left { top: 16px; left: 16px; }
    .frame-mark.top-right { top: 16px; right: 16px; }
    .frame-mark.bottom-left { top: calc(100vw * 0.75 - 32px - 16px); left: 16px; bottom: auto; }
    .frame-mark.bottom-right { top: calc(100vw * 0.75 - 32px - 16px); right: 16px; bottom: auto; }
}

@media (max-width: 480px) {
    .section-cine { padding: 48px 0; }
    .cine-container { gap: 24px; }
    
    .cine-header .eyebrow-text { margin-bottom: 16px; }
    .cine-header h2 { 
        font-size: 2rem; 
        margin-bottom: 16px; 
    }
    
    .cine-photo {
        aspect-ratio: 1 / 1; /* More vertical presence */
    }
    
    .cine-signals-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px 16px;
        padding: 24px 20px;
    }
    
    .cine-signal strong {
        font-size: 12px;
    }
    
    .cine-signal span {
        font-size: 0.9375rem;
    }
    
    .frame-mark.bottom-left { top: calc(100vw - 32px - 16px); }
    .frame-mark.bottom-right { top: calc(100vw - 32px - 16px); }
}


/* ==========================================================================
   5. AEROPUERTOS (ARCHITECTURAL MEDIA FRAME)
   ========================================================================== */
.section-aeropuertos {
    background-color: var(--color-surface, #f8f9ff);
    padding: 88px 0;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid rgba(0,0,0,0.05); /* Transition to next block */
}

/* Base Layout (Desktop) */
.aero-container {
    max-width: 1320px;
}

.aero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
}

@media (min-width: 1024px) {
    .aero-grid {
        grid-template-columns: 58% 1fr;
        gap: 64px;
        align-items: center; /* or stretch if we want them equal height */
    }
}

/* ARCHITECTURAL VISUAL (LEFT) */
.aero-visual {
    position: relative;
    width: 100%;
}

.aero-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background-color: #e6eeff;
    box-shadow: 0 30px 60px rgba(28, 83, 240, 0.08), 0 4px 12px rgba(0,0,0,0.05);
}

.aero-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%; /* Focus on circulation/architecture */
    z-index: 1;
    position: relative;
    transform: scale(1.05);
}

.aero-frame-shadow {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: inset 0 0 40px rgba(0,0,0,0.15);
    z-index: 3;
    pointer-events: none;
}

/* MOBILITY TRACE (MICRO-VISUAL) */
.mobility-trace {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0; /* Animated in via JS if we had it, or pure CSS */
}

.trace-path {
    stroke-dashoffset: 100;
}

/* EDITORIAL COPY (RIGHT) */
.aero-content {
    display: flex;
    flex-direction: column;
}

.aero-content .eyebrow {
    margin-bottom: 24px;
}

.aero-content .eyebrow-text {
    color: var(--color-primary, #1c53f0);
    font-weight: 600;
}

.aero-content .eyebrow-line {
    background-color: var(--color-primary, #1c53f0);
    opacity: 0.3;
}

.section-aeropuertos h2 {
    font-family: var(--font-headline);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
    margin-bottom: 24px;
    font-weight: 700;
    color: var(--color-navy, #1A1340);
    letter-spacing: -0.02em;
}

.aero-lead {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--color-on-surface-variant, #434655);
    margin-bottom: 40px;
    max-width: 90%;
}

/* CONTEXT SIGNALS (ATTRIBUTES) */
.aero-signals-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 24px;
}

.aero-signal {
    position: relative;
    padding-left: 16px;
    border-left: 2px solid var(--color-primary-fixed-dim, #b4c5ff);
}

.aero-signal strong {
    display: block;
    font-family: var(--font-mono, "JetBrains Mono", monospace);
    font-size: 12px;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: var(--color-primary, #1c53f0);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.aero-signal span {
    display: block;
    font-size: 0.9375rem;
    line-height: 1.4;
    color: var(--color-navy, #1A1340);
    opacity: 0.85;
}

/* MOTION */
@media (prefers-reduced-motion: no-preference) {
    /* 1. Image Architectural Reveal */
    .section-aeropuertos.is-visible .aero-photo {
        animation: aeroReveal 1.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
    
    @keyframes aeroReveal {
        0% {
            clip-path: inset(0 100% 0 0);
            transform: scale(1.05) translateX(-8px);
        }
        100% {
            clip-path: inset(0 0 0 0);
            transform: scale(1) translateX(0);
        }
    }

    /* 2. Mobility Trace */
    .section-aeropuertos.is-visible .mobility-trace {
        opacity: 1;
        transition: opacity 1s ease 1s;
    }
    
    .section-aeropuertos.is-visible .trace-path {
        animation: drawTrace 3s linear forwards 1.2s;
    }
    
    @keyframes drawTrace {
        to { stroke-dashoffset: 0; }
    }
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .aero-image-wrapper {
        aspect-ratio: 16 / 9;
    }
    .aero-lead {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .section-aeropuertos {
        padding: 64px 0;
    }
    .aero-grid {
        gap: 40px;
    }
}

@media (max-width: 480px) {
    .section-aeropuertos {
        padding: 56px 0;
    }
    /* Mobile flow: Image -> Copy -> Attributes (achieved by DOM order and grid gap) */
    .aero-grid {
        gap: 32px;
    }
    
    .aero-image-wrapper {
        aspect-ratio: 4 / 3; /* More vertical for mobile */
    }
    
    .section-aeropuertos h2 {
        font-size: 2.25rem;
    }
    
    .aero-signals-grid {
        gap: 24px 16px;
    }
    
    .aero-signal {
        padding-left: 12px;
        border-width: 1.5px;
    }
    
    .aero-signal strong {
        font-size: 11px;
    }
    
    .aero-signal span {
        font-size: 0.875rem;
    }
}


/* ==========================================================================
   6. MEDIA PLANNING DECISION SYSTEM (STATIC)
   ========================================================================== */
.section-planning {
    background-color: var(--color-surface-bright, #ffffff);
    padding: 88px 0;
    overflow: hidden;
    position: relative;
    border-top: 1px solid rgba(0,0,0,0.03);
}

.planning-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 48px auto;
}

.planning-header .eyebrow {
    justify-content: center;
    margin-bottom: 24px;
}

.planning-header .eyebrow-text {
    color: var(--color-primary, #1c53f0);
}

.planning-header .eyebrow-line {
    background-color: var(--color-primary, #1c53f0);
    opacity: 0.3;
}

.section-planning h2 {
    font-family: var(--font-headline);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
    margin-bottom: 20px;
    font-weight: 700;
    color: var(--color-navy, #1A1340);
    letter-spacing: -0.02em;
}

.planning-lead {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--color-on-surface-variant, #434655);
}

/* DECISION FIELD PANEL */
.planning-field-panel {
    background-color: #ffffff;
    background-image: 
        linear-gradient(rgba(28, 83, 240, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(28, 83, 240, 0.03) 1px, transparent 1px);
    background-size: 24px 24px;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: var(--radius-xl);
    padding: 64px 48px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.03);
}

/* LAYOUT */
.planning-field-layout {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    position: relative;
    z-index: 2;
}

.planning-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 320px;
    position: relative;
    z-index: 3;
}

/* MICRO-MODULES */
.planning-module {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    cursor: default;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    /* STATIC - EVERYTHING VISIBLE */
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
}

.p-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary, #1c53f0);
}

.p-icon svg {
    width: 24px;
    height: 24px;
}

.p-content strong {
    display: block;
    font-family: var(--font-mono, "JetBrains Mono", monospace);
    font-size: 11px;
    letter-spacing: 0.1em;
    font-weight: 600;
    color: var(--color-navy, #1A1340);
    margin-bottom: 6px;
    margin-top: 2px;
}

.p-content span {
    display: block;
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--color-on-surface-variant, #434655);
}

/* CORE: ORCHESTRATION */
.planning-core-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.core-rails {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.rail-path {
    fill: none;
    stroke: rgba(28, 83, 240, 0.15);
    stroke-width: 1.5;
    stroke-dasharray: 4 4;
}

.planning-core {
    position: relative;
    z-index: 3;
    width: 140px;
    height: 140px;
    /* STATIC VISIBLE */
    opacity: 1 !important;
    visibility: visible !important;
}

.core-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--color-primary, #1c53f0);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 10px 30px rgba(28, 83, 240, 0.3);
    position: relative;
    z-index: 2;
}

.core-inner span {
    font-family: var(--font-mono, "JetBrains Mono", monospace);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    line-height: 1.3;
}

.core-rings {
    position: absolute;
    inset: -20px;
    z-index: 1;
    pointer-events: none;
}

.ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(28, 83, 240, 0.2);
}

.ring.r2 {
    inset: -20px;
    border: 1px dashed rgba(28, 83, 240, 0.15);
}

/* FEEDBACK LOOP */
.planning-feedback-loop {
    position: absolute;
    bottom: 24px;
    left: 48px;
    right: 48px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(28, 83, 240, 0.1) 20%, rgba(28, 83, 240, 0.1) 80%, transparent);
    z-index: 1;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .planning-field-panel {
        padding: 48px 32px;
    }
    .planning-col {
        width: 280px;
    }
}

@media (max-width: 768px) {
    .section-planning { padding: 64px 0; }
    .planning-header { margin-bottom: 40px; }
    
    .planning-field-layout {
        flex-direction: column;
        align-items: stretch;
        gap: 40px;
    }
    
    .planning-col {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    
    .planning-core-wrapper {
        padding: 24px 0;
    }
    
    .core-rails {
        display: none;
    }
    
    .planning-core-wrapper::before {
        content: '';
        position: absolute;
        top: -20px;
        bottom: -20px;
        left: 50%;
        width: 1px;
        background: linear-gradient(to bottom, transparent, rgba(28, 83, 240, 0.2), transparent);
        z-index: 1;
    }
}

@media (max-width: 480px) {
    .section-planning { padding: 56px 0; }
    .planning-field-panel {
        padding: 32px 20px;
    }
    
    .section-planning h2 {
        font-size: 2rem;
    }
    
    .planning-col {
        grid-template-columns: 1fr 1fr;
    }
    
    .col-inputs .planning-module:nth-child(3) {
        grid-column: span 2;
    }
    
    .col-outputs .planning-module:nth-child(1) {
        grid-column: span 2;
    }
    
    .planning-module {
        flex-direction: row;
        padding: 16px;
        gap: 12px;
    }
    
    .col-inputs .planning-module:not(:nth-child(3)),
    .col-outputs .planning-module:not(:nth-child(1)) {
        flex-direction: column; 
        align-items: center;
        text-align: center;
    }
    
    .col-inputs .planning-module:not(:nth-child(3)) .p-content span,
    .col-outputs .planning-module:not(:nth-child(1)) .p-content span {
        font-size: 0.8125rem;
    }
    
    .planning-core {
        width: 120px;
        height: 120px;
    }
    
    .core-rings {
        inset: -12px;
    }
    .ring.r2 {
        inset: -12px;
    }
}


/* ==========================================================================
   7. IMPACTO FÍSICO A CONTINUIDAD DIGITAL (STAGE B - MOTION)
   ========================================================================== */
.section-continuity {
    background-color: var(--color-navy, #1A1340);
    padding: 88px 0 112px 0; /* Extra bottom padding for explicit separation */
    overflow: visible; /* Prevent clipping issues */
    position: relative;
    color: #ffffff;
    z-index: 10;
}

.continuity-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 48px auto;
}

.continuity-header .eyebrow-text {
    color: var(--color-primary-fixed-dim, #b4c5ff);
    letter-spacing: 0.1em;
}

.continuity-header .eyebrow-line {
    background-color: var(--color-primary-fixed-dim, #b4c5ff);
    opacity: 0.5;
}

.continuity-h2 {
    font-family: var(--font-headline);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
    margin-bottom: 20px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.continuity-lead {
    font-size: 1.125rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.82); /* slightly better contrast */
}

/* SYSTEM PANEL */
.continuity-system-panel {
    background-color: #281E5F;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    padding: 64px 48px;
    position: relative;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.25), 0 20px 60px rgba(0,0,0,0.15);
}

/* RAIL */
.continuity-rail {
    position: absolute;
    top: 50%;
    left: 80px;
    right: 80px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-50%);
    z-index: 1;
}

.continuity-signal {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--color-primary, #1c53f0);
    box-shadow: 0 0 12px rgba(28, 83, 240, 0.8), 0 0 4px rgba(255, 255, 255, 0.5);
    opacity: 0;
}

/* STAGES */
.continuity-stages {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.c-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 120px;
    cursor: default;
}

.c-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #1A1340;
    border: 1px solid rgba(255, 255, 255, 0.25); /* Stronger contrast */
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.85); /* Stronger contrast */
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s ease, color 0.3s ease;
}

.c-icon svg {
    width: 24px;
    height: 24px;
}

.c-label {
    font-family: var(--font-mono, "JetBrains Mono", monospace);
    font-size: 11px;
    letter-spacing: 0.1em;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    transition: color 0.3s ease;
}

/* ENDPOINTS (PHYSICAL & DIGITAL) */
.c-stage-physical .c-icon,
.c-stage-digital .c-icon {
    width: 64px;
    height: 64px;
    background: var(--color-primary, #1c53f0);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(28, 83, 240, 0.4);
}

.c-stage-physical .c-label,
.c-stage-digital .c-label {
    color: #ffffff;
}

/* HOVER STATES */
.c-stage:hover .c-icon {
    transform: scale(1.08);
    border-color: rgba(255, 255, 255, 0.6);
    color: #ffffff;
}
.c-stage:hover .c-label {
    color: #ffffff;
}

/* MOTION CLASSES */
@media (prefers-reduced-motion: no-preference) {
    .section-continuity.is-active .continuity-signal {
        animation: signalTravel 2.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }
    
    .section-continuity.is-active .c-stage:nth-child(1) .c-icon {
        animation: nodePulse 0.4s ease forwards 0s;
    }
    .section-continuity.is-active .c-stage:nth-child(2) .c-icon {
        animation: nodePulse 0.4s ease forwards 0.48s;
    }
    .section-continuity.is-active .c-stage:nth-child(3) .c-icon {
        animation: nodePulse 0.4s ease forwards 0.96s;
    }
    .section-continuity.is-active .c-stage:nth-child(4) .c-icon {
        animation: nodePulse 0.4s ease forwards 1.44s;
    }
    .section-continuity.is-active .c-stage:nth-child(5) .c-icon {
        animation: nodePulse 0.4s ease forwards 1.92s;
    }
    .section-continuity.is-active .c-stage:nth-child(6) .c-icon {
        animation: finalPulse 0.6s ease forwards 2.4s;
    }
    
    @keyframes signalTravel {
        0% { width: 0%; opacity: 0; }
        5% { opacity: 1; }
        100% { width: 100%; opacity: 1; }
    }
    
    @keyframes nodePulse {
        0% { transform: scale(1); border-color: rgba(255,255,255,0.25); color: rgba(255,255,255,0.85); }
        50% { transform: scale(1.08); border-color: rgba(28,83,240,0.9); color: #ffffff; box-shadow: 0 0 16px rgba(28, 83, 240, 0.6); }
        100% { transform: scale(1); border-color: rgba(28,83,240,0.6); color: #ffffff; }
    }
    
    @keyframes finalPulse {
        0% { transform: scale(1); box-shadow: 0 0 20px rgba(28, 83, 240, 0.4); }
        50% { transform: scale(1.12); box-shadow: 0 0 40px rgba(28, 83, 240, 0.9); border-color: #ffffff; }
        100% { transform: scale(1); box-shadow: 0 0 20px rgba(28, 83, 240, 0.6); border-color: rgba(255, 255, 255, 0.3); }
    }
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .continuity-system-panel {
        padding: 48px 32px;
    }
    .continuity-rail {
        left: 48px;
        right: 48px;
    }
}

@media (max-width: 768px) {
    .section-continuity { padding: 64px 0 88px 0; }
    
    .continuity-system-panel {
        padding: 48px 24px;
    }
    
    .continuity-stages {
        flex-direction: column;
        gap: 40px;
        align-items: stretch;
    }
    
    .continuity-rail {
        top: 48px;
        bottom: 48px;
        left: 50%;
        width: 2px;
        height: auto;
        transform: translateX(-50%);
    }
    
    .continuity-signal {
        width: 100%;
        height: 0%;
    }
    
    @media (prefers-reduced-motion: no-preference) {
        @keyframes signalTravel {
            0% { height: 0%; opacity: 0; }
            5% { opacity: 1; }
            100% { height: 100%; opacity: 1; }
        }
    }
    
    .c-stage {
        width: 100%;
        flex-direction: row;
        justify-content: center;
        gap: 24px;
    }
    
    .c-stage:nth-child(even) {
        flex-direction: row-reverse;
    }
    
    .c-label {
        width: 140px;
        text-align: left;
    }
    
    .c-stage:nth-child(even) .c-label {
        text-align: right;
    }
}

@media (max-width: 480px) {
    .section-continuity { padding: 56px 0 80px 0; }
    .continuity-system-panel {
        padding: 32px 16px;
    }
    
    .continuity-h2 {
        font-size: 2rem;
    }
    
    .continuity-stages {
        align-items: center; 
        gap: 40px;
    }
    
    .c-stage {
        width: auto;
        position: relative;
        justify-content: center;
        padding: 0;
        gap: 0;
    }
    
    .c-stage:nth-child(even) {
        flex-direction: row;
    }
    
    .c-label {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 110px;
    }
    
    .c-stage:nth-child(odd) .c-label {
        left: calc(100% + 16px);
        text-align: left;
    }
    
    .c-stage:nth-child(even) .c-label {
        right: calc(100% + 16px);
        left: auto;
        text-align: right;
    }
    
    .c-stage-physical .c-label {
        left: calc(100% + 24px); 
    }
    
    .c-stage-digital .c-label {
        right: calc(100% + 24px); 
        left: auto;
    }
}

/* PREFERS REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
    .continuity-signal {
        width: 100%;
        opacity: 1;
    }
    @media (max-width: 768px) {
        .continuity-signal {
            height: 100%;
            width: 100%;
        }
    }
}


/* ==========================================================================
   8. CTA FINAL (MED-08)
   ========================================================================== */
.section-media-cta {
    background-color: #F8F9FF; /* OFF-WHITE NEUTRAL */
    padding: 88px 0;
    position: relative;
    z-index: 10;
}

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

.cta-grid {
    display: grid;
    grid-template-columns: 55% 45%;
    gap: 64px;
    align-items: center;
}

.cta-copy {
    display: flex;
    flex-direction: column;
}

.cta-copy .eyebrow {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.cta-copy .eyebrow-line {
    width: 32px;
    height: 1px;
    background-color: #1C53F0;
}

.cta-copy .eyebrow-text {
    font-family: var(--font-mono, "JetBrains Mono", monospace);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #1A1340;
}

.cta-h2 {
    font-family: var(--font-headline);
    font-size: clamp(2rem, 3.5vw, 2.5rem);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #1A1340;
    margin-bottom: 24px;
    max-width: 95%;
}

.cta-p {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #434655;
    margin-bottom: 32px;
    max-width: 85%;
}

.cta-actions {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.cta-actions .btn-primary {
    background-color: #1C53F0;
    color: #ffffff;
    font-family: var(--font-headline);
    font-size: 1rem;
    font-weight: 600;
    padding: 16px 32px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.cta-actions .btn-primary:hover,
.cta-actions .btn-primary:focus-visible {
    background-color: #1541c4;
    outline: none;
}
.cta-actions .btn-primary:focus-visible {
    box-shadow: 0 0 0 4px rgba(28, 83, 240, 0.4);
}

.cta-actions .btn-secondary {
    color: #1A1340;
    font-family: var(--font-headline);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    position: relative;
    padding: 16px 0;
    transition: color 0.3s ease;
}

.cta-actions .btn-secondary::after {
    content: '';
    position: absolute;
    bottom: 12px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #1A1340;
    transition: transform 0.3s ease;
    transform-origin: left;
}

.cta-actions .btn-secondary:hover {
    color: #1C53F0;
}
.cta-actions .btn-secondary:hover::after {
    background-color: #1C53F0;
    transform: scaleX(1);
}

.cta-actions .btn-secondary:focus-visible {
    outline: none;
    color: #1C53F0;
}
.cta-actions .btn-secondary:focus-visible::after {
    background-color: #1C53F0;
    box-shadow: 0 4px 0 rgba(28, 83, 240, 0.4);
}

/* Microvisual */
.cta-visual-wrapper {
    background-color: #ffffff;
    border: 1px solid rgba(40, 30, 95, 0.08);
    border-radius: var(--radius-xl, 12px);
    padding: 48px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cta-microvisual {
    width: 100%;
    max-width: 320px;
    position: relative;
}

.cta-svg {
    width: 100%;
    height: auto;
    display: block;
}

.cta-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    padding: 0 10px;
}

.cta-labels span {
    font-family: var(--font-mono, "JetBrains Mono", monospace);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: rgba(40, 30, 95, 0.5);
}

.cta-labels .action-label {
    color: #1C53F0;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .cta-grid {
        grid-template-columns: 50% 50%;
        gap: 40px;
    }
    .cta-container {
        padding: 0 32px;
    }
}

@media (max-width: 768px) {
    .section-media-cta {
        padding: 64px 0;
    }
    
    .cta-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .cta-container {
        padding: 0 24px;
    }
    
    .cta-h2 {
        max-width: 100%;
        font-size: 2.25rem;
    }
    
    .cta-p {
        max-width: 100%;
    }
    
    .cta-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cta-actions .btn-primary {
        text-align: center;
        width: 100%;
    }
    
    .cta-actions .btn-secondary {
        text-align: center;
        width: 100%;
    }
    
    .cta-actions .btn-secondary::after {
        width: auto;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .cta-visual-wrapper {
        padding: 40px 24px;
    }
}

@media (max-width: 480px) {
    .section-media-cta {
        padding: 56px 0;
    }
    .cta-container {
        padding: 0 16px;
    }
    
    .cta-h2 {
        font-size: 2rem;
    }
}
