.empleos-hero {
    background: #031233;
    color: #ffffff;
    padding: 120px 0 56px;
    position: relative;
    overflow: hidden;
}

.empleos-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.empleos-hero-content {
    position: relative;
    z-index: 1;
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

.empleos-hero-title {
    margin: 0;
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.15;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.empleos-hero-description {
    margin: 16px auto 0;
    max-width: 640px;
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.95;
    color: #ffffff;
}

@media (max-width: 768px) {
    .empleos-hero {
        padding: 104px 0 44px;
    }

    .empleos-hero-title {
        font-size: 2.1rem;
    }

    .empleos-hero-description {
        font-size: 1rem;
        padding: 0 12px;
    }
}

/* Custom styles for jobs cards */
#main-jobs {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch; /* Permite que todas las tarjetas de la fila tengan la misma altura */
}

.job-card-container {
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
}

.job-card-container .post-standard {
    display: flex;
    flex-direction: column;
    height: 100%; /* Hace que la tarjeta ocupe toda la altura de la columna */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    background: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.job-card-container .post-standard:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.job-card-container .post-thumb {
    width: 100%;
    height: 220px; /* Forzar altura igual para que el texto de todas las tarjetas se alinee */
    position: relative;
    background-color: #031233;
    overflow: hidden;
}

.post-thumb-blur-bg {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background-size: cover;
    background-position: center;
    filter: blur(20px);
    opacity: 0.5;
    z-index: 0;
}

.job-card-container .post-thumb img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.job-card-container .post__content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.job-card-container .post__content-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.job-card-container .post__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #031233;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3.5rem; /* Forzar espacio de 2 líneas */
}

.job-card-container .post__text {
    flex-grow: 1;
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 20px;
}

.job-description-preview {
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Maximo 4 lineas */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    height: 6rem; /* Forzar espacio de 4 líneas para que siempre midan lo mismo */
}

/* Job Modal Styles */
.job-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.job-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.job-modal-content {
    background: #fff;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    border-radius: 12px;
    padding: 30px;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.job-modal-overlay.active .job-modal-content {
    transform: translateY(0);
}

.job-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    color: #888;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}

.job-modal-close:hover {
    color: #031233;
}

.job-modal-body {
    margin-top: 10px;
}

/* Mobile adjustments for job cards */
@media (max-width: 767px) {
    .job-card-container .post__content {
        padding: 16px; /* Menos padding interior en teléfono */
    }

    .job-card-container .post__title {
        height: auto; /* No forzar altura en teléfono porque están apilados */
        margin-bottom: 8px;
    }

    .job-description-preview {
        height: auto; /* No forzar altura en teléfono */
    }
}

