:root {
    --font-primary: 'Inter', sans-serif;
    --font-secondary: 'Raleway', sans-serif;
    --color-text: #000000;
    --color-text-light: #000000;
   
    --color-background: #f8f8f8;
    --color-surface: #ffffff;
    --border-light: #ebebeb;
    --color-palette-1: #e69782;
    --color-palette-2: #d63c39;
    --color-palette-3: #8a9d8b;
}

/* --- ESTILOS BASE Y DE CARGA --- */
body {
    font-family: var(--font-primary);
    background-color: var(--color-background);
    color: var(--color-text);
    margin: 0;
    line-height: 1.6; /* Interlineado estándar para el cuerpo */
}

.cv-container {
    background-image: url("img/FONDOtotal.svg");
    
     /* background-position: center 20px, center 100%;
    background-size: 100% 50%, 100% 50%; */
    max-width: 850px;
    margin: 60px auto;
    background-color: var(--color-surface);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    opacity: 0;
    animation: fadeIn 0.8s 0.2s ease-out forwards;
    position: relative;
}

/* --- Botón de Idioma --- */
.lang-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
}

#lang-btn {
    font-family: var(--font-secondary);
    font-weight: 600;
    font-size: 0.9em;
    background-color: var(--color-palette-3);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    width: 45px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cv-download-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--color-palette-2);
    color: white;
    font-family: var(--font-secondary);
    font-weight: 600;
    padding: 12px 18px;
    border-radius: 30px;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: background-color 0.3s ease, transform 0.3s ease;
    z-index: 999;
}

.cv-download-btn:hover {
    background-color: #a72e2b; /* Un poco más oscuro que var(--color-palette-2) */
    transform: scale(1.05);
}


/* Hover diferentes según el idioma */
#lang-btn:hover {
    background-color: #6d7d6e; /* Un poco más oscuro que 8a9d8b */
}

#lang-btn.spanish {
    background-color: var(--color-palette-1);
}

#lang-btn.spanish:hover {
    background-color: #d4826a; /* Un poco más oscuro que e69782 */
}

/* --- BARRA DE PROGRESO --- */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background-color: var(--color-palette-1);
    width: 0%;
    z-index: 100;
    transition: width 0.1s linear;
}

/* --- ENCABEZADO --- */
.cv-header {
    padding: 50px 50px 30px;
    text-align: center;
    border-bottom: 1px solid var(--border-light); 
}

h1, h2, h3, h4 {
    font-family: var(--font-secondary);
    font-weight: 800;
    color: var(--color-text);
    text-align: left;
    margin: 0;
}
h1 { font-size: 2.8em; margin: 0 0 10px; text-align: center; }
h2 { font-size: 1.1em; font-weight: 500; opacity: 0.8; margin: 0 0 20px; text-align: center; }

/* --- SECCIONES Y TÍTULOS --- */
.cv-section {
    padding: 30px 50px;
    animation: slideUp 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    opacity: 0;
}

@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { to { opacity: 1; } }

.cv-section:nth-of-type(1) { animation-delay: 0.4s; }
.cv-section:nth-of-type(2) { animation-delay: 0.5s; }
.cv-section:nth-of-type(3) { animation-delay: 0.6s; }
.cv-section:nth-of-type(4) { animation-delay: 0.7s; }
.cv-section:nth-of-type(5) { animation-delay: 0.8s; }

h3 {
    font-size: 1.1em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 25px;
    padding-bottom: 10px;
    position: relative;
}

h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 0;
    background-color: var(--color-text);
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.cv-section.is-visible h3::after {
    width: 40px;
}

/* --- ESTILO GENERAL PARA TODOS LOS ITEMS --- */
.job-item {
    margin-bottom: 25px;
}
.job-item:last-of-type { 
    margin-bottom: 0; 
}
.job-main h4 { 
    font-size: 1.2em; 
    font-weight: 600; 
    margin: 0 0 4px; 
}
.job-meta {
    margin: 0;
    opacity: 0.8;
    font-weight: 400;
    font-family: var(--font-primary);
}
.job-date{
    color: #474747;
}
.job-meta .job-date::before {
    content: '•';
    margin: 0 0.5em;
     
}
.job-company { 
    font-family: var(--font-primary); 
    font-weight: 400;
    opacity: 0.8; 
    margin: 0;
    color: #474747;
}

/* --- ESTILOS PARA DESPLEGABLES DE EXPERIENCIA --- */
.job-details {
    margin-top: 15px;
}

.details-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #000000;
}

/* Oculta el marcador nativo del <details> */
.details-summary::-webkit-details-marker {
    display: none;
}
.details-summary::marker {
    display: none;
}

/* Estilos de la flecha SVG */
.flechacapi {
    height: 10px;
    margin-right: 8px; /* Espacio entre el SVG y el texto */
    transition: transform 0.3s ease-in-out;
    transform-origin: center center;
    transform: rotate(0deg); /* Estado inicial: apunta a la derecha */
}

/* Rotación de la flecha cuando el <details> está abierto */
.job-details[open] .flechacapi {
    transform: rotate(90deg); /* Apunta hacia abajo */
}


.job-tasks {
    padding-left: 20px;
    margin-top: 10px;
    color: #333;
}
.job-tasks li {
        color: #000000;
    margin-bottom: 8px;
    text-align: justify;
    line-height: 1.9;
}

/* --- HABILIDADES --- */
.skills-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); 
    gap: 12px; 
}

.skills-grid span { 
    font-family: var(--font-secondary); 
    font-weight: 600; 
    background-color: transparent; 
    border: 1px solid var(--border-light); 
    padding: 10px 15px; 
    border-radius: 20px; 
    text-align: left; 
    font-size: 0.9em; 
    color: var(--color-text);
}


/* --- ESTILOS PARA CONTACTO --- */
.contact-pills-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px; 
    flex-wrap: wrap;
    margin-top: 10px;
}
.salto-linea {
  display: none;
}

.contact-pill {
    display: inline-flex;
    padding: 10px 15px; 
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 0.9em;
    color: var(--color-text);
    text-decoration: none;
    background-color: transparent;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* --- ESTILOS PARA EL PIE DE PÁGINA DEL CV --- */
.cv-footer {
    padding: 20px 50px 40px;
    text-align: center;
}
.ref-note {
    font-style: italic;
    font-size: 0.9em;
    opacity: 0.7;
    margin-top: 0;
}

/* Justificar texto en la sección "Sobre Mí" y aumentar interlineado */
#sobre-mi p {
    line-height: 2.0;
}


/* --- Media Queries para responsividad --- */
@media (max-width: 768px) { 
    *{

font-size: 14px;


    }

.contact-pills-container{
    gap: 3px;

}

    #sobre-mi p ,.job-tasks li{
        text-align:start;
    }

  .salto-linea {
    display: block;
  }
    .cv-container { margin: 0 auto; border-radius: 0; } 
    .job-item { gap: 5px; } 

    /* Reducir tamaño del nombre en móviles */
    h1 {
        font-size: 2.3em;
    }
}

@media print {
    /* Oculta el botón de descarga y el de idioma al imprimir */
    .cv-download-btn, .lang-toggle {
        display: none !important;
    }

    /* Asegura que el contenedor del CV no tenga sombras ni márgenes extraños */
    .cv-container {
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }

    /* Evita que los detalles de experiencia se corten entre páginas */
    .job-item {
        page-break-inside: avoid;
    }
}
