/* --- VARIABLES Y CONFIGURACIÓN GENERAL --- */
:root {
    --color-principal: #2c3e50;
    --color-secundario: #3498db;
    --color-fondo: #f8f9fa;
    --color-texto: #333333;
    --color-blanco: #ffffff;
    --color-borde: #e2e8f0;
    --fuente-base: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-fondo);
    color: var(--color-texto);
    font-family: var(--fuente-base);
    line-height: 1.6;
}

/* --- CABECERA Y MENÚ INTEGRADO --- */
.main-header {
    background-color: var(--color-principal);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-list {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    margin: 0 auto;
    max-width: 1200px;
}

.logo-item {
    display: flex;
    align-items: center;
    padding: 0 1rem;
}

.logo-item img {
    border: 2px solid var(--color-blanco);
    border-radius: 50%;
    display: block;
    transition: transform 0.3s ease;
}

.logo-item img:hover {
    transform: scale(1.1);
}

.nav-list a {
    color: var(--color-blanco);
    display: block;
    font-size: 1rem;
    font-weight: 600;
    padding: 1.2rem 1.5rem;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.nav-list a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-secundario);
}

/* Indicador de página activa (Experiencia) */
.nav-list a.active {
    border-bottom: 4px solid var(--color-secundario);
    color: var(--color-secundario);
}

/* --- CONTENIDO PRINCIPAL --- */
.content-container {
    margin: 3rem auto;
    max-width: 900px;
    padding: 0 1.5rem;
}

.section-block {
    background-color: var(--color-blanco);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 2.5rem;
    padding: 2.5rem;
}

.section-title {
    color: var(--color-principal);
    font-size: 1.8rem;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    background-color: var(--color-secundario);
    bottom: 0;
    content: '';
    height: 3px;
    left: 0;
    position: absolute;
    width: 60px;
}

/* --- LISTADO DE EXPERIENCIA (CRONOLÓGICO) --- */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    list-style: none;
}

.experience-list li {
    align-items: flex-start;
    border-left: 3px solid var(--color-secundario);
    display: flex;
    gap: 2rem;
    padding-left: 1.5rem;
    position: relative;
}

/* Pequeño punto decorativo en la línea de tiempo */
.experience-list li::before {
    background-color: var(--color-blanco);
    border: 3px solid var(--color-secundario);
    border-radius: 50%;
    content: '';
    height: 12px;
    left: -8px;
    position: absolute;
    top: 6px;
    width: 12px;
}

/* Bloque para los años */
.exp-year {
    color: var(--color-secundario);
    font-weight: 700;
    font-size: 1.05rem;
    min-width: 110px; /* Evita que el año se rompa en dos líneas */
    padding-top: 2px;
}

/* Bloque para la descripción del puesto */
.exp-text {
    color: #4a5568;
    font-size: 1.1rem;
    flex: 1;
}

/* --- BOTÓN DE IMPRESIÓN --- */
.print-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.btn-print {
    background-color: var(--color-principal);
    border-radius: 5px;
    border: none;
    color: var(--color-blanco);
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    padding: 0.8rem 2rem;
    transition: background-color 0.3s ease;
}

.btn-print:hover {
    background-color: var(--color-secundario);
}

/* --- ADAPTACIÓN A MÓVILES (MENÚ LATERAL) --- */
@media (max-width: 768px) {
    body {
        padding-left: 80px; /* Deja espacio para el menú lateral */
    }

    .main-header {
        position: fixed;
        top: 0;
        left: 0;
        width: 80px;
        height: 100vh;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.15);
    }

    .nav-list {
        flex-direction: column;
        justify-content: flex-start;
        padding: 1rem 0;
    }

    .logo-item {
        margin-bottom: 1rem;
        padding: 0;
    }

    .logo-item img {
        width: 45px;
        height: 45px;
    }

    .nav-list a {
        padding: 1rem 0.2rem;
        width: 100%;
        text-align: center;
        font-size: 0.75rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-list a.active {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        border-left: 4px solid var(--color-secundario); /* Marca lateral azul activa */
        background-color: rgba(255, 255, 255, 0.05);
    }

    /* Ajustes específicos del contenido de experiencia */
    .section-block {
        padding: 1.2rem;
    }

    .experience-list li {
        flex-direction: column;
        gap: 0.2rem;
        padding-left: 1.2rem;
    }

    .exp-year {
        font-size: 0.95rem;
        min-width: auto;
    }

    .exp-text {
        font-size: 1rem;
    }
}

/* --- OPTIMIZACIÓN PARA IMPRESIÓN --- */
@media print {
    .main-header, .print-container {
        display: none !important;
    }
    body {
        background-color: #ffffff;
    }
    .section-block {
        box-shadow: none;
        padding: 0;
        margin-bottom: 2rem;
    }
}
