/* Apply Page Specific Styles */
:root {
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    --bg-surface: #ffffff;
    --bg-page: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --radius-lg: 16px;
    --radius-md: 8px;
    --shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-page);
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    line-height: 1.6;
}

.apply-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Form Grid System */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* Header Section */
.apply-hero {
    background: var(--primary-gradient);
    color: white;
    padding: 3rem 1rem 6rem;
    /* Extra padding bottom for overlap */
    text-align: center;
}

.brand-hero {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    backdrop-filter: blur(5px);
}

.job-meta-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.job-tags-hero {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    opacity: 0.9;
    font-size: 0.9rem;
}

.tag-hero {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Main Container */
.apply-container {
    width: 100%;
    max-width: 700px;
    margin: -4rem auto 3rem;
    /* Negative margin to overlap hero */
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 2.5rem;
    position: relative;
    z-index: 10;
}

.job-description-preview {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* Form Styles */
.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #fdfdfd;
}

.form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    background: white;
}

/* File Upload Zone */
.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: #2563eb;
    background: #f0f7ff;
}

.upload-icon {
    font-size: 2rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.upload-text {
    font-weight: 500;
    color: var(--text-main);
}

.upload-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.upload-zone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Buttons */
.btn-submit {
    background: var(--primary-gradient);
    color: white;
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Success Message */
.success-card {
    text-align: center;
    padding: 3rem 1rem;
}

.success-icon {
    font-size: 4rem;
    color: #10b981;
    margin-bottom: 1rem;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 640px) {
    .apply-hero {
        padding-bottom: 4rem;
        text-align: left;
    }

    .apply-container {
        margin-top: -2rem;
        border-radius: 12px 12px 0 0;
        padding: 1.5rem;
    }

    .job-tags-hero {
        justify-content: flex-start;
    }
}