/*
  Additions on top of the legacy rebrand stylesheet (main.css):
  - styles that used to be inline <style> blocks in the old templates
  - the new content blocks (image+text, quote, call to action, accordion)
  - accessibility helpers and the enquiry form
  Brand colours are taken from main.css.
*/
:root {
  --bk-green: #D1EB50;
  --bk-teal: #25BAA7;
  --bk-charcoal: #333F48;
  --bk-grey-bg: #FBFBFB;
  --bk-gap: 30px;
}

/* ---------- Accessibility ---------- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 1000; padding: 10px 16px; background: #fff; color: var(--bk-charcoal); }
.skip-link:focus { left: 10px; top: 10px; }

[role="button"] { cursor: pointer; }
[role="button"]:focus-visible, a:focus-visible { outline: 2px solid var(--bk-teal); outline-offset: 2px; }

/* ---------- Banners ---------- */
.banner, .hero-banner, .banner .col.img { background-size: cover; background-position: center; background-repeat: no-repeat; }
/* Background images with a phone-sized version (set by SiteExtensions.ResponsiveBackground) */
.responsive-bg { background-image: var(--bg-desktop); }
@media (max-width: 767px) { .responsive-bg { background-image: var(--bg-mobile); } }
a.pill-button { display: inline-block; color: #fff; text-decoration: none; }
/* Home hero indent on desktop: legacy CSS used a fixed 200px. Scale smoothly from 200px at 1024px wide
   to 400px at 1440px and above, so the heading sits further in on large monitors without jumping */
@media (min-width: 1024px) {
  .heroh { padding-left: clamp(200px, calc(200px + (100vw - 1024px) * 0.48), 400px); }
  .heroAbout { margin-left: clamp(200px, calc(200px + (100vw - 1024px) * 0.48), 400px); }
}
/* Below desktop width (mobile menu shown) the legacy 50px/200px indent pushed the hero off-centre:
   align it with the logo / page gutter instead (20px, or 16px on phones) */
@media (max-width: 1023px) {
  .heroh { padding-left: 20px; padding-right: 20px; }
  .heroAbout { margin-left: 20px; }
}
@media (max-width: 600px) {
  .heroh { padding-left: 16px; padding-right: 16px; }
  .heroAbout { margin-left: 16px; }
}
/* Tiles overlap the banner on desktop only; on phones the overlap hid the end of the intro text (bug on the old site) */
.related-services--overlap { padding-top: 20px; }
@media (min-width: 1024px) { .related-services--overlap { margin-top: -150px; } }

/* ---------- Sidebars & contacts (was inline in ServicesNew.cshtml) ---------- */
.sidebar-contacts { padding: var(--bk-gap); }
.line-contact, .line-news { color: var(--bk-green); background-color: var(--bk-green); border: 0; border-top: 1px solid var(--bk-green); margin-top: 25px; }
.active-service { background-color: var(--bk-green); }

/* ---------- Profile page (was inline in ProfileNew.cshtml) ---------- */
.profile-header { display: flex; flex-wrap: wrap; background-color: var(--bk-grey-bg); }
.profile-header > div { background-color: var(--bk-grey-bg); margin: var(--bk-gap); padding: 50px; font-size: 20px; }
.profile-header img { max-width: 100%; height: auto; }
.profile-bio { margin-top: 0; padding-top: 0; }
@media (max-width: 767px) {
  .profile-header > div { margin: 15px; padding: 20px; }
}

/* ---------- Team grid ---------- */
.team-intro { padding: 20px 0; }
.manage-services .our-team { display: block; color: inherit; text-decoration: none; }
.manage-services .our-team img { max-width: 100%; height: auto; }

/* ---------- College of Knowledge ---------- */
.knowledge-banner { padding-top: 20px; }
.knowledge-description { padding: 0 30px; }

/* ---------- Content blocks ---------- */
.content .block { margin: 0 0 var(--bk-gap); }
.rich-text img { max-width: 100%; height: auto; }
/* Logo rows in rich text (was inline CSS in the legacy ServiceMain template) */
.rich-text .flex-container { display: flex; flex-wrap: wrap; align-items: center; }
.rich-text .flex-container > div { background-color: var(--bk-grey-bg); margin: 10px; padding: 10px; font-size: 20px; }
.rich-text .flex-container img { height: 67px; width: auto; max-width: none; }

.image-text { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--bk-gap); align-items: center; }
.image-text.image-right .image-text-img { order: 2; }
.image-text-img img { width: 100%; height: auto; display: block; }
@media (max-width: 767px) {
  .image-text { grid-template-columns: 1fr; }
  .image-text.image-right .image-text-img { order: 0; }
}

.video-container-wrap { position: relative; aspect-ratio: 16 / 9; }
.video-container-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.quote-block { margin: var(--bk-gap) 0; padding: 20px 30px; border-left: 4px solid var(--bk-green); background: var(--bk-grey-bg); }
.quote-block blockquote { margin: 0; font-size: 1.25em; }
.quote-block figcaption { margin-top: 10px; }

.cta-block { padding: var(--bk-gap); background: var(--bk-grey-bg); border-top: 4px solid var(--bk-green); }

.card-grid .info-list { margin-top: 20px; }

.accordion details { border-bottom: 1px solid #ddd; }
.accordion summary { cursor: pointer; padding: 15px 30px 15px 0; font-weight: 700; list-style: none; position: relative; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; position: absolute; right: 5px; top: 12px; font-size: 1.4em; }
.accordion details[open] summary::after { content: "–"; }
.accordion-body { padding: 0 0 15px; }

/* ---------- Careers ---------- */
.job-list { list-style: none; padding: 0; }
.job-list li { padding: 12px 0; border-bottom: 1px solid #eee; }
.job-company { display: block; font-size: .9em; color: #777; }

/* ---------- Search ---------- */
.search-page-form { display: flex; gap: 10px; margin: 20px 0; }
.search-page-form input { flex: 1; padding: 10px; border: 1px solid #ccc; }
.searchresults ul { list-style: none; padding: 0; }
.searchresults li { padding: 12px 0; border-bottom: 1px solid #eee; }
.searchresults li p { margin: 5px 0 0; }

/* ---------- Buttons: brand font (form buttons otherwise fall back to Arial) ---------- */
button.btn, input[type="submit"].btn { font-family: "CarnacBold", Arial, Helvetica, sans-serif; font-weight: 400; cursor: pointer; }

/* ---------- Contact / enquiry form (sizes match the live site) ---------- */
.contact-map iframe { width: 100%; max-width: 600px; }
.enquiry-form { max-width: 588px; margin: 0 auto; }
.enquiry-form h3 { text-align: center; }
.form-field { margin-bottom: 18px; }
.form-field input, .form-field textarea {
  width: 100%; box-sizing: border-box; padding: 6px 14px; border: 1px solid #cacaca; border-radius: 4px;
  font: 400 14px/1.5 "Roboto", Arial, Helvetica, sans-serif; color: #4a4a4a; background: #fff;
}
.form-field input { height: 45px; }
.form-field textarea { height: 150px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--bk-green); box-shadow: 0 0 0 2px rgba(209, 235, 80, .35); }
.form-field .input-validation-error { border-color: #c0392b; }
.form-field .field-error, .form-error { display: block; margin-top: 6px; color: #c0392b; font: 400 14px/1.4 "Roboto", Arial, sans-serif; }
.form-error ul { list-style: none; margin: 0 0 18px; padding: 12px 16px; background: #fdf0ee; border-left: 4px solid #c0392b; border-radius: 4px; }
.form-error li { margin: 0; padding: 0; color: #c0392b; font: 400 14px/1.5 "Roboto", Arial, sans-serif; }
.form-error li::before, .form-error li::after { content: none; display: none; }
.form-error ul li { padding-left: 0; }
.form-error ul:empty, .validation-summary-valid { display: none; }
.enquiry-form button.btn { display: block; width: 288px; max-width: 100%; height: 45px; margin: 25px auto 0; }
.form-success { background-color: var(--bk-green); padding: 20px; text-align: center; margin-bottom: 25px; }
.hp-field { position: absolute; left: -9999px; }
.cf-turnstile { margin-bottom: 18px; }

/* ---------- Search page form ---------- */
.search-page-form input { font: 400 16px "Roboto", Arial, sans-serif; border-radius: 4px; }
#enquiry { scroll-margin-top: 110px; }
