/*
  style.css
  ---------
  Udseendet af UngeJob. Inspireret af moderne, troværdige danske sider
  (fx boligsiden.dk): varm cremet baggrund, dyb navy tekst, et stort
  søge-/filterkort, rene hvide listekort og god luft mellem tingene.

  Alle farver styres ét sted (:root herunder). Skift fx --brand og se,
  hvordan hele siden følger med.
*/

:root {
    --bg: #f6f3ec;            /* varm creme baggrund */
    --surface: #ffffff;
    --ink: #14202e;           /* dyb navy til tekst/overskrifter */
    --ink-soft: #5b6774;      /* dæmpet grå-blå */
    --line: #e7e1d5;          /* varm kantlinje */
    --line-soft: #f0ebe1;
    --brand: #1a7a55;         /* rolig, troværdig grøn */
    --brand-dark: #14603f;
    --brand-tint: #e7f2eb;    /* lys grøn baggrundstone */
    --gold: #c9a24a;          /* varm accent til små detaljer */
    --shadow-sm: 0 1px 2px rgba(20, 32, 46, 0.05);
    --shadow: 0 4px 14px rgba(20, 32, 46, 0.06);
    --shadow-lg: 0 18px 40px rgba(20, 32, 46, 0.12);
    --radius: 18px;
    --radius-sm: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
}

a { color: inherit; }

/* ===== Brand ===== */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    background: var(--brand);
    color: #fff;
    border-radius: 10px;
}

.brand-name {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.brand-name strong { color: var(--brand); font-weight: 800; }

/* ===== Topbar ===== */
.nav {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(246, 243, 236, 0.82);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-links {
    display: flex;
    gap: 30px;
    font-size: 15px;
    font-weight: 500;
}
.nav-links a {
    text-decoration: none;
    color: var(--ink-soft);
    transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--ink); }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
    padding: 9px 15px;
    border-radius: 10px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-ghost:hover { background: #fff; border-color: #d9d2c4; }
.btn-ghost:disabled { opacity: 0.55; cursor: wait; }

/* ===== Hero ===== */
.hero {
    padding: 60px 0 40px;
    background:
        radial-gradient(900px 380px at 15% -60px, var(--brand-tint), transparent 70%),
        radial-gradient(700px 340px at 95% 0, #fbf3e2, transparent 70%);
}

.hero-inner { max-width: 900px; }

.hero-eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--brand-dark);
    background: var(--brand-tint);
    padding: 6px 12px;
    border-radius: 999px;
    margin-bottom: 18px;
}

.hero-title {
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.hero-sub {
    font-size: 18px;
    color: var(--ink-soft);
    max-width: 620px;
    margin-bottom: 28px;
}

/* Søge-/filterkortet (signatur-elementet) */
.searchcard {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-lg);
}

.field { display: flex; flex-direction: column; gap: 7px; min-width: 150px; }
.field-grow { flex: 1; }

.field label {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ink-soft);
    padding-left: 4px;
}

.input-wrap {
    display: flex;
    align-items: center;
    gap: 9px;
    background: #faf8f3;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0 12px;
    height: 50px;
    color: var(--ink-soft);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input-wrap:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-tint);
    background: #fff;
}
.input-wrap input,
.input-wrap select {
    border: none;
    background: transparent;
    outline: none;
    font: inherit;
    font-size: 15px;
    color: var(--ink);
    width: 100%;
    cursor: pointer;
}
.input-wrap input { cursor: text; }

.btn-primary {
    height: 50px;
    padding: 0 26px;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:active { transform: scale(0.98); }

/* Kategori-genveje */
.chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 22px;
}
.chips-label { font-size: 14px; color: var(--ink-soft); font-weight: 600; }
.chip {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.chip:hover { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-tint); }
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ===== Resultater ===== */
.results-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 48px 0 22px;
    flex-wrap: wrap;
}
.results-count { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.results-meta { color: var(--ink-soft); font-size: 14.5px; margin-top: 2px; }

.sort { display: flex; align-items: center; gap: 10px; }
.sort label { font-size: 14px; color: var(--ink-soft); font-weight: 600; }
.sort select {
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 9px 12px;
    cursor: pointer;
}

/* ===== Handlingsknapper over resultater ===== */
.results-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn-near {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--brand); color: #fff; border: none;
    padding: 10px 16px; border-radius: 10px;
    font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
    transition: background 0.15s ease;
}
.btn-near:hover { background: var(--brand-dark); }
.btn-near.active { background: var(--brand-dark); }
.btn-near:disabled { opacity: 0.6; cursor: wait; }

/* ===== Kort (Leaflet) ===== */
.map-wrap { margin-bottom: 26px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
#map { height: 420px; width: 100%; }
.map-pin-label { font-weight: 700; }
.leaflet-popup-content { font-family: inherit; }
.popup-title { font-weight: 700; margin-bottom: 4px; }
.popup-city { color: #5b6774; font-size: 13px; margin-bottom: 8px; }
.popup-link { color: #14603f; font-weight: 700; text-decoration: none; }

/* ===== Grid + kort ===== */
.job-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 22px;
    padding-bottom: 20px;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
}
.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: #ddd6c8;
}

/* Billed-forside øverst på kortet */
.card-cover { position: relative; height: 150px; background: var(--lc, var(--brand)); overflow: hidden; }
.cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-cover::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,0.42));
}
.cover-chain {
    position: absolute; left: 12px; bottom: 12px; z-index: 1;
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.95); color: var(--ink);
    font-weight: 700; font-size: 13px;
    padding: 5px 12px 5px 5px; border-radius: 999px;
}
.cover-chain .logo-badge { width: 24px; height: 24px; border-radius: 7px; font-size: 10.5px; }
.cover-badge {
    position: absolute; top: 12px; left: 12px; z-index: 1;
    background: rgba(255,255,255,0.95); color: var(--brand-dark);
    font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px;
}
.cover-new {
    position: absolute; top: 12px; right: 12px; z-index: 1;
    background: var(--brand); color: #fff;
    font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px;
}

/* Kædens "logo-firkant" (monogram) */
.logo-badge {
    display: grid; place-items: center;
    background: var(--lc, var(--brand)); color: #fff;
    font-weight: 800; letter-spacing: -0.02em;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15);
}

.card-body { padding: 16px 18px 8px; display: flex; flex-direction: column; flex: 1; }
.card-title {
    font-size: 16px; font-weight: 700; line-height: 1.35;
    letter-spacing: -0.01em; margin-bottom: 12px;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden; min-height: 44px;
}
.card-meta { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.meta { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 14px; }
.meta svg { flex-shrink: 0; color: var(--brand); }
.meta.dist { color: var(--brand-dark); font-weight: 700; }

.card-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-top: auto; }
.tag { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--brand-tint); color: var(--brand-dark); }
.tag.ghost { background: var(--line-soft); color: var(--ink-soft); }

.card-foot { display: flex; gap: 10px; padding: 14px 18px 18px; }
.btn-detail {
    flex: 1; background: var(--surface); border: 1px solid var(--line); color: var(--ink);
    font: inherit; font-size: 14px; font-weight: 700; padding: 11px;
    border-radius: var(--radius-sm); cursor: pointer;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.btn-detail:hover { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-tint); }
.card-cta {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
    text-decoration: none; background: var(--ink); color: #fff;
    padding: 11px; border-radius: var(--radius-sm);
    font-weight: 700; font-size: 14px; transition: background 0.15s ease;
}
.card-cta:hover { background: #0c1620; }
.card-cta svg { transition: transform 0.15s ease; }
.card-cta:hover svg { transform: translateX(3px); }

/* ===== Detalje-panel (modal) ===== */
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(16, 24, 46, 0.55); backdrop-filter: blur(3px); }
.modal-card {
    position: relative; z-index: 1;
    width: 100%; max-width: 620px; max-height: 88vh; overflow-y: auto;
    background: var(--surface); border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}
.modal-close {
    position: absolute; top: 14px; right: 14px; z-index: 2;
    width: 38px; height: 38px; display: grid; place-items: center;
    background: rgba(255,255,255,0.9); border: 1px solid var(--line);
    border-radius: 10px; cursor: pointer; color: var(--ink);
}
.modal-close:hover { background: #fff; }
.modal-cover { height: 180px; position: relative; background: var(--lc, var(--brand)); overflow: hidden; }
.modal-cover img { width: 100%; height: 100%; object-fit: cover; }
.modal-inner { padding: 26px 28px 30px; }
.modal-chain { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; color: var(--brand-dark); background: var(--brand-tint); padding: 5px 12px; border-radius: 999px; margin-bottom: 14px; }
.modal-title { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 16px; }
.modal-facts { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.modal-fact { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); font-size: 15px; }
.modal-fact svg { flex-shrink: 0; color: var(--brand); }
.modal-desc { color: var(--ink); font-size: 15px; line-height: 1.7; margin-bottom: 20px; white-space: pre-line; }
.modal-desc h4, .modal-skills-wrap h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); margin-bottom: 8px; }
.modal-skills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.modal-apply {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    text-decoration: none; background: var(--brand); color: #fff;
    padding: 14px; border-radius: var(--radius-sm); font-weight: 700; font-size: 15.5px;
    transition: background 0.15s ease;
}
.modal-apply:hover { background: var(--brand-dark); }

.loading, .empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--ink-soft);
    padding: 70px 0;
    font-size: 15px;
}

/* ===== Tryghedssektion ===== */
.trust { margin-top: 40px; padding: 64px 0; border-top: 1px solid var(--line); }
.trust-inner {
    display: grid;
    grid-template-columns: 1.3fr 0.9fr;
    gap: 48px;
    align-items: center;
}
.trust-text h2 { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 14px; }
.trust-text > p { color: var(--ink-soft); font-size: 16px; max-width: 560px; margin-bottom: 26px; }

.trust-points { display: flex; flex-direction: column; gap: 18px; }
.tpoint { display: flex; gap: 14px; align-items: flex-start; }
.tp-ico {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--brand-tint);
    color: var(--brand-dark);
    font-weight: 800;
    font-size: 14px;
}
.tpoint strong { display: block; font-size: 15.5px; margin-bottom: 2px; }
.tpoint p { color: var(--ink-soft); font-size: 14.5px; }

.trust-card {
    background: var(--ink);
    color: #fff;
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-lg);
}
.tc-big { font-size: 60px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; color: #fff; }
.tc-label { color: rgba(255,255,255,0.65); font-size: 15px; margin-bottom: 22px; }
.tc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 0;
    border-top: 1px solid rgba(255,255,255,0.12);
    font-size: 14.5px;
}
.tc-row span { color: rgba(255,255,255,0.6); }
.tc-row strong { font-weight: 700; }

/* ===== Footer ===== */
.footer { background: #101a24; color: #cdd5dd; padding: 54px 0 26px; }
.footer .brand-name { color: #fff; }
.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
    gap: 32px;
}
.footer-brand p { margin-top: 14px; color: #8b97a3; font-size: 14px; max-width: 260px; }
.footer-col h4 { font-size: 14px; color: #fff; margin-bottom: 14px; letter-spacing: 0.02em; }
.footer-col a, .footer-col .soon {
    display: block;
    text-decoration: none;
    color: #a7b1bc;
    font-size: 14.5px;
    padding: 5px 0;
}
.footer-col a:hover { color: #fff; }
.footer-col .soon em { font-style: normal; font-size: 11px; color: #6d7883; margin-left: 6px; }
.footer-note { color: #8b97a3; font-size: 13.5px; line-height: 1.6; }
.footer-bottom {
    margin-top: 34px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 13px;
    color: #7d8893;
}

/* ===== Responsivt ===== */
@media (max-width: 860px) {
    .nav-links { display: none; }
    .searchcard { flex-direction: column; align-items: stretch; }
    .field { min-width: 0; }
    .btn-primary { width: 100%; }
    .trust-inner { grid-template-columns: 1fr; gap: 32px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
}
@media (max-width: 520px) {
    .footer-grid { grid-template-columns: 1fr; }
    .card-title { min-height: 0; }
}
