/* ========================================
   Variables y Base
   ======================================== */
:root {
    --empleos-bg: #0b1220;
    --empleos-bg-2: #0f1419;
    --empleos-card-bg: #141c28;
    --empleos-border: rgba(255,255,255,0.08);
    --empleos-text: #e7e9ee;
    --empleos-muted: rgba(231,233,238,0.7);
    --empleos-accent: #ffd700;
    --empleos-accent-2: #29d1a4;
    --empleos-shadow: 0 24px 60px rgba(3,7,18,0.6);
}

/* ========================================
   Layout General
   ======================================== */
.empleos-page {
    background: radial-gradient(1200px 600px at 15% -10%, rgba(255,215,0,0.06), transparent 65%),
                radial-gradient(800px 500px at 85% 25%, rgba(41,209,164,0.04), transparent 70%),
                var(--empleos-bg);
    min-height: 100vh;
}

/* ========================================
   Hero Section
   ======================================== */
.empleos-hero {
    padding: 140px 0 90px;
    position: relative;
    overflow: hidden;
}

.empleos-hero .container {
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 720px;
}

.hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--empleos-accent);
    margin-bottom: 16px;
    display: block;
}

.empleos-hero h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 20px;
    line-height: 1.1;
}

.hero-lead {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--empleos-muted);
    margin-bottom: 30px;
    max-width: 580px;
}

/* ========================================
   Hero Badges
   ======================================== */
.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.hero-badges .badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--empleos-border);
    border-radius: 999px;
    font-size: 0.9rem;
    color: var(--empleos-text);
    transition: all 0.3s ease;
}

.hero-badges .badge:hover {
    background: rgba(255,255,255,0.08);
    transform: translateY(-2px);
}

.hero-badges .badge i {
    font-size: 1.1rem;
}

.hero-badges .badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 10px;
    background: rgba(11,18,32,0.9);
    color: #4ee28b;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-left: 6px;
}

.hero-badges .badge-crown {
    color: #d4af37;
}

.hero-badges .badge-crown i {
    color: #ffd700;
}

/* ========================================
   Vacantes Section
   ======================================== */
.vacantes-section {
    padding: 60px 0 100px;
}

.section-header {
    margin-bottom: 40px;
}

.section-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--empleos-muted);
    margin-bottom: 12px;
}

.section-header h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

/* ========================================
   Vacantes Grid
   ======================================== */
.vacantes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

.vacante-card {
    background: var(--empleos-card-bg);
    border: 1px solid var(--empleos-border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 18px 36px rgba(3,7,18,0.4);
}

.vacante-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 48px rgba(0,0,0,0.5);
    border-color: rgba(255,255,255,0.12);
}

/* Card Icon */
.vacante-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(74,163,255,0.12), rgba(74,163,255,0.04));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4aa3ff;
    font-size: 1.3rem;
    flex-shrink: 0;
}

/* Card Title */
.vacante-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #4aa3ff;
    margin: 0;
    line-height: 1.3;
}

.vacante-card h3::after {
    content: "";
    display: block;
    width: 40px;
    height: 3px;
    margin-top: 8px;
    background: linear-gradient(90deg, rgba(74,163,255,0.6), rgba(123,209,255,0.3));
    border-radius: 3px;
}

/* Card Description */
.vacante-desc {
    color: var(--empleos-muted);
    line-height: 1.6;
    font-size: 0.95rem;
    margin: 0;
}

/* Salario */
.vacante-salario {
    display: flex;
    gap: 8px;
    align-items: baseline;
    margin-top: 8px;
}

.vacante-salario strong {
    color: #fff;
    font-weight: 600;
}

.vacante-salario .salario-valor {
    font-weight: 700;
    font-size: 1.05rem;
}

.vacante-salario.has-value .salario-valor {
    color: #22c55e;
}

.vacante-salario.no-value .salario-valor {
    color: var(--empleos-muted);
    font-weight: 600;
}

/* Requisitos */
.vacante-requisitos-title {
    margin: 12px 0 8px;
    color: #dbeeff;
    font-weight: 700;
    font-size: 0.95rem;
}

.vacante-requisitos-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.requisito-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.9rem;
    color: var(--empleos-muted);
}

.requisito-item i {
    color: #94f9a8;
    margin-top: 2px;
    flex-shrink: 0;
}

.requisito-item.missing i {
    color: rgba(255,255,255,0.18);
}

.requisito-item strong {
    color: #fff;
    font-weight: 600;
}

/* Card Meta/Footer */
.vacante-fecha {
    font-size: 0.85rem;
    color: var(--empleos-muted);
    margin-top: 12px;
}

.vacante-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.vacante-actions .btn {
    flex: 1;
}

/* ========================================
   Modal
   ======================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 1400;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay:not([hidden]) {
    opacity: 1;
}

.modal {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1500;
    max-width: 850px;
    width: calc(100% - 40px);
    max-height: 90vh;
    background: linear-gradient(180deg, rgba(20,28,40,0.98), rgba(12,18,28,0.98));
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 30px 80px rgba(0,0,0,0.7);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    opacity: 0;
    transform: translate(-50%, -45%);
    transition: all 0.3s ease;
}

.modal:not([hidden]) {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.modal-content {
    padding: 32px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--empleos-muted);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.modal h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 24px;
}

.modal h3 span {
    color: var(--empleos-accent);
    font-weight: 600;
}

/* ========================================
   Form Styles
   ======================================== */
#applyForm {
    display: grid;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.form-full {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
}

.form-group label .required {
    color: #ff4d4f;
    margin-left: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: var(--empleos-text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--empleos-accent);
    background: rgba(255,255,255,0.06);
}

.form-group input[type="file"] {
    padding: 10px;
    cursor: pointer;
}

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

.form-group select {
    cursor: pointer;
}

.form-group select option {
    background: #0b1220;
    color: #fff;
}

.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.form-actions .btn {
    min-width: 200px;
}

.form-message {
    padding: 12px 16px;
    border-radius: 10px;
    text-align: center;
    font-size: 0.9rem;
    margin-top: 16px;
}

.form-message.success {
    background: rgba(34,197,94,0.1);
    border: 1px solid rgba(34,197,94,0.3);
    color: #22c55e;
}

.form-message.error {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    color: #ef4444;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
    .empleos-hero h1 {
        font-size: 2.5rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .empleos-hero {
        padding: 100px 0 60px;
    }
    
    .empleos-hero h1 {
        font-size: 2rem;
    }
    
    .hero-lead {
        font-size: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .vacantes-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .modal-content {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .empleos-hero h1 {
        font-size: 1.75rem;
    }
    
    .hero-badges {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-badges .badge {
        width: 100%;
        justify-content: center;
    }
    
    .modal {
        width: calc(100% - 24px);
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .vacante-card {
        padding: 20px;
    }
}

/* ========================================
   Empty State
   ======================================== */
.vacantes-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--empleos-muted);
}

.vacantes-empty i {
    font-size: 4rem;
    color: rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.vacantes-empty h3 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 12px;
}

.vacantes-empty p {
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto;
}
