/* =========================================================
   SOUTH DOWNS — SITE-WIDE PREMIUM POLISH
   Modern inner-page heroes + professional services dropdown
   ========================================================= */

:root {
  --sd-navy-950: #04182b;
  --sd-navy-900: #07243e;
  --sd-navy-800: #0b3152;
  --sd-blue-500: #09a9df;
  --sd-blue-400: #43c8f2;
  --sd-ice: #e9f8fd;
  --sd-white: #ffffff;
}

/* ---------- Refined navigation ---------- */
body .header {
  z-index: 3000;
}

body .navbar {
  min-height: 76px;
  padding: 0.72rem clamp(1.1rem, 3.5vw, 3.1rem);
  gap: 2rem;
  background: linear-gradient(105deg, #041a30 0%, #082c4a 100%);
  border: 0;
  border-radius: 0;
  box-shadow: 0 12px 34px rgba(0, 19, 35, 0.2);
}

body .navbar .logo {
  max-width: 360px;
  color: #fff;
  font-family: "Barlow Condensed", "Barlow", Arial, sans-serif;
  font-size: clamp(1.28rem, 2vw, 1.72rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}

body .navbar ul.nav-links {
  gap: 0.15rem;
}

body .navbar ul.nav-links > li {
  margin-left: 0;
}

body .navbar ul.nav-links > li > a:not(.cta-button) {
  min-height: 44px;
  padding: 0.68rem 0.82rem;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.93rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color .22s ease, background .22s ease, transform .22s ease;
}

body .navbar ul.nav-links > li > a:not(.cta-button):hover,
body .navbar ul.nav-links > li > a:not(.cta-button):focus-visible,
body .navbar li.dropdown:hover > .services-trigger,
body .navbar li.dropdown.open > .services-trigger {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

body .navbar .cta-button {
  min-height: 46px;
  padding: 0.72rem 1.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  color: #fff;
  background: linear-gradient(100deg, #079fd4, #22bce8);
  box-shadow: 0 10px 22px rgba(0, 151, 207, 0.25);
}

body .navbar .cta-button:hover,
body .navbar .cta-button:focus-visible {
  color: #fff;
  background: linear-gradient(100deg, #20b9e8, #52cff5);
  box-shadow: 0 13px 27px rgba(0, 151, 207, 0.32);
}

body .navbar li.nav-services {
  position: relative;
}

body .navbar .services-trigger {
  gap: 0.62rem !important;
}

body .navbar .services-trigger-icon {
  width: 23px;
  height: 23px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #7ddcff;
  background: rgba(4, 17, 31, 0.32);
  transition: transform .25s ease, background .25s ease;
}

body .navbar .services-trigger-icon i {
  font-size: 0.65rem;
}

body .navbar li.dropdown:hover .services-trigger-icon,
body .navbar li.dropdown.open .services-trigger-icon {
  transform: rotate(180deg);
  background: rgba(9, 169, 223, 0.25);
}

/* Desktop dropdown: solid, editorial, not glassmorphism */
@media (min-width: 1201px) {
  body .navbar ul.nav-links li.dropdown ul.dropdown-menu.services-mega {
    width: 390px;
    min-width: 390px;
    top: calc(100% + 14px);
    left: 50%;
    display: grid !important;
    gap: 7px;
    padding: 15px;
    border: 1px solid #d9e7f0;
    border-top: 4px solid var(--sd-blue-500);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(0, 20, 38, 0.24);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 12px);
    transition: opacity .2s ease, transform .24s ease, visibility .2s ease;
  }

  body .navbar ul.nav-links li.dropdown ul.dropdown-menu.services-mega::before {
    content: "";
    position: absolute;
    top: -14px;
    left: 0;
    right: 0;
    height: 14px;
  }

  body .navbar ul.nav-links li.dropdown:hover ul.dropdown-menu.services-mega,
  body .navbar ul.nav-links li.dropdown:focus-within ul.dropdown-menu.services-mega {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
  }
}

body .navbar .services-mega > li {
  width: 100%;
  margin: 0 !important;
}

body .navbar .services-mega .dropdown-intro {
  padding: 7px 8px 12px;
  display: grid;
  gap: 3px;
  border-bottom: 1px solid #e6eef4;
}

body .navbar .services-mega .dropdown-intro span {
  color: #159acb;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

body .navbar .services-mega .dropdown-intro strong {
  color: #082b48;
  font-family: "Barlow Condensed", "Barlow", Arial, sans-serif;
  font-size: 1.42rem;
  line-height: 1.05;
  text-transform: uppercase;
}

body .navbar ul.nav-links li.dropdown ul.dropdown-menu.services-mega li a.service-option {
  min-height: 78px;
  padding: 10px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 12px;
  color: #0b2942;
  white-space: normal;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #f6f9fb;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

body .navbar ul.nav-links li.dropdown ul.dropdown-menu.services-mega li a.service-option:hover,
body .navbar ul.nav-links li.dropdown ul.dropdown-menu.services-mega li a.service-option:focus-visible {
  color: #082b48;
  background: #eef9fd;
  border-color: #bce8f7;
  transform: translateX(3px);
}

body .navbar .dropdown-service-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 5px;
  background: linear-gradient(145deg, #0c9ed1, #3fc4ed);
  box-shadow: 0 9px 18px rgba(3, 145, 194, 0.19);
}

body .navbar .dropdown-service-icon i {
  font-size: 1.08rem;
}

body .navbar .dropdown-service-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

body .navbar .dropdown-service-copy strong {
  color: #082b48;
  font-size: 0.98rem;
  font-weight: 800;
}

body .navbar .dropdown-service-copy small {
  color: #5a7182;
  font-size: 0.76rem;
  line-height: 1.35;
}

body .navbar .dropdown-service-arrow {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #148fbb;
  border: 1px solid #cfe8f2;
  border-radius: 50%;
  background: #fff;
}

body .navbar .dropdown-service-arrow i {
  font-size: 0.68rem;
}

body .navbar .services-mega .dropdown-footer a {
  min-height: 42px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #fff !important;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 5px;
  background: #082b48;
}

body .navbar .services-mega .dropdown-footer a:hover,
body .navbar .services-mega .dropdown-footer a:focus-visible {
  color: #fff !important;
  background: #0d3c61 !important;
}

/* ---------- Premium inner-page hero system ---------- */
body .page-header.premium-page-hero {
  --page-hero-image: url('images/hero1.jpg');
  --page-hero-position: center;
  position: relative;
  min-height: clamp(430px, 56vh, 610px);
  padding: 0 !important;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  text-align: left;
  background-image: var(--page-hero-image) !important;
  background-size: cover !important;
  background-position: var(--page-hero-position) !important;
  background-repeat: no-repeat !important;
}

body .page-header.premium-page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(3, 22, 40, .97) 0%, rgba(5, 35, 61, .91) 42%, rgba(5, 38, 67, .57) 67%, rgba(2, 18, 34, .22) 100%),
    linear-gradient(0deg, rgba(2, 18, 33, .68) 0%, transparent 45%);
}

body .page-header.premium-page-hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 360px;
  height: 360px;
  right: -205px;
  bottom: -225px;
  border: 64px solid rgba(58, 193, 237, .23);
  border-radius: 50%;
  background: transparent;
  pointer-events: none;
}

/* Service-page request: keep the premium image/gradient treatment but remove
   the decorative circular ring from these two hero sections. */
body .page-header.residential-hero.premium-page-hero::after,
body .page-header.commercial-hero.premium-page-hero::after,
body .page-header.gallery-hero.premium-page-hero::after {
  content: none;
  display: none;
}

body .about-hero { --page-hero-image: url('images/van.jpg'); --page-hero-position: center 55%; }
body .residential-hero { --page-hero-image: url('images/residential1.jpg'); --page-hero-position: 65% center; }
body .commercial-hero { --page-hero-image: url('images/commercial7.jpeg'); --page-hero-position: center; }
body .gallery-hero { --page-hero-image: url('images/hero1.jpg'); --page-hero-position: center; }
body .contact-hero { --page-hero-image: url('images/wow.jpg'); --page-hero-position: center; }
body .terms-hero { --page-hero-image: url('images/commercial3.jpg'); --page-hero-position: center; }

body .page-hero-inner {
  position: relative;
  z-index: 2;
  width: min(100%, 1280px);
  min-height: inherit;
  margin: 0 auto;
  padding: clamp(68px, 8vw, 104px) clamp(22px, 4vw, 56px) clamp(72px, 8vw, 98px);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .52fr);
  align-items: center;
  gap: clamp(40px, 7vw, 100px);
}

body .page-hero-copy {
  min-width: 0;
}

body .page-hero-eyebrow {
  margin: 0 0 19px !important;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #dff7ff !important;
  font-size: .75rem !important;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .16em;
  text-transform: uppercase;
}

body .page-hero-eyebrow span {
  width: 36px;
  height: 3px;
  display: inline-block;
  background: #38c1ef;
  box-shadow: 13px 0 0 rgba(56, 193, 239, .34);
}

body .page-header.premium-page-hero h1 {
  max-width: 850px;
  margin: 0 !important;
  position: relative;
  z-index: 1;
  color: #fff !important;
  font-family: "Barlow Condensed", "Barlow", Arial, sans-serif;
  font-size: clamp(3.65rem, 6.2vw, 6.2rem) !important;
  font-weight: 800 !important;
  line-height: .9 !important;
  letter-spacing: -.03em;
  text-transform: uppercase;
  text-shadow: 0 12px 30px rgba(0, 17, 31, .22);
}

body .page-header.premium-page-hero .page-hero-lead {
  max-width: 690px;
  margin: 26px 0 0 !important;
  position: relative;
  z-index: 1;
  color: rgba(241, 250, 255, .9) !important;
  font-size: clamp(1rem, 1.3vw, 1.15rem) !important;
  line-height: 1.72;
}

body .page-hero-actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

body .page-hero-btn {
  min-height: 51px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  font-size: .88rem;
  font-weight: 750;
  letter-spacing: .02em;
  border: 2px solid transparent;
  border-radius: 3px;
  transition: transform .22s ease, background .22s ease, border-color .22s ease;
}

body .page-hero-btn--primary {
  background: #079fd4;
  border-color: #079fd4;
  box-shadow: 0 13px 27px rgba(0, 140, 194, .27);
}

body .page-hero-btn--secondary {
  background: transparent;
  border-color: rgba(255,255,255,.58);
}

body .page-hero-btn:hover,
body .page-hero-btn:focus-visible {
  color: #fff;
  transform: translateY(-3px);
}

body .page-hero-btn--primary:hover,
body .page-hero-btn--primary:focus-visible {
  background: #28bae8;
  border-color: #28bae8;
}

body .page-hero-btn--secondary:hover,
body .page-hero-btn--secondary:focus-visible {
  color: #082b48;
  background: #fff;
  border-color: #fff;
}

body .page-hero-aside {
  position: relative;
  width: min(100%, 360px);
  justify-self: end;
  padding: 29px 27px 25px;
  color: #fff;
  background: #082a47;
  border-top: 4px solid #31bee9;
  box-shadow: 0 22px 50px rgba(0, 16, 30, .3);
}

body .page-hero-aside::after {
  content: "";
  position: absolute;
  inset: auto 0 0 auto;
  width: 67px;
  height: 67px;
  border-right: 1px solid rgba(77, 202, 241, .45);
  border-bottom: 1px solid rgba(77, 202, 241, .45);
}

body .page-hero-mark {
  width: 51px;
  height: 51px;
  margin-bottom: 20px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #079fd4;
}

body .page-hero-mark i { font-size: 1.22rem; }

body .page-hero-aside > span {
  display: block;
  color: #7edbfa;
  font-size: .69rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

body .page-hero-aside > strong {
  margin-top: 8px;
  display: block;
  color: #fff;
  font-family: "Barlow Condensed", "Barlow", Arial, sans-serif;
  font-size: 1.72rem;
  line-height: 1.03;
  text-transform: uppercase;
}

body .page-hero-points {
  margin: 21px 0 0;
  padding: 18px 0 0;
  display: grid;
  gap: 11px;
  list-style: none;
  border-top: 1px solid rgba(255,255,255,.15);
}

body .page-hero-points li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(244, 251, 255, .9);
  font-size: .84rem;
}

body .page-hero-points i {
  color: #4fcaf2;
  font-size: .77rem;
}

/* Home slider: clear automatic timing indicator */
body .hero-pagination button {
  position: relative;
  overflow: hidden;
}

body .hero-pagination button.is-active::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: #fff;
  transform-origin: left center;
  animation: sdHeroProgress 4.5s linear forwards;
}

@keyframes sdHeroProgress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ---------- Tablet/mobile ---------- */
@media (max-width: 1200px) {
  body .navbar {
    min-height: 68px;
    padding: .7rem 1rem;
  }

  body .navbar .logo {
    max-width: min(72vw, 355px);
    font-size: clamp(1.08rem, 3vw, 1.42rem);
  }

  body .navbar ul.nav-links {
    padding: .75rem !important;
    background: #061e35 !important;
    border-top: 1px solid rgba(255,255,255,.09);
    box-shadow: 0 20px 40px rgba(0, 15, 29, .3);
  }

  body .navbar ul.nav-links > li {
    border-bottom: 1px solid rgba(255,255,255,.08);
  }

  body .navbar ul.nav-links > li > a:not(.cta-button),
  body .navbar ul.nav-links .cta-button {
    min-height: 48px;
    padding: .76rem .85rem;
    border-radius: 5px;
  }

  body .navbar ul.nav-links li.dropdown ul.dropdown-menu.services-mega,
  body .navbar ul.nav-links li.dropdown:not(.open) ul.dropdown-menu.services-mega {
    position: static;
    width: 100%;
    min-width: 0;
    display: none !important;
    margin: 0 0 .65rem;
    padding: 9px;
    gap: 7px;
    background: #fff;
    border: 0;
    border-top: 3px solid #18aedf;
    border-radius: 6px;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  body .navbar ul.nav-links li.dropdown.open ul.dropdown-menu.services-mega {
    display: grid !important;
  }

  body .navbar .services-mega .dropdown-intro {
    padding: 6px 7px 10px;
  }

  body .navbar ul.nav-links li.dropdown ul.dropdown-menu.services-mega li a.service-option {
    min-height: 70px;
    grid-template-columns: 43px minmax(0, 1fr) 27px;
    padding: 8px;
  }

  body .navbar .dropdown-service-icon {
    width: 43px;
    height: 43px;
  }

  body .page-hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(260px, .48fr);
    gap: 34px;
  }
}

@media (max-width: 768px) {
  body .page-header.premium-page-hero {
    min-height: auto;
    background-position: center !important;
  }

  body .page-header.premium-page-hero::before {
    background:
      linear-gradient(180deg, rgba(3, 24, 43, .82) 0%, rgba(4, 30, 53, .95) 52%, rgba(3, 23, 42, .99) 100%);
  }

  body .page-hero-inner {
    padding: clamp(58px, 12vw, 78px) 20px clamp(54px, 11vw, 72px);
    display: block;
    text-align: left;
  }

  body .page-header.premium-page-hero h1 {
    max-width: 560px;
    font-size: clamp(2.8rem, 13vw, 4.25rem) !important;
    line-height: .92 !important;
  }

  body .page-header.premium-page-hero .page-hero-lead {
    margin-top: 21px !important;
    font-size: .98rem !important;
    line-height: 1.62;
  }

  body .page-hero-actions {
    margin-top: 26px;
  }

  body .page-hero-btn {
    flex: 1 1 180px;
    min-height: 50px;
  }

  body .page-hero-aside {
    width: 100%;
    max-width: none;
    margin-top: 36px;
    padding: 23px 21px 21px;
  }

  body .page-hero-aside > strong {
    font-size: 1.48rem;
  }
}

@media (max-width: 480px) {
  body .navbar .logo {
    max-width: 72vw;
    font-size: 1.03rem;
  }

  body .page-hero-actions {
    display: grid;
  }

  body .page-hero-btn {
    width: 100%;
  }

  body .navbar ul.nav-links li.dropdown ul.dropdown-menu.services-mega li a.service-option {
    grid-template-columns: 40px minmax(0, 1fr) 24px;
  }

  body .navbar .dropdown-service-icon {
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body .hero-pagination button.is-active::after { animation: none; }
  body .navbar ul.nav-links li.dropdown ul.dropdown-menu.services-mega,
  body .page-hero-btn,
  body .navbar .service-option { transition: none !important; }
}

/* Compact mobile service selector so the full navigation remains usable. */
body .navbar .services-mega .dropdown-footer strong {
  margin-left: auto;
  white-space: nowrap;
}

@media (max-width: 768px) {
  body .navbar .services-mega .dropdown-intro {
    display: none;
  }

  body .navbar ul.nav-links li.dropdown ul.dropdown-menu.services-mega,
  body .navbar ul.nav-links li.dropdown:not(.open) ul.dropdown-menu.services-mega {
    padding: 7px;
    gap: 5px;
  }

  body .navbar ul.nav-links li.dropdown ul.dropdown-menu.services-mega li a.service-option {
    min-height: 58px;
    grid-template-columns: 38px minmax(0, 1fr) 24px;
    gap: 9px;
    padding: 6px 7px;
  }

  body .navbar .dropdown-service-icon {
    width: 38px;
    height: 38px;
  }

  body .navbar .dropdown-service-copy strong {
    font-size: .9rem;
  }

  body .navbar .dropdown-service-copy small {
    font-size: .68rem;
    line-height: 1.25;
  }

  body .navbar .services-mega .dropdown-footer a {
    min-height: 36px;
    padding: 6px 8px;
    font-size: .7rem;
  }
}
