/* Helphouse Care 5.3.0 — final layout layer */
:root {
  --hh-container: 1160px;
  --hh-gutter: clamp(18px, 3vw, 32px);
  --hh-section: clamp(56px, 7vw, 88px);
  --hh-teal: #1f6675;
  --hh-teal-dark: #153c46;
  --hh-coral: #d0714d;
  --hh-cream: #f4eee5;
  --hh-line: #dfe7e3;
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: min(var(--hh-container), calc(100% - (var(--hh-gutter) * 2)));
}

.section,
.page-content-section {
  padding-block: var(--hh-section);
}

main,
section,
article,
aside,
header,
footer,
nav,
form,
figure,
div {
  min-width: 0;
}

img,
video,
iframe,
table,
select,
input,
textarea {
  max-width: 100%;
}

h1,
h2,
h3,
p,
li,
a,
button,
label,
summary {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.entry-content a:not(.button),
.footer-contacts a {
  overflow-wrap: anywhere;
}

.button {
  min-height: 48px;
  max-width: 100%;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}

.button > span {
  display: block;
  white-space: nowrap;
}

/* Header */
.header-main {
  min-height: 84px;
  gap: clamp(14px, 2vw, 28px);
}

.primary-nav ul {
  gap: clamp(12px, 1.6vw, 22px);
}

.primary-nav a,
.header-phone {
  white-space: nowrap;
}

/* Internal page hero */
.page-hero {
  padding-block: clamp(48px, 6vw, 76px);
}

.page-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
  gap: clamp(32px, 5vw, 70px);
  align-items: center;
}

.page-hero--compact .page-hero__grid {
  grid-template-columns: minmax(0, 900px);
}

.page-hero__inner {
  max-width: 760px;
}

.page-hero__lead {
  max-width: 680px;
}

.page-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.page-hero__photo {
  margin: 0;
}

.page-hero__photo img {
  width: 100%;
  height: clamp(320px, 36vw, 520px);
  object-fit: cover;
  border-radius: 32px;
}

/* Main landing page grid */
.content-layout {
  display: grid;
  align-items: start;
}

.content-layout--with-aside {
  grid-template-columns: minmax(0, 1fr) minmax(270px, 310px);
  gap: clamp(34px, 4vw, 58px);
}

.content-layout--single {
  grid-template-columns: minmax(0, 920px);
  justify-content: center;
}

.entry-content {
  width: 100%;
  max-width: 820px;
}

.content-layout--single .entry-content {
  max-width: 920px;
}

.entry-content > :first-child {
  margin-top: 0;
}

.entry-content h2 {
  margin-top: clamp(44px, 6vw, 68px);
  margin-bottom: 18px;
  font-size: clamp(1.75rem, 2.7vw, 2.65rem);
}

.entry-content h3 {
  margin-top: 34px;
  margin-bottom: 12px;
  font-size: clamp(1.3rem, 2vw, 1.65rem);
}

.entry-content p,
.entry-content li {
  max-width: 78ch;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.35em;
}

.entry-content li + li {
  margin-top: .45em;
}

.entry-content blockquote {
  margin: 34px 0;
  padding: 22px 26px;
  border-left: 5px solid var(--hh-coral);
  background: #fff7f1;
  border-radius: 0 14px 14px 0;
}

.table-scroll,
.entry-content .wp-block-table {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.entry-content table {
  min-width: 620px;
  font-size: .95rem;
}

/* Useful links */
.content-links {
  margin: 52px 0 40px;
  padding-top: 32px;
  border-top: 1px solid var(--hh-line);
}

.content-links h2 {
  margin: 0 0 20px;
  font-size: clamp(1.7rem, 2.4vw, 2.25rem);
}

.content-links__items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.content-links__items a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid #d5e2df;
  border-radius: 999px;
  background: #edf5f5;
  color: #12566a;
  font-weight: 750;
  text-decoration: none;
}

.content-links__items a:hover,
.content-links__items a:focus-visible {
  border-color: var(--hh-teal);
  background: #fff;
}

/* CTA */
.inline-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 270px);
  align-items: center;
  gap: clamp(24px, 4vw, 46px);
  width: 100%;
  margin: 50px 0 38px;
  padding: clamp(28px, 4vw, 46px);
  border-radius: 26px;
  background: var(--hh-teal);
  color: #fff;
  overflow: hidden;
}

.inline-cta .eyebrow {
  color: #ff9064;
}

.inline-cta__title,
.entry-content .inline-cta__title {
  max-width: 18ch;
  margin: 0 0 16px;
  color: #fff;
  font-size: clamp(2rem, 3.4vw, 3.15rem);
  line-height: 1.12;
}

.inline-cta__copy p:last-child {
  max-width: 56ch;
  margin-bottom: 0;
}

.inline-cta__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.inline-cta__actions .button {
  width: 100%;
  min-width: 0;
  padding-inline: 18px;
}

.page-request-form {
  scroll-margin-top: 110px;
  margin-top: 34px;
}

/* Aside */
.content-aside {
  position: sticky;
  top: 116px;
  display: grid;
  gap: 16px;
}

.aside-card {
  overflow: hidden;
}

.aside-card h2 {
  font-size: clamp(1.55rem, 2vw, 1.9rem);
}

.aside-card--links h2 {
  margin-bottom: 12px;
}

.aside-card--links a {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid rgba(21,60,70,.12);
  text-decoration: none;
  font-weight: 700;
}

.aside-card--links a:last-child {
  border-bottom: 0;
}

/* Forms */
.lead-form {
  width: 100%;
  overflow: hidden;
}

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

.lead-form label,
.lead-form label span {
  min-width: 0;
}

.lead-form input,
.lead-form select,
.lead-form textarea {
  min-width: 0;
  min-height: 48px;
}

.lead-form textarea {
  resize: vertical;
}

.form-honeypot[hidden] {
  display: none !important;
}

/* Media */
.media-footer__grid {
  align-items: start;
}

.media-footer__grid article {
  min-width: 0;
}

.embed-wrap iframe {
  display: block;
  width: 100%;
}

/* Footer */
.footer-contacts span {
  display: block;
  margin-top: 14px;
  color: #aac0ba;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.footer-contacts a,
.footer-contacts p {
  display: block;
  margin: 3px 0 0;
}

.site-footer__bottom {
  align-items: flex-start;
  flex-wrap: wrap;
}

/* Desktop and tablet breakpoints */
@media (max-width: 1180px) {
  .content-layout--with-aside {
    grid-template-columns: minmax(0, 1fr);
    justify-content: center;
  }

  .content-layout--with-aside .entry-content {
    max-width: 920px;
    margin-inline: auto;
  }

  .content-aside {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 920px;
    margin: 20px auto 0;
  }

  .aside-card--photo img {
    height: 190px;
  }
}

@media (max-width: 1020px) {
  .page-hero__grid {
    grid-template-columns: 1fr;
  }

  .page-hero__inner {
    max-width: 860px;
  }

  .page-hero__photo img {
    height: min(54vw, 470px);
  }

  .inline-cta {
    grid-template-columns: 1fr;
  }

  .inline-cta__actions {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    max-width: 500px;
  }

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

  .aside-card--links {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  :root {
    --hh-gutter: 18px;
  }

  .section,
  .page-content-section {
    padding-block: 54px;
  }

  .page-hero {
    padding-block: 44px;
  }

  .page-hero__photo img {
    height: 62vw;
    min-height: 260px;
    border-radius: 22px;
  }

  .entry-content table {
    min-width: 560px;
  }

  .content-aside {
    grid-template-columns: 1fr;
  }

  .aside-card--links {
    grid-column: auto;
  }

  .media-footer__grid,
  .site-footer__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .page-hero__actions,
  .inline-cta__actions,
  .lead-form .form-grid {
    grid-template-columns: 1fr;
  }

  .page-hero__actions {
    display: grid;
  }

  .page-hero__actions .button,
  .inline-cta__actions .button {
    width: 100%;
  }

  .inline-cta {
    margin-block: 38px 28px;
    padding: 26px 20px;
    border-radius: 20px;
  }

  .inline-cta__title,
  .entry-content .inline-cta__title {
    max-width: none;
    font-size: clamp(1.85rem, 9vw, 2.45rem);
  }

  .content-links__items {
    display: grid;
    grid-template-columns: 1fr;
  }

  .content-links__items a {
    border-radius: 12px;
  }

  .lead-form {
    padding: 22px 18px;
  }

  .entry-content h2 {
    font-size: clamp(1.7rem, 8vw, 2.2rem);
  }

  .site-footer__bottom {
    display: grid;
    gap: 10px;
  }
}

/* Home contact card avoids duplicating the footer map */
.visit-card {
  overflow: hidden;
  border: 1px solid var(--hh-line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(31, 67, 56, .08);
}

.visit-card > img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.visit-card > div {
  padding: 24px;
}

.visit-card h3 {
  margin-bottom: 12px;
  font-size: clamp(1.55rem, 2.4vw, 2rem);
}
