/* Careers Page Styles - Updated with Modal */

:root {
    --primary: #7f46eb;
    --primary-light: rgba(127, 70, 235, 0.08);
    --primary-hover: #6a35d4;
    --dark: #1a1a1a;
    --text: #282828;
    --text-muted: #5e697f;
    --bg: #ffffff;
    --radius-lg: 32px;
    --radius-md: 20px;
    --transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

body {
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: "Lexend", sans-serif;
    color: var(--dark);
}

/* Hero Section */
.hero {
    padding: 180px 20px 100px;
    text-align: center;
    background: radial-gradient(circle at top, rgba(127, 70, 235, 0.08), transparent 60%);
}

.hero .badge {
    display: inline-block;
    padding: 8px 20px;
    background: #f0f0f5;
    color: var(--primary);
    border-radius: 100px;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero h1 {
    font-size: clamp(42px, 8vw, 72px);
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}

.hero p {
    font-size: 20px;
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto;
    font-weight: 400;
}

/* Values Grid */
.values-section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 60px;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.value-card {
    padding: 40px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    border: 1px solid #f0f0f0;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    border-color: var(--primary-light);
}

.value-icon {
    font-size: 32px;
    margin-bottom: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--primary-light);
    border-radius: 20px;
    color: var(--primary);
}

.value-card h3 {
    font-size: 22px;
    margin-bottom: 12px;
}

.value-card p {
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.7;
}

/* Open Positions */
.jobs-section {
    padding: 100px 20px;
    background: #fcfcfc;
    border-top: 1px solid #f0f0f0;
}

.jobs-container {
    max-width: 900px;
    margin: 0 auto;
}

.job-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 40px;
    background: #ffffff;
    border-radius: 24px;
    margin-bottom: 20px;
    border: 1px solid #eaeaeb;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    position: relative;
    cursor: pointer;
}

.job-card:hover {
    border-color: var(--primary);
    box-shadow: 0 15px 30px rgba(127, 70, 235, 0.1);
    transform: scale(1.01);
    z-index: 2;
}

.job-info h3 {
    font-size: 20px;
    margin-bottom: 10px;
    font-weight: 700;
}

.job-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.job-tag {
    font-size: 14px;
    color: var(--text-muted);
    background: #f5f5f7;
    padding: 6px 14px;
    border-radius: 100px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.apply-btn {
    padding: 14px 28px;
    background: var(--dark);
    color: #ffffff;
    border-radius: 100px;
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition);
    white-space: nowrap;
}

.job-card:hover .apply-btn {
    background: var(--primary);
}

/* CTA Section */
.cta-section {
    padding: 100px 20px;
    text-align: center;
    background: #ffffff;
}

.cta-box {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px;
    background: var(--dark);
    border-radius: 40px;
    color: white;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.cta-box h2 {
    color: white;
    font-size: 36px;
    margin-bottom: 16px;
}

.cta-box p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
    font-size: 18px;
}

.mail-btn {
    display: inline-block;
    padding: 16px 36px;
    background: white;
    color: var(--dark);
    text-decoration: none;
    font-weight: 700;
    border-radius: 100px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.mail-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* --- Application Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: #ffffff;
    width: 100%;
    max-width: 600px;
    min-width: 0;
    border-radius: 32px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.2);
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-container {
    transform: translateY(0) scale(1);
}

.modal-header {
    padding: 32px 40px 24px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.modal-title h3 {
    font-size: 24px;
    margin-bottom: 4px;
}

.modal-title p {
    color: var(--text-muted);
    font-size: 14px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--dark);
}

.modal-body {
    padding: 40px 40px 40px 40px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--dark);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    font-family: inherit;
    font-size: 16px;
    color: var(--text);
    background: #fcfcfc;
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px var(--primary-light);
}

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

.file-upload-wrapper {
    position: relative;
    border: 2px dashed #e0e0e0;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    background: #fbfbfb;
    transition: all 0.2s;
    cursor: pointer;
}

.file-upload-wrapper:hover {
    border-color: var(--primary);
    background: #f0f7ff;
}

.file-upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-text {
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
}

.file-upload-text strong {
    color: var(--primary);
    font-weight: 600;
}

.form-submit {
    width: 100%;
    padding: 18px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 100px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
}

.form-submit:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(127, 70, 235, 0.2);
}

/* Form Validation */
.error-message {
    display: none;
    color: #dc2626;
    font-size: 13px;
    margin-top: 6px;
    font-weight: 500;
    animation: slideDown 0.2s ease;
}

.error-message.active {
    display: block;
}

.form-input.error,
.form-textarea.error {
    border-color: #dc2626;
    background: #fef2f2;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 40px 0;
    display: none;
}

.success-icon {
    width: 64px;
    height: 64px;
    background: #def7ec;
    color: #03543f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 24px;
}

@media (max-width: 768px) {
    .job-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 24px;
        padding-bottom: 90px;
        /* Extra space for button */
    }

    .apply-btn {
        text-align: center;
        position: absolute;
        bottom: 24px;
        left: 24px;
        right: 24px;
    }

    .cta-box {
        padding: 40px 24px;
    }

    .hero h1 {
        font-size: 40px;
    }

    .modal-container {
        max-height: 100vh;
        border-radius: 0;
        height: 100%;
        transform: none;
    }

    .modal-overlay {
        padding: 0;
    }

    .modal-body {
        padding: 32px 20px;
    }

    .modal-header {
        padding: 24px 20px 20px;
    }
}