/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

div .job-details {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    font-size: 18px !important;
    line-height: 24px;
    letter-spacing: 0%;
    color: #0F172A;
}

/* Contenedor principal */
.job-listing-page {
    margin: auto;
    width: 80vw;
    background-color: #FFFFFF;
    padding: 40px 0px;
}

/* Título principal */
h1.job-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 56px !important;
    line-height: 62px;
    color: #0F172A;
    margin-bottom: 20px;
}

.job-details-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between; /* Espacia las columnas */
    gap: 20px;
}

.job-info-container {
    width: 25%;
    margin-right: 50px;
}

.job-info-box {
    display: flex;
    flex-direction: row;
    justify-content: flex-start; /* Espacia las columnas */
    align-items: flex-start;
    width: 100%;
    height: min-content;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    padding: 15px 19px;
    gap: 15px;
    margin-bottom: 15px;
}

/* Columna de icono */
.job-info-icon {
    display: flex;
    align-items: flex-start;
}

/* Columna de texto */
.job-info-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px; /* Espacio mínimo entre "Nivel" y "Básico" */
}

.job-info-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 14px !important;
    color: #0F172A;
    line-height: 24px;
    margin-bottom: 0;
}

.job-info-content {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px !important;
    color: #475569;
    line-height: 24px;
    letter-spacing: 0%;
    margin-bottom: 0;
    align-self: flex-start;
}

.related-jobs-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
}

.related-jobs-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 36px !important;
    line-height: 40px;
    color: #0F172A;
    letter-spacing: 0%;
    padding-bottom: 30px;
}

/* Tarjeta de trabajo */
.job-listing-card {
    width: calc(33.33% - 10px); /* Distribuye en tres columnas con espacio entre ellas */    
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 16px;
    border: 1px solid #94A3B8;
    padding: 33px;
    background-color: #FFFFFF;
}

/* Información del trabajo */
.job-info {
    flex-grow: 1;
}

p.related-job-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 20px !important;
    line-height: 28px;
    letter-spacing: 0%;
    color: #0F172A;
    margin-bottom: 15px;
}

.related-job-description {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    font-size: 16px !important;
    line-height: 24px;
    letter-spacing: 0%;
    color: #64748B;
    margin-top: 0;
}

.job-description {
    width: 60%;
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    font-size: 18px !important;
    line-height: 24px;
    letter-spacing: 0%;
    color: #0F172A;
    margin-top: 0;
}

/* Botones */
.job-actions {
    display: flex;
    justify-content: center; /* Centra horizontalmente */
    align-items: center; /* Centra verticalmente */
    gap: 15px; /* Espacio entre botones */
    width: 100%;
    margin-top: auto;
}

.job-details-button {
    width: fit-content;
    height: auto;
    padding: 8px 17px;
    border-radius: 4px;
    border: 1px solid #0F172A;
    color: #0F172A;
    font-family: 'Poppins', sans-serif;
    font-size: 16px !important;
    font-weight: 500;
    line-height: 20px;
    letter-spacing: 0%;
    text-align: center;
    text-decoration: none;
}

.job-listing-apply-button {
    width: fit-content;
    height: auto;
    padding: 8px 17px;
    background-color: #1868F2;
    color: #FFFFFF !important;
}

.job-listing-apply-button-top {
    display: block;
    height: auto;
    padding: 12px 8px;
    border-radius: 8px;
    background-color: #1868F2;
    color: #FFFFFF;
    font-family: 'Open Sans', sans-serif;
    font-size: 16px !important;
    line-height: 100%;
    font-weight: 600;
    letter-spacing: 0%;
    text-align: center;
}

.related-jobs {
    margin-bottom: 40px;
}

/**/

/* Contenedor principal de Vacantes Activas */
.job-listings {
    width: 100%;
    max-width: 1300px; /* Ajustado según el layout */
    padding: 12px 17px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.job-listings-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 36px !important;
    line-height: 40px;
    letter-spacing: 0%;
    color: #0F172A;
    margin-bottom: 0;
}

/* Contenedor de búsqueda */
.jobs-listing-search-container {
    width: 100%;
    height: auto;
    gap: 10px;
    padding: 12px 17px;
    border-radius: 8px;
    border: solid 1px #94A3B8;
    background-color: #FFFFFF;
    display: flex;
    flex-direction: column;
}

/* Filas de búsqueda */
.jobs-listing-search-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Diseño de las cajitas de búsqueda */
.job-search-box {
    position: relative;
    width: 100%;
    height: auto;
    padding: 0 13px;
    border-radius: 4px;
    border: 1px solid #CBD5E1;
    background-color: #FFFFFF;
    display: flex;
    align-items: center;
}

/* Icono dentro de la búsqueda */
.jobs-listing-search-icon {
    position: absolute;
    left: 10px;
    display: flex;
    align-items: center;
}

/* Dropdown de categoría */
/* Estilos generales del dropdown */
#jobsListingCategoryFilter {
    width: 100%;
    height: auto;
    padding: 9px 40px;
    border-radius: 4px;
    border: 1px solid #CBD5E1;
    font-size: 14px !important;
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    line-height: 20px;
    color: #64748B;
    background-color: #FFFFFF;
    cursor: pointer;
    appearance: none;
    position: relative;
    z-index: 0; /* Se coloca debajo del icono */
}

/* Simulación del placeholder */
#jobsListingCategoryFilter:invalid {
    color: #64748B;
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    font-size: 14px !important;
    line-height: 20px;
}


/* Estilos del placeholder en el campo de búsqueda y categoría*/
#jobsListingSearchBox::placeholder {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    font-size: 14px !important;
    line-height: 20px;
    letter-spacing: 0%;
    color: #64748B !important;
    vertical-align: middle;
}


/* Contenedor para la flecha del dropdown */
.jobs-listing-dropdown-arrow {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 21px;
    pointer-events: none;
}

/* Botón de restablecer */
#jobsListingResetButton {
    width: 96px;
    height: 40px;
    padding: 10px 8px;
    border-radius: 4px;
    border: none;
    background-color: #1868F2;
    color: #FFFFFF;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    font-size: 14px !important;
    line-height: 20px;
    letter-spacing: 0%;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#jobsListingResetButton:hover {
    background-color: #1056C3;
}


/* Campo de búsqueda */
#jobsListingSearchBox {
    width: 100%;
    border: none;
    font-size: 16px !important;
    outline: none;
    margin-left: 10px;
}

/* Dropdown de categoría */
.jobs-listing-category-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.jobs-listing-category-icon {
    position: absolute;
    left: 10px;
    display: flex;
    align-items: center;
    z-index: 2; /* Lo coloca por encima del dropdown */
    pointer-events: none;
}


/* Lista de Vacantes */
#jobList {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columnas iguales */
    gap: 20px; /* Espaciado entre las tarjetas */
    padding: 0; /* O usa el mismo 17px para que calce exacto */
    margin: 0;
}

.job-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%; /* Asegura que el contenido crezca y el footer se mantenga abajo */
    background-color: #FFFFFF;
    padding: 33px;
    border-radius: 16px;
    border: 1px solid #94A3B8;
}

.job-card-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 20px !important;
    line-height: 28px;
    color: #0F172A;
    letter-spacing: 0%;
    margin-bottom: 24px;
}

.job-card-excerpt {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    font-size: 16px !important;
    line-height: 24px;
    letter-spacing: 0%;
    color: #64748B;
}

.job-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end; /* Asegura que la fecha esté pegada abajo */
    margin-top: auto;
}

/* Fecha alineada abajo */
.jobs-listing-published-date {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    font-size: 11px !important;
    line-height: 13px;
    letter-spacing: 0%;
    text-transform: uppercase;    
    color: #475569;
    align-self: flex-end; /* Asegura que la fecha no quede en el medio */
}

/* Contenedor de botones alineados a la derecha */
.job-actions-container {
    margin-left: auto; /* Ahora sí mueve los botones a la derecha */
}

.job-actions {
    display: flex;
    gap: 10px;
}

.job-details-button,
.job-listing-apply-button {
    padding: 10px;
    border-radius: 4px;
    border: none;
    font-size: 16px !important;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    line-height: 20px;
    letter-spacing: 0%;
    text-align: center;
    
}

.job-details-button {
    background-color: transparent;
    border: 1px solid #0F172A;
    color: #0F172A !important;
}

.job-listing-modal {
    display: none;
    position: absolute; /* Cambiado de fixed a absolute */
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: #475569CC;
}

.job-listing-modal-content {
    background-color: #FFFFFF;
    display: flex;
    flex-direction: column; /* Asegura que todo esté en una columna */
    align-items: center; /* Centra el contenido */
    width: 60%;
    margin: 10% auto;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 
        0px 10px 10px -5px rgba(0, 0, 0, 0.04),
        0px 20px 25px -5px rgba(0, 0, 0, 0.10);
}

.job-listing-modal-form {
    width: 80%; /* Ajusta el formulario para que ocupe toda la columna */
}

.job-listing-modal-header {
    display: flex;
    align-items: center;
    justify-content: center; /* Centra el contenido horizontalmente */
    gap: 20px; /* Espaciado entre el logo y la "X" */
    width: 100%;
    padding: 20px;
    position: relative;
}

.job-listing-modal-close {
    position: absolute;
    right: 20px; /* Alinea la "X" a la derecha */
    cursor: pointer;
    width: 14px;
    height: 14px;
}

.job-listing-modal-text {
    text-align: center;
    margin-top: 10px; /* Espaciado entre el header y los textos */
}

.job-listing-logo {
    max-width: 150px;
    margin-bottom: 15px;
}

.job-listing-modal-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 26px !important;
    line-height: 26px;
    letter-spacing: -0.03em;
    color: #0F172A;
    margin-bottom: 10px;
}

.job-listing-modal-subtitle {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    font-size: 14px !important;
    line-height: 20px;
    color: #475569;
}

.wpcf7 label.form-postulacion {
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    font-size: 14px !important;
    line-height: 20px;
    letter-spacing: 0%;
    color: #334155;    
}

.wpcf7 input[type=submit] {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 14px !important;
    line-height: 20px;
    letter-spacing: 0%;
    text-align: center;
    color: #FFFFFF; /* Color de texto blanco */
    background-color: #1868F2; /* Color de fondo azul */
    width: 100%;
    height: 40px;
    border-radius: 4px;
    padding-top: 3px;
    padding-right: 63px;
    padding-bottom: 3px;
    padding-left: 63px;
    border: none; /* Elimina el borde predeterminado */
    cursor: pointer; /* Cambia el cursor al pasar sobre el botón */
}

.wpcf7 input[type=text], .wpcf7 input[type=email], .wpcf7 input[type=url] {
    border-radius: 6px !important;
    padding: 9px 13px !important;
    background: var(--Background, #FFFFFF) !important;
    border: 1px solid var(--Color-neutral-300, #CBD5E1) !important;
    box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.05) !important;
}

.wpcf7 textarea {
    height: 93px !important;
    border-radius: 6px !important;
    background: var(--Background, #FFFFFF) !important;
    border: 1px solid var(--Color-neutral-300, #CBD5E1) !important;
    box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.05) !important;
}

.wpcf7 label .form-postulacion-required {
    color: #B91C1C;
}

@media screen and (max-width: 768px) {
    #jobList {
        grid-template-columns: 1fr; /* Solo una columna */
    }

    .jobs-listing-search-row {
        flex-direction: column; /* Fila de filtros uno debajo del otro */
        align-items: stretch;
    }

    .job-card {
        padding: 20px;
    }

    #jobsListingResetButton {
        width: 100%;
        margin-top: 10px;
    }

    .job-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .job-actions-container {
        width: 100%;
        margin: 0; /* Por si hay sangrías extra */
    }
      
    .job-details-button,
    .job-listing-apply-button {
        width: 100%;
    }
    
    .jobs-listing-published-date {
        align-self: flex-start;
        margin-bottom: 8px;
        text-align: left;
    }

    .job-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    #job-listing-apply-modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(15, 23, 42, 0.85); /* fondo oscuro */
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 1000;
    }
    
    .job-listing-modal-content {
        width: 93vw;
        max-height: 90vh; /* para evitar desbordamientos */
        overflow-y: auto;
        background-color: #fff;
        border-radius: 16px;
        padding: 24px;
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    }

    .job-listing-modal-form {
        width: 100%;
    }
    
    /* Single job*/

    .job-listing-page {
        width: 100vw;
        padding: 24px 16px;
        box-sizing: border-box;
      }
    
      .job-title,
      .job-description,
      .job-details-container,
      .job-info-container {
        width: 100%;
        padding: 0;
        box-sizing: border-box;
      }
    
      .job-details-container {
        flex-direction: column;
        gap: 24px;
      }
    
      .related-jobs-container {
        flex-direction: column;
      }
    
      .job-listing-card {
        width: 100%;
        padding: 24px;
      }
    
      .job-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
      }
    
      .job-details-button,
      .job-listing-apply-button {
        width: 100%;
      }
    
      .job-listing-apply-button-top {
        width: 100%;
      }
    
      .related-jobs-title {
        font-size: 28px !important;
        padding-bottom: 20px;
      }
    
      .job-description {
        font-size: 16px !important;
      }

}
  