:root {
  --green: #176d27;
  --green-dark: #0d4f1b;
  --green-soft: #eef7ef;
  --ink: #182019;
  --muted: #5e675f;
  --cream: #faf9f4;
  --white: #fff;
  --line: #dfe4df;
  --shadow: 0 14px 40px rgba(18, 49, 24, .11);
  --content: 1180px;
  --banner-height: 39px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
}

a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 1000;
  padding: .75rem 1rem;
  color: var(--white);
  background: var(--green-dark);
  border-radius: .35rem;
}

.skip-link:focus { top: 1rem; }

.legal-banner {
  position: sticky;
  top: 0;
  z-index: 110;
  min-height: var(--banner-height);
  padding: .72rem 1rem;
  color: var(--white);
  background: #080808;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .055em;
  text-align: center;
  text-transform: uppercase;
}

.site-header {
  position: sticky;
  top: var(--banner-height);
  z-index: 100;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .09);
}

.header-inner {
  width: min(calc(100% - 2rem), var(--content));
  min-height: 108px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo-block {
  display: grid;
  justify-items: center;
  line-height: 1;
}

.brand-logo {
  width: 190px;
  height: auto;
  display: block;
}

.registration {
  margin-top: .4rem;
  color: var(--ink);
  font-size: .67rem;
  line-height: 1.2;
}

.header-contact {
  display: grid;
  justify-items: end;
  gap: .12rem;
  font-size: 1.02rem;
}

.header-contact a {
  font-weight: 650;
  text-underline-offset: .2em;
}

.header-contact span::before {
  content: "●";
  margin-right: .5rem;
  color: var(--green);
}

.primary-nav {
  width: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}

.primary-nav > a,
.nav-dropdown-toggle {
  padding: .72rem 1rem;
  border-right: 1px solid var(--line);
  border-top: 0;
  border-bottom: 0;
  border-left: 0;
  color: var(--ink);
  background: var(--white);
  font-family: inherit;
  font-size: .9rem;
  font-weight: 650;
  letter-spacing: .02em;
  text-align: center;
  text-decoration: none;
}

.primary-nav > a:last-child { border-right: 0; }
.primary-nav > a:hover,
.primary-nav > a:focus-visible,
.nav-dropdown-toggle:hover,
.nav-dropdown-toggle:focus-visible,
.nav-dropdown.open .nav-dropdown-toggle {
  color: var(--white);
  background: var(--green);
}

.primary-nav > a.active,
.primary-nav > a.active:hover,
.primary-nav > a.active:focus-visible,
.nav-dropdown.active > .nav-dropdown-toggle,
.nav-dropdown.active > .nav-dropdown-toggle:hover,
.nav-dropdown.active > .nav-dropdown-toggle:focus-visible {
  color: var(--white);
  background: #080808;
}

.nav-dropdown {
  position: relative;
  min-width: 0;
}

.nav-dropdown-toggle {
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.nav-dropdown-menu {
  position: absolute;
  z-index: 20;
  top: 100%;
  left: 0;
  width: 100%;
  min-width: 220px;
  display: none;
  padding: .35rem 0;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  display: grid;
}

.nav-dropdown-menu a {
  padding: .75rem 1rem;
  font-size: .88rem;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a:focus-visible,
.nav-dropdown-menu a.active {
  color: var(--white);
  background: var(--green);
}

.menu-toggle { display: none; }

.hero {
  position: relative;
  min-height: 610px;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: var(--white);
  background: url("../images/hubcare-services.jpg") center / cover no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 18, 9, .91) 0%, rgba(6, 18, 9, .72) 50%, rgba(6, 18, 9, .28) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, .15), transparent);
}

.hero-content {
  position: relative;
  width: min(calc(100% - 2rem), var(--content));
  margin: 0 auto;
  padding: 5rem 0;
}

.eyebrow,
.kicker {
  margin: 0 0 .7rem;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-block;
  padding: .55rem .9rem;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 100px;
}

.hero h1 {
  max-width: 720px;
  margin: 1.1rem 0 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.7rem, 6vw, 5.25rem);
  line-height: .98;
  letter-spacing: -.045em;
}

.hero-text {
  max-width: 650px;
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.65;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
}

.button {
  min-height: 48px;
  padding: .78rem 1.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 100px;
  font-size: .9rem;
  font-weight: 750;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}

.button:hover { transform: translateY(-2px); }
.button-primary { color: var(--white); background: var(--green); }
.button-primary:hover { background: #228437; }
.button-secondary {
  color: var(--white);
  border-color: rgba(255,255,255,.72);
  background: rgba(255,255,255,.08);
}
.button-secondary:hover { color: var(--ink); background: var(--white); }
.button-dark { color: var(--white); background: var(--ink); }
.button-light { color: var(--green-dark); background: var(--white); }
.button-outline-light { color: var(--white); border-color: var(--white); }
.button-outline-light:hover { color: var(--green-dark); background: var(--white); }

.section {
  width: min(calc(100% - 2rem), var(--content));
  margin: 0 auto;
  padding: 6.5rem 0;
}

.section-heading {
  max-width: 730px;
  margin: 0 auto 3rem;
  text-align: center;
}

.kicker { color: var(--green); }

.section-heading h2,
.why-content h2,
.contact-band h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -.03em;
}

.section-heading > p:last-child {
  margin: 1rem auto 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.service-card {
  padding: 2rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(18, 49, 24, .05);
  transition: transform .18s ease, box-shadow .18s ease;
}

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

.service-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--green);
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 800;
}

.service-icon-image {
  width: 52px;
  height: 52px;
  display: block;
  object-fit: contain;
}

.service-card h3 {
  margin: 1.3rem 0 .45rem;
  font-size: 1.05rem;
}

.service-card p {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
}

.centered {
  margin-top: 2rem;
  text-align: center;
}

.text-link {
  color: var(--green-dark);
  font-weight: 800;
  text-underline-offset: .25rem;
}

.why-us {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--cream);
}

.why-image {
  min-height: 570px;
  background: url("../images/comforting-hands.jpg") center / cover no-repeat;
}

.why-content {
  max-width: 650px;
  padding: 6rem clamp(2rem, 7vw, 7rem);
  align-self: center;
}

.why-content > p:not(.kicker) { color: var(--muted); }

.check-list {
  margin: 1.6rem 0 2rem;
  padding: 0;
  display: grid;
  gap: .7rem;
  list-style: none;
}

.check-list li::before {
  content: "✓";
  width: 1.5rem;
  display: inline-block;
  color: var(--green);
  font-weight: 900;
}

.contact-band {
  padding: 4rem max(1rem, calc((100% - var(--content)) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  color: var(--white);
  background: var(--green-dark);
}

.contact-band .kicker { color: #bfe7c6; }
.contact-band h2 { max-width: 650px; font-size: clamp(2rem, 4vw, 3rem); }
.contact-band-actions { display: flex; flex-wrap: wrap; gap: .7rem; }

.site-footer {
  padding: 4.5rem max(1rem, calc((100% - var(--content)) / 2)) 1.5rem;
  color: #303a31;
  background: var(--green-soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr repeat(3, 1fr);
  gap: 3rem;
}

.footer-grid > div { display: flex; flex-direction: column; align-items: flex-start; }
.footer-logo-link {
  display: inline-block;
  text-decoration: none;
}

.footer-logo {
  width: 190px;
  height: auto;
  display: block;
}

.footer-registration {
  margin-top: .4rem !important;
  color: var(--ink);
  font-size: .67rem !important;
}
.footer-grid h2 {
  margin: 0 0 .8rem;
  color: var(--ink);
  font-size: .92rem;
}
.footer-grid p { margin: .35rem 0; font-size: .87rem; }
.footer-grid a:not(.footer-logo-link) {
  margin: .24rem 0;
  font-size: .87rem;
  text-underline-offset: .2rem;
}

.footer-bottom {
  margin-top: 3.5rem;
  padding-top: 1.3rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid #ccd9ce;
  font-size: .76rem;
}

.page-hero {
  position: relative;
  min-height: 360px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--white);
  background-position: center;
  background-size: cover;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(5, 18, 8, .64);
}

.page-hero-content {
  position: relative;
  width: min(calc(100% - 2rem), 900px);
  padding: 5rem 0;
  text-align: center;
}

.page-hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.5rem, 6vw, 4.8rem);
  line-height: 1;
}

.page-hero p { margin: 1rem auto 0; max-width: 700px; font-size: 1.1rem; }
.about-hero { background-image: url("../images/aboutus.avif"); }
.commitment-hero { background-image: url("../images/our-commitment.avif"); }
.contact-hero { background-image: url("../images/contact.avif"); }

/* Desktop-only hero framing. Mobile image positioning remains unchanged. */
@media (min-width: 721px) {
  .hero {
    background-position: center top;
  }

  .commitment-hero {
    background-position: center 25%;
  }

  .contact-hero {
    background-position: center 20%;
  }
}

.content-section {
  width: min(calc(100% - 2rem), 980px);
  margin: 0 auto;
  padding: 5.5rem 0;
}

.content-section h2,
.content-section h3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.15;
}

.content-section h2 { margin: 0 0 1.25rem; font-size: clamp(2rem, 4vw, 3.4rem); }
.content-section h3 { margin: 2.5rem 0 .7rem; font-size: 1.65rem; }
.content-section p { color: var(--muted); }

.split-content {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 3.5rem;
  align-items: center;
}

.split-content img { width: 100%; border-radius: 1rem; box-shadow: var(--shadow); }

.value-grid,
.commitment-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.value-card,
.commitment-card {
  padding: 1.7rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--green-soft);
}

.value-card h3,
.commitment-card h2 { margin-top: 0; }

.contact-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.contact-card {
  padding: 2.4rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

.contact-card h2 { font-size: 2rem; }
.contact-phone { color: var(--green-dark); font-size: 1.45rem; font-weight: 800; }

.legal-page {
  width: min(calc(100% - 2rem), 900px);
  margin: 0 auto;
  padding: 5rem 0;
}

.legal-page > h1 {
  margin: 0 0 2rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
}

.legal-page h2 { margin: 2.5rem 0 .6rem; font-size: 1.35rem; }
.legal-page p, .legal-page li { color: var(--muted); }

@media (max-width: 900px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .why-us { grid-template-columns: 1fr; }
  .why-image { min-height: 380px; }
  .contact-band { align-items: flex-start; flex-direction: column; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  :root { --banner-height: 35px; }
  .legal-banner {
    padding: .62rem .75rem;
    font-size: .68rem;
  }
  .header-inner { min-height: 86px; }
  .brand-logo { width: 155px; }
  .registration { margin-top: .28rem; font-size: .58rem; }
  .header-contact { display: none; }

  .menu-toggle {
    padding: .7rem .8rem;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    border: 1px solid var(--line);
    border-radius: .5rem;
    background: var(--white);
    font: inherit;
    font-size: .78rem;
    font-weight: 750;
  }

  .menu-icon,
  .menu-icon::before,
  .menu-icon::after {
    width: 20px;
    height: 2px;
    display: block;
    background: var(--ink);
    transition: transform .18s ease;
  }

  .menu-icon { position: relative; }
  .menu-icon::before,
  .menu-icon::after { content: ""; position: absolute; left: 0; }
  .menu-icon::before { top: -6px; }
  .menu-icon::after { top: 6px; }

  .menu-toggle[aria-expanded="true"] .menu-icon { background: transparent; }
  .menu-toggle[aria-expanded="true"] .menu-icon::before { top: 0; transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-icon::after { top: 0; transform: rotate(-45deg); }

  .primary-nav {
    display: none;
    width: 100%;
    grid-template-columns: 1fr;
    border-top: 1px solid var(--line);
  }

  .primary-nav.open { display: grid; }
  .primary-nav > a,
  .nav-dropdown-toggle { border-right: 0; border-bottom: 1px solid var(--line); }

  .nav-dropdown-menu {
    position: static;
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .nav-dropdown:hover .nav-dropdown-menu,
  .nav-dropdown:focus-within .nav-dropdown-menu { display: none; }
  .nav-dropdown.open .nav-dropdown-menu { display: grid; }
  .nav-dropdown-menu a { padding-left: 2rem; background: var(--green-soft); }

  .hero { min-height: 570px; background-position: 48% center; }
  .hero-overlay { background: rgba(6, 18, 9, .72); }
  .hero h1 { font-size: clamp(2.65rem, 13vw, 4rem); }
  .section { padding: 4.5rem 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; }
  .split-content,
  .value-grid,
  .commitment-grid,
  .contact-options { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .service-grid { grid-template-columns: 1fr; }
  .hero-actions,
  .contact-band-actions { align-items: stretch; flex-direction: column; width: 100%; }
  .button { width: 100%; }
  .why-image { min-height: 290px; }
  .why-content { padding: 4rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
