@import url("./common.css");

/* Reserve link in nav — shares visual style with .nav-cta but has no JS modal binding */
.nav-cta-link {
    background: var(--btn-green);
    color: #fff;
    font-family: var(--font);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 16px;
    padding: 0.625rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.nav-cta-link:hover {
    background: var(--bg-dark);
}

body {
    font-family: 'Outfit', -apple-system, sans-serif;
}

::selection {
    background-color: var(--accent);
    color: #fff;
}

/* === Hero === */
.careers-hero {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 8%;
    padding-top: 160px;
    padding-bottom: 3rem;
}

.careers-hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bg-black);
    margin-bottom: 1rem;
}

.careers-hero h1 .accent {
    color: var(--accent);
}

.careers-hero p {
    font-size: clamp(0.95rem, 1.4vw, 1.1rem);
    color: var(--text-muted);
    max-width: 640px;
    line-height: 1.7;
}

/* === Sidebar + Listings Layout === */
.careers-body {
    display: flex;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 3% 0 0;
    gap: 0;
}

/* === Category Navigation (Left Sidebar) === */
.category-nav-wrap {
    position: sticky;
    top: 100px;
    align-self: flex-start;
    z-index: 40;
    width: 240px;
    min-width: 240px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding: 1.5rem 1rem 1.5rem 2.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-radius: 24px;
    background-color: var(--accent);
    color: var(--bg-light)
}

.category-nav-wrap::-webkit-scrollbar {
    display: none;
}

.category-nav-wrap.scrolled {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.category-nav {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0;
}

.cat-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: left;
    padding: 0.5rem 0.875rem;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: color 0.3s, background-color 0.3s;
}

.cat-btn:hover {
    color: var(--bg-black);
    background: rgba(255, 255, 255, 0.5);
}

.cat-btn.active {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 1px 4px rgba(23, 102, 82, 0.08);
}

/* === Job Listings Container === */
.careers-listings {
    flex: 1;
    min-width: 0;
    padding: 0 2rem 6rem 1rem;
}

/* === Category Section === */
.category-section {
    margin-bottom: 3.5rem;
}

.category-section.hidden {
    display: none;
}

.category-header {
    margin-bottom: 1.5rem;
}

.category-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    opacity: 0.6;
}

.category-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--bg-black);
    margin-top: 0.25rem;
    letter-spacing: -0.01em;
}

/* === Job Cards Grid === */
.job-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .job-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1280px) {
    .job-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* === Job Card === */
.job-card {
    position: relative;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(23, 102, 82, 0.08);
    border-radius: 20px;
    padding: 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.35s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

.job-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(23, 102, 82, 0.1), 0 2px 8px rgba(0, 0, 0, 0.04);
    border-color: rgba(23, 102, 82, 0.2);
}

/* Accent top bar */
.job-card-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--cta-green));
    opacity: 0;
    transition: opacity 0.35s;
}

.job-card:hover .job-card-accent {
    opacity: 1;
}

.job-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--accent-15);
    color: var(--accent);
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.job-card-icon i,
.job-card-icon svg {
    width: 18px;
    height: 18px;
}

.job-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--bg-black);
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.job-card:hover h3 {
    color: var(--accent);
}

.job-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.65;
    flex: 1;
}

.job-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: gap 0.3s, color 0.3s;
}

.job-card-cta:hover {
    gap: 0.7rem;
    color: var(--bg-black);
}

.job-card-cta svg,
.job-card-cta i {
    width: 14px;
    height: 14px;
}

/* === Staggered Reveal === */
.card-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.card-reveal:nth-child(2) {
    transition-delay: 0.08s;
}

.card-reveal:nth-child(3) {
    transition-delay: 0.16s;
}

.card-reveal:nth-child(4) {
    transition-delay: 0.24s;
}

.card-reveal:nth-child(5) {
    transition-delay: 0.32s;
}

.card-reveal:nth-child(6) {
    transition-delay: 0.4s;
}

/* === Empty State === */
.careers-empty {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 5rem 2rem;
    min-height: 320px;
}

.careers-empty.show {
    display: flex;
}

.careers-empty-icon {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--accent-15);
    border: 1.5px dashed rgba(23, 102, 82, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin-bottom: 1.75rem;
    flex-shrink: 0;
}

.careers-empty-icon::before,
.careers-empty-icon::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border: 1px dashed rgba(23, 102, 82, 0.14);
    pointer-events: none;
}

.careers-empty-icon::before {
    inset: -16px;
}

.careers-empty-icon::after {
    inset: -30px;
}

.careers-empty-icon i,
.careers-empty-icon svg {
    width: 26px;
    height: 26px;
}

.careers-empty-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--bg-black);
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}

.careers-empty-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 300px;
    margin-bottom: 2rem;
}

.careers-empty-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #fff;
    background: var(--accent);
    border: none;
    border-radius: 14px;
    padding: 0.6rem 1.375rem;
    cursor: pointer;
    transition: background-color 0.2s cubic-bezier(0.2, 0, 0, 1), gap 0.25s;
}

.careers-empty-cta:hover {
    background: var(--bg-black);
    gap: 0.65rem;
}

.careers-empty-cta i,
.careers-empty-cta svg {
    width: 13px;
    height: 13px;
}

/* === Loading / Error States === */
.careers-loading {
    text-align: center;
    padding: 6rem 2rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.careers-error {
    text-align: center;
    padding: 6rem 2rem;
    color: #b91c1c;
    font-size: 0.95rem;
    font-weight: 500;
}

.careers-error.hidden,
.careers-loading.hidden {
    display: none;
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
    .job-card {
        transition: none;
    }

    .job-card:hover {
        transform: none;
    }

    .card-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* === Responsive === */
@media (max-width: 1024px) {
    .careers-body {
        flex-direction: column;
        padding: 0;
    }

    .category-nav-wrap {
        position: sticky;
        top: 84px;
        width: 100%;
        min-width: 0;
        max-height: none;
        overflow-x: auto;
        overflow-y: visible;
        padding: 0.625rem 4%;
        background: rgba(211, 228, 222, 0.92);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(23, 102, 82, 0.08);
    }

    .category-nav {
        flex-direction: row;
        gap: 0.25rem;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .category-nav::-webkit-scrollbar {
        display: none;
    }

    .cat-btn {
        border-radius: 9999px;
        text-align: center;
    }

    .cat-btn.active {
        color: #fff;
        background: var(--bg-teal);
        box-shadow: none;
    }

    .careers-listings {
        padding: 2rem 4% 4rem;
    }
}

@media (max-width: 768px) {
    .careers-hero {
        padding-top: 120px;
        min-height: 40vh;
    }
}