/* =====================================================
   Google Jobs Board – Frontend Styles
   Aesthetic: Editorial / refined dark-ink on cream
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;800&family=DM+Sans:ital,wght@0,400;0,500;0,600;1,400&display=swap');

/* ── Root tokens ───────────────────────────────── */
.gjb-wrap {
    --gjb-ink:       #0f0e0c;
    --gjb-paper:     #f8f5f0;
    --gjb-accent:    #e8420a;   /* bold vermillion */
    --gjb-accent-2:  #1a3a6b;   /* deep navy */
    --gjb-muted:     #7a7068;
    --gjb-border:    #ddd8d0;
    --gjb-card-bg:   #ffffff;
    --gjb-shadow:    0 2px 0 #ddd8d0, 0 4px 20px rgba(15,14,12,.06);
    --gjb-radius:    4px;
    --gjb-font-head: 'Playfair Display', Georgia, serif;
    --gjb-font-body: 'DM Sans', system-ui, sans-serif;
    --gjb-grid-cols: repeat(auto-fill, minmax(280px, 1fr));

    font-family: var(--gjb-font-body);
    color: var(--gjb-ink);
    background: var(--gjb-paper);
    padding: 48px 32px;
    border-radius: 8px;
    box-sizing: border-box;
    max-width: 1200px;
    margin: 0 auto;
}

/* list layout override */
.gjb-wrap.gjb-layout-list {
    --gjb-grid-cols: 1fr;
}

*, *::before, *::after { box-sizing: inherit; }

/* ── Header bar ───────────────────────────────── */
.gjb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
    padding-bottom: 28px;
    border-bottom: 2px solid var(--gjb-ink);
}

.gjb-header__left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.gjb-header__icon {
    font-size: 2.4rem;
    line-height: 1;
}

.gjb-header__title {
    font-family: var(--gjb-font-head);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -.03em;
    color: var(--gjb-ink);
    margin: 0 0 2px;
    line-height: 1.1;
}

.gjb-header__meta {
    font-size: .82rem;
    color: var(--gjb-muted);
    margin: 0;
    font-weight: 500;
    letter-spacing: .02em;
}

/* ── Search box ───────────────────────────────── */
.gjb-search-wrap {
    position: relative;
}

.gjb-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--gjb-muted);
    pointer-events: none;
}

.gjb-search {
    font-family: var(--gjb-font-body);
    font-size: .9rem;
    color: var(--gjb-ink);
    background: var(--gjb-card-bg);
    border: 1.5px solid var(--gjb-border);
    border-radius: 30px;
    padding: 10px 18px 10px 40px;
    width: 260px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.gjb-search:focus {
    border-color: var(--gjb-accent-2);
    box-shadow: 0 0 0 3px rgba(26,58,107,.1);
}

.gjb-search::placeholder { color: var(--gjb-muted); }

/* ── Grid / list ──────────────────────────────── */
.gjb-grid {
    display: grid;
    grid-template-columns: var(--gjb-grid-cols);
    gap: 20px;
}

/* ── Cards ────────────────────────────────────── */
.gjb-card {
    background: var(--gjb-card-bg);
    border: 1.5px solid var(--gjb-border);
    border-radius: var(--gjb-radius);
    padding: 28px 26px 22px;
    box-shadow: var(--gjb-shadow);
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s;

    /* staggered entrance */
    opacity: 0;
    transform: translateY(18px);
    animation: gjb-card-in .45s ease forwards;
    animation-delay: calc(var(--card-index) * 60ms);
}

.gjb-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 2px 0 var(--gjb-accent), 0 8px 32px rgba(15,14,12,.12);
    border-color: var(--gjb-accent);
}

/* Accent left-rule on hover */
.gjb-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    border-radius: 4px 0 0 4px;
    background: var(--gjb-accent);
    opacity: 0;
    transition: opacity .22s;
}

.gjb-card:hover::before { opacity: 1; }

@keyframes gjb-card-in {
    to { opacity: 1; transform: translateY(0); }
}

/* list layout card adjustments */
.gjb-layout-list .gjb-card {
    flex-direction: row;
    align-items: center;
    padding: 20px 24px;
    gap: 0;
}

.gjb-layout-list .gjb-card__badge  { margin-right: 20px; flex-shrink: 0; }
.gjb-layout-list .gjb-card__title  { flex: 1; margin: 0; font-size: 1.05rem; }
.gjb-layout-list .gjb-card__desc   { display: none; }
.gjb-layout-list .gjb-card__footer { margin-top: 0; margin-left: 20px; flex-shrink: 0; }

/* ── Badge ────────────────────────────────────── */
.gjb-badge {
    display: inline-block;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 2px;
}

.gjb-badge--open {
    background: #ecfdf3;
    color: #16803b;
    border: 1px solid #bbf7d0;
}

/* ── Card typography ──────────────────────────── */
.gjb-card__title {
    font-family: var(--gjb-font-head);
    font-size: 1.22rem;
    font-weight: 700;
    color: var(--gjb-ink);
    margin: 0;
    line-height: 1.25;
    letter-spacing: -.02em;
}

.gjb-card__desc {
    font-size: .88rem;
    color: var(--gjb-muted);
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

/* ── Card footer / CTA ────────────────────────── */
.gjb-card__footer {
    margin-top: auto;
    padding-top: 8px;
}

.gjb-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--gjb-font-body);
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .01em;
    text-decoration: none;
    padding: 9px 18px;
    border-radius: var(--gjb-radius);
    transition: background .2s, transform .15s, color .2s;
    cursor: pointer;
}

.gjb-btn svg {
    width: 14px;
    height: 14px;
    transition: transform .2s;
}

.gjb-btn--apply {
    background: var(--gjb-ink);
    color: #fff;
}

.gjb-btn--apply:hover {
    background: var(--gjb-accent);
    color: #fff;
}

.gjb-btn--apply:hover svg { transform: translateX(3px); }

.gjb-btn--nolink {
    background: transparent;
    color: var(--gjb-muted);
    border: 1.5px solid var(--gjb-border);
    cursor: default;
}

/* ── Empty / no-results states ────────────────── */
.gjb-empty,
.gjb-no-results {
    text-align: center;
    padding: 60px 24px;
    color: var(--gjb-muted);
}

.gjb-empty__icon {
    display: block;
    font-size: 2.4rem;
    margin-bottom: 12px;
}

.gjb-empty p,
.gjb-no-results p {
    font-size: .95rem;
    margin: 0;
}

/* ── Hidden helper ────────────────────────────── */
[hidden] { display: none !important; }

/* ── Responsive ───────────────────────────────── */
@media (max-width: 600px) {
    .gjb-wrap { padding: 28px 16px; }
    .gjb-header { flex-direction: column; align-items: flex-start; }
    .gjb-search { width: 100%; }
    .gjb-header__title { font-size: 1.5rem; }
    .gjb-layout-list .gjb-card { flex-direction: column; align-items: flex-start; gap: 12px; }
    .gjb-layout-list .gjb-card__footer { margin-left: 0; }
}
