/* ==========================================================================
   Jobs (jobs/index.html, jobs/detail.html, jobs/not_found.html)
   Builds on the .home-* components in index.css
   ========================================================================== */

/* --- Shared ------------------------------------------------------------ */
.job-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    color: rgba(226, 234, 248, 0.85);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.job-chip i {
    font-size: 0.75rem;
    color: var(--home-accent);
}

/* --- Job list ---------------------------------------------------------- */
.jobs-section {
    scroll-margin-top: var(--navbar-height, 70px);
}

.jobs-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem 2rem;
    margin-bottom: 2rem;
}

.jobs-head h2 {
    font-size: clamp(1.9rem, 3.4vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.025em;
}

.jobs-head .home-kicker {
    margin-bottom: 0.6rem;
}

.jobs-list {
    display: grid;
    gap: 0.9rem;
}

.job-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 1.25rem;
    padding: 1.35rem 1.5rem;
    border-radius: var(--home-radius);
    color: inherit;
    background: var(--home-surface);
    border: 1px solid var(--home-border);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.job-row:hover {
    transform: translateY(-2px);
    border-color: var(--home-border-accent);
    box-shadow: 0 16px 36px rgba(6, 182, 212, 0.1);
}

.job-row:focus-visible {
    outline: 2px solid var(--home-accent-strong);
    outline-offset: 3px;
}

.job-row__icon {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    font-size: 1.2rem;
    color: var(--home-accent-strong);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.14), rgba(168, 85, 247, 0.14));
    border: 1px solid rgba(6, 182, 212, 0.25);
}

.job-row__department {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--home-accent-strong);
}

.job-row h3 {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.35;
}

.job-row__body p {
    margin-top: 0.35rem;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--home-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.job-row__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.job-row__arrow {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--home-accent-strong);
    background: rgba(6, 182, 212, 0.08);
    transition: transform 0.25s ease, background 0.25s ease;
}

.job-row:hover .job-row__arrow {
    transform: translateX(3px);
    background: rgba(6, 182, 212, 0.16);
}

/* --- How to apply ------------------------------------------------------ */
.jobs-apply {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}

.jobs-apply__title {
    font-size: clamp(1.9rem, 3.4vw, 2.7rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
}

.jobs-apply__lead {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--home-text-muted);
}

.jobs-apply__lead a {
    color: var(--home-accent-strong);
    font-weight: 600;
}

.jobs-tips {
    padding: 1.9rem;
    border-radius: calc(var(--home-radius) + 4px);
    background: var(--home-surface);
    border: 1px solid var(--home-border);
}

.jobs-tips h3 {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1.1rem;
}

.jobs-tips h3 i {
    color: #fbbf24;
}

.jobs-tips ul {
    display: grid;
    gap: 0.65rem;
    list-style: none;
}

.jobs-tips li {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    font-size: 0.93rem;
    color: var(--home-text);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.jobs-tips li i {
    width: 1.2rem;
    text-align: center;
    color: var(--home-accent-strong);
}

/* --- Detail: hero ------------------------------------------------------ */
.job-breadcrumb {
    margin-bottom: 1.75rem;
}

.job-breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--home-text-muted);
    transition: color 0.2s ease;
}

.job-breadcrumb a:hover {
    color: var(--home-text);
}

.job-department {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.2rem;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #bdeefc;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.35);
}

.job-hero h1 {
    margin-bottom: 1rem;
}

.job-hero .home-subhero__lead {
    margin-bottom: 1.5rem;
}

.job-hero__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.job-hero .home-hero__actions {
    margin-bottom: 0;
}

/* --- Detail: content + sidebar ----------------------------------------- */
.job-section {
    padding-top: clamp(3rem, 6vw, 4.5rem);
}

.job-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: clamp(2rem, 4vw, 3rem);
    align-items: start;
}

.job-content {
    display: grid;
    gap: 1.25rem;
}

.job-block {
    padding: clamp(1.5rem, 3vw, 2rem);
    border-radius: var(--home-radius);
    background: var(--home-surface);
    border: 1px solid var(--home-border);
}

.job-block h2 {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.job-block h2 span {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 0.95rem;
    color: var(--home-accent-strong);
    background: rgba(6, 182, 212, 0.12);
}

.job-block__text {
    font-size: 1rem;
    line-height: 1.8;
    color: rgba(226, 234, 248, 0.82);
}

.job-block__text p + p {
    margin-top: 0.9rem;
}

.job-sidebar {
    position: sticky;
    top: calc(var(--navbar-height, 70px) + 1.5rem);
}

.job-card-side {
    padding: 1.6rem;
    border-radius: calc(var(--home-radius) + 4px);
    background:
        radial-gradient(circle at 100% 0%, rgba(6, 182, 212, 0.12), transparent 50%),
        var(--home-surface);
    border: 1px solid var(--home-border-accent);
}

.job-card-side h3 {
    margin-bottom: 1rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--home-text-subtle);
}

.job-facts {
    display: grid;
    gap: 0.25rem;
    margin-bottom: 1.4rem;
}

.job-facts > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.92rem;
}

.job-facts dt {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--home-text-muted);
}

.job-facts dt i {
    width: 1rem;
    text-align: center;
    color: var(--home-accent);
}

.job-facts dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
    color: var(--home-text);
}

.job-card-side__apply {
    width: 100%;
}

.job-card-side__hint {
    margin-top: 0.75rem;
    font-size: 0.82rem;
    text-align: center;
    color: var(--home-text-subtle);
}

.job-card-side__hint a {
    color: var(--home-accent-strong);
}

.job-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.4rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.job-share > span:first-child {
    margin-right: auto;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--home-text-muted);
}

.job-share a,
.job-share button {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 0.95rem;
    color: var(--home-text);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.job-share a:hover,
.job-share button:hover {
    color: var(--home-accent-strong);
    border-color: var(--home-border-accent);
}

.job-share__feedback {
    width: 100%;
    font-size: 0.8rem;
    text-align: right;
    color: #34d399;
}

.job-share__feedback:empty {
    display: none;
}

/* --- Responsive -------------------------------------------------------- */
@media (max-width: 1000px) {
    .job-layout,
    .jobs-apply {
        grid-template-columns: 1fr;
    }

    .job-sidebar {
        position: static;
    }
}

@media (max-width: 760px) {
    .job-row {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 1rem;
        padding: 1.2rem;
    }

    .job-row__meta {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .job-row__arrow {
        display: none;
    }

    .job-row__icon {
        width: 44px;
        height: 44px;
        font-size: 1.05rem;
    }

    .jobs-tips {
        padding: 1.35rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .job-row,
    .job-row__arrow {
        transition: none;
    }
}
