/* HERO */
.convocatorias-hero {
    height: 60vh;
    background: url('/public/recursos/cards/convocatorias.webp') center/cover no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.convocatorias-hero .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(30, 59, 138, 0.748), rgba(15, 23, 42, 0.803));
}

.hero-content {
    position: relative;
    text-align: center;
    color: #fff;
    width: 100%;
    padding: 0 5%;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
}

.hero-content p {
    font-size: 1.2rem;
    opacity: .9;
    max-width: 800px;
    margin: 0 auto;
}

/* CONVOCATORIAS SECTION */
.convocatorias-section {
    padding: 80px 0;
    background-color: #f8fafc;
    position: relative;
}

.convocatorias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* JOB CARDS */
.job-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Ensure all cards in a row have the same height */
}

.job-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: #ecd211;
    /* Institutional Yellow - No gradient */
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.job-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.job-card:hover::before {
    transform: scaleX(1);
}

.card-header {
    padding: 25px 25px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.job-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: #1e3b8a;
    /* Institutional Blue - No gradient */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ecd211;
    /* Yellow icon */
    font-size: 24px;
}

.card-header h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: #1e293b;
    margin: 0;
}

.job-card .description {
    padding: 0 25px 15px;
    color: #64748b;
    line-height: 1.6;
    flex-grow: 1;
    /* Pushes details and actions to the bottom */
}

.details {
    padding: 0 25px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #475569;
    font-size: 0.9rem;
}

.detail-item i {
    color: #1e3b8a;
    /* Blue icon */
    width: 20px;
    text-align: center;
}

.card-actions {
    padding: 20px 25px;
    background-color: #f8fafc;
    display: flex;
    gap: 12px;
    margin-top: auto;
    /* Ensures actions are always pinned to bottom */
}

.view-details-btn {
    flex: 1;
    padding: 12px 15px;
    background-color: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    color: #1e3b8a;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.view-details-btn:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

.apply-link {
    flex: 1;
    padding: 12px 15px;
    background: #1e3b8a;
    /* Institutional Blue - No gradient */
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.apply-link:hover {
    background: #152961;
    /* Darker blue on hover */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 59, 138, 0.3);
}

/* MODAL STYLES */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-cont {
    background: white;
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    position: relative;
}

.modal-overlay.active .modal-cont {
    transform: scale(1);
}

.close-modal-x {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f1f5f9;
    border: none;
    color: #64748b;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal-x:hover {
    background-color: #e2e8f0;
    color: #1e293b;
}

.modal-header {
    padding: 30px 30px 20px;
    background: #1e3b8a;
    /* Institutional Blue - No gradient */
    color: white;
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 4px solid #ecd211;
    /* Institutional Yellow accent line */
}

.header-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ecd211;
}

.header-text .subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0 0 5px;
}

.header-text h2 {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
}

.modal-body-container {
    padding: 30px;
    max-height: calc(90vh - 200px);
    overflow-y: auto;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.detail-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: #1e3b8a;
}

.detail-text {
    color: #475569;
    line-height: 1.7;
    margin: 0;
}

.requirements-box {
    background-color: #f8fafc;
    border-left: 4px solid #1e3b8a;
    padding: 15px;
    border-radius: 0 8px 8px 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.requirements-box i {
    color: #ecd211;
    /* Yellow check icon */
    margin-top: 3px;
}

.modal-footer {
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.btn-confirm-apply {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 25px;
    background: #1e3b8a;
    /* Institutional Blue - No gradient */
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    width: 100%;
}

.btn-confirm-apply:hover {
    background: #152961;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(30, 59, 138, 0.3);
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .convocatorias-grid {
        grid-template-columns:  1fr;
        gap: 20px;
    }

    .modal-header {
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }

    .header-icon {
        margin: 0 auto;
    }

    .modal-body-container {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .card-actions {
        flex-direction: column;
    }

    .view-details-btn,
    .apply-link {
        width: 100%;
    }
}

/* ANIMATIONS */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.job-card {
    animation: fadeIn 0.6s ease forwards;
}

/* CUSTOM SCROLLBAR */
.modal-body-container::-webkit-scrollbar {
    width: 8px;
}

.modal-body-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.modal-body-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.modal-body-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}