/* British Guardianship — page-body styles.
 *
 * The evo theme (Bootstrap + bgs.css) owns the chrome: header, menu, footer,
 * typography and the global palette. Everything here styles the CONTENT of a
 * page and is scoped under .bg-page so it can never fight the theme — the
 * layout wraps <main> in that class.
 *
 * Colours are the theme's: navy #202744, blue #46c8f5, grey #eeeeee,
 * off-white #faf9f6.
 */

:root {
  --bgs-dark: #202744;
  --bgs-blue: #46c8f5;
  --bgs-blue-soft: #e8f7fe;
  --bgs-grey: #eeeeee;
  --bgs-white: #faf9f6;
  --bgs-ink: #252525;
  --bgs-muted: #6b7280;
  --bgs-line: #e6e6e6;
  --bgs-radius: 25px;
  --bgs-radius-sm: 12.5px;
  --bgs-shadow: rgba(0, 0, 0, 0.1) 0 4px 12px;
}

/* Clear the fixed header + floating pill menu. The theme sets .hero{margin-top:160px}
   for its own sample page; we put the offset on <main> instead so every page —
   hero or not — starts below the chrome, and cancel the theme's margin to stop
   the two from stacking. */
main { padding-top: 170px; }
.bg-page .hero { margin-top: 0; }

@media (max-width: 767.98px) {
  main { padding-top: 150px; }
}

.bg-page img { max-width: 100%; height: auto; }

/* Buttons ------------------------------------------------------------------ */
/* Scoped, so the theme's .btn-md-blue / .btn-md-dark in the header are untouched. */
.bg-page .btn {
  display: inline-block; padding: 0 24px; height: 44px; line-height: 44px;
  border-radius: 50px; font-family: "Exo", sans-serif; font-weight: 700;
  font-size: 0.9rem; border: 2px solid transparent; cursor: pointer;
  text-decoration: none; transition: background-color .2s ease, color .2s ease;
}
.bg-page .btn-primary { background: var(--bgs-blue); border-color: var(--bgs-blue); color: var(--bgs-white); }
.bg-page .btn-primary:hover { background: var(--bgs-dark); border-color: var(--bgs-dark); color: var(--bgs-white); text-decoration: none; }
.bg-page .btn-ghost { border-color: var(--bgs-white); color: var(--bgs-white); background: transparent; }
.bg-page .btn-ghost:hover { background: var(--bgs-white); color: var(--bgs-dark); text-decoration: none; }
.bg-page .btn-outline { border-color: var(--bgs-blue); color: var(--bgs-dark); background: transparent; }
.bg-page .btn-outline:hover { background: var(--bgs-blue); color: var(--bgs-white); text-decoration: none; }

/* Hero --------------------------------------------------------------------- */
.bg-page .hero {
  background: var(--bgs-dark); color: var(--bgs-white);
  border-radius: var(--bgs-radius); padding: 4rem 0; margin-bottom: 3rem;
}
.bg-page .hero h1 { font-size: clamp(2rem, 4vw, 3.052rem); margin: 0 0 1rem; color: var(--bgs-white); }
.bg-page .hero p { font-size: 1.1rem; opacity: .95; max-width: 640px; }
.bg-page .hero .actions { margin-top: 1.6rem; display: flex; gap: .8rem; flex-wrap: wrap; }

/* Sections ----------------------------------------------------------------- */
.bg-page .section { padding: 3rem 0; }
.bg-page .section.alt { background: var(--bgs-grey); border-radius: var(--bgs-radius); }
.bg-page .section-head { text-align: center; max-width: 680px; margin: 0 auto 2.2rem; }
.bg-page .section-head h2 { font-size: clamp(1.6rem, 3vw, 2.441rem); margin: .2rem 0; }
.bg-page .eyebrow { color: var(--bgs-blue); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }
.bg-page .breadcrumbs { font-size: .85rem; color: var(--bgs-muted); padding: 1rem 0; }
.bg-page .breadcrumbs a { color: var(--bgs-muted); text-decoration: none; }
.bg-page .breadcrumbs a:hover { color: var(--bgs-blue); }

/* Cards -------------------------------------------------------------------- */
.bg-page .grid { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.bg-page .card {
  background: #fff; border: 1px solid var(--bgs-line); border-radius: var(--bgs-radius);
  overflow: hidden; display: flex; flex-direction: column; transition: .15s;
}
.bg-page .card:hover { box-shadow: var(--bgs-shadow); transform: translateY(-2px); }
.bg-page .card .thumb { aspect-ratio: 16/10; background: var(--bgs-blue-soft); object-fit: cover; width: 100%; }
.bg-page .card .body { padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.bg-page .card .body h3 { font-size: 1.15rem; margin: 0; }
.bg-page .card .meta { color: var(--bgs-muted); font-size: .85rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.bg-page .badge {
  display: inline-block; background: var(--bgs-blue-soft); color: var(--bgs-dark);
  border-radius: 50px; padding: .15rem .6rem; font-size: .75rem; font-weight: 700;
}

/* Listing with filters ------------------------------------------------------ */
.bg-page .listing { display: grid; grid-template-columns: 260px 1fr; gap: 2rem; align-items: start; }
.bg-page .filters {
  background: #fff; border: 1px solid var(--bgs-line); border-radius: var(--bgs-radius);
  padding: 1.2rem; position: sticky; top: 180px;
}
.bg-page .filters h4 { margin: .2rem 0 .6rem; font-size: .95rem; }
.bg-page .filters label { display: block; font-size: .9rem; margin: .2rem 0; cursor: pointer; }
.bg-page .filters .group { padding: .6rem 0; border-bottom: 1px solid var(--bgs-line); }
.bg-page .filters input[type=search] { width: 100%; padding: .5rem .7rem; border: 1px solid var(--bgs-line); border-radius: 50px; }

/* WYSIWYG content ----------------------------------------------------------- */
.bg-page .prose { max-width: 760px; }
.bg-page .prose h2 { margin-top: 1.8rem; }
.bg-page .prose img { border-radius: var(--bgs-radius); margin: 1rem 0; }
.bg-page .prose a { color: var(--bgs-blue); }

.bg-page .map { height: 320px; border-radius: var(--bgs-radius); overflow: hidden; border: 1px solid var(--bgs-line); }

/* Forms --------------------------------------------------------------------- */
.bg-page .form-wrap { max-width: 780px; margin-inline: auto; }
.bg-page .field { margin-bottom: 1.1rem; }
.bg-page .field label { display: block; font-weight: 700; margin-bottom: .3rem; font-size: .92rem; }
.bg-page .field .req { color: #c0392b; }
.bg-page .form-control {
  width: 100%; padding: .6rem .8rem; border: 1px solid var(--bgs-line);
  border-radius: var(--bgs-radius-sm); font: inherit; background: #fff;
}
.bg-page .form-control:focus { outline: none; border-color: var(--bgs-blue); box-shadow: 0 0 0 3px var(--bgs-blue-soft); }
.bg-page textarea.form-control { min-height: 120px; }
.bg-page .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.bg-page .form-section {
  border: 1px solid var(--bgs-line); border-radius: var(--bgs-radius);
  padding: 1.2rem; margin: 1.2rem 0; background: var(--bgs-white);
}
.bg-page .form-section h3 { margin: .1rem 0 1rem; font-size: 1.15rem; color: var(--bgs-dark); }
.bg-page .bg-field-error { border-color: #c0392b !important; background: #fff5f4; }
.bg-page .bg-label-error { color: #c0392b; }
.bg-page #success {
  display: none; background: #e9f7ef; border: 1px solid #b7e4c7; color: #1e6b3a;
  padding: 1.5rem; border-radius: var(--bgs-radius); text-align: center;
}
.bg-page #error {
  display: none; background: #fdecea; border: 1px solid #f5c6c0; color: #a33;
  padding: .8rem 1rem; border-radius: var(--bgs-radius-sm); margin-bottom: 1rem;
}
.bg-page .xbtns { margin-top: .5rem; }

/* Pagination ---------------------------------------------------------------- */
.bg-page .pager { margin-top: 2rem; }
.bg-page .pager ul { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; padding: 0; margin: 0; }
.bg-page .pager li a, .bg-page .pager li span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 .6rem; border: 1px solid var(--bgs-line);
  border-radius: 50px; color: var(--bgs-dark); text-decoration: none;
  font-weight: 700; font-size: .9rem; background: #fff;
}
.bg-page .pager li a:hover { border-color: var(--bgs-blue); color: var(--bgs-blue); }
.bg-page .pager li.active span { background: var(--bgs-blue); border-color: var(--bgs-blue); color: #fff; }
.bg-page .pager li.disabled span { opacity: .4; cursor: default; }

/* Responsive ---------------------------------------------------------------- */
@media (max-width: 860px) {
  .bg-page .listing { grid-template-columns: 1fr; }
  .bg-page .filters { position: static; }
}
@media (max-width: 640px) {
  .bg-page .row2 { grid-template-columns: 1fr; }
}
