/*
 * components.css — Component Styles
 * Styles for all _components/ JS modules and page-level sections.
 * Edit here for style fixes — never rebuild the component JS files.
 */

/* ════════════════════════════════════════════════════════════════
   SITE HEADER — fixed at top (top bar + desktop nav)
   ════════════════════════════════════════════════════════════════ */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--z-header);
}
@media (max-width: 1024px) { #site-header { position: static; } }

/* ════════════════════════════════════════════════════════════════
   TOP BAR — structure only, style in design pass
   ════════════════════════════════════════════════════════════════ */
.top-bar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.top-bar__item {
  display: flex;
  align-items: center;
}
.top-bar__item a { color: inherit; }
@media (max-width: 768px) { .top-bar { display: none; } }


/* ════════════════════════════════════════════════════════════════
   DESKTOP NAV — structure only, style in design pass
   ════════════════════════════════════════════════════════════════ */
.main-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* HARD RULE: logo min-width 100px */
.nav__logo img { width: auto; min-width: 100px; }

.nav__links {
  display: flex;
  align-items: center;
  list-style: none;
}
.nav__links > li > a {
  display: block;
  white-space: nowrap;
}

/* Desktop dropdowns — functional behavior
   HARD RULE: top:100% flush, never calc(100%+Npx). Use padding-top inside for visual gap. */
.main-nav .has-dropdown { position: relative; }
.main-nav .dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  opacity: 0;
  visibility: hidden;
  z-index: var(--z-dropdown);
  list-style: none;
  pointer-events: none;
  transition: opacity var(--transition-base), visibility var(--transition-base), transform var(--transition-base);
}
.main-nav .has-dropdown:hover .dropdown,
.main-nav .has-dropdown:focus-within .dropdown,
.main-nav .has-dropdown.kb-open .dropdown {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}
.main-nav .dropdown li a { display: block; }

/* Chevron rotation */
.dropdown-arrow {
  display: inline-block;
  vertical-align: middle;
  transition: transform var(--transition-base);
}
.main-nav .has-dropdown:hover .dropdown-arrow,
.main-nav .has-dropdown:focus-within .dropdown-arrow,
.main-nav .has-dropdown.kb-open .dropdown-arrow { transform: rotate(180deg); }

/* Hamburger — functional structure
   HARD RULE: min 48x48px, must have visible background + border (circle button) */
.nav__hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  min-width: 48px;
  min-height: 48px;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}
.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-base);
  transform-origin: center;
}
.nav__hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hide desktop nav on mobile */
@media (max-width: 1024px) {
  .main-nav { display: none; }
}


/* ════════════════════════════════════════════════════════════════
   MOBILE NAV — structure only, style in design pass
   ════════════════════════════════════════════════════════════════ */

/* Push page content below the fixed header — adjust values in design pass */
body { padding-top: 100px; }
body.has-hero { padding-top: 0; }
@media (max-width: 1024px) {
  body { padding-top: 64px; }
  body.has-hero { padding-top: 0; }
}

.mobile-nav { display: none; }
@media (max-width: 1024px) { .mobile-nav { display: block; } }

/* ── Fixed top bar ── */
.mobile-nav__bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: var(--z-header);
}
/* HARD RULE: logo min-width 100px */
.mobile-nav__logo img { width: auto; min-width: 100px; }

.mobile-nav__actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Phone button — HARD RULE: must show icon + phone number, bright/visible color */
.mobile-nav__phone-btn {
  display: flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}
.mobile-nav__phone-btn svg { flex-shrink: 0; }

/* ── Overlay ── */
.mobile-nav__overlay {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-header) + 1);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}
.mobile-nav__overlay.is-visible { opacity: 1; visibility: visible; }

/* ── Drawer ── */
.mobile-nav__drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(320px, 85vw);
  z-index: calc(var(--z-header) + 2);
  transform: translateX(100%);
  transition: transform var(--transition-slow);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-nav__drawer.is-open { transform: translateX(0); }

.mobile-nav__drawer-inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.mobile-nav__drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* HARD RULE: logo min-width 100px */
.mobile-nav__drawer-logo img { width: auto; min-width: 100px; }

.mobile-nav__close {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  flex-shrink: 0;
}

/* Drawer links */
.mobile-nav__links { list-style: none; flex: 1; }
.mobile-nav__links > li > a,
.mobile-nav__links > li > .mobile-dropdown-row .mobile-dropdown-label {
  display: block;
}

/* Dropdown row — HARD RULE: toggle separate from link, min 48x48px, visible bg + border */
.mobile-dropdown-row { display: flex; align-items: center; }
.mobile-dropdown-label { flex: 1; }
.mobile-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  flex-shrink: 0;
  cursor: pointer;
}
.mobile-dropdown-toggle svg { width: 18px; height: 18px; }
.mobile-dropdown-toggle .dropdown-arrow { margin-left: 0; transition: transform var(--transition-base); }
.mobile-has-dropdown.is-open .mobile-dropdown-toggle .dropdown-arrow { transform: rotate(180deg); }

/* Accordion sub-links */
.mobile-dropdown {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
  margin: 0;
}
.mobile-has-dropdown.is-open .mobile-dropdown { max-height: 600px; }
.mobile-dropdown li a { display: block; }

/* Drawer footer */
.mobile-nav__drawer-footer { display: flex; flex-direction: column; }

/* Prevent body scroll when drawer is open */
body.nav-open { overflow: hidden; }


/* ════════════════════════════════════════════════════════════════
   CHAT WIDGET — position bottom-right, clear of mobile nav bar
   ════════════════════════════════════════════════════════════════ */
.chad-widget-wrap {
  position: fixed;
  bottom: var(--space-5);
  right: var(--space-5);
  z-index: calc(var(--z-lightbox) - 1);
}
/* GHL typically renders the widget inside this wrapper or adds its own fixed element.
   The rule below ensures any GHL-injected fixed widget stays bottom-right on mobile. */
@media (max-width: 1024px) {
  /* Override GHL widget default position if needed — adjust selectors to match actual widget */
  [id*="chat-widget"],
  [class*="chat-widget"],
  [id*="hl-chat"],
  [class*="hl-chat"] {
    bottom: var(--space-5) !important;
    right: var(--space-5) !important;
    left: auto !important;
  }
}


/* ════════════════════════════════════════════════════════════════
   FOOTER — structure only, style in design pass
   ════════════════════════════════════════════════════════════════ */
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
}
/* HARD RULE: footer logo min-width 120px */
.footer__col--brand img { width: auto; min-width: 120px; }
.footer__phone { display: block; }
.footer__email { display: block; }
.footer__links { list-style: none; }
.footer__links a { display: block; }
.footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.footer__bottom nav { display: flex; align-items: center; }

@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom-inner { flex-direction: column; text-align: center; }
}


/* ════════════════════════════════════════════════════════════════
   HERO — structure only, style in design pass
   ════════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  width: 100%;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
}
/* Google Rating Badge — big G + stacked text */
.hero-google-badge {
  display: inline-flex;
  align-items: center;
}
.hero-google-badge svg { flex-shrink: 0; }
.hero-google-badge__text { display: flex; flex-direction: column; }
.hero-google-badge__stars { color: #FBBC05; }
.hero-google-badge a { color: inherit; text-decoration: none; }

/* HARD RULE: hero form fade-in prevents GHL iframe layout shift — do not remove */
.hero__form-wrap {
  opacity: 0;
  animation: formFadeIn 0.5s ease 0.4s forwards;
}
@keyframes formFadeIn { to { opacity: 1; } }

/* Small hero (inner pages) */
.hero--sm .hero__inner {
  grid-template-columns: 1fr;
  text-align: center;
}

@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__form-wrap { max-width: 560px; margin: 0 auto; }
}
@media (max-width: 768px) {
  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; justify-content: center; }
}


/* ════════════════════════════════════════════════════════════════
   TRUST STRIP — structure only, style in design pass
   ════════════════════════════════════════════════════════════════ */
.trust-strip__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.trust-strip__item {
  display: flex;
  align-items: center;
  white-space: nowrap;
}
.trust-strip__item svg,
.trust-strip__item img { flex-shrink: 0; }
@media (max-width: 768px) {
  .trust-strip__divider { display: none; }
}


/* ════════════════════════════════════════════════════════════════
   SERVICE CARDS — structure only, style in design pass
   ════════════════════════════════════════════════════════════════ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.service-card {
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.service-card__img-wrap {
  position: relative;
  overflow: hidden;
}
.service-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.service-card__body { flex: 1; display: flex; flex-direction: column; }
.service-card__link {
  display: inline-flex;
  align-items: center;
  margin-top: auto;
}

@media (max-width: 1024px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .services-grid { grid-template-columns: 1fr; } }


/* ════════════════════════════════════════════════════════════════
   PROCESS STEPS — structure only, style in design pass
   ════════════════════════════════════════════════════════════════ */
.process-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.process__number {
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .process-steps { grid-template-columns: 1fr; }
  .process__step { display: flex; align-items: flex-start; }
  .process__number { flex-shrink: 0; }
}


/* ════════════════════════════════════════════════════════════════
   PHOTO GALLERY — structure only, style in design pass
   ════════════════════════════════════════════════════════════════ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.gallery-item {
  display: block;
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery__hidden { display: none; }
.gallery__hidden.is-visible { display: contents; }

@media (max-width: 768px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .gallery-grid { grid-template-columns: 1fr; } }


/* ════════════════════════════════════════════════════════════════
   FAQ ACCORDION — structure only, style in design pass
   ════════════════════════════════════════════════════════════════ */
.faq__question {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  cursor: pointer;
}
.faq__chevron { flex-shrink: 0; transition: transform var(--transition-base); }
.faq__question[aria-expanded="true"] .faq__chevron { transform: rotate(180deg); }
.faq__answer[hidden] { display: none; }


/* ════════════════════════════════════════════════════════════════
   LIGHTBOX — functional UI, keep intact
   ════════════════════════════════════════════════════════════════ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-base);
}
.lightbox.is-open { pointer-events: auto; opacity: 1; }
.lightbox__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.92); }
.lightbox__container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  max-width: 90vw;
  max-height: 90vh;
}
.lightbox__img-wrap { display: flex; align-items: center; justify-content: center; }
.lightbox__img {
  max-width: 82vw;
  max-height: 85vh;
  object-fit: contain;
}
.lightbox__close { position: fixed; top: 1rem; right: 1.5rem; color: white; z-index: 1; }
.lightbox__prev,
.lightbox__next { color: white; flex-shrink: 0; }
.lightbox__counter { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,0.6); }

@media (max-width: 768px) {
  .lightbox__img { max-width: 95vw; }
}


/* ════════════════════════════════════════════════════════════════
   FINAL CTA SECTION — structure only, style in design pass
   ════════════════════════════════════════════════════════════════ */
.cta-section__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}
.cta-section__left { display: flex; flex-direction: column; }
.cta-section__phone { display: block; }
.cta-section__email { display: block; }
.cta-section__img-wrap { overflow: hidden; }
.cta-section__img-wrap img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 768px) {
  .cta-section__inner { grid-template-columns: 1fr; }
  .cta-section__img-wrap { display: none; }
}


/* ════════════════════════════════════════════════════════════════
   TEAM CARDS — structure only, style in design pass
   ════════════════════════════════════════════════════════════════ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.team-card__img-wrap { overflow: hidden; }
.team-card__img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 768px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .team-grid { grid-template-columns: 1fr; } }


/* ════════════════════════════════════════════════════════════════
   ABOUT SECTION — structure only, style in design pass
   ════════════════════════════════════════════════════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}
.about__img-wrap { overflow: hidden; }
.about__img-wrap img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 768px) { .about-grid { grid-template-columns: 1fr; } }


/* ════════════════════════════════════════════════════════════════
   THANK YOU PAGE — structure only, style in design pass
   ════════════════════════════════════════════════════════════════ */
.thank-you-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.thank-you__icon {
  display: flex;
  align-items: center;
  justify-content: center;
}
.thank-you__phone { display: block; }


/* ════════════════════════════════════════════════════════════════
   404 PAGE — structure only, style in design pass
   ════════════════════════════════════════════════════════════════ */
.error-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.error-page__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
