/* ─────────────────────────────────────────────────────────────────────────
   flecbase-jobs — default theme.
   This file is YOURS. Restyle everything here (or swap it out) without
   touching the app. The only contract is the class names used in the views;
   change those in tandem with app/views/* if you rename them.
   Brand it fast by editing the CSS variables in :root below.
   ───────────────────────────────────────────────────────────────────────── */
:root {
  --brand:        #1f6feb;   /* primary / links / buttons */
  --brand-dark:   #1a5fca;
  --accent:       #ffb020;   /* featured tag */
  --ink:          #12161c;
  --muted:        #5a6572;
  --line:         #e6e8ec;
  --bg:           #f6f7f9;
  --paper:        #ffffff;
  --radius:       12px;
  --shadow:       0 6px 24px rgba(18,22,28,.08);
  --wrap:         1080px;
  --head:         'Barlow Condensed', system-ui, sans-serif;
  --body:         'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
h1,h2,h3 { font-family: var(--head); line-height: 1.05; margin: 0 0 .4em; letter-spacing: .3px; }
h1 { font-size: clamp(2rem, 5vw, 3rem); text-transform: uppercase; }

/* Header / footer (styled by you) */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: .9rem 0; }
.brand { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); font-family: var(--head); font-size: 1.4rem; font-weight: 700; text-transform: uppercase; }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--brand); }
.site-nav a { color: var(--muted); font-family: var(--head); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; margin-left: 1.3rem; }
.site-nav a:hover { color: var(--brand); text-decoration: none; }
.site-main { min-height: 60vh; }
.site-footer { background: var(--ink); color: rgba(255,255,255,.7); margin-top: 3rem; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding: 1.6rem 0; font-size: .9rem; }
.site-footer a { color: rgba(255,255,255,.85); }

/* Hero */
.hero { background: linear-gradient(120deg, var(--brand), var(--brand-dark)); color: #fff; padding: clamp(2.5rem,6vw,4rem) 0; }
.hero h1 { color: #fff; }
.hero .eyebrow { font-family: var(--head); text-transform: uppercase; letter-spacing: 3px; opacity: .85; margin: 0 0 .3rem; }
.hero .lead { font-size: 1.15rem; opacity: .95; margin: 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--head); text-transform: uppercase; letter-spacing: .8px; font-weight: 600; font-size: 1.05rem; padding: .6rem 1.2rem; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; transition: transform .12s, background .2s; }
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-block { display: flex; width: 100%; justify-content: center; }

/* Board + filters */
.board { padding: 2rem 0 3rem; }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.6rem; align-items: center; }
.filters input, .filters select { font-family: var(--body); font-size: .95rem; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); }
.filter-search { flex: 1 1 240px; }
.filter-clear { color: var(--muted); font-size: .9rem; margin-left: .3rem; }

/* Job cards */
.job-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.job-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .15s, border-color .2s; }
.job-card:hover { transform: translateY(-3px); border-color: var(--brand); }
.job-card.is-featured { border-color: var(--accent); }
.job-card-link { display: block; padding: 1.3rem 1.5rem; color: inherit; }
.job-card-link:hover { text-decoration: none; }
.job-title { font-size: 1.5rem; margin: .2rem 0 .3rem; }
.job-summary { color: var(--muted); margin: 0 0 .8rem; }
.job-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; color: var(--muted); font-size: .9rem; }
.job-meta-lg { font-size: 1rem; margin-top: .6rem; }
.meta-salary { color: var(--ink); font-weight: 600; }
.tag { display: inline-block; font-family: var(--head); text-transform: uppercase; letter-spacing: 1px; font-size: .72rem; font-weight: 700; padding: .18rem .55rem; border-radius: 999px; }
.tag-featured { background: var(--accent); color: #3a2a00; }

/* Pager + empty */
.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 2rem; }
.pager-info { color: var(--muted); font-size: .9rem; }
.empty { text-align: center; padding: 3rem 0; color: var(--muted); }
.empty h2 { color: var(--ink); }

/* Detail */
.job-hero { background: var(--paper); border-bottom: 1px solid var(--line); padding: 2.2rem 0; }
.crumbs { color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: 1px; margin: 0 0 .6rem; }
.job-detail { display: grid; grid-template-columns: 1fr 320px; gap: 2.5rem; padding: 2.5rem 0 3.5rem; align-items: start; }
.job-body { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; }
.job-lead { font-size: 1.15rem; color: var(--muted); margin-top: 0; }
.job-body h2, .job-body h3 { font-family: var(--head); margin-top: 1.6rem; }
.job-body ul, .job-body ol { padding-left: 1.2rem; }
.job-aside { position: sticky; top: 90px; display: grid; gap: 1rem; }
.apply-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; }
.apply-card h3 { font-size: 1.3rem; }
.apply-note { color: var(--muted); font-size: .85rem; text-align: center; margin: .6rem 0 0; }
.apply-facts { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; margin: 1.2rem 0 0; font-size: .92rem; }
.apply-facts dt { color: var(--muted); }
.apply-facts dd { margin: 0; font-weight: 600; }
.back-link { color: var(--muted); font-size: .9rem; }

@media (max-width: 820px) {
  .job-detail { grid-template-columns: 1fr; }
  .job-aside { position: static; }
}

/* Apply form */
.apply-wrap { max-width: 640px; padding: 2.5rem 0 3.5rem; }
.apply-form { display: grid; gap: 1.1rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem; }
.apply-form label { display: grid; gap: .35rem; font-family: var(--head); text-transform: uppercase; letter-spacing: .5px; font-size: .95rem; color: var(--muted); }
.apply-form .opt { text-transform: none; letter-spacing: 0; font-family: var(--body); font-size: .8rem; }
.apply-form input, .apply-form textarea { font-family: var(--body); font-size: 1rem; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); width: 100%; }
.apply-form input:focus, .apply-form textarea:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
.apply-form .consent { flex-direction: row; grid-auto-flow: column; grid-template-columns: auto 1fr; align-items: start; gap: .6rem; text-transform: none; letter-spacing: 0; font-family: var(--body); font-size: .95rem; color: var(--ink); }
.apply-form .consent input { width: auto; margin-top: .25rem; }
.apply-actions { display: flex; gap: .8rem; margin-top: .4rem; }
.field-error { color: #b3261e; font-family: var(--body); text-transform: none; letter-spacing: 0; font-size: .85rem; }
.form-banner { background: #fdecea; border: 1px solid #f5c2bd; color: #8c1d18; border-radius: 8px; padding: .9rem 1.1rem; margin-bottom: 1.2rem; }
.apply-success { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2.5rem; text-align: center; }
.apply-success h2 { color: var(--brand); }
.apply-ref { color: var(--muted); }

/* Apply layout — advert criteria beside the form */
.apply-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; padding: 2.5rem 0 3.5rem; align-items: start; }
.apply-advert { position: sticky; top: 90px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.8rem; max-height: calc(100vh - 120px); overflow-y: auto; }
.apply-advert h2 { font-size: 1.6rem; }
.apply-advert-body { margin-top: 1rem; }
.apply-advert-body h2, .apply-advert-body h3 { font-family: var(--head); font-size: 1.2rem; margin-top: 1.2rem; }
.apply-advert-body ul, .apply-advert-body ol { padding-left: 1.2rem; }
.apply-formwrap .apply-form { margin: 0; }
.req { color: #b3261e; }
.cover-group { border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.1rem 1.2rem; margin: 0; display: grid; gap: .6rem; }
.cover-group legend { font-family: var(--head); text-transform: uppercase; letter-spacing: .5px; font-size: .95rem; color: var(--muted); padding: 0 .4rem; }
.cover-group p { margin: 0; }
.cover-file { display: grid; gap: .35rem; font-family: var(--head); text-transform: uppercase; letter-spacing: .5px; font-size: .9rem; color: var(--muted); }
.apply-form input[type=file] { font-family: var(--body); font-size: .92rem; padding: .5rem; border: 1px dashed var(--line); border-radius: 8px; background: #fafbfc; width: 100%; }

@media (max-width: 860px) {
  .apply-layout { grid-template-columns: 1fr; }
  .apply-advert { position: static; max-height: none; }
}
