/* ================= CONFIGURACIÓN GENERAL ================= */
:root {
    --bg-light: #fbfbfd; 
    --bg-off-white: #ffffff;
    --text-dark: #222222;
    --text-grey: #666666;
    --ring-color: rgba(0, 0, 0, 0.04); 
    --accent-orange: #FF3C00;
    --modal-overlay: rgba(0, 0, 0, 0.6);
    
    /* Tipografías */
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Titillium Web', sans-serif;
}

body.light-theme {
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-family: var(--font-primary);
}

/* --- EFECTO DE SELECCIÓN DE TEXTO (PREMIUM) --- */
::selection {
    background: var(--accent-orange);
    color: #ffffff;
    text-shadow: none;
}

/* ================= TIPOGRAFÍA TÍTULOS ================= */
h1, h2, h3, .page-title, .hub-brand, .modal-title, .pill-badge {
    font-family: var(--font-heading);
}

/* ================= LAYOUT GENERAL ================= */
.alliances-wrapper {
    background-color: var(--bg-light);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ================= HERO SECTION (DARK TECH ELEGANCE) ================= */
.page-intro {
    position: relative;
    /* GRIS OSCURO PROFUNDO / CARBONO */
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #fff;
    padding-top: 180px; 
    padding-bottom: 160px;
    text-align: left; 
    margin-bottom: 0;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
    -webkit-clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}

.pill-badge.glass-effect {
    display: inline-flex;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: rgba(255, 255, 255, 0.1); 
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    margin-bottom: 30px;
    backdrop-filter: blur(5px);
}
.pill-badge.glass-effect::before {
    content: "▪"; 
    margin-right: 10px;
    color: var(--accent-orange); 
}

.page-title {
    font-size: 4rem; 
    font-weight: 300; 
    line-height: 1.1;
    margin-bottom: 20px;
    color: #fff;
}

.word-up {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px);
    filter: blur(10px);
    animation: revealWord 0.8s cubic-bezier(0.2, 1, 0.3, 1) forwards;
    animation-delay: var(--d);
    margin-right: 0.2em; 
}

.page-title .highlight-text .word-up {
    font-weight: 700;
    color: #fff;
}

.page-desc {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    max-width: 600px;
    margin-top: 30px;
    font-family: var(--font-primary);
}


/* ##################################################################
   ECOSISTEMA RADIAL
   ################################################################## */

.network-section {
    position: relative;
    padding: 80px 0 80px 0; 
    background-color: var(--bg-light);
}

.ecosystem-graph-container {
    position: relative;
    width: 100%;
    height: 750px; 
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 100px;
    perspective: 1000px; 
}

/* --- Anillos de Fondo --- */
.bg-rings {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
}

.orbit-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid var(--ring-color);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}

.ring-1 { width: 350px; height: 350px; }
.ring-2 { width: 600px; height: 600px; border-width: 1px; }
.ring-3 { width: 900px; height: 900px; border-style: dashed; opacity: 0.5; }
.ring-4 { width: 1200px; height: 1200px; opacity: 0.4; border-width: 1px; }
.ring-5 { width: 1500px; height: 1500px; opacity: 0.2; border-width: 1px; border-style: dotted; }

/* --- NÚCLEO CENTRAL --- */
.hub-center {
    width: 200px;
    height: 200px;
    background: #ffffff;
    border-radius: 50%;
    position: relative;
    z-index: 20; 
    display: flex;
    justify-content: center;
    align-items: center;
    border: 4px solid #fff; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.08); 
}

.hub-content { text-align: center; }
.hub-label { 
    display: block;
    font-size: 0.7rem; 
    text-transform: uppercase; 
    color: var(--text-grey); 
    letter-spacing: 1px;
    margin-bottom: 5px;
    font-family: var(--font-primary);
}
.hub-brand { 
    font-size: 2.5rem; 
    font-weight: 700; 
    color: var(--text-dark);
    margin: 0; 
    letter-spacing: -1px;
    line-height: 1;
}

/* --- ORBITA --- */
.orbiting-elements-container {
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    z-index: 10;
    animation: orbitRotation 80s linear infinite; 
}

/* --- NODOS --- */
.partner-node {
    position: absolute;
    top: 0; left: 0;
    width: 140px;
    height: 140px;
    transform: rotate(var(--angle)) translate(var(--dist)) rotate(calc(var(--angle) * -1));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 15;
}
.pointer-cursor { cursor: pointer; }

/* CONTRA-ROTACIÓN */
.node-counter-rotator {
    animation: orbitRotation 80s linear infinite reverse; 
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}
.partner-node:hover .node-counter-rotator { transform: scale(1.1); }

/* Círculo Logo */
.node-circle {
    width: 130px; height: 130px;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}
.partner-node:hover .node-circle {
    border-color: var(--accent-orange);
    box-shadow: 0 15px 40px rgba(255, 60, 0, 0.1);
}
.node-circle img {
    max-width: 65%; max-height: 65%;
    object-fit: contain;
    transition: transform 0.3s;
    filter: none; 
}

.node-label {
    margin-top: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
    opacity: 0.7;
    transition: opacity 0.3s;
    font-family: var(--font-heading);
}
.partner-node:hover .node-label { opacity: 1; color: var(--accent-orange); }

/* Puntos decorativos */
.dot-node {
    position: absolute;
    top: 0; left: 0;
    width: 8px; height: 8px;
    background: #ccc;
    border-radius: 50%;
    transform: rotate(var(--angle)) translate(var(--dist));
}

/* --- TEXTO INFERIOR --- */
.network-description {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 20;
}
.network-description h3 {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-dark);
}
.network-description p {
    color: var(--text-grey);
    font-size: 1.1rem;
    line-height: 1.7;
}

/* CTA Box */
.cta-box.light-mode-cta {
    background: #ffffff;
    border: 1px solid #eee;
    border-radius: 30px;
    padding: 60px;
    text-align: center;
    margin-top: 80px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.05);
}
.cta-box.light-mode-cta h2 { font-size: 2rem; margin-bottom: 30px; color: var(--text-dark); }

/* ================= ANIMACIONES ================= */
@keyframes orbitRotation {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes revealWord {
    0% { opacity: 0; transform: translateY(40px); filter: blur(10px); }
    100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.fade-section { opacity: 0; transform: translateY(20px); transition: opacity 0.8s ease, transform 0.8s ease; }
.fade-section.visible { opacity: 1; transform: translateY(0); }

/* ================= MODAL ================= */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--modal-overlay);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(8px);
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal-content-box {
    background: #fff;
    width: 100%; max-width: 500px;
    border-radius: 24px; padding: 40px;
    position: relative;
    box-shadow: 0 25px 80px rgba(0,0,0,0.2);
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.modal-overlay.active .modal-content-box { transform: translateY(0); }

.modal-close-btn {
    position: absolute;
    top: 20px; right: 20px;
    background: #f0f0f0; border: none;
    font-size: 1.2rem; color: #666;
    cursor: pointer; transition: 0.2s;
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.modal-close-btn:hover { background: #e0e0e0; color: var(--accent-orange); }

.modal-header { text-align: center; margin-bottom: 30px; }
.modal-logo-wrapper {
    width: 100px; height: 100px;
    margin: 0 auto 20px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    border: 1px solid #eee;
    padding: 15px;
    background: #fff;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}
.modal-logo-wrapper img { max-width: 100%; max-height: 100%; object-fit: contain; }
.modal-title { font-size: 1.8rem; color: var(--text-dark); margin: 0; }

.modal-body { text-align: center; }
.modal-subtitle { font-size: 0.85rem; text-transform: uppercase; color: var(--accent-orange); margin-bottom: 15px; letter-spacing: 1px; font-weight: 700; }
.modal-body p { color: var(--text-grey); line-height: 1.6; }
.modal-details-placeholder {
    margin-top: 25px; padding-top: 20px; border-top: 1px solid #f0f0f0;
    font-size: 0.9rem; color: #999; font-style: italic;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
    .page-title { font-size: 2.5rem; }
    
    .page-intro { 
        text-align: center; 
        padding-top: 120px;
        clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%); 
    }
    .page-desc { margin: 30px auto 0; }

    .ecosystem-graph-container {
        height: auto;
        padding: 20px 0;
        margin-bottom: 20px;
    }
    
    .bg-rings, .dot-node { display: none; }
    
    .orbiting-elements-container, .node-counter-rotator {
        animation: none !important; 
        position: static; width: auto; height: auto; transform: none !important;
    }
    
    .hub-center { margin: 0 auto 50px; }
    
    .partner-node {
        position: relative;
        top: auto; left: auto;
        transform: none !important;
        width: 100%;
        height: auto;
        margin-bottom: 20px;
    }
    
    .node-counter-rotator {
        flex-direction: row;
        justify-content: flex-start;
        background: #fff;
        border: 1px solid #eee;
        padding: 15px;
        border-radius: 16px;
        width: 100%;
        box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    }
    .node-circle {
        width: 70px; height: 70px;
        margin-right: 20px;
        flex-shrink: 0;
        border-width: 1px;
    }
    .node-label { margin-top: 0; font-size: 1.1rem; opacity: 1; }
}