/* Apply Page Styles */

.apply-page {
    background: var(--bg);
    color: var(--ink);
}

/* ===== HERO HEADER ===== */
.apply-hero {
    position: relative;
    overflow: hidden;
    padding: 4rem 0 3.5rem;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.08) 0%, rgba(124, 58, 237, 0.05) 40%, transparent 100%);
}

.apply-hero::before,
.apply-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top right, rgba(var(--accent-rgb), 0.14) 0%, transparent 55%);
    opacity: 0.6;
    pointer-events: none;
}

.apply-hero::after {
    background: radial-gradient(ellipse at bottom left, rgba(124, 58, 237, 0.18) 0%, transparent 60%);
    opacity: 0.4;
}

.apply-hero-inner {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.apply-hero-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.apply-hero-content h1 {
    font-size: clamp(2.4rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: 0.02em;
}

.apply-hero-content .tagline {
    font-size: 1.1rem;
    max-width: 600px;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
}

.notice-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.85rem 1.1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    max-width: 720px;
}

.notice-icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    color: var(--accent);
}

.notice-banner p {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.45;
}

/* ===== OPEN POSITIONS ===== */
.apply-positions {
    padding: 3.5rem 0;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    margin-bottom: 0.6rem;
}

.section-subtitle {
    margin: 0 0 2.25rem;
    color: rgba(255, 255, 255, 0.62);
}

.apply-positions-container {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.positions-group {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.positions-group-header {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.positions-group-header h3 {
    font-size: 1.45rem;
    color: var(--accent);
    margin: 0;
}

.positions-group-header p {
    margin: 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.95rem;
}

.positions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.positions-divider {
    height: 1px;
    margin: 1.5rem 0 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.position-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding: 1.35rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(18, 24, 32, 0.6);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    min-height: 100%;
}

.position-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.08) 0%, transparent 65%);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.position-card:hover,
.position-card.is-selected {
    transform: translateY(-4px);
    border-color: rgba(var(--accent-rgb), 0.28);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

.position-card:hover::before,
.position-card.is-selected::before {
    opacity: 1;
}

.position-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.position-title {
    margin: 0;
    font-size: 1.15rem;
    color: var(--ink);
}

.position-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.82rem;
}

.meta-divider {
    color: rgba(255, 255, 255, 0.25);
}

.position-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.45px;
    background: rgba(var(--accent-rgb), 0.15);
    color: var(--accent);
    border: 1px solid rgba(var(--accent-rgb), 0.35);
}

.position-description {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.95rem;
    line-height: 1.55;
}

.position-requirements h4 {
    margin: 0 0 0.35rem;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
}

.position-requirements ul {
    margin: 0;
    padding-left: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.88rem;
}

.position-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.position-actions .btn {
    flex: 1 1 auto;
    min-width: 145px;
    justify-content: center;
}

.positions-loading,
.no-positions {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

/* ===== APPLICATION FORM ===== */
.apply-form-section {
    padding: 0 0 4rem;
}

.form-container {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: flex-start;
}

.position-selector,
.application-form {
    background: rgba(18, 24, 32, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(6px);
}

.position-selector h2,
.application-form h2 {
    margin-top: 0;
    font-size: 1.6rem;
}

.form-description {
    margin: 0 0 1.5rem;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.95rem;
}

.position-select-wrapper {
    position: relative;
}

.position-select-wrapper select {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(12, 18, 26, 0.82);
    color: var(--ink);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.position-select-wrapper select:focus {
    outline: none;
    border-color: rgba(var(--accent-rgb), 0.5);
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.25);
}

.position-select-wrapper option {
    color: #0b121a;
    background: #f7f7f7;
}

.position-details-card {
    margin-top: 1.5rem;
    padding: 1.25rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.position-details-card h3 {
    margin: 0;
    font-size: 1.15rem;
}

.position-details-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.position-details-card ul {
    margin: 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.3rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.35rem 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    font-size: 0.95rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(10, 14, 22, 0.85);
    color: var(--ink);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group textarea {
    resize: vertical;
    min-height: 130px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: rgba(var(--accent-rgb), 0.5);
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.25);
}

.form-group option {
    color: #0b121a;
    background: #f7f7f7;
}

.required {
    color: var(--accent);
}

.form-agreement {
    margin-top: 1rem;
    padding: 1.1rem 1.2rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.95rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.75);
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.2rem;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(10, 14, 22, 0.9);
    accent-color: var(--accent);
}

.form-actions {
    margin-top: 2rem;
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.form-status {
    margin-top: 1.5rem;
    padding: 1rem 1.2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--ink);
    font-size: 0.95rem;
    line-height: 1.5;
}

.form-status.success {
    border-color: rgba(52, 211, 153, 0.45);
    background: rgba(16, 185, 129, 0.22);
}

.form-status.error {
    border-color: rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.18);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
    .apply-hero {
        padding: 3rem 0 2.8rem;
    }

    .apply-hero-inner {
        padding: 0 1rem;
    }

    .positions-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .form-container {
        grid-template-columns: 1fr;
    }

    .position-selector,
    .application-form {
        padding: 1.6rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .apply-hero {
        padding: 2.5rem 0 2.2rem;
    }

    .positions-group-header h3 {
        font-size: 1.25rem;
    }

    .position-card {
        padding: 1.1rem;
        gap: 0.75rem;
    }

    .position-title {
        font-size: 1.05rem;
    }

    .position-actions .btn {
        min-width: auto;
    }

    .notice-banner {
        flex-direction: column;
    }

    .position-details-card {
        padding: 1rem;
    }
}
