/* ============================================================================
   FLEXECARE PAGE STYLES, page-specific compositions that sit on top of the
   shared layout + component systems.
   ========================================================================== */

/* ---- Generic two-column intro (copy + media) ------------------------------- */

.split {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.split > * { min-width: 0; }

.split__media {
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  position: relative;
}

.split__media img { width: 100%; height: 100%; object-fit: cover; }

.split--flip .split__media { order: -1; }

/* ---- Prose (long-form article / legal / service body copy) ------------------- */

.prose { max-width: var(--container-narrow); }

.prose h2 { margin: 1.7em 0 0.55em; font-size: 1.5rem; }
.prose h3 { margin: 1.4em 0 0.45em; font-size: 1.1875rem; }
.prose > h2:first-child, .prose > h3:first-child { margin-top: 0; }

.prose img { border-radius: var(--radius-card); margin: 1.4em 0; }

.prose figure { margin: 1.6em 0; }

.prose figcaption { font-size: var(--fs-tiny); color: var(--fc-muted); margin-top: 8px; }

/* Article header */
.article-head { max-width: var(--container-narrow); margin-bottom: 26px; }

.article-head .article-card__meta { margin-bottom: 14px; }

.article-head h1 { text-transform: none; letter-spacing: 0; }

.article-head .standfirst { font-size: 1.125rem; color: var(--fc-muted); margin-top: 14px; }

/* ---- Contact page ------------------------------------------------------------- */

/* Two complete service groups: Domcare | Nursing (each owns phone, email, address) */
.contact-directory {
  margin: 0 auto clamp(32px, 4vw, 44px);
  max-width: 960px;
}

.contact-directory__title {
  margin: 0 0 16px;
  font-family: var(--font-ui);
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--fc-navy);
  letter-spacing: 0.01em;
}

.contact-services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 48px);
}

.contact-service {
  min-width: 0;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}

.contact-service + .contact-service {
  padding-left: clamp(20px, 3vw, 32px);
  border-left: 1px solid var(--fc-line);
}

.contact-service__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.contact-service__list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0;
  min-width: 0;
}

.contact-service__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--fc-green);
  background: transparent;
  color: var(--fc-green);
}

.contact-service__icon svg {
  display: block;
  width: 20px;
  height: 20px;
  color: var(--fc-green);
  stroke: currentColor;
}

.contact-service__list a,
.contact-service__text {
  color: var(--fc-muted);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  overflow-wrap: anywhere;
  line-height: 1.5;
  padding-top: 10px;
}

.contact-service__list a:hover { color: var(--fc-cyan-deep); }

.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.contact-cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.contact-card {
  background: var(--fc-white);
  border: 1px solid var(--fc-line);
  border-top: 4px solid var(--fc-cyan);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 30px 28px;
  text-align: center;
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}

.contact-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-4px); }

.contact-card__icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 1.5px solid var(--fc-green);
  background: var(--fc-green-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-card__icon svg { width: 26px; height: 26px; color: var(--fc-green); }

.contact-card h3 { margin-bottom: 8px; font-size: 1.0625rem; }

.contact-card p { font-size: var(--fs-small); color: var(--fc-muted); margin: 0; }

.contact-card a { font-weight: 600; }

/* About: named services only (detail lives on the services hub) */
.service-names {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 28px;
  max-width: 720px;
}

.service-names a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  background: var(--fc-white);
  border: 1px solid var(--fc-line);
  border-radius: var(--radius-card);
  color: var(--fc-navy);
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  font-weight: 700;
  text-decoration: none;
}

.service-names a svg {
  width: 16px;
  height: 16px;
  color: var(--fc-green);
  flex: none;
}

.service-names a:hover { border-color: var(--fc-cyan); color: var(--fc-cyan-deep); }

.service-names__more {
  text-align: center;
  margin: 22px 0 0;
}

/* Map figure */
.map-figure {
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--fc-line);
}

.map-figure iframe { display: block; width: 100%; height: 380px; border: 0; }

.map-figure figcaption {
  padding: 14px 20px;
  font-size: var(--fs-tiny);
  color: var(--fc-muted);
  background: var(--fc-white);
}

/* ---- Emergency / hours -------------------------------------------------------- */

.hours-table th { width: 42%; }

.hours-table .state {
  font-family: var(--font-ui);
  font-weight: 700;
  color: var(--fc-cyan-deep);
}

.emergency-callout {
  background: var(--fc-green);
  color: var(--fc-white);
  border-radius: var(--radius-card);
  padding: clamp(28px, 4vw, 44px);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 22px;
}

.emergency-callout .eyebrow { color: var(--fc-white); }

.emergency-callout h2 { color: var(--fc-white); margin-bottom: 8px; }

.emergency-callout p { color: var(--fc-white); margin: 0; }

.emergency-callout .btn--phone {
  background: var(--fc-cyan);
  color: var(--fc-white);
}

.emergency-callout .btn--phone:hover {
  background: var(--fc-cyan);
  color: var(--fc-navy);
}

/* ---- CQC page ------------------------------------------------------------------- */

.cqc-panel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  background: var(--fc-white);
  border: 1px solid var(--fc-line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  padding: clamp(24px, 3.5vw, 40px);
}

.cqc-panel img { height: 56px; width: auto; }

.cqc-panel__rating {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.375rem;
  color: var(--fc-navy);
}

.cqc-panel__rating .rating-chip {
  display: inline-block;
  background: var(--fc-cyan);
  color: var(--fc-white);
  border-radius: var(--radius-pill);
  font-size: 0.9375rem;
  padding: 5px 16px;
  margin-left: 10px;
  vertical-align: middle;
}

.cqc-panel__meta { font-size: var(--fs-tiny); color: var(--fc-muted); margin-top: 6px; }

/* ---- Values page ------------------------------------------------------------------ */

.values-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

.value-card {
  background: var(--fc-white);
  border: 1px solid var(--fc-line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 28px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.value-card__num {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--fc-green);
  color: var(--fc-white);
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  line-height: 1;
}

.value-card__num svg {
  width: 26px;
  height: 26px;
  flex: none;
  display: block;
  color: var(--fc-white);
}

.value-card h3 { font-size: 1.125rem; margin-bottom: 6px; }

.value-card p { font-size: var(--fs-small); color: var(--fc-muted); margin: 0; }

/* ---- Team profile ---------------------------------------------------------------- */

.profile-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.profile-photo {
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: calc(var(--h-sticky) + 24px);
}

.profile-photo img { width: 100%; }

.profile-facts {
  background: var(--fc-ice);
  border-radius: var(--radius-card);
  padding: 22px 24px;
  margin-top: 18px;
  font-size: var(--fs-small);
}

.profile-facts dt {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fc-cyan-deep);
  margin-top: 14px;
}

.profile-facts dt:first-child { margin-top: 0; }

.profile-facts dd { margin: 3px 0 0; color: var(--fc-body-text); }

/* ---- Areas we cover ------------------------------------------------------------------ */

.areas-band {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.area-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ---- Conversion landing split (assessment / callback) ------------------------------------ */

.convert-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(32px, 4vw, 64px);
  align-items: start;
}

/* ---- Care advice hub filters ----------------------------------------------------------- */

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
}

.filter-pill {
  font-family: var(--font-ui);
  font-size: 0.8438rem;
  font-weight: 600;
  color: var(--fc-navy);
  background: var(--fc-white);
  border: 1.5px solid var(--fc-line);
  border-radius: var(--radius-pill);
  padding: 9px 20px;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.filter-pill:hover { border-color: var(--fc-green); color: var(--fc-green); }

.filter-pill.is-active {
  background: var(--fc-green);
  border-color: var(--fc-green);
  color: var(--fc-white);
}

/* ---- Sitemap page ---------------------------------------------------------------------- */

.sitemap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 48px); }

.sitemap-grid ul { list-style: none; padding: 0; margin: 0; }

.sitemap-grid li { margin: 0 0 8px; }

.sitemap-grid a { color: var(--fc-body-text); text-decoration: none; font-size: var(--fs-small); }

.sitemap-grid a:hover { color: var(--fc-blue); text-decoration: underline; }

.sitemap-grid ul ul { padding-left: 18px; margin-top: 8px; }

/* ---- FAQ page groups ---------------------------------------------------------------------- */

.faq-group { margin-bottom: clamp(36px, 5vw, 56px); }

.faq-group:last-child { margin-bottom: 0; }

.faq-group h2 { margin-bottom: 18px; }

/* ---- Legal pages ------------------------------------------------------------------------------ */

.legal-updated {
  font-family: var(--font-ui);
  font-size: var(--fs-tiny);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fc-muted);
  margin-bottom: 26px;
}

/* ---- Responsive ---------------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .profile-layout { grid-template-columns: 1fr; }
  .profile-photo { position: static; max-width: 380px; }
  .sitemap-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .split, .areas-band, .convert-grid { grid-template-columns: 1fr; }
  .split--flip .split__media { order: 0; }
  .split > *,
  .areas-band > *,
  .convert-grid > * { min-width: 0; }
  .contact-cards,
  .contact-cards--2 { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .emergency-callout { grid-template-columns: 1fr; text-align: center; }
  .emergency-callout .btn {
    justify-self: stretch;
    width: 100%;
    max-width: 100%;
    white-space: normal;
  }
  .cqc-panel { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}

@media (max-width: 640px) {
  .sitemap-grid { grid-template-columns: 1fr; }
  .contact-services { grid-template-columns: 1fr; gap: 28px; }
  .contact-service + .contact-service {
    padding-left: 0;
    border-left: 0;
    padding-top: 28px;
    border-top: 1px solid var(--fc-line);
  }
  .service-names { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .contact-card { padding: 22px 18px; }
  .contact-card a { overflow-wrap: anywhere; }

  .map-figure iframe,
  .map-figure img { height: 240px; }
  .map-figure figcaption { padding: 12px 14px; }

  .cqc-panel { padding: 20px 16px; gap: 16px; }
  .cqc-panel img { height: 44px; }
  .rating-chip { display: inline-block; margin: 8px 0 0; margin-left: 0; }

  .value-card {
    padding: 18px;
    gap: 12px;
    flex-direction: column;
    align-items: flex-start;
  }
  .value-card > div { min-width: 0; max-width: 100%; }
  .value-card__num { width: 44px; height: 44px; font-size: 0.9375rem; }
  .value-card__num svg { width: 22px; height: 22px; }

  .profile-facts { padding: 16px 18px; }
  .profile-photo { max-width: 100%; }

  .filter-row { gap: 8px; margin-bottom: 24px; }
  .filter-pill { padding: 8px 14px; font-size: 0.8125rem; }

  .article-head .standfirst { font-size: 1rem; }
  .prose h2 { font-size: 1.3125rem; }
  .prose h3 { font-size: 1.125rem; }

  .convert-grid .form-panel,
  .convert-copy { max-width: 100%; }

  .emergency-callout { padding: 22px 18px; gap: 16px; }
  .areas-band { gap: 24px; }
}
