/* ==========================================================================
   ESTILOS PARA EL SISTEMA DE DATOS DE TRABAJO (ELECTROWEB)
   ========================================================================== */

.jobs-hero-section {
    position: relative;
    padding: 60px 0 35px 0;
    background: linear-gradient(135deg, #09192c 0%, #102a45 60%, #15385b 100%);
    color: #ffffff;
    border-bottom: 3px solid #f7a81b;
}

.jobs-hero-content h1 {
    font-size: 2.3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
}

.jobs-hero-content h1 span {
    color: #f7a81b;
}

.jobs-hero-content p {
    font-size: 1.05rem;
    color: #cbdbe9;
    max-width: 820px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.jobs-hero-img-box {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    border: 2px solid rgba(247, 168, 27, 0.45);
    height: 195px;
    width: 100%;
}

.jobs-hero-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s ease;
}

.jobs-hero-img-box:hover .jobs-hero-thumb {
    transform: scale(1.04);
}

/* Alerta de Deslinde y Seguridad Destacada para Titulares */
.jobs-safety-headline-card {
    background: #ffffff;
    border: 2px solid #feb2b2;
    border-radius: 12px;
    padding: 22px 24px;
    margin-bottom: 30px;
    box-shadow: 0 6px 20px rgba(229, 62, 62, 0.08);
}

.jobs-safety-headline-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid #fee2e2;
    padding-bottom: 12px;
}

.jobs-safety-headline-header h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #9b2c2c;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.jobs-safety-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 14px;
}

.jobs-safety-item {
    background: #fff5f5;
    border: 1.5px solid #feb2b2;
    border-radius: 8px;
    padding: 16px 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.jobs-safety-item.warning {
    background: #fffaf0;
    border-color: #fbd38d;
}

.jobs-safety-badge-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}

.jobs-safety-item-content h4 {
    font-size: 1.05rem;
    font-weight: 800;
    color: #9b2c2c;
    margin-bottom: 5px;
    line-height: 1.3;
}

.jobs-safety-item.warning .jobs-safety-item-content h4 {
    color: #975a16;
}

.jobs-safety-item-content p {
    font-size: 0.9rem;
    color: #4a5568;
    margin: 0;
    line-height: 1.45;
}

.jobs-safety-footer-note {
    font-size: 0.85rem;
    color: #718096;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Barra de Filtros y Acción */
.jobs-filter-bar {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.jobs-filter-bar .form-control,
.jobs-filter-bar .custom-select {
    height: 46px;
    border-radius: 8px;
    border: 1px solid #cbd5e0;
    font-size: 0.95rem;
}

.jobs-filter-bar .form-control:focus,
.jobs-filter-bar .custom-select:focus {
    border-color: #1a6fb5;
    box-shadow: 0 0 0 3px rgba(26, 111, 181, 0.15);
}

.btn-post-job {
    height: 46px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f7a81b 0%, #e0940f 100%);
    color: #0b1a2c !important;
    font-weight: 700;
    border: none;
    padding: 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(247, 168, 27, 0.35);
    white-space: nowrap;
}

.btn-post-job:hover {
    background: linear-gradient(135deg, #ffb52e 0%, #f0a01a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(247, 168, 27, 0.45);
}

/* Tarjetas de Ofertas Laborales */
.job-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.job-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.09);
    border-color: #cbd5e0;
}

.job-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.job-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0b2b4f;
    margin-bottom: 6px;
    line-height: 1.35;
}

.job-card-company {
    font-size: 0.98rem;
    color: #4a5568;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.job-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.job-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.badge-type {
    background: #ebf8ff;
    color: #2b6cb0;
}

.badge-category {
    background: #f7fafc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.badge-location {
    background: #feebc8;
    color: #7b341e;
}

.badge-salary {
    background: #f0fff4;
    color: #22543d;
    border: 1px solid #c6f6d5;
}

.badge-timer {
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #fed7d7;
}

.job-card-desc {
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    white-space: pre-line;
}

.job-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #edf2f7;
    padding-top: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

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

.btn-contact-ws {
    background: #25d366;
    color: #ffffff !important;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-contact-ws:hover {
    background: #1ebc59;
}

.btn-contact-mail {
    background: #1a6fb5;
    color: #ffffff !important;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    outline: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-contact-mail:hover {
    background: #145992;
    transform: translateY(-1px);
}

.btn-contact-mail.copied {
    background: #2b8a3e;
}

.btn-report-job {
    background: transparent;
    color: #a0aec0;
    border: none;
    font-size: 0.82rem;
    cursor: pointer;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
}

.btn-report-job:hover {
    color: #e53e3e;
}

/* Modales */
.modal-header-jobs {
    background: #0d1e33;
    color: #ffffff;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    padding: 18px 24px;
}

.modal-header-jobs .modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
}

.modal-header-jobs .close {
    color: #ffffff;
    opacity: 0.8;
}

.modal-header-jobs .close:hover {
    opacity: 1;
}

.jobs-form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 5px;
}

.jobs-form-group .form-control,
.jobs-form-group .custom-select {
    border-radius: 6px;
    border: 1px solid #cbd5e0;
    font-size: 0.92rem;
}

.jobs-audit-box {
    background: #f7fafc;
    border: 1px dashed #cbd5e0;
    border-radius: 8px;
    padding: 14px 16px;
    margin-top: 15px;
    margin-bottom: 15px;
}

.jobs-audit-box h5 {
    font-size: 0.92rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 6px;
}

.jobs-audit-box p {
    font-size: 0.82rem;
    color: #718096;
    margin-bottom: 10px;
    line-height: 1.45;
}

.jobs-terms-check {
    font-size: 0.88rem;
    color: #2d3748;
    font-weight: 600;
    cursor: pointer;
}

.jobs-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px dashed #cbd5e0;
    margin-bottom: 30px;
}

.jobs-empty-icon {
    font-size: 3.5rem;
    color: #cbd5e0;
    margin-bottom: 15px;
}

.jobs-empty-state h3 {
    font-size: 1.3rem;
    color: #2d3748;
    font-weight: 700;
    margin-bottom: 8px;
}

.jobs-empty-state p {
    font-size: 0.95rem;
    color: #718096;
    max-width: 500px;
    margin: 0 auto 20px auto;
}

/* Estilos de Paginación */
#jobsPaginationContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 35px;
    margin-bottom: 25px;
    gap: 6px;
    flex-wrap: wrap;
}

.jobs-page-btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #cbd5e0;
    background: #ffffff;
    color: #2d3748;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.jobs-page-btn:hover:not(:disabled) {
    background: #edf2f7;
    border-color: #a0aec0;
    color: #1a6fb5;
}

.jobs-page-btn.active {
    background: #1a6fb5;
    color: #ffffff !important;
    border-color: #1a6fb5;
    box-shadow: 0 2px 8px rgba(26, 111, 181, 0.35);
}

.jobs-page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.jobs-page-info {
    font-size: 0.92rem;
    color: #4a5568;
    font-weight: 600;
    margin: 0 10px;
}

/* ==========================================================================
   OPTIMIZACIONES RESPONSIVE (MÓVIL Y TABLET)
   ========================================================================== */
@media (max-width: 768px) {
    .jobs-hero-section {
        padding: 35px 0 25px 0;
    }
    .jobs-hero-content h1 {
        font-size: 1.7rem;
        line-height: 1.3;
    }
    .jobs-hero-content p {
        font-size: 0.95rem;
        margin-bottom: 15px;
    }
    .jobs-hero-img-box {
        height: 160px;
        margin-top: 15px;
    }
    .jobs-safety-headline-card {
        padding: 16px;
        margin-bottom: 20px;
    }
    .jobs-safety-headline-header h3 {
        font-size: 1.05rem;
    }
    .jobs-safety-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .jobs-safety-item {
        padding: 12px 14px;
        gap: 10px;
    }
    .jobs-safety-badge-icon {
        font-size: 1.6rem;
    }
    .jobs-filter-bar {
        padding: 15px;
        margin-bottom: 20px;
    }
    .job-card {
        padding: 16px;
        margin-bottom: 18px;
    }
    .job-card-title {
        font-size: 1.15rem;
    }
    .job-card-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .job-contact-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .btn-contact-ws,
    .btn-contact-mail {
        justify-content: center;
        width: 100%;
        padding: 9px 16px;
    }
    .btn-report-job {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .jobs-hero-content h1 {
        font-size: 1.45rem;
    }
    .modal-header-jobs {
        padding: 14px 18px;
    }
    .modal-header-jobs .modal-title {
        font-size: 1.1rem;
    }
}
