/* Jobs Page - Clean & Simple */

body {
    background-color: #f1f3f4;
}

.search-header h2 {
    color: #000C4F;
    font-weight: 700;
}

.filters-bar {
    border: 1px solid #dee2e6;
}

.filters-bar .form-label {
    color: #000C4F;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.results-info {
    color: #000C4F;
    font-size: 14px;
}

.job-item {
    transition: all 0.2s ease;
    border: 1px solid #dee2e6;
    overflow: hidden;
}

.job-item p {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.job-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.job-item h5 {
    color: #000C4F;
}

.job-item .btn:hover {
    background-color: #B61272 !important;
    border-color: #B61272 !important;
    transform: translateY(-1px);
}

.job-detail-panel .card {
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

/* Estilos para el detalle del trabajo */
.job-detail-header {
    background: linear-gradient(135deg, #000C4F 0%, #0a1a5e 100%);
    padding: 20px;
    border-radius: 0;
}

.job-detail-header h5 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.job-detail-header .company-name {
    font-size: 1rem;
    opacity: 0.9;
}

.job-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

@media (min-width: 992px) {
    .job-info-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.job-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.job-info-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #6c757d;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.job-info-value {
    font-size: 14px;
    font-weight: 600;
    color: #212529;
}

.job-info-value.salary {
    color: #28a745;
    font-size: 16px;
}

.job-section {
    padding: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.job-section:last-of-type {
    border-bottom: none;
}

.job-section h6 {
    font-size: 14px;
    font-weight: 700;
    color: #000C4F;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.job-section h6::before {
    content: '';
    width: 4px;
    height: 18px;
    background-color: #B61272;
    border-radius: 2px;
}

.job-description {
    font-size: 14px;
    line-height: 1.6;
    color: #495057;
    text-align: justify;
}

.job-requirements,
.job-benefits {
    list-style: none;
    padding: 0;
    margin: 0;
}

.job-requirements li,
.job-benefits li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    font-size: 14px;
    color: #495057;
    line-height: 1.5;
}

.job-requirements li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: 700;
    font-size: 14px;
}

.job-benefits li::before {
    content: '★';
    position: absolute;
    left: 0;
    color: #ffc107;
    font-size: 14px;
}

.job-apply-footer {
    padding: 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.btn-apply {
    background: linear-gradient(135deg, #B61272 0%, #8e0e5a 100%);
    border: none;
    font-weight: 600;
    padding: 12px 24px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(182, 18, 114, 0.3);
}

.btn-apply:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(182, 18, 114, 0.4);
}

.text-primary {
    color: #000C4F !important;
}

/* Paginación personalizada */
.pagination {
    gap: 5px;
}

.pagination .page-link {
    color: #000C4F;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 8px 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* Paginación responsive */
@media (max-width: 576px) {
    .pagination {
        justify-content: center;
        gap: 2px;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 10px 0;
    }
    
    .pagination .page-link {
        padding: 8px 12px;
        font-size: 14px;
        min-width: 44px;
        text-align: center;
        white-space: nowrap;
    }
    
    /* Ocultar páginas en móvil excepto primeras y últimas */
    .pagination .page-item:nth-child(n+4):nth-last-child(n+4) {
        display: none;
    }
}

.pagination .page-link:hover {
    background-color: #000C4F;
    color: white;
    border-color: #000C4F;
}

.pagination .page-item.active .page-link {
    background-color: #000C4F;
    border-color: #000C4F;
    color: white;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.page-link:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 12, 79, 0.25);
}

/* Filtros desplegables en móvil */
@media (max-width: 767px) {
    .filters-content {
        display: none;
        margin-top: 15px;
    }
    
    .filters-content.show {
        display: block !important;
        animation: slideDown 0.3s ease;
    }
    
    .filters-bar .col-md-2 {
        margin-bottom: 15px;
    }
    
    .filter-buttons-mobile {
        margin-top: 15px;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .filters-bar {
        position: sticky;
        top: 0;
        z-index: 100;
        background: white;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        margin-bottom: 15px;
        padding: 15px !important;
    }
    
    .filters-bar .row {
        gap: 10px;
    }
    
    .filters-bar .col-md-2 {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .filter-buttons-mobile {
        display: flex;
        gap: 10px;
        width: 100%;
    }
    
    .filter-buttons-mobile button {
        flex: 1;
    }
    
    .job-item .d-flex {
        flex-direction: column;
        align-items: start !important;
        gap: 15px;
    }
    
    .job-item .text-end {
        align-self: stretch;
        text-align: start !important;
        margin-left: 0 !important;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-top: 1px solid #f0f0f0;
        padding-top: 15px;
        width: 100%;
    }
    
    .job-detail-panel {
        display: none;
    }
    
    /* Modal para detalle en móvil */
    .job-detail-modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        z-index: 1050;
        overflow-y: auto;
    }
    
    .job-detail-modal.show {
        display: block;
    }
    
    .job-detail-modal-header {
        position: sticky;
        top: 0;
        background: #000C4F;
        color: white;
        padding: 15px;
        z-index: 1051;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .close-modal {
        background: transparent;
        border: none;
        color: white;
        font-size: 24px;
    }
}