/*
Theme Name: Hampshire Legal Recruitment
Theme URI: https://hampshirelegal.co.uk/
Author: Ten Percent Group
Author URI: https://ten-percent.co.uk/
Description: A bespoke recruitment theme for Hampshire Legal, covering permanent and locum legal recruitment across Hampshire.
Version: 1.1.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.0
Text Domain: hampshire-legal
*/

:root {
  --navy: #102a43;
  --navy-deep: #071d31;
  --blue: #1f5f99;
  --blue-dark: #174b7a;
  --sky: #e4f0f8;
  --sky-strong: #c9e1f1;
  --gold: #d6a84b;
  --cream: #f7f4ed;
  --white: #ffffff;
  --ink: #172431;
  --muted: #536575;
  --line: #d6e1ea;
  --shadow: 0 20px 55px rgba(16, 42, 67, 0.14);
  --radius: 20px;
  --shell: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: Aptos, "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.67;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
svg { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 {
  color: var(--navy);
  font-family: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  line-height: 1.08;
}
h1 { margin-bottom: 1.5rem; font-size: clamp(2.8rem, 5.6vw, 5.2rem); letter-spacing: -0.045em; }
h2 { margin-bottom: 1.2rem; font-size: clamp(2rem, 3.5vw, 3.3rem); letter-spacing: -0.035em; }
h3 { margin-bottom: 0.7rem; font-size: 1.42rem; }

.shell { width: min(calc(100% - 40px), var(--shell)); margin-inline: auto; }
.narrow { width: min(calc(100% - 40px), 820px); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.skip-link { position: fixed; z-index: 99999; top: 10px; left: 10px; padding: 0.7rem 1rem; background: var(--gold); transform: translateY(-160%); }
.skip-link:focus { transform: none; }

.utility { background: var(--navy-deep); color: #dbe8f1; font-size: 0.82rem; }
.utility__inner { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.utility__links { display: flex; gap: 22px; }
.utility a { text-decoration: none; }
.utility a:hover { text-decoration: underline; }

.site-header { position: sticky; z-index: 50; top: 0; background: rgba(255,255,255,0.97); box-shadow: 0 1px 0 rgba(16,42,67,0.12); backdrop-filter: blur(12px); }
.admin-bar .site-header { top: 32px; }
.header__inner { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--navy); text-decoration: none; }
.brand__mark { display: grid; width: 47px; height: 47px; place-items: center; border-radius: 14px; background: var(--gold); color: var(--navy); transform: rotate(-2deg); }
.brand__mark svg { width: 26px; height: 26px; }
.brand strong, .brand small { display: block; }
.brand strong { font-family: Charter, "Bitstream Charter", Cambria, Georgia, serif; font-size: 1.28rem; line-height: 1; }
.brand small { margin-top: 6px; color: var(--muted); font-size: 0.68rem; letter-spacing: 0.13em; text-transform: uppercase; }
.custom-logo-link img { max-height: 56px; width: auto; }

.primary-nav { display: flex; align-items: center; gap: 21px; }
.primary-nav ul { display: flex; align-items: center; gap: 21px; margin: 0; padding: 0; list-style: none; }
.primary-nav a { color: var(--navy); font-size: 0.9rem; font-weight: 750; text-decoration: none; }
.primary-nav a:hover, .primary-nav .current-menu-item > a, .primary-nav .current_page_item > a { color: var(--blue); }
.primary-nav li:last-child > a { display: inline-flex; padding: 0.62rem 1rem; border-radius: 999px; background: var(--navy); color: #fff; }
.nav-toggle { display: none; border: 0; background: none; padding: 8px; cursor: pointer; }
.nav-toggle span:not(.screen-reader-text) { display: block; width: 27px; height: 2px; margin: 5px; background: var(--navy); }

.site-main, .entry-content { margin: 0; }
.entry-content > :first-child { margin-top: 0; }
.entry-content > :last-child { margin-bottom: 0; }
.eyebrow { margin-bottom: 1rem; color: var(--blue-dark); font-size: 0.77rem; font-weight: 850; letter-spacing: 0.16em; text-transform: uppercase; }
.lede { max-width: 850px; color: #405367; font-size: clamp(1.15rem, 1.8vw, 1.4rem); }
.button-row { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 2rem; }
.button { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; gap: 9px; padding: 0.78rem 1.2rem; border: 2px solid transparent; border-radius: 999px; font-weight: 800; line-height: 1.2; text-decoration: none; transition: transform 0.18s, background 0.18s, color 0.18s; }
.button:hover { transform: translateY(-2px); }
.button--primary { background: var(--blue); color: #fff; }
.button--primary:hover { background: var(--navy); }
.button--secondary { border-color: var(--navy); background: transparent; color: var(--navy); }
.button--secondary:hover { background: var(--navy); color: #fff; }
.button--light { background: #fff; color: var(--navy); }
.button--outline-light { border-color: rgba(255,255,255,0.7); color: #fff; }
.button--text { padding-inline: 0; border-radius: 0; color: var(--blue-dark); }
.button svg, .text-link svg { width: 18px; height: 18px; }

.hero { position: relative; overflow: hidden; padding: clamp(72px, 10vw, 132px) 0; background: linear-gradient(120deg, var(--cream) 0 67%, var(--navy) 67%); }
.hero::before { position: absolute; width: 520px; height: 520px; top: -205px; right: -230px; border: 1px solid rgba(214,168,75,0.38); border-radius: 50%; content: ""; }
.hero__grid { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(320px,0.76fr); align-items: center; gap: clamp(45px,8vw,105px); }
.hero__copy { position: relative; z-index: 1; }
.hero__copy h1 { max-width: 830px; }
.hero__copy .lede { max-width: 730px; }
.hero__proof { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 2.3rem; color: var(--muted); font-size: 0.9rem; font-weight: 750; }
.hero__proof span { display: flex; align-items: center; gap: 8px; }
.hero__proof span::before { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); content: ""; }
.hero-panel { position: relative; z-index: 1; padding: clamp(28px,4vw,48px); border-radius: var(--radius); background: var(--navy); color: #dbe8f1; box-shadow: var(--shadow); }
.hero-panel h2 { color: #fff; font-size: clamp(1.75rem,2.5vw,2.5rem); }
.hero-panel a { display: block; margin-top: 0.65rem; color: #fff; font-weight: 750; text-decoration: none; }
.hero-panel__phone { color: var(--gold) !important; font-family: Charter, Cambria, Georgia, serif; font-size: 1.9rem !important; }
.hero-panel__label { color: var(--gold); font-size: 0.77rem; font-weight: 850; letter-spacing: 0.15em; text-transform: uppercase; }

.page-hero { padding: clamp(72px,9vw,116px) 0; border-bottom: 1px solid var(--line); background: linear-gradient(135deg,var(--cream),#fff 69%); }
.page-hero__inner { max-width: 1000px; }
.page-hero h1 { font-size: clamp(2.75rem,5vw,4.8rem); }
.section { padding: clamp(72px,9vw,122px) 0; }
.section--tint { background: var(--sky); }
.section--navy { background: var(--navy); color: #dbe8f1; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section--navy .eyebrow, .section--map .eyebrow { color: var(--gold); }
.section--map { overflow: hidden; background: var(--navy); color: #dbe8f1; }
.section--map h2 { color: #fff; }
.section-heading { max-width: 770px; margin-bottom: 3rem; }
.section-heading--row { display: flex; max-width: none; align-items: end; justify-content: space-between; gap: 30px; }
.section-heading--row > div { max-width: 730px; }

.card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.card-grid--three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.card { display: flex; min-height: 250px; flex-direction: column; align-items: flex-start; padding: clamp(25px,3vw,36px); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 8px 24px rgba(16,42,67,0.06); }
.card p { color: var(--muted); }
.card__icon { display: grid; width: 49px; height: 49px; margin-bottom: 1.4rem; place-items: center; border-radius: 13px; background: var(--sky); color: var(--blue); }
.card__icon svg { width: 26px; height: 26px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; color: var(--blue-dark); font-weight: 800; text-decoration: none; }
.split__grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: clamp(45px,8vw,100px); }
.feature-list, .side-panel { padding: clamp(28px,4vw,46px); border-radius: var(--radius); }
.feature-list { background: #fff; box-shadow: var(--shadow); }
.side-panel { border-top: 5px solid var(--gold); background: var(--cream); }
.check-list { margin: 0; padding: 0; list-style: none; }
.check-list li { display: flex; align-items: flex-start; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.check-list li::before { flex: none; margin-top: 1px; color: var(--blue); font-weight: 900; content: "✓"; }
.check-list li:last-child { border: 0; }
.check-list svg { flex: none; margin-top: 4px; color: var(--blue); stroke-width: 2.5; }
.section--map .check-list li { border-color: rgba(255,255,255,0.16); }
.section--map .check-list svg { color: var(--gold); }
.section--map .check-list li::before { color: var(--gold); }
.steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; margin: 0; padding: 0; list-style: none; }
.steps li { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.steps span { display: inline-block; margin-bottom: 1rem; color: var(--blue); font-size: 0.78rem; font-weight: 900; letter-spacing: 0.1em; }
.number-list { margin: 0; padding: 0; counter-reset: item; list-style: none; }
.number-list li { display: grid; grid-template-columns: 55px 1fr; gap: 2px 18px; padding: 22px 0; border-top: 1px solid var(--line); counter-increment: item; }
.number-list li::before { grid-row: 1/3; color: var(--blue); font-weight: 900; content: "0" counter(item); }
.number-list span { color: var(--muted); }
.accordion details { padding: 20px 0; border-top: 1px solid var(--line); }
.accordion details:last-child { border-bottom: 1px solid var(--line); }
.accordion summary { color: var(--navy); cursor: pointer; font-family: Charter, Cambria, Georgia, serif; font-size: 1.25rem; font-weight: 700; }
.accordion details p { margin: 1rem 0 0; color: var(--muted); }

.map-layout { display: grid; grid-template-columns: minmax(0,0.88fr) minmax(460px,1.12fr); align-items: center; gap: clamp(45px,7vw,90px); }
.map-copy .button { margin-top: 2rem; }
.coverage-map { margin: 0; padding: 18px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.coverage-map img { width: 100%; border-radius: 12px; background: #edf4f8; }
.coverage-map figcaption { padding: 12px 4px 0; color: #5a6975; font-size: 0.82rem; }
.map-page { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(320px,0.7fr); align-items: center; gap: clamp(42px,7vw,85px); }
.place-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.place-grid span { padding: 0.72rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--navy); font-weight: 750; }
.jobs-band { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); }
.jobs-band > div { padding: clamp(26px,4vw,42px); background: #fff; }
.jobs-band > div > svg { width: 34px; height: 34px; margin-bottom: 1.2rem; color: var(--blue); }
.search-ideas { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.search-ideas div { display: grid; gap: 4px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 14px; }
.search-ideas div:last-child { grid-column: 1/-1; }
.search-ideas strong { color: var(--navy); font-family: Charter, Cambria, Georgia, serif; font-size: 1.2rem; }
.search-ideas span { color: var(--muted); }
.resource-list { display: grid; grid-template-columns: repeat(2,1fr); gap: 15px; }
.resource { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 13px; background: #fff; color: var(--navy); font-weight: 800; text-decoration: none; }
.resource:hover { border-color: var(--blue); }
.stat-block { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 13px 22px; padding: clamp(28px,4vw,45px); border-radius: var(--radius); background: rgba(255,255,255,0.08); }
.stat-block strong { color: var(--gold); font-family: Charter, Cambria, Georgia, serif; font-size: 2.35rem; }
.contact-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.contact-card { padding: clamp(28px,4vw,45px); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.contact-card > a:not(.button) { color: var(--blue-dark); font-size: 1.2rem; font-weight: 800; }
.contact-details > div { padding: 17px 0; border-top: 1px solid var(--line); }
.contact-details dt { color: var(--muted); font-size: 0.77rem; font-weight: 850; letter-spacing: 0.12em; text-transform: uppercase; }
.contact-details dd { margin: 0.3rem 0 0; }
.prose section { margin-bottom: 2.2rem; padding-bottom: 2.2rem; border-bottom: 1px solid var(--line); scroll-margin-top: 120px; }
.prose section:last-child { border: 0; }
.prose h2 { font-size: clamp(1.75rem,2.6vw,2.35rem); }
.prose a { color: var(--blue-dark); font-weight: 700; }
.notice { padding: 20px 22px; border-left: 5px solid var(--gold); background: var(--cream); }

.final-cta { padding: clamp(55px,7vw,86px) 0; background: var(--blue-dark); color: #e9f3fa; }
.final-cta__inner { display: grid; grid-template-columns: 1.35fr 1fr; align-items: center; gap: 50px; }
.final-cta h2 { color: #fff; }
.final-cta .eyebrow { color: var(--gold); }
.final-cta .button-row { justify-content: flex-end; margin: 0; }

.site-footer { padding: 70px 0 28px; background: var(--navy-deep); color: #bdd0df; }
.footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3,1fr); gap: 50px; }
.site-footer h2 { margin-bottom: 1.2rem; color: var(--gold); font-family: inherit; font-size: 0.77rem; letter-spacing: 0.13em; text-transform: uppercase; }
.site-footer a { display: block; margin: 0.48rem 0; color: #e7f0f6; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.brand--footer { margin-bottom: 1.5rem; }
.brand--footer strong { color: #fff; }
.brand--footer small { color: #afc5d5; }
.footer__bottom { display: flex; justify-content: space-between; gap: 30px; margin-top: 45px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.12); font-size: 0.78rem; }
.footer__bottom p { margin: 0; }
.footer__bottom p:last-child { text-align: right; }

.simple-entry { padding: 80px 0; }
.simple-entry__content { max-width: 800px; }
.simple-entry__content a { color: var(--blue-dark); }

@media (max-width: 1030px) {
  .primary-nav, .primary-nav ul { gap: 14px; }
  .primary-nav a { font-size: 0.84rem; }
}
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .primary-nav { display: none; position: absolute; top: 84px; right: 0; left: 0; padding: 20px; border-top: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .primary-nav a { display: block; padding: 12px 8px; font-size: 0.94rem; }
  .primary-nav li:last-child > a { justify-content: center; margin-top: 8px; text-align: center; }
  .hero { background: var(--cream); }
  .hero__grid, .split__grid, .map-layout, .map-page, .final-cta__inner { grid-template-columns: 1fr; }
  .hero__grid { gap: 45px; }
  .hero-panel { max-width: 660px; }
  .coverage-map { max-width: 720px; }
  .steps { grid-template-columns: repeat(2,1fr); }
  .footer__grid { grid-template-columns: repeat(2,1fr); }
  .final-cta .button-row { justify-content: flex-start; }
}
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 700px) {
  body { font-size: 16px; }
  .utility__inner > span { display: none; }
  .utility__inner { justify-content: center; }
  .utility__links { gap: 14px; font-size: 0.76rem; }
  .header__inner { min-height: 74px; }
  .brand__mark { width: 40px; height: 40px; }
  .brand strong { font-size: 1.08rem; }
  .brand small { font-size: 0.58rem; }
  .primary-nav { top: 74px; }
  .card-grid, .card-grid--three, .jobs-band, .contact-grid, .resource-list, .search-ideas, .footer__grid { grid-template-columns: 1fr; }
  .search-ideas div:last-child { grid-column: auto; }
  .section-heading--row { display: block; }
  .steps { grid-template-columns: 1fr; }
  .footer__bottom { display: block; }
  .footer__bottom p:last-child { margin-top: 12px; text-align: left; }
  .hero__proof { display: grid; }
  .button { width: 100%; }
  .button--text { width: auto; }
  .coverage-map { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* Live Hampshire vacancies. */
.live-jobs__head { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 28px; margin-bottom: 30px; }
.live-jobs__head > div { max-width: 760px; }
.live-jobs__head h2 { margin-bottom: 0.75rem; }
.live-jobs__head p:last-child { margin-bottom: 0; color: var(--muted); }
.jobs-filter { display: grid; grid-template-columns: minmax(250px,1fr) minmax(190px,0.42fr) auto; align-items: end; gap: 14px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 10px 28px rgba(16,42,67,0.07); }
.jobs-filter label { display: grid; gap: 7px; }
.jobs-filter label > span { color: var(--muted); font-size: 0.76rem; font-weight: 850; letter-spacing: 0.11em; text-transform: uppercase; }
.jobs-filter input, .jobs-filter select { width: 100%; min-height: 50px; padding: 0.75rem 0.9rem; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); font: inherit; }
.jobs-filter input:focus, .jobs-filter select:focus { border-color: var(--blue); outline: 3px solid rgba(31,95,153,0.17); outline-offset: 1px; }
.jobs-filter__clear { min-height: 50px; padding: 0.75rem 1rem; border: 1px solid var(--line); border-radius: 11px; background: var(--cream); color: var(--navy); cursor: pointer; font: inherit; font-weight: 800; }
.jobs-status { margin: 22px 0 12px; color: var(--muted); font-size: 0.92rem; font-weight: 750; }
.jobs-list { display: grid; gap: 16px; }
.job-card { padding: clamp(22px,3vw,32px); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 8px 25px rgba(16,42,67,0.06); }
.job-card__head { display: flex; align-items: start; justify-content: space-between; gap: 24px; }
.job-card h3 { margin: 0; font-size: clamp(1.35rem,2.2vw,1.75rem); }
.job-card h3 a { text-decoration: none; }
.job-card h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.job-card__date { flex: none; color: var(--muted); font-size: 0.8rem; }
.job-card__meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 16px; }
.job-card__meta span { padding: 0.36rem 0.65rem; border-radius: 999px; background: var(--sky); color: var(--navy); font-size: 0.79rem; font-weight: 750; }
.job-card__summary { margin-bottom: 18px; color: var(--muted); }
.job-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.job-card__details, .job-card__apply { font-weight: 850; text-decoration: none; }
.job-card__details { color: var(--navy); }
.job-card__details:hover { text-decoration: underline; }
.job-card__apply { padding: 0.55rem 0.9rem; border-radius: 999px; background: var(--blue); color: #fff; }
.jobs-empty, .jobs-fallback { padding: clamp(24px,4vw,38px); border: 1px dashed var(--line); border-radius: var(--radius); background: #fff; }
.jobs-empty h3 { margin-bottom: 0.6rem; }
.jobs-empty p { color: var(--muted); }
.jobs-empty .button { width: auto; }
.link-panel { display: grid; gap: 12px; }
.official-link { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; border-radius: 13px; background: rgba(255,255,255,0.1); color: #fff; font-weight: 800; text-decoration: none; }
.official-link:hover { background: rgba(255,255,255,0.16); }

@media (max-width: 800px) {
  .live-jobs__head, .jobs-filter { grid-template-columns: 1fr; align-items: stretch; }
  .live-jobs__head .button { width: 100%; }
  .job-card__head { display: block; }
  .job-card__date { display: block; margin-top: 8px; }
}
