/* Global responsive hardening for all static pages */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

img,
video,
canvas,
svg,
iframe {
  max-width: 100%;
  height: auto;
}

table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

input,
select,
textarea,
button {
  max-width: 100%;
}

pre,
code,
a,
small,
span,
p,
h1,
h2,
h3,
h4,
h5,
h6,
li {
  overflow-wrap: anywhere;
  word-break: normal;
}

/* Keep common layout wrappers from forcing horizontal scroll */
.container,
section,
header,
main,
footer,
nav {
  max-width: 100%;
}

@media (max-width: 1024px) {
  .hero-bg,
  [class*="hero"] {
    background-position: center;
    background-size: cover;
  }
}

@media (max-width: 768px) {
  .dropdown-menu,
  .google-reviews-menu {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: 100%;
    max-width: 100%;
    box-shadow: none !important;
  }

  .nav-title {
    max-width: 65vw;
    font-size: clamp(0.95rem, 3.6vw, 1.15rem) !important;
  }

  .hero-text,
  h1 {
    font-size: clamp(1.4rem, 6vw, 2.2rem);
    line-height: 1.2;
  }
}

@media (max-width: 480px) {
  .cta-button,
  .btn,
  button,
  input[type="submit"],
  input[type="button"] {
    width: 100%;
  }
}

/* FAQ/accordion contrast guardrail: prevent unreadable same-color text/background */
.faq-item,
.accordion-item,
.faq-answer,
.accordion-content,
.suburb-dropdown-menu {
  background-color: #ffffff !important;
}

.faq-question,
.accordion-header,
.faq-answer,
.accordion-content,
.faq-question *,
.accordion-header *,
.faq-answer *,
.accordion-content *,
.suburb-dropdown-menu,
.suburb-dropdown-menu *,
.suburb-dropdown-menu a {
  color: #1f2937 !important;
}

/* Slightly larger header branding */
.nav-logo-container img,
header a img[src*="logo"] {
  height: 60px !important;
  width: auto !important;
  max-height: 60px;
  box-shadow: none !important;
}

@media (max-width: 768px) {
  .nav-logo-container img,
  header a img[src*="logo"] {
    height: 52px !important;
    max-height: 52px;
    box-shadow: none !important;
  }
}

/* Dark mode by default */
html {
  color-scheme: dark;
}

html.dark,
html.dark body {
  background-color: #0f131a !important;
  color: #e5e7eb !important;
}

html.dark h1,
html.dark h2,
html.dark h3,
html.dark h4,
html.dark h5,
html.dark h6 {
  color: #f9fafb !important;
}

html.dark p,
html.dark li,
html.dark span,
html.dark label,
html.dark small {
  color: #d1d5db !important;
}

html.dark section,
html.dark header,
html.dark footer,
html.dark nav,
html.dark main,
html.dark article,
html.dark aside,
html.dark form,
html.dark .area-card,
html.dark .card,
html.dark .dropdown-menu,
html.dark .mobile-dropdown-menu,
html.dark .suburb-dropdown,
html.dark .suburb-dropdown-menu {
  background-color: #141a22 !important;
  color: #e5e7eb !important;
}

html.dark a {
  color: #8ecbff !important;
}

html.dark .btn,
html.dark .cta-button,
html.dark button {
  color: #ffffff !important;
}

html.dark .faq-item,
html.dark .accordion-item,
html.dark .faq-answer,
html.dark .accordion-content,
html.dark .suburb-dropdown-menu {
  background-color: #1a212b !important;
}

html.dark .faq-question,
html.dark .accordion-header,
html.dark .faq-answer,
html.dark .accordion-content,
html.dark .faq-question *,
html.dark .accordion-header *,
html.dark .faq-answer *,
html.dark .accordion-content *,
html.dark .suburb-dropdown-menu,
html.dark .suburb-dropdown-menu *,
html.dark .suburb-dropdown-menu a {
  color: #e5e7eb !important;
}

/* Theme-based logo swapping */
html.dark img[src="logo.webp"],
html.dark img[src="/logo.webp"],
html.dark img[src="../logo.webp"],
html.dark img[src="../../logo.webp"],
html.dark img[src="../../../logo.webp"] {
  content: url("/ligh-logo.webp") !important;
}

html:not(.dark) img[src="logo.webp"],
html:not(.dark) img[src="/logo.webp"],
html:not(.dark) img[src="../logo.webp"],
html:not(.dark) img[src="../../logo.webp"],
html:not(.dark) img[src="../../../logo.webp"] {
  content: url("/dark-logo.webp") !important;
}

/* Home "How It Works" mobile layout hardening */
@media (max-width: 900px) {
  #how-it-works,
  #how-we-work {
    padding-top: 2.2rem !important;
    padding-bottom: 2.2rem !important;
  }

  #how-it-works h2,
  #how-we-work h2 {
    font-size: clamp(1.45rem, 6vw, 2rem) !important;
    line-height: 1.2 !important;
    margin-bottom: 0.85rem !important;
  }

  .process-steps-container {
    gap: 1.25rem !important;
  }

  .process-step-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.9rem !important;
    align-items: stretch !important;
    direction: ltr !important;
    padding: 1rem !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(20, 26, 34, 0.75);
  }

  .process-step-row .process-step-visual,
  .process-step-row .process-step-content {
    width: 100% !important;
    max-width: 100% !important;
    direction: ltr !important;
  }

  .process-step-row .process-step-content {
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-align: left !important;
  }

  .process-step-row .process-step-content span {
    font-size: 2.1rem !important;
    margin-bottom: 0.1rem !important;
    opacity: 0.25 !important;
  }

  .process-step-row .process-step-content h3 {
    font-size: 1.35rem !important;
    line-height: 1.25 !important;
    margin-bottom: 0.45rem !important;
  }

  .process-step-row .process-step-content p {
    font-size: 0.98rem !important;
    line-height: 1.55 !important;
  }
}
