/* =========================================================
   Coombs and Partners — Stylesheet
   Fresh build, referencing coombsandpartners.co.uk (WordPress)
   for layout/design only. No code copied from the WP theme.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

:root {
  --red: #ED1C24;
  --red-dark: #C8161D;
  --navy: #282F3D;
  --text-dark: #333333;
  --text-grey: #5C6567;
  --nav-grey: #959FA1;
  --border-grey: #E5E5E5;
  --bg-light: #F5F5F6;
  --white: #FFFFFF;
  --max-width: 1160px;
  --font: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html, body, h1, h2, h3, h4, p, ul, ol, figure { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-grey);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); }
ul { list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font);
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.25;
}
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Nothing on the site — header, footer, full-bleed background images —
   is allowed to expand past 1280px, even on ultra-wide screens. */
body { background: var(--white); }
.site-wrap {
  max-width: 1280px;
  margin: 0 auto;
  background: var(--white);
}

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--white);
  border-bottom: 2px solid var(--red);
  position: relative;
  z-index: 100;
}
.nav-wrap {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  position: relative;
}
/* On desktop, nav-collapse contributes no box of its own — its two <nav>
   children become direct flex items of .nav-wrap, so they flank the logo,
   sitting right next to it (the 45px gap above handles the logo spacing). */
.nav-collapse { display: contents; }
.main-nav {
  display: flex;
  align-items: center;
  order: 2;
}
.main-nav.nav-left { justify-content: flex-start; order: 2; }
.main-nav.nav-right { justify-content: flex-start; order: 3; }
.main-nav a {
  display: block;
  padding: 28px 16px;
  font-size: 15px;
  font-weight: 700;
  text-transform: none;
  color: var(--nav-grey);
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.main-nav a:hover,
.main-nav a.active { color: var(--red); }
.site-logo {
  flex-shrink: 0;
  padding: 14px 0;
  order: 1;
  margin-right: 45px;
}
.site-logo img { width: 218px; height: auto; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  position: relative;
  background-size: cover;
  background-position: center;
  height: clamp(220px, 32vw, 380px);
  display: flex;
  align-items: flex-end;
}
.page-hero .hero-title-box {
  background: var(--red);
  padding: 34px 40px;
  max-width: 640px;
  margin: 0 0 0 0;
}
.page-hero.no-image { background-color: var(--bg-light); }
.page-hero .hero-title-box h1 {
  color: var(--white);
  font-size: 34px;
  margin: 0;
}
.page-hero-inner {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Page hero block (new pattern: fixed-height photo, title box
   overlapping its bottom, content in a white panel inset in a light-grey
   full-width band). The photo and title box share the same grid row so
   the title overlaps the photo's bottom edge by its own height; the
   content band gets its own row directly below with no gap. */
.page-hero-block {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 455px auto;
}
.page-hero-block .page-hero {
  grid-row: 1;
  grid-column: 1;
  height: auto;
  display: block;
  position: relative;
  z-index: 1;
}
.page-hero-block .page-hero-inner {
  grid-row: 1;
  grid-column: 1;
  align-self: end;
  max-width: 1050px;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}
.page-hero-block .hero-title-box {
  background: var(--red);
  height: 100px;
  width: fit-content;
  max-width: none;
  display: flex;
  align-items: center;
  padding: 0 25px;
  transform: translateY(-65px);
}
.page-hero-block .hero-title-box h1 {
  color: var(--white);
  font-size: 34px;
  margin: 0;
}
.page-content-band {
  grid-row: 2;
  grid-column: 1;
  background: #F5F5F5;
}
.page-content-box {
  max-width: 1050px;
  margin: -65px auto 0;
  background: var(--white);
  position: relative;
  z-index: 2;
}
.page-content-box .content-section {
  max-width: none;
  padding: 56px 60px 64px;
}

/* ---------- Generic content section ---------- */
.content-section {
  max-width: 840px;
  margin: 0 auto;
  padding: 56px 24px 64px;
}
.content-section .lead {
  font-style: italic;
  font-size: 20px;
  color: var(--text-dark);
  line-height: 1.5;
  margin-bottom: 28px;
}
.content-section p { margin-bottom: 22px; font-size: 17px; }
.content-section h2 {
  color: var(--red);
  font-size: 23px;
  margin: 36px 0 16px;
}
.content-section img { border-radius: 2px; margin: 28px 0; }
.content-section hr {
  border: none;
  border-top: 1px solid var(--border-grey);
  margin: 36px 0 0;
}

/* ---------- Article header (news detail pages — no hero photo) ---------- */
.article-header {
  background: #F5F5F5;
  padding-top: 30px;
}
.article-header-inner {
  max-width: 1050px;
  margin: 0 auto;
  padding: 0 24px;
}
.article-header .hero-title-box {
  background: var(--red);
  height: 100px;
  width: fit-content;
  display: flex;
  align-items: center;
  padding: 0 25px;
}
.article-header .hero-title-box h1 {
  color: var(--white);
  font-size: 34px;
  margin: 0;
}
.article-content-box {
  max-width: 1050px;
  margin: 0 auto;
  background: var(--white);
}
.article-content-box .content-section {
  max-width: none;
  padding: 56px 60px 64px;
}
@media (max-width: 900px) {
  .article-header-inner { padding: 0 25px; }
  .article-content-box .content-section { padding-left: 25px; padding-right: 25px; }
}

/* ---------- Article footer (back link + share links) ---------- */
.article-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border-grey);
}
.article-footer .article-back { margin: 0; }
.article-share {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.article-share-label { font-weight: 700; color: var(--text-dark); font-size: 15px; margin-right: 4px; }
.article-share a {
  width: 40px;
  height: 40px;
  background: var(--bg-light);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dark);
  transition: background 0.3s;
}
.article-share a:hover { background: var(--border-grey); }
.article-share a svg { width: 18px; height: 18px; fill: currentColor; }
@media (max-width: 900px) {
  .article-footer { flex-direction: column-reverse; align-items: flex-start; gap: 20px; }
}

/* ---------- Homepage: top hero ---------- */
.home-top { position: relative; }
.home-top-photo {
  height: 628px;
  background-color: var(--white);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
/* Above 980px, the title/vision boxes float over the bottom of the photo. */
.home-top-boxes {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
}
.home-top .home-top-inner { max-width: 1160px; margin: 0 auto; padding: 0 24px 40px; width: 100%; }
.home-top .hero-title-box {
  background: var(--red);
  padding: 36px 44px;
  max-width: 620px;
}
.home-top .hero-title-box h1 {
  color: var(--white);
  font-size: 34px;
  line-height: 1.2;
}
.home-top .vision-box {
  background: var(--navy);
  padding: 30px 44px 40px;
  max-width: 620px;
}
.home-top .vision-box h3 {
  color: var(--white);
  font-size: 20px;
  margin-bottom: 12px;
}
.home-top .vision-box p {
  color: #C6CBD2;
  font-style: italic;
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
}

/* At 980px and below: the red title box and navy vision box are placed
   with CSS Grid so the red box overlaps the bottom of the photo (sharing
   the photo's grid row, bottom-aligned) while the vision box gets its own
   row directly below the photo — no overlap, no gap, regardless of the
   title box's actual height. `display: contents` on the wrapper divs lets
   their children become direct grid items of .home-top. */
@media (max-width: 980px) {
  .home-top {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 628px auto;
  }
  .home-top-photo {
    grid-row: 1;
    grid-column: 1;
  }
  .home-top-boxes {
    position: static;
    display: contents;
  }
  .home-top .home-top-inner {
    display: contents;
    padding: 0;
  }
  .home-top .hero-title-box,
  .home-top .vision-box {
    max-width: none;
    width: 100%;
  }
  .home-top .hero-title-box {
    grid-row: 1;
    grid-column: 1;
    align-self: end;
    background: rgba(237, 28, 36, 0.9);
  }
  .home-top .vision-box {
    grid-row: 2;
    grid-column: 1;
  }
}

/* ---------- Quote / illustration section ---------- */
.quote-section {
  background: var(--bg-light) url('/theme-images/build.png') no-repeat bottom right;
  padding: 90px 0 190px;
  position: relative;
}
.quote-section .quote-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}
.quote-section .quote-text { max-width: 600px; }
.quote-section .quote-label {
  color: var(--nav-grey);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.quote-section blockquote {
  font-size: 27px;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.35;
  margin: 0 0 18px;
}
.quote-section cite {
  font-style: normal;
  font-size: 15px;
  color: var(--text-grey);
}
.quote-section cite strong { color: var(--text-dark); }

/* ---------- Tile grid (homepage + experience listing) ---------- */
.tile-grid {
  max-width: 1160px;
  margin: 70px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  position: relative;
}

/* At 1080px and below: the isometric illustration is dropped, the quote
   text spans the full width, and the tile row no longer overlaps the
   grey section above it (sits directly below instead). */
@media (max-width: 1080px) {
  .quote-section { padding-bottom: 90px; background-image: none; }
  .tile-grid { margin-top: 170px; }
}

.tile {
  display: block;
  border: 1px solid var(--border-grey);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.tile:hover {
  border-color: #B5B5B5;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
.tile-photo {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.tile-photo img { width: 100%; height: 100%; object-fit: cover; }
.tile-label {
  position: absolute;
  left: 0;
  bottom: 0;
  background: var(--red);
  color: var(--white);
  font-weight: 700;
  font-size: 18px;
  text-transform: uppercase;
  padding: 14px 24px;
}
.tile-body { padding: 24px 24px 30px; }
.tile-body p { margin: 0 0 14px; font-size: 15px; }
.tile-body .read-more {
  color: var(--red);
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.3s;
}
.tile:hover .read-more { color: #6586A3; }
.tile-body .read-more img { width: 14px; height: 14px; }

/* ---------- Full-width divider image ---------- */
.divider-image { width: 100%; }
.divider-image img { width: 100%; height: auto; display: block; }

/* ---------- Latest news (homepage) ---------- */
.latest-news { padding: 60px 0 80px; }
.latest-news-card {
  background: var(--navy);
  max-width: 1160px;
  margin: 0 auto;
  padding: 56px 60px 64px;
}
.latest-news-card h2 {
  color: var(--white);
  font-size: 30px;
  margin-bottom: 40px;
}
.latest-news-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: stretch;
}
.latest-news-list { display: flex; flex-direction: column; }
.news-item {
  display: block;
  padding: 22px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  text-decoration: none;
}
.news-item:first-child { padding-top: 0; }
.news-item:last-child { border-bottom: none; padding-bottom: 0; }
.news-item-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.news-item-arrow {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 1px solid var(--white);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 14px;
  line-height: 1;
  transition: color 0.3s, border-color 0.3s;
}
.news-item-title {
  color: var(--white);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.4;
  transition: color 0.3s;
}
.news-item-excerpt {
  display: block;
  color: #C6CBD2;
  font-size: 14px;
  line-height: 1.6;
  padding-left: 42px;
  transition: color 0.3s;
}
.news-item:hover .news-item-arrow {
  color: var(--nav-grey);
  border-color: var(--nav-grey);
}
.news-item:hover .news-item-title,
.news-item:hover .news-item-excerpt {
  color: var(--nav-grey);
}
.latest-news-photo { overflow: hidden; }
.latest-news-photo img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

/* ---------- News listing page ---------- */
.news-list-item {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 30px 16px;
  margin: 0 -16px;
  border: 1px solid transparent;
  border-bottom-color: var(--border-grey);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.news-list-item:first-child { padding-top: 0; }
.news-list-item:hover {
  border-color: #B5B5B5;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
.news-list-item-thumb {
  flex: 0 0 160px;
  width: 160px;
  height: 120px;
  overflow: hidden;
  border-radius: 2px;
}
.news-list-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.news-list-item-body { flex: 1; min-width: 0; }
.news-list-item h2 { font-size: 24px; margin-bottom: 10px; color: var(--text-dark); }
.news-list-item:hover h2 { color: var(--red); }
.news-list-item p { font-size: 15px; color: var(--text-grey); margin-bottom: 10px; }
.news-list-item .read-more { color: var(--red); font-weight: 700; font-size: 14px; }
@media (max-width: 600px) {
  .news-list-item { flex-direction: column; gap: 14px; }
  .news-list-item-thumb { width: 100%; height: auto; aspect-ratio: 16/9; }
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 6px;
  background: var(--bg-light);
  color: var(--text-dark);
  font-weight: 700;
  font-size: 14px;
  border-radius: 2px;
}
.pagination a:hover { background: #e9e9ea; color: var(--text-dark); }
.pagination .current { background: var(--red); color: var(--white); }
.pagination .disabled { opacity: 0.4; }

/* ---------- Experience project pages ---------- */
.project-meta { margin: 28px 0; }
.project-meta h2 {
  color: var(--red);
  font-size: 18px;
  margin: 26px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.project-meta p { margin-bottom: 6px; }
.project-meta ol { padding-left: 20px; list-style: decimal; margin: 8px 0; }
.project-meta ol li { margin-bottom: 6px; font-size: 17px; color: var(--text-grey); }
.project-meta ul { padding-left: 20px; list-style: disc; margin: 8px 0; }
.project-meta ul li { margin-bottom: 6px; font-size: 17px; color: var(--text-grey); }

/* ---------- Contact page ---------- */
.contact-hero-image { width: 100%; }
.contact-hero-image img { width: 100%; height: 380px; object-fit: cover; display: block; }
.contact-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}
.contact-col-details { padding: 56px 60px; }
.contact-col-image {
  background: var(--navy);
  padding: 56px 60px;
  display: flex;
  align-items: center;
}
.contact-col-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}
.contact-details { display: flex; flex-wrap: wrap; gap: 48px; margin: 8px 0 0; }
.contact-details div { flex: 1; min-width: 220px; }
.contact-details h3 { color: var(--red); font-size: 15px; text-transform: uppercase; margin-bottom: 10px; }
.contact-details p { font-size: 16px; margin: 0 0 6px; }
.accreditation-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  padding: 30px 60px 56px;
}
.accreditation-row img { max-height: 60px; width: auto; }

/* ---------- Policies list ---------- */
.policy-list { margin-top: 12px; }
.policy-list li {
  border-bottom: 1px solid var(--border-grey);
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.policy-list li:first-child { padding-top: 0; }
.policy-list a { color: var(--text-dark); font-weight: 600; font-size: 16px; }
.policy-list a:hover { color: var(--red); }
.policy-list .file-type {
  font-size: 12px;
  font-weight: 700;
  color: var(--nav-grey);
  border: 1px solid var(--border-grey);
  border-radius: 3px;
  padding: 3px 8px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  position: relative;
  overflow: hidden;
  padding: 56px 0 0;
}
.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 24px;
  position: relative;
  z-index: 2;
}
.footer-inner a {
  color: #C6CBD2;
  font-size: 15px;
  display: block;
  margin-bottom: 14px;
}
.footer-inner a:hover { color: var(--white); }
.footer-contact h4 { color: var(--white); font-size: 17px; margin-bottom: 16px; }
.footer-social { display: flex; gap: 12px; margin-top: 4px; }
.footer-social a {
  width: 34px;
  height: 34px;
  border: 1px solid #4A5164;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  color: var(--white);
  font-size: 14px;
}
.footer-social a:hover { border-color: var(--white); }
.footer-line {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 40px;
  opacity: 0.9;
}
.footer-bottom {
  padding: 22px 24px;
  text-align: center;
  font-size: 13px;
  color: #8990A0;
  position: relative;
  z-index: 2;
}
.footer-bottom p { margin: 0 0 8px; }
.footer-bottom p:last-child { margin-bottom: 0; }
.footer-bottom a { color: #8990A0; }
.footer-bottom a:hover { color: var(--white); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .home-top .hero-title-box h1 { font-size: 26px; }
  .quote-section .quote-inner { flex-direction: column; }
  .quote-section blockquote { font-size: 22px; }
  .tile-grid { grid-template-columns: 1fr; margin-top: 40px; }
  .latest-news-card { padding: 40px 28px 44px; }
  .latest-news-row { grid-template-columns: 1fr; gap: 8px; }
  .latest-news-photo { order: 2; margin-top: 24px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .page-hero .hero-title-box h1 { font-size: 26px; }
  .page-content-box .content-section { padding-left: 25px; padding-right: 25px; }
  .contact-columns { grid-template-columns: 1fr; }
  .contact-col-details,
  .contact-col-image,
  .accreditation-row { padding-left: 25px; padding-right: 25px; }
  .contact-col-image img { height: auto; aspect-ratio: 16/10; }
}
/* Mobile navigation breakpoint */
@media (max-width: 1180px) {
  .nav-wrap { padding: 0 16px; flex-wrap: wrap; gap: 0; justify-content: space-between; }
  .site-logo { padding: 10px 0; order: 1; margin-right: 0; }
  .site-logo img { height: 54px; }
  .nav-toggle { display: flex; order: 3; }
  .nav-toggle span { background: var(--red); }

  /* nav-collapse becomes an overlay panel that floats above the page
     content (instead of a normal-flow block that pushes it down). */
  .nav-collapse {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--white);
    border-top: 1px solid var(--border-grey);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    z-index: 200;
  }
  .nav-collapse.is-open { display: block; }

  .main-nav { flex-direction: column; align-items: stretch; order: 0; }
  .main-nav.nav-left, .main-nav.nav-right { justify-content: flex-start; }
  .main-nav a {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-grey);
  }
}

@media (max-width: 860px) {
  .footer-inner { grid-template-columns: 1fr; }
  .content-section .lead { font-size: 18px; }
  .contact-hero-image img { height: 220px; }
}
