/* ======================= GLOBAL SAFE RESETS ======================= */

html {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;   /* ✅ smooth scroll for #open-positions */
}

body {
    margin: 0;
    padding: 0;
}

main,
.main-content,
.site-main,
.content,
.content-wrapper {
    margin-bottom: 0;
    padding-bottom: 0;
}

footer,
.site-footer,
.footer {
    margin-top: 0 !important;
}

/* ======================= GLOBAL PARAGRAPH STYLE ======================= */

p {
    font-size: 14px;
    line-height: 1.8;
    color: #444;
}

/* ======================= GLOBAL SPACING SYSTEM ======================= */

:root {
    --section-padding-desktop: 48px;  /* base for large screens */
    --section-padding-mobile: 34px;   /* base for <= 900px */
}

/* ======================= GLOBAL PADDING PATTERN ======================= */
/* Hero: full top, half bottom
   Middle sections (why, positions): half top & bottom
   Final CTA: custom compact padding so it hugs footer nicely */

.careers-hero {
    padding-top: var(--section-padding-desktop);
    padding-bottom: calc(var(--section-padding-desktop) / 2);
    margin: 0;
}

.why-section,
.positions-section {
    padding-top: calc(var(--section-padding-desktop) / 2);
    padding-bottom: calc(var(--section-padding-desktop) / 2);
    margin: 0;
}

/* ======================= HERO SECTION ======================= */

.careers-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.careers-title {
    font-size: 48px;
    font-weight: 800;
    color: #0b1020;
    margin: 0 0 6px;
}

.careers-subtitle {
    margin-top: 14px;
    max-width: 550px;
    text-align: left;
}

.careers-cta-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 14px 36px;
    font-size: 17px;
    font-weight: 700;
    border-radius: 50px;

    background: #FF8804;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0px 10px 25px rgba(255, 136, 4, 0.35);
    transition: 0.25s ease;
}

.careers-cta-btn:hover {
    background: #e67600;
    transform: translateY(-3px);
    box-shadow: 0px 14px 32px rgba(255, 136, 4, 0.45);
}

.careers-hero-image {
    width: 100%;
    max-width: 430px;
    border-radius: 18px;
    display: block;
}

.careers-hero-right {
    flex: 1;
    min-width: 320px;
}

/* ======================= WHY WORK WITH US ======================= */

.why-section {
    background: #ffffff;
    margin: 0;
    /* padding is controlled by the global pattern above */
}

.section-title {
    text-align: center;
    font-size: 34px;
    font-weight: 800;
    margin: 0 0 20px;   /* top = 0 so we don’t add extra gap */
}

.why-intro {
    max-width: 900px;
    margin: 0 auto 20px;
    text-align: center;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-top: 6px;
    align-items: stretch;              /* all cards equal height */
}

.why-card {
    padding: 24px;
    background: #fafafa;
    border-radius: 14px;
    border: 1px solid #eee;
    position: relative;
    overflow: hidden;
    transition:
        0.25s ease background,
        0.25s ease border-color,
        0.25s ease color,
        0.25s ease transform,
        0.25s ease box-shadow;
    display: flex;                     /* flex layout for alignment */
    flex-direction: column;
    justify-content: flex-start;
}

/* make all headings same vertical space so rows align */
.why-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #111827;
    transition: color 0.25s ease;
    min-height: 48px;                  /* adjust if you want more/less */
    display: flex;
    align-items: flex-end;
}

/* description grows to fill card so last lines align */
.why-card p {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    transition: color 0.25s ease;
    flex-grow: 1;                      /* keeps heights consistent */
}

.why-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    background: linear-gradient(135deg, #4f46e5, #6d28d9);
    border-color: transparent;
}

.why-card:hover h3,
.why-card:hover p {
    color: #fff;
}

/* ======================= OPEN POSITIONS ======================= */

.positions-intro {
    max-width: 900px;
    margin: 0 auto 18px;
    text-align: center;
}

.positions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 14px;
    align-items: stretch;              /* equal card height */
}

.position-card {
    background: #fff;
    padding: 24px;
    border-radius: 14px;
    border: 1px solid #eee;
    position: relative;
    overflow: hidden;
    transition:
        0.25s ease background,
        0.25s ease border-color,
        0.25s ease color,
        0.25s ease transform,
        0.25s ease box-shadow;
    display: flex;                     /* flex for aligned content */
    flex-direction: column;
    justify-content: flex-start;
}

/* pill only hugs the text */
.position-tag {
    font-size: 13px;
    font-weight: 600;
    background: #e0e7ff;
    color: #3730a3;
    padding: 4px 10px;
    border-radius: 999px;
    transition: 0.25s ease;
    display: inline-flex;              /* only as wide as content */
    align-items: center;
    justify-content: center;
    align-self: flex-start;            /* keep it at the left, not full width */
    white-space: nowrap;
}

/* keep all titles same height across row */
.position-title {
    margin-top: 12px;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    transition: 0.25s ease color;
    min-height: 48px;                  /* ensures row alignment */
    display: flex;
    align-items: flex-end;
}

.position-desc {
    margin-top: 8px;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    transition: color 0.25s ease;
    flex-grow: 1;                      /* description fills remaining height */
}

.position-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
    background: linear-gradient(135deg, #4f46e5, #6d28d9);
    border-color: transparent;
}

.position-card:hover .position-title,
.position-card:hover .position-desc {
    color: #fff;
}

.position-card:hover .position-tag {
    background: #fff;
    color: #4f46e5;
}

.position-btn {
    margin-top: 16px;
    padding: 10px 22px;
    font-size: 15px;
    border-radius: 50px;
}

/* ======================= FINAL CTA ======================= */

.careers-final-cta {
    text-align: center;
    background: linear-gradient(135deg, #4f46e5, #6d28d9);
    color: #ffffff;
    margin: 0;
    padding-top: calc(var(--section-padding-desktop) / 2);
    padding-bottom: 24px; /* compact space under button on desktop */
}

.cta-text {
    font-size: 30px;
    font-weight: 800;
    margin: 0 0 8px;
}

.cta-sub {
    margin-top: 8px;
    font-size: 14px;
    opacity: 0.9;
    color: #ffffff;
}

/* CTA Button */

.cta-btn {
    display: inline-block;
    background: #FF8804;
    color: #ffffff;
    font-weight: 700;
    font-size: 17px;
    padding: 15px 44px;
    border-radius: 50px;
    text-decoration: none;
    transition: 0.25s ease-in-out;
    margin-top: 18px;
    box-shadow: 0px 10px 25px rgba(255, 136, 4, 0.35);
}

.cta-btn:hover {
    background: #e67600;
    transform: translateY(-3px);
    box-shadow: 0px 14px 32px rgba(255, 136, 4, 0.45);
}

/* ======================= GENERIC BRAND BUTTON ======================= */

.btn-primary {
    background: #FF8804;
    color: #ffffff;
    border: none;
    font-weight: 600;
    border-radius: 999px;
    padding: 12px 28px;
    font-size: 16px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0px 10px 25px rgba(255, 136, 4, 0.35);
    transition: 0.25s ease-in-out;
}

.btn-primary:hover {
    background: #e67600;
    color: #ffffff;
    box-shadow: 0px 14px 32px rgba(255, 136, 4, 0.45);
    transform: translateY(-2px);
}

/* ======================= SUCCESS ALERT & TURNSTILE SPACING ======================= */

.career-alert-success {
    max-width: 900px;
    margin: 16px auto 0;
    padding: 12px 16px;
    border-radius: 8px;
    background: #ecfdf3;
    color: #166534;
    border: 1px solid #22c55e;
    font-size: 14px;
}

.turnstile-wrapper {
    margin-top: 10px;
}

/* ======================= RESUME MODAL ======================= */

.resume-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    backdrop-filter: blur(2px);
}

.resume-modal-overlay.show {
    display: flex;
}

.resume-modal {
    background: #ffffff;
    border-radius: 18px;
    max-width: 580px;
    width: 100%;
    padding: 30px 34px 32px;
    position: relative;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3);
    transform: translateY(12px);
    opacity: 0;
    transition: 0.25s ease-out;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.resume-modal-overlay.show .resume-modal {
    transform: translateY(0);
    opacity: 1;
}

.resume-modal-top-strip {
    height: 4px;
    width: 74px;
    border-radius: 999px;
    background: linear-gradient(135deg, #4f46e5, #6d28d9);
    margin-bottom: 16px;
}

.resume-modal-header is {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.resume-modal-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.resume-modal-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.resume-modal-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 4px;
    color: #0b1020;
}

.resume-modal-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.resume-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
    transition: color 0.2s ease, transform 0.2s ease;
}

.resume-modal-close:hover {
    color: #111827;
    transform: scale(1.05);
}

/* FORM */

.resume-form {
    margin-top: 8px;
}

.resume-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px 18px;
    margin-bottom: 10px;
}

.resume-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.resume-form-group-full {
    grid-column: 1 / -1;
}

.resume-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

.resume-form-group label span {
    color: #ef4444;
}

.resume-form-group input[type="text"],
.resume-form-group input[type="email"],
.resume-form-group input[type="tel"],
.resume-form-group input[type="url"],
.resume-form-group input[type="file"] {
    border-radius: 10px;
    border: 1px solid #d1d5db;
    padding: 9px 11px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    background-color: #f9fafb;
    color: #111827;
}

.resume-form-group input::placeholder {
    color: #9ca3af;
    font-size: 13px;
}

.resume-form-group input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.18);
    background-color: #ffffff;
}

.resume-form-group input[type="file"] {
    padding: 8px 10px;
    border-style: dashed;
    border-color: #cbd5f5;
    background-color: #f3f4ff;
    cursor: pointer;
}

.resume-form-group input[type="file"]::-webkit-file-upload-button,
.resume-form-group input[type="file"]::file-selector-button {
    margin-right: 10px;
    border: none;
    border-radius: 999px;
    padding: 7px 14px;
    background: #4f46e5;
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.resume-help-text {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

.resume-error {
    font-size: 12px;
    color: #b91c1c;
    margin-top: 2px;
}

/* SUBMIT BUTTON */

.resume-submit-btn {
    margin-top: 18px;
    width: 100%;
    justify-content: center;
}

/* SUCCESS MESSAGE */

.resume-success-message {
    display: none;
    text-align: center;
    padding-top: 8px;
}

.resume-success-message.show {
    display: block;
}

.resume-success-icon {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 6px auto 10px;
    font-size: 22px;
}

.resume-success-message h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #0b1020;
}

.resume-success-message p {
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 16px;
}

.resume-close-after-success {
    width: 100%;
    justify-content: center;
}

/* ======================= POSITION INFO MODAL ======================= */

.position-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    backdrop-filter: blur(2px);
}

.position-modal-overlay.show {
    display: flex;
}

.position-modal {
    background: #ffffff;
    border-radius: 18px;
    max-width: 480px;
    width: 100%;
    padding: 26px 30px 28px;
    position: relative;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3);
    transform: translateY(12px);
    opacity: 0;
    transition: 0.25s ease-out;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-align: left;
}

.position-modal-overlay.show .position-modal {
    transform: translateY(0);
    opacity: 1;
}

.position-modal-top-strip {
    height: 4px;
    width: 74px;
    border-radius: 999px;
    background: linear-gradient(135deg, #4f46e5, #6d28d9);
    margin-bottom: 16px;
}

.position-modal-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.position-modal-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.position-modal-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 4px;
    color: #0b1020;
}

.position-modal-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.position-modal-close {
    position: absolute;
    top: 10px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
    transition: color 0.2s ease, transform 0.2s ease;
}

.position-modal-close:hover {
    color: #111827;
    transform: scale(1.05);
}

.position-modal-body {
    margin-top: 6px;
    text-align: left;
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
}

.position-modal-body a {
    color: #FF8804;
    font-weight: 600;
    text-decoration: underline;
}

.position-modal-btn {
    margin-top: 14px;
    width: 100%;
    justify-content: center;
    color: #ffffff !important;
}

/* Utility */

.hidden {
    display: none !important;
}

/* ======================= RESPONSIVE ======================= */

@media (max-width: 900px) {
    .careers-hero-inner {
        flex-direction: column;
    }

    .careers-title {
        font-size: 42px;
    }

    /* mobile spacing pattern: hero full top/half bottom, mids half/half, CTA compact as well */
    .careers-hero {
        padding-top: var(--section-padding-mobile);
        padding-bottom: calc(var(--section-padding-mobile) / 2);
    }

    .why-section,
    .positions-section {
        padding-top: calc(var(--section-padding-mobile) / 2);
        padding-bottom: calc(var(--section-padding-mobile) / 2);
    }

    .careers-final-cta {
        padding-top: calc(var(--section-padding-mobile) / 2);
        padding-bottom: 24px;
    }

    .why-intro,
    .positions-intro {
        padding: 0 12px;
    }
}

@media (max-width: 640px) {
    .careers-title {
        font-size: 36px;
    }

    .resume-modal {
        padding: 24px 20px 26px;
    }

    .position-modal {
        padding: 22px 18px 22px;
    }

    .resume-form-grid {
        grid-template-columns: 1fr;
    }
}
