/* SHARED FILE — do not edit inside a site folder. Master copy: _shared/css/home-services.css
 * Edit the master, then run: python3 _shared/tools/sync_css.py */
/* Homepage care services. Uses the site's typography, colours and button components. */
.home-services {
  padding-block: clamp(3rem, 5vw, 5rem);
  background: linear-gradient(160deg, #f3f8f5 0%, #e6f0ec 55%, #f0f6f3 100%);
  border-block: 1px solid #dce8e2;
  color: var(--acc-brand-900, var(--acc-brand-900));
  scroll-margin-top: calc(var(--acc-navbar-h, 88px) + 20px);
}

.home-services__intro {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  align-items: end;
  gap: 2rem 4rem;
  margin-bottom: 2.25rem;
}

.home-services__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1rem;
  color: var(--acc-brand-700, var(--acc-brand-700));
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.home-services__eyebrow::before {
  content: "";
  width: 2rem;
  height: 2px;
  background: var(--acc-gold-500, var(--acc-gold-500));
}

.home-services__title {
  max-width: 22ch;
  margin: 0;
  font-size: clamp(2rem, 2.6vw + 0.6rem, 3rem);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.012em;
  color: var(--acc-brand-900, var(--acc-brand-900));
  text-wrap: pretty;
}

.home-services__summary {
  max-width: 49ch;
  margin: 0 0 0.2rem;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--acc-ink-700, #2d3748);
}

.home-services__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--acc-home-card-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-services__grid > li {
  display: flex;
  min-width: 0;
}

/* Service cards: the photo sits flush in its tinted card, no fade. Tone is per service, set in the markup. */
.home-services__card {
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  color: var(--acc-brand-900);
  text-decoration: none;
}

.home-services__card:hover {
  color: var(--acc-brand-900);
  text-decoration: none;
}

/* The text sits below the photo, never on it, so its contrast does not depend on the picture. */
.home-services__photo {
  position: relative;
  aspect-ratio: var(--acc-home-card-ratio);
  overflow: hidden;
}

.home-services__photo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms var(--acc-ease-out);
}

.home-services__card-heading {
  padding: var(--acc-home-card-inset) var(--acc-home-card-inset) 0;
}

.home-services__card h3 {
  margin: 0;
  color: var(--tone-ink);
  font-size: clamp(1.3125rem, 1.2rem + 0.4vw, 1.5rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.home-services__description {
  margin: 0;
  padding: 0.5rem var(--acc-home-card-inset) 1rem;
  font-size: 1rem;
  line-height: 1.55;
  hyphens: none;
}

.home-services__card-link {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  padding: 0 var(--acc-home-card-inset) var(--acc-home-card-inset);
}

.home-services__arrow {
  display: grid;
  place-items: center;
  border-radius: 50%;
}

@media (hover: hover) and (pointer: fine) {
  .home-services__card:hover .home-services__photo img { transform: scale(1.04); }
}

.home-services__all {
  display: flex;
  justify-content: center;
  margin-top: clamp(1.75rem, 1.25rem + 1.5vw, 2.75rem);
}

.home-services__help {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.6fr);
  align-items: center;
  gap: 2rem 3rem;
  margin-top: 2.5rem;
  padding: clamp(1.5rem, 3.3vw, 3rem);
  border: 1px solid var(--acc-brand-700);
  border-radius: 1.5rem;
  background: linear-gradient(120deg, var(--acc-brand-900), var(--acc-brand-700));
  color: #fff;
  box-shadow: 0 18px 40px rgba(var(--acc-brand-900-rgb), 0.12);
}

.home-services__help-copy {
  min-width: 0;
  max-width: 38rem;
}

.home-services__help-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  color: var(--acc-gold-400);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-services__help-eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  background: currentColor;
}

.home-services__help h3 {
  margin: 0 0 0.85rem;
  color: #fff;
  font-size: clamp(1.35rem, 1.8vw, 1.65rem);
  font-weight: 600;
  line-height: 1.3;
}

.home-services__help p {
  margin: 0;
  color: #e0ece8;
  font-size: 0.95rem;
  line-height: 1.7;
  hyphens: none;
  text-wrap: pretty;
}

.home-services__contact {
  display: inline-grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  max-width: 100%;
  min-height: 52px;
  margin-top: 1.15rem;
  border-radius: 0.5rem;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.home-services__contact:hover {
  color: var(--acc-gold-400);
  text-decoration: none;
}

.home-services__contact-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid #5d6f7e;
  border-radius: 50%;
  color: var(--acc-gold-400);
  font-size: 1.2rem;
}

.home-services__contact-label,
.home-services__contact-value {
  display: block;
}

.home-services__contact-label {
  margin-bottom: 0.15rem;
  color: #d5e5e1;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.4;
}

.home-services__contact-value {
  font-size: 1.125rem;
  line-height: 1.5;
}

.home-services__next {
  min-width: 0;
  padding-left: clamp(1.5rem, 3vw, 2.5rem);
  border-left: 1px solid #5d6f7e;
}

.home-services__next-label {
  display: block;
  margin-bottom: 1rem;
  color: #d5e5e1;
  font-size: 0.85rem;
  font-weight: 500;
}

.home-services__actions {
  display: grid;
  gap: 0.75rem;
}

.home-services__actions > a {
  width: 100%;
  min-height: 56px;
  font-size: 0.95rem;
  box-shadow: none;
}

/* The existing rounded buttons, using the site's gold-on-teal CTA palette. */
.home-services__actions .btn-ph-primary {
  background: var(--acc-gold-400);
  border-color: var(--acc-gold-400);
  color: var(--acc-brand-900, var(--acc-brand-900));
}

.home-services__actions .btn-ph-primary::after {
  display: none;
}

.home-services__actions .btn-ph-primary:hover {
  background: var(--acc-gold-400);
  border-color: var(--acc-gold-400);
  color: var(--acc-brand-900, var(--acc-brand-900));
  box-shadow: none;
}

.home-services__actions .btn-ph-ghost {
  background: transparent;
  border-color: #97a6b3;
  color: #fff;
}

.home-services__actions .btn-ph-ghost:hover {
  background: #fff;
  border-color: #fff;
  color: var(--acc-brand-900, var(--acc-brand-900));
  box-shadow: none;
}

.home-services a:focus-visible {
  outline: 3px solid var(--acc-brand-700, var(--acc-brand-700));
  outline-offset: 4px;
}

.home-services__help a:focus-visible {
  outline-color: var(--acc-gold-400);
}

/* Align photos, headings, descriptions and arrows across each row, including wrapped titles. */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 600px) {
    .home-services__grid > li,
    .home-services__card {
      display: grid;
      grid-row: span 4;
      grid-template-rows: subgrid;
    }
    .home-services__card { row-gap: 0; }
    .home-services__card-link { align-self: end; margin-top: 0; }
  }
}

/* Tablet: the ninth card fills its row, photo left, text right. */
@media (min-width: 600px) and (max-width: 991.98px) {
  .home-services__grid > li:last-child { display: flex; grid-column: 1 / -1; grid-row: auto; }
  .home-services__grid > li:last-child .home-services__card {
    display: grid;
    grid-row: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto 1fr;
    align-content: start;
  }
  .home-services__grid > li:last-child .home-services__photo { grid-row: 1 / -1; }
  .home-services__grid > li:last-child :is(.home-services__card-heading, .home-services__description, .home-services__card-link) { grid-column: 2; }
}

@media (max-width: 991.98px) {
  .home-services__intro { grid-template-columns: 1fr; gap: 1rem; }
  .home-services__title { max-width: 26ch; }
  .home-services__summary { max-width: 65ch; }
  .home-services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-services__help { grid-template-columns: 1fr; gap: 1.5rem; }
  .home-services__help-copy { max-width: 100%; }
  .home-services__next { padding: 1.5rem 0 0; border-left: 0; border-top: 1px solid #5d6f7e; }
  .home-services__actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 599.98px) {
  .home-services__intro { margin-bottom: 1.5rem; }
  .home-services__grid { grid-template-columns: 1fr; gap: 0.875rem; }
  .home-services__card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto 1fr;
    align-items: start;
  }
  .home-services__photo { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
  .home-services__card-heading { grid-column: 1; grid-row: 2; padding-right: 0.75rem; }
  .home-services__card h3 { font-size: 1.3125rem; }
  .home-services__description { grid-column: 1 / -1; grid-row: 3; padding-block: 0.375rem var(--acc-home-card-inset); }
  .home-services__card-link { grid-column: 2; grid-row: 2; margin: 0; padding: var(--acc-home-card-inset) var(--acc-home-card-inset) 0 0; }
  .home-services__help { margin-top: 1.5rem; padding: 1.5rem; border-radius: 1.25rem; }
  .home-services__actions { grid-template-columns: 1fr; }
}

@media (max-width: 374.98px) {
  .home-services__help { padding: 1.25rem; }
  .home-services__contact { grid-template-columns: 2.25rem minmax(0, 1fr); gap: 0.65rem; }
  .home-services__contact-icon { width: 2.25rem; height: 2.25rem; }
  .home-services__contact > .bi-arrow-up-right { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .home-services *, .home-services *::after { transition: none; }
  .home-services .btn-ph-primary:hover, .home-services .btn-ph-ghost:hover { transform: none; }
}
