/*
 * Estilos CSS para Vacantes de Empleo Plugin
 * Frontend Styles
 */

/* Reset básico para elementos del plugin */
.vacantes-empleo * {
    box-sizing: border-box;
}

/* Contenedor principal de vacantes */
.job-listings-container,
.job-vacancy-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Grid de vacantes */
.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* Tarjetas de vacantes */
.job-card {
    background: #ffffff;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.job-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-color: #3498db;
}

.job-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.job-card:hover:before {
    opacity: 1;
}

/* Header de tarjeta */
.job-card-header {
    position: relative;
    margin-bottom: 15px;
    padding-top: 10px;
}

.job-featured-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 10px rgba(243, 156, 18, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.job-card-title {
    margin: 0 0 8px 0;
    font-size: 1.3em;
    font-weight: 600;
}

.job-card-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.job-card-title a:hover {
    color: #3498db;
}

.job-card-company {
    color: #7f8c8d;
    font-size: 1em;
    font-weight: 500;
    margin-bottom: 15px;
}

/* Metadata de vacante */
.job-card-meta {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.job-location, 
.job-salary {
    display: flex;
    align-items: center;
    font-size: 0.95em;
    color: #5a6c7d;
}

.job-location .icon, 
.job-salary .icon {
    margin-right: 8px;
    font-size: 1.1em;
}

/* Excerpt */
.job-card-excerpt {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.95em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Tags */
.job-card-tags {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.job-tag {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.job-tag.job-category {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1565c0;
    border: 1px solid #90caf9;
}

.job-tag.job-type {
    background: linear-gradient(135deg, #f3e5f5, #e1bee7);
    color: #7b1fa2;
    border: 1px solid #ce93d8;
}

/* Footer de tarjeta */
.job-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.job-date {
    font-size: 0.85em;
    color: #95a5a6;
}

.job-apply-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

.job-apply-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1c5d8a);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
    color: white;
    text-decoration: none;
}

/* Paginación */
.job-listings-pagination {
    text-align: center;
    margin-top: 40px;
}

.job-listings-pagination .page-numbers {
    display: inline-block;
    padding: 12px 18px;
    margin: 0 5px;
    background: white;
    border: 2px solid #e1e8ed;
    color: #3498db;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.job-listings-pagination .page-numbers:hover,
.job-listings-pagination .page-numbers.current {
    background: #3498db;
    color: white;
    border-color: #3498db;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Vista individual de vacante */
.job-vacancy-single {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.job-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
}

.job-title {
    margin: 0 0 20px 0;
    font-size: 2.5em;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.job-featured {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9em;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.job-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.job-detail {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.job-detail strong {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9em;
    color: #2c3e50 !important;
    opacity: 1;
    text-shadow: none;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 5px;
}

.job-detail span {
    font-size: 1.1em;
    font-weight: 600;
    color: white !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    display: inline-block;
}

/* Estilos específicos para taxonomías en header */
.job-taxonomies {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.job-categories,
.job-types {
    margin-bottom: 15px;
}

.job-categories strong,
.job-types strong {
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 8px;
    font-size: 0.9em;
    color: #2c3e50 !important;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 8px;
    border-radius: 4px;
    text-shadow: none;
}

.job-category-tag,
.job-type-tag {
    display: inline-block;
    padding: 6px 12px;
    margin: 2px 4px 2px 0;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 600;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.job-category-tag:hover,
.job-type-tag:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Forzar estilos de contraste en el header */
.job-header strong {
    color: #2c3e50 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    font-weight: 700 !important;
    text-shadow: none !important;
    display: inline-block !important;
}

/* Contenido de vacante */
.job-content {
    padding: 40px;
}

.job-content h2 {
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #3498db;
    position: relative;
}

.job-content h2:after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 50px;
    height: 3px;
    background: #e74c3c;
}

/* Sección de aplicación */
.job-application-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #3498db;
    border-radius: 15px;
    padding: 40px;
    margin: 40px;
}

.job-application-section h2 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8em;
}

/* Formulario de aplicación */
.job-application-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 1em;
}

.required {
    color: #e74c3c;
    margin-left: 3px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-1px);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Grupos especiales del formulario */
.captcha-group {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    padding: 20px;
    border-radius: 10px;
    border-left: 5px solid #ffc107;
}

.privacy-notice {
    background: linear-gradient(135deg, #d1ecf1, #b8daff);
    padding: 20px;
    border-radius: 10px;
    border-left: 5px solid #17a2b8;
}

.checkbox-label {
    display: flex !important;
    align-items: flex-start;
    font-weight: normal !important;
    cursor: pointer;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    width: auto !important;
    margin-right: 12px;
    margin-top: 3px;
    flex-shrink: 0;
    transform: scale(1.2);
}

/* Botón de envío */
.submit-group {
    text-align: center;
    margin-top: 30px;
}

.submit-application-btn {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 18px 40px;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.3);
}

.submit-application-btn:hover {
    background: linear-gradient(135deg, #229954, #27ae60);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.4);
}

.submit-application-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Notificaciones del formulario */
.form-notice {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 600;
    animation: slideIn 0.3s ease;
}

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

.form-notice.success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 2px solid #28a745;
}

.form-notice.error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 2px solid #dc3545;
}

/* Mensaje de vacante cerrada */
.job-closed-notice {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
}

/* Navegación entre vacantes */
.job-navigation {
    display: flex;
    justify-content: space-between;
    margin: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.job-navigation a {
    color: #3498db;
    text-decoration: none;
    padding: 10px 20px;
    border: 2px solid #3498db;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.job-navigation a:hover {
    background: #3498db;
    color: white;
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .jobs-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 15px;
    }
    
    .job-card {
        padding: 20px;
    }
    
    .job-card-footer {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .job-apply-btn {
        width: 100%;
        text-align: center;
    }
    
    .job-header {
        padding: 30px 20px;
    }
    
    .job-title {
        font-size: 2em;
    }
    
    .job-details-grid {
        grid-template-columns: 1fr;
    }
    
    .job-content {
        padding: 30px 20px;
    }
    
    .job-application-section {
        margin: 20px;
        padding: 30px 20px;
    }
    
    .job-navigation {
        flex-direction: column;
        gap: 10px;
        margin: 20px;
    }
    
    .submit-application-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .job-card {
        padding: 15px;
        margin: 0 10px;
    }
    
    .job-header {
        padding: 20px 15px;
    }
    
    .job-title {
        font-size: 1.8em;
    }
    
    .job-content {
        padding: 20px 15px;
    }
    
    .job-application-section {
        margin: 15px;
        padding: 20px 15px;
    }
}