
/* =========================================
   1. IDENTIDAD VISUAL
========================================= */

:root {
    --navy: #173E63;
    --blue: #1688D6;
    --sky: #9ACFF4;
    --background: #F5FAFF;
    --white: #FFFFFF;
    --text: #54718C;
    --border: #DCE8F2;

    --font-title: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;

    --radius: 20px;
    --shadow: 0 8px 30px rgba(23, 62, 99, 0.06);
}

/* =========================================
   2. ESTILOS GENERALES
========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: var(--font-body);
    background: var(--background);
    color: var(--text);
    line-height: 1.7;
}

h1, h2, h3, h4 {
    font-family: var(--font-title);
    color: var(--navy);
    line-height: 1.25;
}

a {
    text-decoration: none;
    color: var(--blue);
}

button {
    font-family: inherit;
    cursor: pointer;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

[hidden] {
    display: none !important;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 5px;
}

.container {
    width: min(90%, 1200px);
    margin: 0 auto;
}

/* =========================================
   3. MENÚ DE NAVEGACIÓN
========================================= */

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.navbar {
    width: min(90%, 1200px);
    min-height: 78px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-title);
    font-size: 27px;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -1px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 38px;
    list-style: none;
}

.nav-menu a {
    font-size: 15px;
    font-weight: 600;
    color: var(--navy);
    transition: color 0.25s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--blue);
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--navy);
    font-size: 27px;
    min-width: 44px;
    min-height: 44px;
}

/* =========================================
   4. INICIO - HERO
========================================= */

.hero {
    min-height: calc(100vh - 78px);
    display: flex;
    align-items: center;
    text-align: center;
    padding: 100px 0;
    background: var(--background);
}

.hero .container {
    max-width: 950px;
}

.hero p:first-child {
    display: inline-block;
    padding: 9px 20px;
    background: #E3F1FD;
    border-radius: 50px;
    color: var(--navy);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 28px;
}

.hero h1 {
    font-size: clamp(36px, 5.5vw, 68px);
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 18px;
}

.hero h2 {
    font-size: clamp(23px, 3vw, 36px);
    color: var(--blue);
    font-weight: 600;
    margin-bottom: 22px;
}

.hero p {
    max-width: 650px;
    margin: 0 auto 35px;
    font-size: 17px;
}

.hero a {
    display: inline-block;
    padding: 14px 28px;
    margin: 5px;
    border: 2px solid var(--blue);
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.25s ease;
}

.hero a[href="#resultados"] {
    background: var(--blue);
    color: var(--white);
}

.hero a[href="#contacto"] {
    color: var(--blue);
    background: transparent;
}

.hero a:hover {
    transform: translateY(-3px);
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
}

/* Fotografía profesional: se añadirá al HTML */

.hero-photo {
    width: 220px;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 24px;
    margin: 0 auto 32px;
    box-shadow: var(--shadow);
}

/* =========================================
   5. SECCIONES GENERALES
========================================= */

.section {
    padding: 110px 0;
}

.section h2 {
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.section p {
    font-size: 16px;
}

#sobre-mi,
#competencias,
#formacion {
    background: var(--white);
}

#resultados,
#portafolio {
    background: var(--background);
}

/* =========================================
   6. TARJETAS BENTO
========================================= */

.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.bento-card {
    grid-column: span 6;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease,
                box-shadow 0.3s ease;
}

.bento-card.large {
    grid-column: span 8;
}

.bento-card.small {
    grid-column: span 4;
}

.bento-card.full {
    grid-column: 1 / -1;
}

.bento-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(23, 62, 99, 0.10);
}

.bento-card h3 {
    font-size: 22px;
    margin-bottom: 12px;
}

/* =========================================
   7. EXPERIENCIA PROFESIONAL
========================================= */

.timeline {
    margin-top: 35px;
    padding-left: 30px;
    border-left: 2px solid var(--sky);
}

.timeline-item {
    position: relative;
    padding-bottom: 32px;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -37px;
    top: 6px;
    width: 12px;
    height: 12px;
    background: var(--blue);
    border: 3px solid var(--white);
    border-radius: 50%;
}

.timeline-item h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

/* =========================================
   8. DASHBOARD DE RESULTADOS
========================================= */

.dashboard {
    margin-top: 40px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.metric-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.metric-value {
    display: block;
    color: var(--navy);
    font-family: var(--font-title);
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
}

.metric-label {
    font-size: 14px;
    color: var(--text);
}

.chart-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin-top: 24px;
    box-shadow: var(--shadow);
}

.chart-card canvas {
    max-width: 100%;
}

/* =========================================
   9. COMPETENCIAS Y HERRAMIENTAS
========================================= */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.skill-card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    transition: transform 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
}

.skill-card h3 {
    margin-bottom: 16px;
}

.skill-level {
    display: inline-block;
    background: #E3F1FD;
    color: var(--navy);
    border-radius: 30px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
}

/* =========================================
   10. PORTAFOLIO SHOWCASE
========================================= */

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 32px 0;
}

.filter-btn {
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--navy);
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.25s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.project-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.project-card.featured {
    grid-column: 1 / -1;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-card img {
    width: 100%;
    height: 320px;
    object-fit: contain;
    background: #EDF4FA;
}

.project-info {
    padding: 25px;
}

.project-info h3 {
    margin-bottom: 10px;
}

/* =========================================
   11. FORMACIÓN Y CURRÍCULUM
========================================= */

#formacion a {
    display: inline-block;
    margin: 25px 10px 0 0;
    padding: 13px 25px;
    border-radius: 10px;
    background: var(--navy);
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    transition: background 0.25s ease;
}

#formacion a:hover {
    background: var(--blue);
}

.cv-preview {
    width: 100%;
    min-height: 500px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 25px;
}

/* =========================================
   12. CONTACTO - BANNER
========================================= */

.contacto {
    background: var(--navy);
    color: var(--white);
    text-align: center;
    padding: 100px 0;
}

.contacto .container {
    max-width: 850px;
}

.contacto h2 {
    color: var(--white);
    font-size: clamp(30px, 4vw, 48px);
    font-weight: 800;
    margin-bottom: 22px;
}

.contacto p {
    color: #DCEEFF;
    margin-bottom: 30px;
    font-size: 17px;
}

.contacto a {
    display: inline-block;
    padding: 14px 24px;
    margin: 7px;
    background: var(--white);
    color: var(--navy);
    border-radius: 10px;
    font-weight: 600;
    overflow-wrap: anywhere;
    transition: background 0.25s ease;
}

.contacto a:hover {
    background: var(--sky);
}

/* =========================================
   13. PIE DE PÁGINA
========================================= */

.footer {
    background: var(--navy);
    color: #DCEEFF;
    text-align: center;
    padding: 35px 20px;
    border-top: 1px solid rgba(255,255,255,0.15);
}

.footer p {
    font-size: 13px;
    margin: 5px 0;
}

.footer p:first-child {
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
}

/* =========================================
   14. ANIMACIONES SUAVES
========================================= */

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero .container {
    animation: fade-up 0.8s ease both;
}

.reveal.visible {
    animation: fade-up 0.7s ease both;
}

/* =========================================
   15. ADAPTACIÓN A TABLET Y CELULAR
========================================= */

@media (max-width: 768px) {

    html {
        scroll-padding-top: 85px;
    }

    .navbar {
        min-height: 70px;
        flex-wrap: wrap;
    }

    .logo {
        font-size: 24px;
    }

    .menu-toggle {
        display: block;
    }

    /* El menú se mantiene accesible hasta
       que programemos JavaScript. */

    .nav-menu {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        gap: 18px;
        padding: 12px 0;
    }

    .navbar.menu-ready .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 25px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        box-shadow: var(--shadow);
    }

    .navbar.menu-ready .nav-menu.open {
        display: flex;
    }

    .nav-menu a {
        display: block;
        padding: 10px 5px;
    }

    .hero {
        min-height: calc(100svh - 70px);
        padding: 75px 0;
    }

    .hero h1 {
        letter-spacing: -1px;
    }

    .hero p {
        font-size: 15px;
    }

    .hero-photo {
        width: 165px;
    }

    .section {
        padding: 75px 0;
    }

    .bento-grid,
    .metrics-grid,
    .skills-grid,
    .showcase-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .bento-card,
    .bento-card.large,
    .bento-card.small,
    .bento-card.full,
    .project-card.featured {
        grid-column: 1 / -1;
    }

    .bento-card,
    .metric-card,
    .skill-card,
    .chart-card {
        padding: 24px;
    }

    .project-card img {
        height: auto;
        max-height: 450px;
    }

    .contacto {
        padding: 75px 0;
    }

    .contacto a {
        display: block;
        max-width: 350px;
        margin: 12px auto;
    }

    .cv-preview {
        min-height: 350px;
    }
}

@media (max-width: 480px) {

    .hero a {
        display: block;
        max-width: 280px;
        margin: 12px auto;
    }

    .hero h1 {
        font-size: 34px;
    }

    .hero h2 {
        font-size: 23px;
    }

    .hero p:first-child {
        font-size: 11px;
        padding: 8px 12px;
    }
}

/* Accesibilidad: reducir animaciones cuando
   el visitante así lo prefiera. */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}


/* =========================================
   16. ESTILOS COMPLEMENTARIOS DEL CONTENIDO
========================================= */

.bento-card p + p {
    margin-top: 12px;
}

.bento-card .skill-level {
    margin-bottom: 16px;
}

.bento-card > .metric-value {
    margin-top: 15px;
}

.timeline-item summary {
    cursor: pointer;
    color: var(--navy);
    font-size: 16px;
    padding: 8px 0;
}

.timeline-item summary:hover {
    color: var(--blue);
}

.timeline-item p {
    margin-top: 10px;
}

.timeline-item[open] summary {
    color: var(--blue);
}

.dashboard .metrics-grid {
    margin-top: 28px;
}

.dashboard .metric-card {
    background: var(--background);
    min-width: 0;
}

.dashboard .metric-value {
    overflow-wrap: anywhere;
}

.chart-card h3 {
    margin-bottom: 20px;
}

.chart-card svg {
    display: block;
    width: 100%;
    max-width: 700px;
    margin: 15px auto 0;
}

.project-card.featured img {
    height: 420px;
}

.project-info p {
    margin-bottom: 12px;
}

.project-open {
    display: inline-block;
    margin-top: 12px;
    font-weight: 600;
}

.project-open:hover {
    text-decoration: underline;
}

#formacion summary {
    color: var(--navy);
    font-weight: 600;
    cursor: pointer;
    margin-top: 22px;
}

#formacion details {
    margin-top: 20px;
}

@media (max-width: 768px) {

    .project-card.featured img {
        height: auto;
    }

    .dashboard .bento-card {
        padding: 18px;
    }

    .timeline {
        padding-left: 22px;
    }

    .timeline-item::before {
        left: -29px;
    }

    .timeline-item summary {
        font-size: 14px;
    }

}


/* =========================================
   17. INTERACTIVIDAD Y ANIMACIONES
========================================= */

.reveal-ready:not(.visible) {
    opacity: 0;
    transform: translateY(20px);
}

.reveal-ready.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease,
                transform 0.7s ease;
    animation: none;
}


/* =========================================
   18. FILTROS DEL PORTAFOLIO
========================================= */

.empty-projects {
    text-align: center;
    padding: 45px 25px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--text);
}

.filter-btn:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 3px;
}


/* =========================================
   19. VENTANA INTERNA DE PROYECTOS
========================================= */

body.modal-open {
    overflow: hidden;
}

.project-modal {
    position: fixed;
    inset: 0;
    margin: auto;
    padding: 0;
    width: min(92%, 850px);
    max-height: 90vh;
    max-height: 90dvh;
    border: none;
    border-radius: 20px;
    background: var(--white);
    color: var(--text);
    overflow-y: auto;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.2);
}

.project-modal::backdrop {
    background: rgba(15, 35, 55, 0.82);
}

.project-modal[open] {
    animation: modal-appear 0.3s ease;
}

.modal-content {
    position: relative;
    padding: 30px;
}

.modal-close {
    position: sticky;
    top: 0;
    z-index: 2;
    display: block;
    margin-left: auto;
    margin-bottom: 15px;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--white);
    color: var(--navy);
    font-size: 20px;
    box-shadow: var(--shadow);
}

.modal-close:hover {
    background: var(--navy);
    color: var(--white);
}

.modal-image {
    width: 100%;
    max-height: 65vh;
    object-fit: contain;
    border-radius: 12px;
    background: var(--background);
}

.modal-info {
    padding: 25px 0 5px;
}

.modal-info h2 {
    font-size: clamp(22px, 3vw, 30px);
    margin-bottom: 15px;
}

.modal-description p {
    margin-bottom: 12px;
}

@keyframes modal-appear {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================
   20. BOTÓN VOLVER ARRIBA
========================================= */

.back-to-top {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 900;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--navy);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 25px;
    box-shadow: var(--shadow);
    transition: background 0.25s ease,
                transform 0.25s ease;
}

.back-to-top:hover {
    background: var(--blue);
    transform: translateY(-4px);
}


/* =========================================
   21. AJUSTES PARA CELULAR
========================================= */

@media (max-width: 768px) {

    .navbar.menu-ready .nav-menu.open {
        border-bottom: 1px solid var(--border);
        animation: modal-appear 0.2s ease;
    }

    .modal-content {
        padding: 18px;
    }

    .project-modal {
        width: 94%;
        border-radius: 15px;
    }

    .modal-image {
        max-height: 55vh;
    }

    .modal-info {
        padding-top: 20px;
    }

    .back-to-top {
        right: 15px;
        bottom: 15px;
        width: 42px;
        height: 42px;
    }

}


/* =========================================
   22. ACCESIBILIDAD
========================================= */

@media (prefers-reduced-motion: reduce) {

    .reveal-ready:not(.visible) {
        opacity: 1;
        transform: none;
    }

    .reveal-ready,
    .project-modal,
    .nav-menu,
    .back-to-top {
        animation: none !important;
        transition: none !important;
    }

}


/* =========================================
   23. DASHBOARD AVANZADO
========================================= */

.dashboard-headline {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: clamp(24px, 4vw, 36px);
    color: #173E63;
    line-height: 1.3;
}

.advanced-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 30px 0;
}

.advanced-kpi {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 22px;
    border: 1px solid #DCE8F2;
    border-radius: 16px;
    background: #F5FAFF;
    transition: transform 0.3s ease,
                box-shadow 0.3s ease;
}

.advanced-kpi:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(23, 62, 99, 0.08);
}

.advanced-kpi .metric-value {
    font-size: clamp(22px, 2.5vw, 34px);
    color: #173E63;
    font-variant-numeric: tabular-nums;
}

.advanced-kpi > span:not(.kpi-icon) {
    font-size: 13px;
    color: #54718C;
}

.advanced-kpi small {
    font-weight: 700;
    color: #1688D6;
}

.kpi-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #E3F1FD;
    color: #173E63;
    font-weight: 700;
    font-size: 20px;
}


/* =========================================
   24. GRÁFICOS INTERACTIVOS
========================================= */

.advanced-chart {
    margin-top: 30px;
    padding: 28px;
    border: 1px solid #DCE8F2;
    border-radius: 18px;
    background: #FFFFFF;
}

.advanced-chart label,
.creative-comparison label {
    display: block;
    margin: 15px 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: #173E63;
}

#metric-selector {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #DCE8F2;
    border-radius: 10px;
    background: #F5FAFF;
    color: #173E63;
    font: inherit;
    cursor: pointer;
}

#metric-description {
    margin-top: 12px;
    font-size: 14px;
    color: #54718C;
}

.interactive-bars {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 35px;
    max-width: 650px;
    margin: 35px auto;
}

.bar-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.bar-column strong {
    color: #173E63;
    font-size: clamp(16px, 3vw, 24px);
    font-variant-numeric: tabular-nums;
}

.bar-track {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    height: 220px;
    border-bottom: 1px solid #DCE8F2;
    background: repeating-linear-gradient(
        to top,
        transparent 0,
        transparent 43px,
        #EAF1F7 43px,
        #EAF1F7 44px
    );
}

.chart-bar {
    width: 55%;
    max-width: 120px;
    border-radius: 7px 7px 0 0;
    transition: height 0.65s ease;
}

.chart-bar.before {
    background: #9ACFF4;
}

.chart-bar.after {
    background: #1688D6;
}

.chart-variation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px;
    background: #F5FAFF;
    border-radius: 12px;
}

#metric-change {
    font-size: 25px;
    color: #1688D6;
}


/* =========================================
   25. TABLA DE RESULTADOS
========================================= */

.results-details {
    margin: 25px 0;
    padding: 20px;
    border: 1px solid #DCE8F2;
    border-radius: 14px;
}

.results-details summary {
    color: #173E63;
    font-weight: 600;
    cursor: pointer;
}

.table-scroll {
    overflow-x: auto;
}

.results-table {
    width: 100%;
    min-width: 520px;
    margin-top: 20px;
    border-collapse: collapse;
    font-size: 14px;
}

.results-table th,
.results-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #DCE8F2;
    text-align: right;
}

.results-table th:first-child,
.results-table td:first-child {
    text-align: left;
}

.results-table th {
    background: #173E63;
    color: #FFFFFF;
}

.results-table td:last-child {
    color: #1688D6;
    font-weight: 700;
}

.results-table tbody tr:hover {
    background: #F5FAFF;
}


/* =========================================
   26. COMPARADOR VISUAL
========================================= */

.creative-comparison {
    margin: 30px 0;
}

.comparison-frame {
    --position: 50%;
    position: relative;
    width: 100%;
    max-width: 560px;
    aspect-ratio: 1 / 1;
    margin: 25px auto 15px;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid #DCE8F2;
    background: #F5FAFF;
}

.comparison-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.comparison-before {
    position: absolute;
    inset: 0;
    background: #F5FAFF;
    clip-path: inset(
        0 calc(100% - var(--position)) 0 0
    );
}

.comparison-label {
    position: absolute;
    top: 12px;
    z-index: 2;
    padding: 7px 12px;
    background: #173E63;
    color: #FFFFFF;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.label-before {
    left: 12px;
}

.label-after {
    right: 12px;
}

.comparison-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--position);
    width: 3px;
    background: #FFFFFF;
    transform: translateX(-50%);
    pointer-events: none;
}

.comparison-divider span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #FFFFFF;
    color: #173E63;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}

#comparison-slider {
    display: block;
    width: 100%;
    max-width: 560px;
    margin: 15px auto;
    accent-color: #1688D6;
    cursor: ew-resize;
}

.comparison-captions {
    display: flex;
    justify-content: space-between;
    max-width: 560px;
    margin: 0 auto 25px;
    font-size: 12px;
    color: #54718C;
}

.evidence-note {
    margin-top: 25px;
    font-size: 12px;
    color: #54718C;
}


/* =========================================
   27. ICONOS DE COMPETENCIAS
========================================= */

.professional-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 18px;
    border-radius: 12px;
    background: #E3F1FD;
    color: #1688D6;
}

.professional-icon svg {
    width: 25px;
    height: 25px;
}


/* =========================================
   28. RESPONSIVE Y ACCESIBILIDAD
========================================= */

@media (max-width: 1024px) {

    .advanced-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 768px) {

    .advanced-kpis {
        grid-template-columns: 1fr;
    }

    .advanced-chart {
        padding: 18px;
    }

    .interactive-bars {
        gap: 18px;
    }

    .bar-track {
        height: 180px;
    }

    .chart-variation {
        padding: 15px;
    }

    .comparison-label {
        font-size: 11px;
    }

}

@media (prefers-reduced-motion: reduce) {

    .chart-bar,
    .advanced-kpi {
        transition: none;
    }

}

[hidden] {
    display: none !important;
}
