/* ===========================
   BASE / RESET
=========================== */
body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI";
  background-color: #383a38;
  color: #fff6ef;
}

/* ===========================
   HERO (VIDEO BACKGROUND)
=========================== */
.hero {
  position: relative;
  width: 100%;
  height: 62vh; /* was 85vh */
  overflow: hidden;
  margin-top: 0; /* keep content clear of fixed nav */
  padding: 0;
}

#bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover; /* fill without letterboxing */
  object-position: center;
  transform: none; /* remove the 60%/-50% shift */
  z-index: -1; /* behind everything */
  pointer-events: none; /* clicks go to your content */
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  z-index: 1;
  text-align: center;
  color: #fff6ef;
  padding: 0 20px;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: bold;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.9), 2px 2px 10px rgba(0, 0, 0, 0.8);
}

/* keep the effective p rule (valid one) */
.hero-content p {
  font-size: 1.5rem;
  margin-top: 10px;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.9), 2px 2px 10px rgba(0, 0, 0, 0.8);
}

/* Default height (desktop) */
.hero {
  height: 62vh; /* was 85vh */
}
/* Prefer small-viewport units where supported (desktop keeps 62) */
@supports (height: 10svh) {
  .hero {
    height: 62svh; /* was 85svh */
  }
}

/* Keep video full-bleed; nudge focal point for tall phones */
@media (max-width: 640px) {
  /* Mobile height = 85 */
  .hero {
    height: 85vh;
  }

  #bg-video {
    object-position: 50% 60%;
    transform: translateZ(0) scale(1.2);
  } /* try 60–70% if you want more road */

  .hero-content {
    padding: 0 14px;
  }
  .hero-content h1 {
    font-size: clamp(1.8rem, 8vw, 2.4rem);
  }
  .hero-content p {
    font-size: clamp(1rem, 3.8vw, 1.2rem);
  }
}

/* ===========================
   TRUSTED BY (HOME)
=========================== */
.trusted-by {
  background-color: #152a51;
  color: white;
  text-align: center;
  padding: 30px 10px;
}
.trusted-by h2 {
  color: #fff6ef;
  font-size: 2.3rem;
  margin-bottom: 20px;
}
.trusted-by .logos {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
}
.trusted-by .logos img {
  height: 60px;
  width: auto;
  object-fit: contain;
  filter: none;
}

/* ===========================
   MAIN (HOME) + TYPOGRAPHY
=========================== */
main {
  background-image: url("../images/cream-1600.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #1e1e1e; /* fallback */
  color: #fff6ef;
  text-align: center;
  padding: 80px 20px;
}
main h1 {
  font-size: 2.5rem;
  color: #383a38;
  margin-bottom: 40px;
}
main h3 {
  font-size: 2.5rem;
  color: #383a38;
  margin-bottom: 40px;
}
main p {
  font-size: 1.2rem;
  color: #383a38;
  /* text-shadow: 1px 1px 6px rgba(0,0,0,0.9); */
  max-width: 800px;
  margin: 0 auto 30px;
  line-height: 1.6;
}

/* ===========================
   SPECIALTIES (HOME)
=========================== */
.specialties .container {
  max-width: none;
  width: 100%;
}
.specialties h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #383a38;
}
.specialties .intro-text {
  font-size: 1.3rem;
  max-width: 700px;
  margin: 0 auto 50px;
  line-height: 1.6;
  color: #383a38;
  /* text-shadow: 1px 1px 4px rgba(0,0,0,0.7); */
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: stretch;
}
.card-link {
  text-decoration: none;
  color: inherit;
  display: inline-block;
}

.specialty-item {
  background-color: #152a51;
  border-radius: 10px;
  padding: 60px 30px;
  /* box-shadow: 0 4px 20px rgba(0,0,0,0.2); */
  color: white;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.3s ease;
  max-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.specialty-item:hover {
  transform: translateY(-5px);
}

.specialty-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
}
.specialty-item h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: #fff6ef;
}
.specialty-item p {
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto 20px;
  color: #fff6ef;
  /* text-shadow: 1px 1px 4px rgba(0,0,0,0.6); */
}

/* flashlight hover that’s actually used on interest items 
.specialty-item::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255,215,0,0.5),
    transparent 40%
  );
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}
.specialty-item:hover::before { opacity: 1; } */

/*==================================================
    This is what makes the cards glow EDGE-GLOW
==================================================*/
:root {
  --fg: #fff;
  --page-bg: #151821;
  --card-navy: #152a51; /* card background color */
  --glow-sens: 20;
  --glow-blend: plus-lighter;
  --glow-color: 48deg 85% 60%;
  --pointer-°: 0deg;
  --pointer-d: 0;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: var(--page-bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, "Segoe UI", Roboto, Arial;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 8px;
}
h2 {
  margin: 0 0 6px;
  font-size: 1.8rem;
}
.intro-text {
  margin: 0 0 18px;
  color: #cfd3dc;
  opacity: 0.9;
}

.specialties .card-grid {
  max-width: 1200px;
  margin: 0 auto 60px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* ===== Card (glow border, uniform size, inset image) ===== */
.card {
  --pads: 16px;
  --color-sens: calc(var(--glow-sens) + 20);
  position: relative;
  border-radius: 20px;
  isolation: isolate;
  transform: translate3d(0, 0, 0.01px);
  border: 1px solid rgb(255 255 255 / 20%);
  overflow: visible; /* allow halo outside */
  touch-action: pan-y; /* allow vertical scroll on touch */
  height: 420px; /* all cards same height */
  background: var(--card-navy); /* navy background for the card */
  box-shadow: rgba(0, 0, 0, 0.12) 0 1px 2px, rgba(0, 0, 0, 0.1) 0 2px 6px,
    rgba(0, 0, 0, 0.08) 0 12px 24px;
}

/* glow layers */
.card::before,
.card > .glow {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  transition: opacity 0.25s ease-out;
}
.card:not(:hover):not(.animating)::before,
.card:not(:hover):not(.animating) > .glow {
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

/* colorful border following pointer angle */
.card::before {
  z-index: 1;
  border: 1px solid transparent;
  background: linear-gradient(#0000 0 100%) padding-box,
    radial-gradient(at 80% 55%, #c299ff 0, #0000 50%) border-box,
    radial-gradient(at 69% 34%, #ff9bb0 0, #0000 50%) border-box,
    radial-gradient(at 8% 6%, #65ffb3 0, #0000 50%) border-box,
    radial-gradient(at 41% 38%, #59e1ff 0, #0000 50%) border-box,
    radial-gradient(at 86% 85%, #84f7ff 0, #0000 50%) border-box,
    radial-gradient(at 82% 18%, #ffe96b 0, #0000 50%) border-box,
    radial-gradient(at 51% 4%, #ffb49a 0, #0000 50%) border-box,
    linear-gradient(#c299ff 0 100%) border-box;
  opacity: calc(
    (var(--pointer-d) - var(--color-sens)) / (100 - var(--color-sens))
  );
  -webkit-mask-image: conic-gradient(
    from var(--pointer-°) at center,
    black 25%,
    transparent 40%,
    transparent 60%,
    black 75%
  );
  mask-image: conic-gradient(
    from var(--pointer-°) at center,
    black 25%,
    transparent 40%,
    transparent 60%,
    black 75%
  );
}

/* outer halo that tracks pointer */
.card > .glow {
  z-index: 3;
  --outset: 16px;
  inset: calc(var(--outset) * -1);
  pointer-events: none;
  -webkit-mask-image: conic-gradient(
    from var(--pointer-°) at center,
    black 2.5%,
    transparent 10%,
    transparent 90%,
    black 97.5%
  );
  mask-image: conic-gradient(
    from var(--pointer-°) at center,
    black 2.5%,
    transparent 10%,
    transparent 90%,
    black 97.5%
  );
  opacity: calc(
    (var(--pointer-d) - var(--glow-sens)) / (100 - var(--glow-sens))
  );
  mix-blend-mode: var(--glow-blend);
}
.card > .glow::before {
  content: "";
  position: absolute;
  inset: var(--outset);
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px hsl(var(--glow-color) / 100%),
    inset 0 0 2px 2px hsl(var(--glow-color) / 90%),
    inset 0 0 5px 1px hsl(var(--glow-color) / 75%),
    inset 0 0 8px 1px hsl(var(--glow-color) / 66%),
    inset 0 0 15px 0 hsl(var(--glow-color) / 50%),
    inset 0 0 25px 2px hsl(var(--glow-color) / 30%),
    inset 0 0 50px 2px hsl(var(--glow-color) / 10%),
    0 0 2px 2px hsl(var(--glow-color) / 90%),
    0 0 5px 1px hsl(var(--glow-color) / 75%),
    0 0 8px 1px hsl(var(--glow-color) / 66%),
    0 0 15px 0 hsl(var(--glow-color) / 50%),
    0 0 25px 2px hsl(var(--glow-color) / 30%),
    0 0 50px 2px hsl(var(--glow-color) / 10%);
}

/* inner content (image inset / not touching borders) */
.card-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 24px; /* spacing from border */
  border-radius: inherit;
}
.card-inner img {
  width: 100%;
  height: 58%;
  min-height: 200px;
  object-fit: cover;
  display: block;
  border-radius: 14px; /* image does NOT touch outer border */
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.25) inset;
}
.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 14px 2px 0;
  background: transparent; /* no dark box under text */
}
.card-body h3 {
  margin: 0 0 6px;
  font-size: 1.08rem;
  font-weight: 800;
  color: #fff;
}
.card-body p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

/* ============================
        OUR KEY AREAS
  =========================== */

/* Home spacing: titles not touching the content */

/* Specialties section: add space below the heading and above the cards/grid */
section.specialties :is(h2, h3) {
  margin-bottom: 14px;
}
section.specialties :is(h2, h3) + * {
  margin-top: 10px;
}

/* “Our Key Service Areas in California” block */
.cities-served :is(h2, h3) {
  margin-bottom: 14px;
}
.cities-served :is(h2, h3) + * {
  margin-top: 10px;
}

/* Cities collage: full-bleed strips, no gaps */
.cities-served {
  padding: 0;

  /* Perf: defer heavy paint until near viewport */
  content-visibility: auto;
  contain-intrinsic-size: 1px 800px; /* reserve space to avoid CLS */
}
.cities-served .container {
  padding: 0;
}

/* make the list full-bleed across the viewport */
.cities-served .strip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100vw; /* go edge-to-edge */
  margin-left: 50%;
  transform: translateX(-50%); /* break out of .container */
}

/* each <li><a> becomes a thin image strip */
.cities-served .strip-list li {
  margin: 0;
}
.cities-served .strip-list li > a {
  --height: clamp(110px, 22vh, 200px); /* “thin” strip height */
  display: grid;
  place-items: center;
  height: var(--height);
  background: var(--bg) center/cover no-repeat; /* set per item */
  position: relative;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.3px;
  font-size: clamp(18px, 3.3vw, 28px);
  line-height: 1;
}

/* subtle overlay for readability */
.cities-served .strip-list li > a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.45));
}

/* the text sits above the overlay */
.cities-served .strip-list li > a span {
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* eliminate any gap between strips */
.cities-served .strip-list li + li {
  margin-top: 0;
}

/* Shared — applies the custom property as the background */
.strip-list li {
  --bg: none;
  background-image: var(--bg);
  /* keep your existing sizing/positioning if any
     e.g., background-size: cover; background-position: center; */
}

/* ============================
   City backgrounds (ONE optimized 1600px WebP each)
   Files live in ../images/city-strips/*-1600.webp
============================ */

/* San Diego area */
.strip-list li.city-san-diego {
  --bg: url("/images/city-strips/sandiego-1600.webp");
}
.strip-list li.city-la-jolla {
  --bg: url("/images/city-strips/lajolla-1600.webp");
}
.strip-list li.city-carlsbad {
  --bg: url("/images/city-strips/carlsbad-1600.webp");
}
.strip-list li.city-chula-vista {
  --bg: url("/images/city-strips/chulavista-1600.webp");
}
.strip-list li.city-del-mar {
  --bg: url("/images/city-strips/delmar-1600.webp");
}
.strip-list li.city-rancho-santafe {
  --bg: url("/images/city-strips/ranchosantafe-1600.webp");
}
.strip-list li.city-coronado {
  --bg: url("/images/city-strips/coronado-1600.webp");
}

/* Los Angeles area */
.strip-list li.city-los-angeles {
  --bg: url("../images/city-strips/losangeles-1600.webp");
}
.strip-list li.city-beverly-hills {
  --bg: url("/images/city-strips/beverlyhills-1600.webp");
}
.strip-list li.city-hollywood {
  --bg: url("/images/city-strips/hollywood-1600.webp");
}
.strip-list li.city-calabasas {
  --bg: url("/images/city-strips/calabasas-1600.webp");
}

/* San Francisco Bay Area */
.strip-list li.city-san-francisco {
  --bg: url("/images/city-strips/sanfrancisco-1600.webp");
}
.strip-list li.city-palo-alto {
  --bg: url("/images/city-strips/paloalto-1600.webp");
}
.strip-list li.city-menlo-park {
  --bg: url("/images/city-strips/menlopark-1600.webp");
}
.strip-list li.city-san-mateo {
  --bg: url("/images/city-strips/sanmateo-1600.webp");
}
.strip-list li.city-atherton {
  --bg: url("/images/city-strips/atherton-1600.webp");
}

/* ===========================
   TESTIMONIALS (HOME)
=========================== */
.testimonials {
  background-color: #383a38;
  color: #383a38;
  padding: 80px 20px;
  text-align: center;
}
.testimonials h2 {
  font-size: 2.5rem;
  color: #fff6e2;
  margin-bottom: 40px;
}
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
}
.testimonial {
  background-color: #fff6e2;
  border-left: 4px solid #000000;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  font-style: italic;
  transition: transform 0.3s ease;
}
.testimonial:hover {
  transform: translateY(-5px);
}
.testimonial h4 {
  margin-top: 15px;
  font-size: 1rem;
  color: #383a38;
  font-style: normal;
}

/* ===========================
   WHY CHOOSE US (HOME)
=========================== */
.why-us {
  background-image: url("../images/navbar-cream.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #383a38;
  padding: 80px 20px;
  text-align: left;
}
.why-us h2 {
  color: #383a38;
  font-size: 2.5rem;
  margin-bottom: 30px;
  max-width: 110ch; /* match the paragraph column */
  margin: 0 auto 30px; /* center the block */
  text-align: center; /* center the heading text */
}
.why-us p {
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 110ch;
  margin: 0 auto 20px;
  color: #383a38;
  /* text-shadow: 1px 1px 4px rgba(0,0,0,0.6); */
}

/*==============================
  TRUSTED BY
  ==============================*/
@media (max-width: 640px) {
  section.trusted-by {
    display: grid;
    grid-template-columns: 20% repeat(auto-fit, minmax(110px, 1fr));
    row-gap: 14px; /* vertical space */
    column-gap: 32psx; /* HORIZONTAL SEPARATION BETWEEN LOGOS */
    align-items: center;
    justify-items: center;
  }

  /* extra breathing room inside each logo cell */
  section.trusted-by
    > :not(h1):not(h2):not(h3):not(h4)
    :not(.scroll-up):not(.scrollup):not(.scroll-to-top):not(#scrollUp):not(
      #scroll-top
    ) {
    padding-inline: 8px;
  }

  section.trusted-by > :is(h1, h2, h3, h4) {
    grid-column: 1 / -1;
    margin: 0 0 6px;
    text-align: center;
  }
  section.trusted-by img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 40px;
    display: block;
  }
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
  z-index: 10000;
}
.modal-content {
  background: #fff;
  border-radius: 8px;
  width: 90%;
  max-width: 800px;
  max-height: 90%;
  position: relative;
  overflow: hidden;
}
.modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 24px;
  cursor: pointer;
  color: #333;
}
.modal-iframe {
  width: 100%;
  height: 80vh;
  border: none;
}

/* Remove purple highlight from #:~:text=... links (Chrome/Edge) */
@supports selector(::target-text) {
  ::target-text {
    background-color: rgba(255, 255, 0, 0.25); /* soft highlight */
    text-decoration: none;
    outline: none;
  }
}

/* =======TERMS AND CONDITIONS======= */

.terms-page h3 {
  text-shadow: none !important;
}
