body {
    font-family: 'GMX-Regular', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f8f5f5;
}

main {
    flex: 1;
    margin-top: auto;
    background-color: #f1eeea;
    display: grid;
    place-items: center;
    padding: 2rem 0;
    font-family: 'Montserrat', sans-serif;
    width: 100%;
}


/* Intro Section with Improved Visual Design */
.intro {
    text-align: center;
    padding: 2rem 5%;
    background-color: #f0f7f2;
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 95%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.info-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 90%;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.title2 {
    font-family: 'GMX', sans-serif;
    font-size: clamp(2.2rem, 5vw, 4.5rem);
    font-weight: 800;
    margin-top: 0;
    color: #244711;
    text-align: center;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    line-height: 1.2;
}

.title2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: #4c9a2a;
    margin: 0.5rem auto;
    border-radius: 2px;
}

.sub {
    width: 90%;
    max-width: 700px;
    font-family: 'GMX', sans-serif;
    font-size: clamp(1rem, 1.5vw, 1.5rem);
    color: #3a7524;
    text-align: center;
    margin: -1rem auto 1rem;
    line-height: 1.4;
    font-weight: 500;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
}

.title3 {
    font-family: 'GMX', sans-serif;
    font-weight: 700;
    font-size: clamp(1.4rem, 4vw, 2.5rem);
    color: #244711;
    text-align: center;
    margin: 0.5rem 0 1rem;
    padding: 0.5rem 1.5rem;
    background-color: rgba(36, 71, 17, 0.08);
    border-radius: 30px;
    display: inline-block;
    box-shadow: 0 4px 8px rgba(36, 71, 17, 0.1);
}

/* Filters Section with Modern UI */
.filters {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    width: 80%;
    max-width: 800px;
    gap: 2rem;
    margin: 0.5rem auto 2rem;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.custom-select-candidature,
.custom-select-cargo {
    position: relative;
    width: auto;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
}

.custom-select-candidature{
    position: relative;
    width: auto;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5;
}

.custom-select-candidature:hover,
.custom-select-cargo:hover {
    transform: translateY(-2px);
}

.selected-option {
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #244711;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(36, 71, 17, 0.25);
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    z-index: 10000;
}

.selected-option:hover {
    background-color: #2f5b16;
    box-shadow: 0 6px 15px rgba(36, 71, 17, 0.35);
}

.selected-option i {
    transition: transform 0.3s ease;
    margin-left: 0.8rem;
    z-index: 10000;

}

.options {
    position: absolute;
    top: 110%;
    left: 0;
    width: 100%;
    border: none;
    border-radius: 15px;
    background-color: #ffffff;
    display: none;
    z-index: 1000;
    margin-top: 0.3rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.option {
    padding: 0.8rem 1.2rem;
    position: relative;
    transition: all 0.2s ease;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: #244711;
    border-bottom: 1px solid rgba(36, 71, 17, 0.1);
    z-index: 10000;
}

.option:last-child {
    border-bottom: none;
}

.option:hover {
    background-color: rgba(36, 71, 17, 0.1);
    padding-left: 1.5rem;
}

.option .tooltip {
    display: none;
    position: absolute;
    left: 1%;
    top: 0;
    margin-left: 0.5rem;
    padding: 1rem;
    background-color: #ffffff;
    color: #244711;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    line-height: 1.5;
    z-index: 10001;
    border-left: 4px solid #4c9a2a;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    height: auto;
    width: 250px;
}

.option:hover .tooltip {
    display: block;
}

.custom-select-candidature.active .selected-option,
.custom-select-cargo.active .selected-option {
    background-color: #2f5b16;
    box-shadow: 0 2px 8px rgba(36, 71, 17, 0.2);
}

.custom-select-candidature.active .selected-option i, 
.custom-select-cargo.active .selected-option i {
    transform: rotate(180deg);
}

.custom-select-candidature.active .options, 
.custom-select-cargo.active .options {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.candidates {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    justify-content: center;
    margin-top: 2rem;
    width: 95%;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

.candidate-card {
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    border: 1px solid rgba(36, 71, 17, 0.1);
    position: relative;
    align-items: center;
    max-width: 500px;
    width: 100%;
}

.candidate-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(36, 71, 17, 0.15);
}

.img-container {
    height: 280px;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.candidate-card:hover .img-container img {
    transform: scale(1.05);
}

.info-container {
    padding: 20px 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
}

.numero-circle {
    width: 95%;
    min-width: 120px;
    height: 36px;
    background-color: #56813e;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -18px;
    right: 50%;
    transform: translateX(50%);
    border: 2px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2;
    padding: 0 12px;
    font-size: 0.9rem ;
}

.numero-circle span {
    color: white;
    font-weight: 700;
    font-size: 1rem;
    margin-left: 5px;
}

.candidate-data {
    padding-top: 5px;
    text-align: center;
    width: 100%;
}

.name,
.cargo {
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.name {
    color: #183708;
    font-size: clamp(1.1rem, 1.5vw, 1.5rem);
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    width: 100%;
    max-width: 90%;
    text-align: center;
    word-wrap: break-word;
    white-space: normal; 
    overflow-wrap: break-word;
}

.cargo {
    font-size: clamp(0.9rem, 1vw, 1rem);
    color: #244711;
    margin-top: 0.5rem;
    line-height: 1.4;
    font-weight: 500;
    width: 100%;
    max-width: 90%;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}


.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    background-color: rgba(36, 71, 17, 0.05);
    border-radius: 10px;
}

/* Loading State */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    width: 100%;
}

.loading i {
    font-size: 3rem;
    color: #2f6a3a;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow: auto;
    justify-content: center;
    align-items: center;
}

.video-container {
    display: flex;
    flex-direction: column;
    width: 40%;
    max-width: 550px;
    min-width: 300px;
    height: auto;
    background-color: #e7e0e0;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    position: relative;
    border-radius: 10px;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    margin-left: 100px;
    display: none;
}

.info-candidate {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 10px; 
    background-color: #f0e7e7;
    border-bottom: 1px solid #ddd;
    align-items: center;
    justify-content: center;
    gap: 3%;
}

.info-candidate h3 {
    margin: 7px;
    font-size: 18px;
    color: #2f6a3a;
    font-weight: bolder;
    text-align: center;
    border-radius: 10px;
    padding: 2px;
}

#showIframeButton {
    padding: 8px 16px;
    background-color: #2f6a3a;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

#showIframeButton:hover {
    background-color: #124816;
}

.content-area {
    display: flex;
    flex: 1;
    height: calc(100% - 60px);
}

.video-wrapper {
    flex: 1;
    min-width: 50%;
    height: 100%;
    padding-left: 15px;
    padding-right: 15px;
    padding-top: 15px;
    padding-top: -15px;
    box-sizing: border-box;
}

#candidate-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #000;
}

.pdf-container {
    flex: 1;
    height: 100%;
    padding: 15px;
    box-sizing: border-box;
    background-color: #e7e0e0;
    border-left: 1px solid #ddd;
    display: none;
    justify-content: center;
    align-items: center;
    display: flex;
    flex-direction: column;
    border-radius: 10px;
}

.pdf-container img {
    margin: 10px;
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
}

.pdf-container iframe{
    width: auto;
    height: auto;
}


.zoomable {
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.zoomed {
    transform: scale(1.1);
    cursor: zoom-out;
}

/* Estilos para los botones de navegación */
.navigation-buttons {
    position: absolute;
    width: 130%;
    display: flex;
    justify-content: space-between;
    top: 40%;
    transform: translateY(-50%);
    transform: translateX(-11.5%);
    z-index: 10;
    padding: 0 10px;
    pointer-events: none; 
    margin-bottom: 20px;
}

.nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(156, 158, 157, 0.8); 
    color: white;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    pointer-events: auto; 
}

.nav-btn:hover {
    background-color: rgb(82, 83, 82);
    transform: scale(1.1);
}

.nav-btn.disabled {
    background-color: rgba(128, 128, 128, 0.5);
    cursor: not-allowed;
}

.nav-btn i {
    font-size: 18px;
}

.aprendamos-container-title {
    width: 80%;
    margin: 0 auto; 
}

.aprendamos-title1 {
    width: 100%;
    display: flex;
    justify-content: left;
    align-items: center;
    font-family: "Lora", sans-serif;
    font-size: clamp(1.5rem, 5vw, 4rem);
    margin-top: 10px;
    color: #244711;
}

.aprendamos-title2 {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Lora", sans-serif;
    font-size: clamp(1rem, 5vw, 1.8rem);
    margin-top: 10px;
    color: #204b09;
    text-align: center;
    font-weight: bold;
}

/* Custom Language Selector Styles */
.aprendamos-lenguage-selector {
    margin-top: 20px;
    margin-bottom: 30px;
}

.aprendamos-lenguage-custom-select {
    position: relative;
    width: 200px;
    font-family: "Lora", sans-serif;
    font-weight: bolder;
}

.aprendamos-lenguage-selected-option {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #244711;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: #fefbfb;
}

.aprendamos-lenguage-selected-option i {
    transition: transform 0.3s ease;
}

.aprendamos-lenguage-options {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 10px;
    background-color: #244711;
    display: none;
    z-index: 1000;
}

.aprendamos-lenguage-option {
    padding: 10px;
    position: relative;
    transition: background-color 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: #fff9f9;
}

.aprendamos-lenguage-option:hover {
    background-color: #f5f5f5;
    color:#2f5b16
}

/* Show options when clicked */
.aprendamos-lenguage-custom-select.active .aprendamos-lenguage-options {
    display: block;
}

.aprendamos-lenguage-custom-select.active .aprendamos-lenguage-selected-option i {
    transform: rotate(180deg);
}

.aprendamos-video-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.aprendamos-video-wrapper {
    position: relative;
    background-color: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.aprendamos-video-wrapper video {
    width: 100%;
    border-radius: 10px;
    cursor: pointer;
}

.aprendamos-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
}

.aprendamos-play-button {
    background-color: rgba(255,255,255,0.8);
    color: #1a5f3e;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 40px;
    margin-top: 100px;
}

.aprendamos-sign-language {
    position: absolute;
    right: 15px;
    max-width: 50px;
    margin-top: 243px;
}

.aprendamos-kumiai-text-container {
    text-align: center;
    color: rgb(12, 12, 12);
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
    font-size: 14px;
    line-height: 1.5;
}

.aprendamos-kumiai-text-container p {
    margin: 0 0 10px 0;
}

/* Indicador de carga */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}
        
.loading i {
    font-size: 3rem;
    color: #2f6a3a;
        animation: spin 1s infinite linear;
    }
        
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tablet Styles */
@media (max-width: 992px) {
    .aprendamos-container-title {
        width: 90%;
    }
    
    .aprendamos-play-button {
        width: 60px;
        height: 60px;
        font-size: 30px;
        margin-top: 80px;
    }
    
    .aprendamos-kumiai-text-container {
        font-size: 13px;
    }
}

/* Media Queries para diferentes tamaños de pantalla */
@media (max-width: 768px) {

    .title2{
        width: 150%;
        margin-bottom: 30px;
        font-size: clamp(1.2rem, 5vw, 2.5rem);
    }
    
    .sub {
        display: block;
        visibility: visible;
    }

    .title3{
        margin-top: -20px;
        width: 90%;
    }

    .filters{
        width: 100%;
    }

    .custom-select-candidature, .custom-select-cargo {
        position: relative;
        width: 200px;
        cursor: pointer;
        margin: 10px;
    }

    .options {
        z-index: 1000; 
    }

    .candidates{
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        padding: 1%;
    }

    
    footer {
        grid-template-columns: 1fr;
    }
    
    .link-media, .social-media {
        width: 100%;
    }

    .content-area {
        flex-direction: column;
    }
    
    .video-wrapper, .pdf-container {
        width: 100%;
        min-width: 100%;
    }
    
    .pdf-container {
        border-left: none;
        border-top: 1px solid #ddd;
        height: 300px;
    }

    .video-container {
        height: 70%;
        width: 85%;
        margin: 5% auto;
        padding-bottom: 20px;
    }

    .info-candidate {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        place-items: center;
        padding: 15px;
        gap: 2%;
      }

    .info-candidate h3 {
        font-size: 15px;
        display: flex;
        justify-content: center;
        margin: 0;
    }    
    
    #candidate-type{
        display: none;
    }

    #showIframeButton {
        padding: 8px 15px;
    }

    .filters{
        margin-top: 20px;
        width: 100%;
    }

    .options{
        width: auto;
        z-index: 10000;
    }

    .option{
        width: auto;
        z-index: 10000;
    }
    
    .option .tooltip {
        display: none;
    }
    
    .option:hover .tooltip {
        display: none;
    }

    .navigation-buttons {
        width: 94.5%;
    }

    .close-btn{
        display: block;
    }

    .aprendamos-container-title {
        width: 95%;
    }
    
    .aprendamos-video-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .aprendamos-title1 {
        font-size: clamp(1.2rem, 4vw, 2.5rem);
    }
    
    .aprendamos-title2 {
        font-size: clamp(0.9rem, 4vw, 1.5rem);
    }
    
    .aprendamos-play-button {
        width: 50px;
        height: 50px;
        font-size: 25px;
        margin-top: 25%;
    }
    
    .aprendamos-video-wrapper {
        padding: 10px;
        margin-bottom: 25px;
    }
    
    .aprendamos-kumiai-text-container {
        font-size: 12px;
    }
    
    .aprendamos-lenguage-custom-select {
        width: 180px;
    }

    .navigation-buttons {
        top: 94%;
        bottom: 10px;
        transform: translateX(3%);
        margin-bottom: 50px;
    }
    
}

@media (max-width: 480px) {

    .numero-circle {
        width: 95%;
        min-width: 120px;
        height: 36px;
        background-color: #56813e;
        border-radius: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: -18px;
        right: 50%;
        transform: translateX(50%);
        border: 2px solid white;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        z-index: 2;
        padding: 0 12px;
        font-size: 0.85rem;
    }
    
    .numero-circle span {
        color: white;
        font-weight: 700;
        font-size: 1rem;
    }

    .pdf-container img {
        margin: 10px;
        max-width: 110%;
        max-height: 96%;
        border-radius: 10px;
    }

    .navigation-buttons {
        top: 92%;
        bottom: 10px;
        transform: translateX(3%);
        margin-bottom: 50px;
    }
    
    .title2 {
        font-size: clamp(1.2rem, 4vw, 2rem);
    }
    
    .sub {
        font-size: clamp(0.8rem, 1vw, 1rem);
        margin-top: -50px;
        margin-bottom: 20px;
        visibility: visible;
        display: block;
    }

    .title3{
        margin-bottom: 0;
        width: 90%;
        padding-top: 2px;
        padding-bottom: 2px;
        font-size: clamp(1.4rem, 4vw, 2.5rem);
    }

    .filters{
        gap: 5%;
    }
    
    .filters button {
        font-size: 0.8rem;
    }

    .custom-select-candidature, .custom-select-cargo {
        position: relative;
        width: auto;
        cursor: pointer;
        font-size: 20px;
    }

    #candidatura-options{
        z-index: 100;
    }

    .candidates{
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        padding: 1%;
    }
    
    .candidate-card {
        min-width: 100px;
        height: auto;
    }

    .candidate-card img {
        display: flex;
        width: 100%;
        border-radius: 5px;
    }

    .img-container {
        height: 180px;
        overflow: hidden;
        position: relative;
        width: 100%;
    }
    
    .img-container img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: all 0.5s ease;
    }

    .selected-option {
        font-size: 0.8rem;
        font-weight: 600;
        transition: all 0.3s ease;
    }

    .options{
        width: auto;
        z-index: 10000;
    }

    .option{
        width: auto;
        z-index: 10000;
    }
    
    .option .tooltip {
        display: none;
    }

    .option:hover .tooltip {
        display: none;
    }

    .video-modal{
        display: grid;
        place-items: center;
    }

    .aprendamos-container-title {
        width: 90%;
    }
    
    .aprendamos-lenguage-custom-select {
        width: 150px;
    }
    
    .aprendamos-video-container {
        gap: 15px;
    }
    
    .aprendamos-play-button {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .aprendamos-kumiai-text-container {
        font-size: 11px;
    }
    
    .aprendamos-sign-language {
        max-width: 30px;
        margin-top: 180px;
    }
    
}
