/* ==========================================================================
   SUNESIS+ STYLE SHEET (Versión Final - Footer Sincronizado)
   ========================================================================== */

/* --- 1. VARIABLES Y GLOBALES --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;800&display=swap');

:root {
    --color-fondo-oscuro: #0a0a14;
    --color-fondo-seccion: #101425;
    --color-fondo-tarjeta: #1a1f36;
    --color-acento-dorado: #D4AF37;
    --color-acento-dorado-brillo: #f7d468;
    --color-texto-blanco: #f0f0f0;
    --color-texto-gris: #c0c0d0;
}

body {
    background-color: var(--color-fondo-oscuro);
    color: var(--color-texto-blanco);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* --- 2. CABECERA (HEADER) --- */
.sunesis-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: auto;
    padding: 20px 40px;
    z-index: 1000;
    box-sizing: border-box;
}

.header-content {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
}

.header-right-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sunesis-logo-link {
    display: flex;
    align-items: center;
}

.sunesis-logo-abrev {
    height: 60px;
    width: auto;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.sunesis-logo-abrev:hover {
    transform: scale(1.05) rotate(5deg);
    opacity: 0.9;
}

.menu-toggle {
    background-color: rgba(30, 35, 60, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    width: 55px;
    height: 55px;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    transition: background-color 0.3s ease;
}

.menu-toggle:hover {
    background-color: rgba(30, 35, 60, 0.8);
}

.hamburger-svg {
    fill: var(--color-texto-blanco);
    width: 55px;
    height: 55px;
}

.hamburger-svg .line {
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1),
                rotate 0.3s cubic-bezier(0.23, 1, 0.32, 1),
                opacity 0.3s ease;
    transform-origin: center;
}

.menu-toggle.is-active .hamburger-svg .line.top {
    rotate: 45deg;
    transform: translateY(20px);
}
.menu-toggle.is-active .hamburger-svg .line.middle {
    opacity: 0;
}
.menu-toggle.is-active .hamburger-svg .line.bottom {
    rotate: -45deg;
    transform: translateY(-20px);
}

/* --- 3. MENÚ LATERAL --- */
.menu-panel-right {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    height: 100%;
    background-color: rgba(10, 10, 20, 0.85);
    backdrop-filter: blur(15px);
    padding: 100px 40px;
    box-shadow: -10px 0 30px rgba(0,0,0,0.3);
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 999;
    overflow-y: auto;
}

.menu-panel-right.is-open {
    transform: translateX(0);
}

.overlay-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 25px;
}

.nav-link {
    color: var(--color-texto-blanco);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 400;
    opacity: 0;
    transform: translateX(20px);
    transition: color 0.3s ease, opacity 0.5s ease, transform 0.5s ease;
}

.menu-panel-right.is-open .nav-link {
    opacity: 1;
    transform: translateX(0);
}
.menu-panel-right.is-open .nav-link:nth-child(1) { transition-delay: 0.15s; }
.menu-panel-right.is-open .nav-link:nth-child(2) { transition-delay: 0.20s; }
.menu-panel-right.is-open .nav-link:nth-child(3) { transition-delay: 0.25s; }
.menu-panel-right.is-open .nav-link:nth-child(4) { transition-delay: 0.30s; }
.menu-panel-right.is-open .nav-link:nth-child(5) { transition-delay: 0.35s; }
.menu-panel-right.is-open .nav-link:nth-child(6) { transition-delay: 0.40s; }
.menu-panel-right.is-open .nav-link:nth-child(7) { transition-delay: 0.45s; }

.nav-link:hover {
    color: var(--color-acento-dorado-brillo);
    transform: translateX(5px);
}

.nav-link-cta {
    margin-top: 20px;
    padding: 12px 25px;
    border: 1px solid var(--color-acento-dorado);
    border-radius: 50px;
    color: var(--color-acento-dorado);
    font-size: 1.2rem !important;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-link-cta:hover {
    background-color: var(--color-acento-dorado);
    color: var(--color-fondo-oscuro) !important;
}

/* --- 4. SECCIÓN HERO --- */
.sunesis-hero-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    overflow: hidden;
}

#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.sunesis-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    animation: fadeIn 2s ease-in-out;
    display: flex; 
    flex-direction: column;
    align-items: center;
}

.sunesis-hero-logo {
    width: clamp(450px, 60vw, 850px);
    height: auto;
    margin-bottom: 2rem;
    animation: popInLogo 1.5s 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    box-shadow: 0 0 100px 30px var(--color-acento-dorado);
    border-radius: 12px;
    overflow: hidden;
}

.hero-video-player {
    width: 100%;
    height: 100%;
    display: block;
}

@keyframes popInLogo {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.sunesis-hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--color-texto-blanco);
    text-shadow: 0px 2px 15px rgba(0, 0, 0, 0.7);
    position: relative;
    z-index: 10;
}

.sunesis-hero-content p {
    font-size: clamp(1.3rem, 3vw, 1.8rem); 
    color: var(--color-texto-gris);
    max-width: 800px;
    margin-bottom: 2.5rem;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 10;
}

/* --- 5. BOTONES Y CTA --- */
.sunesis-cta-button {
    background: linear-gradient(45deg, var(--color-acento-dorado), var(--color-acento-dorado-brillo));
    color: #101425 !important;
    padding: 18px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: inline-block;
    border: none;
    box-shadow: 0 5px 25px rgba(212, 175, 55, 0.4);
    position: relative;
    z-index: 10;
    cursor: pointer;
}

.sunesis-cta-button:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 12px 35px rgba(247, 212, 104, 0.5);
}

.sunesis-cta-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

/* --- 6. SECCIONES GENERALES --- */
.sunesis-section {
    padding: 100px 25px;
    max-width: 1200px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease-out, transform 1s ease-out;
    position: relative; 
    z-index: 2;
}

.sunesis-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    text-align: center;
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    margin-bottom: 1rem;
    color: var(--color-texto-blanco);
}

.section-subtitle {
    font-weight: 500;
    text-align: center;
    margin-bottom: 50px;
    opacity: 0.9;
    color: var(--color-texto-gris);
}

#formacion .section-title,
#experiencia .section-title,
#evolucionar .section-title {
    color: #FFFFFF;
}

/* --- 7. PANELES INTERACTIVOS --- */
.interactive-panels-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}
.panel-triggers {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.trigger-btn {
    background: transparent;
    border: none;
    color: var(--color-texto-gris);
    padding: 20px;
    text-align: left;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.3s, color 0.3s;
    border-left: 3px solid transparent;
}
.trigger-btn:hover {
    background-color: var(--color-fondo-seccion);
}
.trigger-btn.active {
    color: var(--color-acento-dorado-brillo);
    background-color: var(--color-fondo-seccion);
    border-left: 3px solid var(--color-acento-dorado);
}
.panel-content-wrapper {
    flex: 2;
}
.content-panel {
    display: none;
    background: var(--color-fondo-seccion);
    border-radius: 16px;
    padding: 40px;
    animation: fadeInPanel 0.6s ease;
}
.content-panel.active {
    display: block;
}
@keyframes fadeInPanel {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}
.content-panel h3 {
    font-size: 2rem;
    margin-top: 0;
    color: var(--color-texto-blanco);
}
.content-panel p {
    color: var(--color-texto-gris);
    line-height: 1.7;
}

/* --- 8. TARJETAS AVANZADAS --- */
.advanced-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

@media (min-width: 1200px) {
    .advanced-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

.advanced-card {
    background-color: var(--color-fondo-tarjeta);
    border: 1px solid transparent;
    border-radius: 16px;
    padding: 40px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
}
.advanced-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.advanced-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    border-color: var(--color-acento-dorado);
}
.advanced-card h3 {
    font-size: 1.8rem;
    color: var(--color-acento-dorado-brillo);
    margin-bottom: 15px;
}
.advanced-card p {
    color: var(--color-texto-gris);
    line-height: 1.7;
    font-size: 1rem;
}
.advanced-card .icon {
    font-size: 2.5rem;
    color: var(--color-acento-dorado);
    margin-bottom: 20px;
}

#llamado .advanced-card {
    background-color: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: none;
}
#llamado .advanced-card:hover {
    background-color: rgba(212, 175, 55, 0.2);
    border-color: var(--color-acento-dorado-brillo);
}
#llamado .advanced-card h3 { color: var(--color-acento-dorado-brillo); }
#llamado .advanced-card p { color: var(--color-texto-gris); }
#llamado .advanced-card .icon { color: var(--color-acento-dorado-brillo); }

/* --- 9. PARTÍCULAS --- */
.particle-section {
    background-color: rgba(212, 175, 55, 0.1);
    border-radius: 24px;
    overflow: hidden;
}
.particle-canvas-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
}
.sunesis-section.particle-section-alt {
    max-width: none;
    width: 100%;
    background: radial-gradient(ellipse at center, var(--color-fondo-seccion) 0%, var(--color-fondo-oscuro) 70%);
    position: relative;
    overflow: hidden;
    padding-top: 100px;
    padding-bottom: 100px;
}
.particle-section-alt > .section-title,
.particle-section-alt > .section-subtitle,
.particle-section-alt > .advanced-grid {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 25px;
    padding-right: 25px;
    position: relative;
    z-index: 2;
}
.particle-canvas-section-alt {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* --- 10. FOOTER CORREGIDO --- */
.sunesis-footer {
    background-color: #000000;
    color: #FFFFFF;
    padding: 50px 40px 20px 40px;
    border-top: 2px solid var(--color-acento-dorado);
    position: relative;
    z-index: 100;
    font-size: 0.95rem;
}

/* Fila Superior */
.footer-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-col { flex: 1; }

.footer-left { text-align: left; }
.footer-center { text-align: center; }
.footer-right { text-align: right; }

.footer-right a {
    color: var(--color-acento-dorado-brillo);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}
.footer-right a:hover {
    color: #FFF;
    text-decoration: underline;
}

/* Botón Subir: SIEMPRE VISIBLE POR AHORA */
.scroll-to-top-btn {
    background-color: var(--color-acento-dorado);
    color: var(--color-fondo-oscuro);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: none;
    
    /* MODIFICACIÓN: Eliminamos opacidad para que siempre se vea */
    opacity: 1; 
    transform: translateY(0);
    visibility: visible; 
    
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}
.scroll-to-top-btn:hover {
    background-color: var(--color-acento-dorado-brillo);
    transform: scale(1.1);
}

/* Fila Inferior (Centrado Total) */
.footer-bottom-row {
    border-top: 1px solid #333;
    padding-top: 25px;
    color: #888;
    font-size: 0.8rem;
    line-height: 1.6;
    
    /* CENTRADO A PRUEBA DE TODO */
    display: flex;
    flex-direction: column;
    align-items: center; 
    text-align: center;
}

.footer-bottom-row p {
    margin: 8px 0;
    max-width: 900px;
    width: 100%;
    text-align: center !important; /* Importante para anular temas */
}

/* --- 11. MEDIA QUERIES (MÓVILES) --- */
@media (max-width: 768px) {
    .sunesis-header {
        padding: 15px 20px;
        width: 100vw;
        max-width: 100%;
        box-sizing: border-box;
        left: 0;
        right: 0;
    }

    .menu-panel-right {
        width: 100%;
        max-width: 100%;
        padding-top: 120px;
    }

    .interactive-panels-container { flex-direction: column; }
    .panel-triggers {
        flex-direction: column;
        overflow-x: hidden;
        width: 100%;
        padding-bottom: 20px;
        gap: 10px;
    }
    .trigger-btn {
        white-space: normal;
        width: 100%;
        text-align: center;
        background-color: rgba(255, 255, 255, 0.03);
        border-radius: 8px;
    }

    .sunesis-footer { padding: 30px 20px; }
    .footer-top-row {
        flex-direction: column;
        gap: 25px;
        text-align: center;
    }
    .footer-left, .footer-center, .footer-right {
        text-align: center;
        flex: none;
        width: 100%;
    }
    .footer-center { order: -1; margin-bottom: 10px; }
    
    .advanced-grid { grid-template-columns: 1fr; }
}