/* ===========================
   RESET & BASE
   =========================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  width: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* Color system aligned with landing page */
:root {
  --brand-blue: #0052cc;
  --brand-blue-deep: #003366;
  --accent: #f7931e;
  --text: #111111;
  --muted: #333333;
  --border: #e6e9ee;
  --bg: #ffffff;
  --bg-soft: #f7f7f7;
}

/* Base body typography & layout */
body {
  font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Main content container matches landing page */
main,
section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

/* ===========================
   HEADER & NAV (MATCH LANDING)
   =========================== */
header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

/* Inner nav row */
header nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
}

#sfhlogo {
  height: 40px;
  cursor: pointer;
  transition: transform 0.25s ease;
}

#sfhlogo:hover {
  transform: scale(1.05);
}

/* ===========================
   NAV LINKS
   =========================== */
.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--brand-blue-deep);
  font-weight: 500;
  font-size: 1rem;
  position: relative;
  transition: color 0.25s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.nav-links a:hover::after,
.nav-links a:focus::after {
  width: 100%;
}

/* ===========================
   HAMBURGER MENU (MOBILE)
   =========================== */
.hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5rem;
}

.hamburger-box {
  width: 24px;
  height: 18px;
  display: inline-block;
  position: relative;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
  width: 100%;
  height: 2px;
  background-color: var(--brand-blue-deep);
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.hamburger-inner {
  top: 50%;
  transform: translateY(-50%);
}

.hamburger-inner::before,
.hamburger-inner::after {
  content: "";
}

.hamburger-inner::before {
  top: -6px;
}

.hamburger-inner::after {
  top: 6px;
}

.hamburger.active .hamburger-inner {
  transform: rotate(45deg);
}

.hamburger.active .hamburger-inner::before {
  transform: rotate(90deg) translateX(6px);
}

.hamburger.active .hamburger-inner::after {
  opacity: 0;
}

/* Close button used on mobile overlay menu */
.mobile-menu-close {
  display: none;
  position: fixed;
  top: 12px;
  right: 16px;
  z-index: 1200;
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--brand-blue-deep);
}

/* ===========================
   HERO (GENERIC / NON-VIDEO)
   =========================== */
/* Used on non-landing pages that still reference this aria label */
section[aria-label="Solar Leads Introduction"] {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 60vh;
  padding: 5rem 1.5rem 4rem;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

section[aria-label="Solar Leads Introduction"] h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--brand-blue-deep);
}

.hero-sub {
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  color: var(--muted);
}

.hero-support {
  font-size: 1rem;
  margin: 2rem auto 0;
  max-width: 720px;
  color: var(--muted);
}

.cta-microcopy {
  font-size: 0.92rem;
  margin-top: 0.5rem;
  opacity: 0.9;
  color: #333;
}

.trust-strip {
  margin-top: 1.5rem;
}

.trust-strip p {
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--muted);
}

.trust-icons {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}

.trust-icons img {
  height: 26px;
}

/* ===========================
   BUTTONS (MATCH LANDING)
   =========================== */
.btn-primary,
.btn-secondary {
  border: none;
  border-radius: 0;
  padding: 1rem 2.25rem;
  font-weight: 600;
  display: inline-block;
  text-align: center;
  cursor: pointer;
  text-transform: none;
  box-shadow: none;
  font-size: 1rem;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus {
  background: #d67a00;
  color: #ffffff;
}

.btn-secondary {
  background: #ffffff;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background: var(--accent);
  color: #ffffff;
}

/* Used for tiny CTAs like in idle reminder */
.small-btn {
  padding: 0.6rem 1.2rem;
  font-size: 0.92rem;
}

/* ===========================
   HOW IT WORKS / CARD-STYLE
   =========================== */
section[aria-label="How SolarForHelp Works"] {
  text-align: left;
}

h3 {
  font-size: 2rem;
  color: var(--brand-blue-deep);
  text-align: left;
  margin-bottom: 1.25rem;
  font-weight: 600;
}

/* Support old class names as flat white cards */
.qualification-box,
.side-by-side-boxes article {
  background: #ffffff;
  padding: 2rem;
  border-radius: 0;
  border: 1px solid var(--border);
  text-align: left;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  width: 100%;
  max-width: 350px;
}

.qualification-box:hover,
.qualification-box:focus-within,
.side-by-side-boxes article:hover,
.side-by-side-boxes article:focus-within {
  background: #fafafa;
  transform: translateY(-2px);
  box-shadow: none;
}

.card-microcopy {
  font-size: 0.9rem;
  margin-top: 0.6rem;
  color: var(--muted);
  opacity: 0.9;
}

.side-by-side-boxes {
  display: flex;
  gap: 2rem;
  justify-content: center;
  width: 100%;
  max-width: 740px;
}

.side-by-side-boxes article {
  flex: 1;
  min-width: 0;
}

/* ===========================
   MID-PAGE CTA BANNER
   =========================== */
.cta-banner {
  background: var(--bg-soft);
  color: var(--text);
  text-align: center;
  border-radius: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  box-shadow: none;
  margin: 1rem auto 3rem;
  padding: 2.5rem 1.5rem;
}

.cta-banner h3 {
  color: var(--brand-blue-deep);
  text-align: center;
}

.inline-cta {
  color: var(--accent);
  font-weight: 600;
}

.inline-cta:hover {
  text-decoration: underline;
}

/* ===========================
   FAQ SECTION (FLAT)
   =========================== */
section[aria-label="Frequently Asked Questions"] {
  max-width: 900px;
  margin: 0 auto 3rem auto;
}

section[aria-label="Frequently Asked Questions"] details {
  background: #ffffff;
  padding: 1rem 1.25rem;
  border-radius: 0;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
  transition: background 0.25s ease;
}

section[aria-label="Frequently Asked Questions"] details[open] {
  background: #fafafa;
}

section[aria-label="Frequently Asked Questions"] summary {
  font-weight: 600;
  font-size: 1rem;
  color: var(--brand-blue-deep);
  outline: none;
  user-select: none;
}

section[aria-label="Frequently Asked Questions"] summary::-webkit-details-marker {
  display: none;
}

/* Keep simple – no + / − icons necessary; can be added via JS if needed */

/* ===========================
   BRIDGE LINE & CLOSING CTA
   =========================== */
.section-bridge {
  text-align: left;
  margin-top: 1rem;
  font-size: 1rem;
}

.closing-cta {
  text-align: center;
  margin: 0 auto 1rem;
  padding: 2.5rem 1.5rem;
  background: #ffffff;
  border-radius: 0;
  border: 1px solid var(--border);
  box-shadow: none;
}

.closing-cta h3 {
  margin-bottom: 0.75rem;
  text-align: center;
}

/* ===========================
   FOOTER (FLAT, LIGHT)
   =========================== */
footer {
  background: #ffffff;
  border-top: 1px solid var(--border);
  color: #333333;
}

footer a {
  color: #333333;
  transition: color 0.3s ease;
}

footer a:hover {
  color: var(--brand-blue-deep) !important;
  text-decoration: underline;
}

.footer-logo img {
  transition: transform 0.3s ease;
}

.footer-logo:hover img {
  transform: scale(1.05);
}

/* Footer link underline animation */
.footer-link {
  position: relative;
  display: inline-block;
  transition: all 0.3s ease;
}

.footer-link::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  background: var(--accent);
  left: 0;
  bottom: -3px;
  transition: width 0.3s ease;
}

.footer-link:hover::after {
  width: 100%;
}

/* Social icons subtle hover */
.social-icon {
  display: inline-block;
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.social-icon:hover {
  transform: scale(1.1);
}

/* ===========================
   BACK TO TOP BUTTON
   =========================== */
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease, background 0.25s ease;
  z-index: 1000;
}

#backToTop.show {
  opacity: 1;
  visibility: visible;
}

#backToTop:hover {
  background-color: #d67a00;
}

/* ===========================
   ANIMATIONS – FADE IN
   =========================== */
.fade-in-section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}

.fade-in-section.visible {
  opacity: 1;
  transform: none;
}

/* ===========================
   UTILITY "USEFUL LINKS" SECTION (LEGACY)
   =========================== */
section[aria-label="Useful Links"] {
  background: var(--brand-blue-deep);
  color: #ffffff;
  padding: 3rem 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  max-width: 100%;
}

section[aria-label="Useful Links"] a {
  color: #ffd700;
  text-decoration: none;
  margin: 0 0.5rem;
  font-weight: 600;
}

section[aria-label="Useful Links"] a:hover,
section[aria-label="Useful Links"] a:focus {
  color: #ffffff;
  text-decoration: underline;
}

/* ===========================
   EXIT INTENT MODAL (FLAT)
   =========================== */
.exit-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 2000;
}

.exit-modal.show {
  opacity: 1;
  visibility: visible;
}

.exit-modal-content {
  background: #ffffff;
  color: #111111;
  padding: 2.25rem 2rem;
  max-width: 520px;
  text-align: center;
  border-radius: 0;
  border: 1px solid var(--border);
  position: relative;
}

.exit-modal-content h2 {
  color: var(--brand-blue-deep);
  font-weight: 700;
  margin-bottom: 1rem;
}

.exit-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: 0;
  font-size: 1.8rem;
  color: #555555;
  cursor: pointer;
}

/* ===========================
   IDLE REMINDER (FLAT BANNER)
   =========================== */
.idle-reminder {
  position: fixed;
  bottom: 25px;
  right: 25px;
  max-width: 320px;
  background: #ffffff;
  color: #111111;
  border: 1px solid var(--border);
  padding: 1rem 1.25rem;
  box-shadow: none;
  border-radius: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  z-index: 1800;
}

.idle-reminder.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.idle-reminder p {
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.idle-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: 0;
  font-size: 1.2rem;
  color: #555555;
  cursor: pointer;
}

/* ===========================
   RESPONSIVE STYLES
   =========================== */
@media (max-width: 768px) {
  header nav {
    padding: 0.75rem 1.25rem;
  }

  .hamburger {
    display: inline-block;
  }

  /* Mobile dropdown menu (sheet) */
  .nav-links {
    position: absolute;
    top: 100%;
    right: 1.5rem;
    flex-direction: column;
    gap: 1rem;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: none;
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
    max-width: 260px;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    color: var(--brand-blue-deep);
  }

  main,
  section {
    padding: 3rem 1.25rem;
  }

  section[aria-label="Solar Leads Introduction"] {
    padding: 4rem 1.25rem 3rem;
    min-height: auto;
  }

  .side-by-side-boxes {
    flex-direction: column;
    align-items: center;
    max-width: 350px;
  }

  .qualification-box,
  .side-by-side-boxes article {
    max-width: 100%;
    width: 100%;
  }

  .social-icons {
    justify-content: center !important;
  }

  .mobile-menu-close {
    display: block;
  }

  #sfhlogo {
    height: 40px;
  }

  .idle-reminder {
    right: 10px;
    left: 10px;
    bottom: 15px;
    max-width: none;
  }
}

@media (min-width: 769px) {
  .nav-links {
    position: static;
    flex-direction: row;
    background: transparent;
    transform: none;
    opacity: 1;
    pointer-events: all;
    padding: 0;
  }

  .mobile-menu-close {
    display: none !important;
  }
}

/* Fix: prevent sticky header overlapping hero title on mobile */
@media (max-width: 768px) {
  header { 
    position: sticky; 
    top: 0; 
    z-index: 9999;
  }

  .hero-video-section {
    /* make sure hero starts BELOW the header */
    margin-top: 0 !important;
    padding-top: 6.5rem; /* adjust if needed (try 6rem–7.5rem) */
  }

  /* optional: tighten hero centering so text isn’t pushed down too far */
  .hero-video-section {
    align-items: flex-start;
  }
  .hero-content {
    padding-top: 1.5rem;
  }
}

/* --- Fix iOS/Safari hero clipping (top + bottom) --- */

/* Adjust this if your header is taller/shorter */
:root { --header-h: 96px; }

.hero-video-section{
  margin: 0 !important;                 /* no white band */
  width: 100% !important;
  max-width: 100% !important;

  /* IMPORTANT: stop fixed height clipping */
  height: auto !important;
  min-height: calc(100svh - var(--header-h)); /* stable viewport on iOS */
  overflow: hidden;                      /* keep for video crop */
  padding-top: calc(var(--header-h) + 16px) !important;
  padding-bottom: 72px !important;       /* prevents bottom cut-off */
  display: flex;
  align-items: center;
}

/* If the content is still tight on smaller phones */
@media (max-width: 480px){
  .hero-video-section{
    padding-bottom: 96px !important;
  }
}

