:root {
    --color-primary: #003050;
    --color-text: #333333;
    --color-background: #FFFFFF;
    --color-section-bg: #F4F4F4;
    --letra-chica: #666;
    --degradado: linear-gradient(90deg,rgba(0, 48, 80, 1) 0%, rgba(9, 9, 121, 1) 50%, rgba(20, 119, 185, 1) 100%);
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.experience, .education, .carousel-slide, .section {
    padding: 25px;
}
ul{
    padding-left: 25px;
    margin-top: 10px;
}
li {
    margin-bottom: 10px;
    line-height: 1.5;
}
h2, h3 {
    margin-bottom: 10px;
}
p {
    margin-bottom: 12px;
    line-height: 1.6;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.header {
    background-image: url(../assets/imagenes/header.png);
    background-position: center;
    background-size: cover;
    color: var(--color-background);
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header h1 {
    margin-bottom: 5px;
    font-size: 2.5em;
}

.header p {
    margin: 5px 0;
    font-size: 1.1em;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.contact-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    background-color: var(--color-background);
    color: var(--color-primary);
    text-decoration: none;
    border: 2px solid var(--color-primary);
    border-radius: 20px;
    font-weight: bold;
    transition: background-color 1s, color 1s;
    position: relative;
    overflow: hidden;
    z-index: 1;
    max-width: 100%;
}


.contact-button:hover {
    cursor: pointer;
    color: var(--color-background);
    border-color: var(--color-background);
}

.contact-button:hover span{
    color: var(--color-background)
}

.contact-button::before{
    content:'';
    position: absolute;
    top:0;
    left:0;
    background-color: var(--color-primary);
    height: 100%;
    width: 100%;
    transform: translateX(-100%);
    transition: transform 1s ease-in-out;
    z-index: -1;
}

.contact-button:hover::before{
    transform: translateX(0%);
}

.section {
    background-color: var(--color-section-bg);
    padding: 25px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(180, 21, 21, 0.05);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    position: relative;
}

.section h2 {
    color: var(--color-primary);
    border-bottom: 3px solid var(--color-primary);
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.skills-projects-group {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.skills-projects-group .section {
    flex: 1;
    margin-bottom: 0px;
}

.click-mas {
    cursor: pointer;
    font-style: italic;
    color: var(--letra-chica);
    font-size: 0.9em;
    margin-top: 5px;
    display: inline-block;
}

.click-mas:hover {
    color: var(--color-primary);
    cursor: pointer;
    transform: scale(1.1);

}

.about p {
    text-align: justify;
}

.two-columns {
    display: flex;
    gap: 30px;
}

.experience,
.education {
    flex: 1;
    background-color: var(--color-background);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.job-card {
    margin-bottom: 20px;
    padding-left: 15px;
    border-left: 3px solid var(--color-primary);
}

.job-card h3 {
    margin: 0;
    color: var(--color-primary);
    font-size: 1.2em;
}

.period {
    font-style: italic;
    color: var(--letra-chica);
    font-size: 0.9em;
    margin-top: 5px;
    margin-bottom: 10px;
}

.job-card ul {
    padding-left: 20px;
    margin-top: 5px;
    font-size: 0.95em;
}


.footer {
    text-align: center;
    padding: 15px;
    background-color: var(--color-text);
    color: var(--color-background);
    font-size: 0.85em;
    margin-top: 30px;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    padding: 0 40px;
    margin-bottom: 20px;
}

.carousel-track {
    display: flex;
    transition: transform 0.3s ease-in-out;
}

.carousel-slide {
    flex: 0 0 100%;
    min-width: 100%;
    box-sizing: border-box;
    display: none;
    cursor: pointer;
    padding: 15px;
    border-radius: 8px;
    transition: background-color 0.3s; 
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--color-primary);
    color: var(--color-background);
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 10;
    font-size: 1.5em;
    line-height: 1;
    border-radius: 4px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-btn:hover {
    opacity: 1;
}

.prev-btn {
    left: 2%;
}

.next-btn {
    right: 2%;
}

.skill-group {
    padding: 20px 10px;
    background-color: var(--color-background);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(175, 15, 15, 0.05);
    
}

.project-group {
    padding: 20px 10px;
    background-color: var(--color-background);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(175, 15, 15, 0.05);
}

.project-group h3 {
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
}

.skill-group h3 {
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
}


.main-nav {
    background-color: var(--color-text);
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-background);
    font-size: 1.8rem;
    cursor: pointer;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.main-nav a {
    color: var(--color-background);
    text-decoration: none;
    padding: 10px 18px;
    margin: 0 5px;
    font-size: 0.95em;
    font-weight: 500;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 4px;
    line-height: 1;
    vertical-align: middle;
}

.main-nav a:hover {
    background-color: var(--color-primary);
}


.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: var(--color-background);
    margin: 15% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.close-btn {
    color: var(--color-primary);
    float: right;
    font-size: 35px;
    font-weight: bold;
    line-height: 1;
}

.close-btn:hover,
.close-btn:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.transformar-section {
    transition: background-color 0.3s;
}
.transformar-section:hover {
    transform: scale(1.01);
    box-shadow: 0 15px 30px rgba(5, 42, 255, 0.15);
}

#click-about {
    cursor: pointer;
}


.language-selector {
   margin-left: 15px;
}
#language-switcher {
    background-color: var(--color-text); 
    color: var(--color-background); 
    border: 1px solid var(--color-text);
    padding: 5px;
    border-radius: 4px;
    font-size: 0.95em;
    cursor: pointer;
}

#language-switcher:hover {
    background-color: var(--color-primary); 
}

#language-switcher option {
    background-color: var(--color-primary);
    color: var(--color-background);
}


@media (max-width: 850px) {
    html {
        font-size: 90%
    }
    /* El menú se convierte en hamburguesa */
    .menu-toggle {
        display: block;
        margin-right: auto;
    }

    .nav-links {
        display: none; /* Se oculta por defecto */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-text);
        padding: 20px;
        list-style: none;
    }

    .nav-links.active {
        display: flex; /* Se muestra al abrir */
    }

    .main-nav a {
        margin: 5px 0;
        width: 100%;
        text-align: center;
    }

    /* Columnas a una sola fila */
    .skills-projects-group, .two-columns {
        flex-direction: column;
        width: 100%;
        gap: 20px;
    }

    .header h1 {
        font-size: 2em;
    }
    .skills-projects-group .section, .experience, .education {
        flex: 1 1 100%;
        width: 100%;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 85%
    }
    .container {
        flex-direction: column;
        align-items: center;
        padding: 10px; 
    }

    .header {
        padding: 30px 10px;
    }

    .header h1 {
        font-size: 1.6em; 
    }

    .contact-info {
        /* flex-direction: column; */
        align-items: center;
        width: 100%;
        gap: 10px;
    }

    .contact-button {
        /* width: 100%;  */
        max-width: 100%; 
        display: flex;
        justify-content: flex-start;
    }

    .section, .experience, .education {
        padding: 15px; 
    }

    .job-card {
        padding-left: 10px;
    }
}

/* Contenedor principal */
.dropdown {
    position: relative;
    display: inline-block;
}

/* Ocultar el menú por defecto */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--color-background);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 9999;
    border-radius: 4px;
}

/* Estilo de los links dentro del menú */
.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover { background-color: var(--color-section-bg); }

/* Mostrar al pasar el mouse */
.dropdown:hover .dropdown-content {
    display: block;
}

.no-break {
    white-space: nowrap;
}

.project-img img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
    cursor: pointer;
}
.project-img img:hover {
    transform: scale(1.05);
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}

 .project-img {
    position: relative;
    width: calc(100% + 40px);
    margin-left: -20px;       
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lightbox {
    z-index: 2000; 
    background-color: rgba(0, 0, 0, 0.9) !important; 
    display: none;
    justify-content: center;
    align-items: center;
}

#lightbox-img {
    max-width: 90%;
    max-height: 90vh;
    border: 3px solid white;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}