/* Jobs page styles, aligned to the EasyPay design system in styles.css */

.jobs-hero {
    position: relative;
    padding: 160px 0 80px;
    background: var(--ep-grad-hero);
    color: #fff;
    overflow: hidden;
    isolation: isolate;
    text-align: center;
}

.jobs-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 30%, transparent 80%);
    z-index: -1;
    opacity: 0.6;
}

.jobs-hero::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    right: -200px;
    top: -200px;
    background: radial-gradient(circle, rgba(83, 208, 224, 0.28), transparent 60%);
    border-radius: 50%;
    z-index: -1;
}

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

.jobs-hero h1 {
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.04em;
    line-height: 1;
    margin: 0 0 18px;
}

.jobs-hero p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.78);
    margin: 0 auto;
    max-width: 620px;
}

.jobs-section { padding: clamp(60px, 8vw, 100px) 0; background: var(--ep-surface); }

.perks-section { background: var(--ep-surface-tint); padding: clamp(60px, 8vw, 100px) 0; }

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-header h2 {
    font-size: clamp(1.9rem, 3.6vw, 3rem);
    font-weight: 800;
    color: var(--ep-ink);
    letter-spacing: -0.035em;
    line-height: 1.05;
    margin: 14px 0 0;
}

.section-header .subtitle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--ep-cyan-deep);
    margin-bottom: 0;
}

.section-header .subtitle::before {
    content: '';
    width: 24px;
    height: 1px;
    background: currentColor;
    opacity: 0.6;
}

/* Cards */
.perks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-top: 40px;
}

.perk-item {
    text-align: left;
    padding: 26px 24px;
    background: var(--ep-surface);
    border: 1px solid var(--ep-line);
    border-radius: var(--r-xl);
    transition: transform var(--motion-base), box-shadow var(--motion-base), border-color var(--motion-base);
}

.perk-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--ep-shadow-md);
    border-color: rgba(83, 208, 224, 0.30);
}

.perk-item i {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(83, 208, 224, 0.12);
    color: var(--ep-cyan-deep);
    font-size: 18px;
    margin-bottom: 16px;
}

.perk-item h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ep-ink);
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}

.perk-item p {
    font-size: 14px;
    color: var(--ep-text-muted);
    margin: 0;
    line-height: 1.55;
}

/* Job card */
.job-card {
    background: var(--ep-surface);
    border-radius: var(--r-xl);
    padding: 32px;
    margin-bottom: 18px;
    border: 1px solid var(--ep-line);
    transition: transform var(--motion-base), box-shadow var(--motion-base), border-color var(--motion-base);
}

.job-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--ep-shadow-md);
    border-color: rgba(83, 208, 224, 0.30);
}

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

.job-title-section { flex: 1; }

.job-label {
    display: inline-block;
    color: var(--ep-cyan-deep);
    font-weight: 700;
    font-size: 11.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 12px;
    padding: 4px 10px;
    background: rgba(83, 208, 224, 0.12);
    border-radius: var(--r-pill);
}

.job-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--ep-ink);
    letter-spacing: -0.03em;
    margin: 0 0 14px;
}

.job-meta {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.job-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ep-text-muted);
    font-size: 14px;
}

.job-meta-item i { color: var(--ep-cyan-deep); }

.job-description {
    color: var(--ep-text);
    line-height: 1.65;
    margin-bottom: 18px;
}

.job-description h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ep-ink);
    margin: 18px 0 10px;
}

.job-description ul { margin: 0 0 14px; padding-left: 22px; }
.job-description li { margin-bottom: 6px; color: var(--ep-text); font-size: 14.5px; }

.job-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.btn-apply {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--ep-cyan-deep);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--r-pill);
    text-decoration: none;
    font-weight: 600;
    font-size: 14.5px;
    transition: transform var(--motion-fast), background var(--motion-fast), box-shadow var(--motion-fast);
    border: none;
    box-shadow: 0 6px 18px rgba(47, 184, 204, 0.32);
}

.btn-apply:hover {
    background: #259fb2;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(47, 184, 204, 0.40);
}

.btn-expand {
    background: transparent;
    border: 1.5px solid var(--ep-line);
    color: var(--ep-text);
    padding: 10px 18px;
    border-radius: var(--r-pill);
    font-weight: 500;
    font-size: 14px;
    transition: all var(--motion-fast);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-expand:hover {
    border-color: var(--ep-cyan-deep);
    color: var(--ep-cyan-deep);
}

.btn-expand i { transition: transform var(--motion-fast); }
.btn-expand.is-open i { transform: rotate(180deg); }

.job-details {
    display: none;
    padding-top: 18px;
    border-top: 1px solid var(--ep-line-soft);
    margin-top: 18px;
}

.job-details.active {
    display: block;
    animation: slideDown 0.3s ease;
}

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

/* Closed positions */
.closed-section {
    padding: clamp(60px, 8vw, 100px) 0;
    background: var(--ep-surface-tint);
}

.red-accent .subtitle { color: var(--ep-danger) !important; }
.red-accent .subtitle::before { background: var(--ep-danger); }

.job-card.closed {
    background: var(--ep-surface);
    border-color: var(--ep-line);
    opacity: 0.92;
}

.job-card.closed:hover { transform: none; box-shadow: var(--ep-shadow-sm); border-color: var(--ep-line); }

.closed-label {
    color: var(--ep-danger) !important;
    background: rgba(220, 38, 38, 0.08) !important;
}

@media (max-width: 768px) {
    .job-title { font-size: 1.3rem; }
    .job-header { flex-direction: column; }
    .job-actions { flex-direction: column; align-items: stretch; }
    .btn-apply, .btn-expand { width: 100%; justify-content: center; }
}

/* Empty-state for closed positions */
.closed-empty {
    text-align: center;
    padding: 40px 24px;
    background: var(--ep-surface);
    border: 1px dashed var(--ep-line);
    border-radius: var(--r-xl);
    color: var(--ep-text-muted);
}

.closed-empty i {
    font-size: 32px;
    color: var(--ep-text-subtle);
    margin-bottom: 14px;
    display: block;
}

.closed-empty p {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.5;
}

/* =============================================================
   APPLY MODAL
   ============================================================= */
.apply-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.22s ease;
}

.apply-modal.is-open {
    pointer-events: auto;
    opacity: 1;
}

.apply-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 26, 48, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.apply-modal-dialog {
    position: relative;
    background: var(--ep-surface);
    border-radius: var(--r-2xl);
    box-shadow: 0 30px 80px rgba(0, 40, 80, 0.30);
    width: min(540px, calc(100% - 32px));
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 36px;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.apply-modal.is-open .apply-modal-dialog {
    transform: translateY(0) scale(1);
}

.apply-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--ep-line);
    background: var(--ep-surface);
    color: var(--ep-text-muted);
    font-size: 16px;
    cursor: pointer;
    transition: all var(--motion-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.apply-modal-close:hover {
    background: var(--ep-ink);
    color: #fff;
    border-color: var(--ep-ink);
}

.apply-modal-header {
    margin-bottom: 22px;
}

.apply-modal-header h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ep-ink);
    letter-spacing: -0.025em;
    margin: 10px 0 6px;
}

.apply-modal-subtitle {
    margin: 0;
    font-size: 14px;
    color: var(--ep-text-muted);
}

.apply-modal-subtitle strong {
    color: var(--ep-ink);
}

.apply-field {
    margin-bottom: 16px;
}

.apply-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ep-ink-2);
    margin-bottom: 8px;
    letter-spacing: -0.005em;
}

.apply-field input[type="text"],
.apply-field input[type="email"],
.apply-field input[type="tel"] {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--ep-line);
    border-radius: var(--r-md);
    font-family: var(--ep-font);
    font-size: 14.5px;
    color: var(--ep-ink);
    background: var(--ep-surface);
    transition: border-color var(--motion-fast), box-shadow var(--motion-fast);
}

.apply-field input:focus {
    outline: none;
    border-color: var(--ep-cyan-deep);
    box-shadow: 0 0 0 4px rgba(83, 208, 224, 0.16);
}

/* PDF dropzone */
.apply-file {
    position: relative;
    border: 1.5px dashed var(--ep-line);
    border-radius: var(--r-md);
    padding: 22px 18px;
    cursor: pointer;
    transition: border-color var(--motion-fast), background var(--motion-fast);
    text-align: center;
}

.apply-file:hover {
    border-color: var(--ep-cyan-deep);
    background: rgba(83, 208, 224, 0.04);
}

.apply-file input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.apply-file-prompt {
    color: var(--ep-text-muted);
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.apply-file-prompt i {
    font-size: 24px;
    color: var(--ep-cyan-deep);
}

.apply-file-error {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--ep-danger);
}

.apply-submit {
    width: 100%;
    margin-top: 8px;
    justify-content: center;
}

.apply-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 576px) {
    .apply-modal-dialog { padding: 28px 22px; }
    .apply-modal-header h3 { font-size: 1.3rem; }
}
