/* ============================================================
   Atlantic Shores Financial — shared.css  (v2 — fully audited)
   ============================================================ */

:root { color-scheme: dark; }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  overflow-x: hidden;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
img { max-width: 100%; height: auto; }
a { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }

/* ══════════════════════════════════════
   NAV — definitive shared implementation
   ══════════════════════════════════════ */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  transition: background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
  border-bottom: 1px solid transparent;
}
#nav.scrolled {
  background: rgba(5,13,34,0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-color: rgba(255,255,255,0.07);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}
@media (max-width: 600px) { .nav-inner { padding: 0 1.25rem; } }

.nav-logo { display: flex; align-items: center; flex-shrink: 0; }
.nav-logo img { display: block; height: 34px; width: auto; }

/* Desktop nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.52);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-links a:hover { color: #ffffff; }

.nav-apply {
  padding: 0.6rem 1.3rem !important;
  background: linear-gradient(135deg, #3aa0f5, #2e8fd9) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border-radius: 6px;
  white-space: nowrap;
}
.nav-apply:hover { opacity: 0.9; color: #ffffff !important; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
  z-index: 901;
}
.nav-toggle span {
  width: 22px;
  height: 1.5px;
  background: rgba(255,255,255,0.88);
  display: block;
  transition: transform 0.28s ease, opacity 0.2s ease;
  transform-origin: center;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Extra drawer-only items — hidden on desktop */
.nav-divider   { display: none; }
.nav-extra     { display: none; }
.nav-cta-mobile { display: none !important; }

@media (max-width: 820px) {
  .nav-toggle { display: flex; }

  /* Hide desktop CTA pill */
  .nav-cta { display: none !important; }

  /* Full-screen drawer */
  .nav-links {
    position: fixed;
    top: 74px; left: 0; right: 0; bottom: 0;
    height: calc(100dvh - 74px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: rgba(5,13,34,0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 1.5rem 2.5rem 2rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    transform: translateY(-110%);
    transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
    z-index: 899;
  }
  .nav-links.open { transform: translateY(0); }

  .nav-links li {
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .nav-links li:last-child { border-bottom: none; }
  .nav-links a {
    display: block;
    padding: 1rem 0;
    color: rgba(255,255,255,0.88);
    font-size: 0.82rem;
  }

  /* Divider bar */
  .nav-divider {
    display: block !important;
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 0.75rem 0;
    list-style: none;
    border: none;
    padding: 0;
    width: 100%;
    border-bottom: none !important;
  }

  /* Extra links */
  .nav-extra { display: block !important; }
  .nav-extra a {
    text-transform: none !important;
    letter-spacing: 0.04em !important;
    font-size: 0.76rem !important;
    color: rgba(255,255,255,0.38) !important;
  }
  .nav-extra a:hover { color: rgba(255,255,255,0.72) !important; }

  /* Mobile CTA at bottom of drawer */
  .nav-cta-mobile {
    display: block !important;
    margin-top: 1.25rem !important;
    border-bottom: none !important;
  }
  .nav-cta-mobile a.nav-apply {
    display: block !important;
    text-align: center !important;
    padding: 1rem !important;
    border-radius: 6px !important;
    width: 100% !important;
  }
}

/* ══════════════════════════════════════
   REVEAL ANIMATION
   ══════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s cubic-bezier(0.16,1,0.3,1), transform 0.75s cubic-bezier(0.16,1,0.3,1);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }

/* ══════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════ */
.btn { min-height: 44px; }

/* ══════════════════════════════════════
   PAGE HERO (interior pages)
   ══════════════════════════════════════ */
.page-hero {
  padding: 10rem 0 5.5rem;
  position: relative;
  z-index: 2;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 90% at 80% 40%, rgba(10,32,80,0.55) 0%, transparent 70%);
  pointer-events: none;
}
@media (max-width: 820px) { .page-hero { padding: 8rem 0 4rem; } }
@media (max-width: 600px) {
  .page-hero { padding: 6.5rem 0 3rem; }
  .page-hero h1 { font-size: clamp(2rem, 7vw, 2.8rem) !important; }
}
@media (max-width: 480px) {
  .page-hero { padding: 5.5rem 0 2.5rem; }
  .page-hero h1 { font-size: clamp(1.75rem, 6.5vw, 2.2rem) !important; }
}

/* ══════════════════════════════════════
   PROGRAM PAGE LAYOUT
   ══════════════════════════════════════ */
.content { padding: 5.5rem 0 7rem; position: relative; z-index: 2; }
.layout { display: grid; grid-template-columns: 1fr 320px; gap: 4rem; align-items: start; }

@media (max-width: 960px) { .layout { grid-template-columns: 1fr; gap: 2.5rem; } }
@media (max-width: 600px) {
  .card { padding: 1.5rem 1.25rem !important; }
  .sidebar-card { padding: 1.4rem 1.1rem !important; }
  .content { padding: 3rem 0 4rem; }
  .bullet-list li { font-size: 0.84rem; }
}

/* Terms grid */
.terms-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.25rem; }
@media (max-width: 540px) { .terms-grid { grid-template-columns: 1fr; } }

/* Application page */
@media (max-width: 800px) { .app-layout { grid-template-columns: 1fr !important; gap: 2.5rem !important; } }
@media (max-width: 560px) {
  .frow { grid-template-columns: 1fr !important; }
  .form-block { padding: 1.75rem 1.25rem !important; }
  .app-section { padding: 3rem 0 4rem !important; }
}

/* ══════════════════════════════════════
   FOOTER — shared
   ══════════════════════════════════════ */
footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 4.5rem 0 2.5rem;
  position: relative;
  z-index: 2;
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 520px) { .footer-top { grid-template-columns: 1fr; gap: 1.5rem; } }

.fb-logo { height: 28px; width: auto; display: block; margin-bottom: 1.1rem; }
.fb-desc {
  font-size: 0.8rem;
  font-weight: 300;
  color: rgba(255,255,255,0.36);
  line-height: 1.85;
  max-width: 290px;
}
.fc-title {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(58,160,245,0.9);
  margin-bottom: 0.85rem;
}
.fc-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.fc-list a {
  font-size: 0.8rem;
  font-weight: 300;
  color: rgba(255,255,255,0.36);
  text-decoration: none;
  transition: color 0.18s;
  line-height: 1.6;
}
.fc-list a:hover { color: rgba(255,255,255,0.72); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
@media (max-width: 520px) { .footer-bottom { flex-direction: column; gap: 0.5rem; } }
.footer-legal {
  font-size: 0.63rem;
  font-weight: 300;
  color: rgba(255,255,255,0.18);
  line-height: 1.9;
  max-width: 640px;
}
.footer-copy {
  font-size: 0.63rem;
  font-weight: 300;
  color: rgba(255,255,255,0.18);
  white-space: nowrap;
}
.footer-trust {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
@media (max-width: 520px) { .footer-trust { flex-direction: column; gap: 1rem; align-items: flex-start; } }
.eho {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.62rem;
  color: rgba(255,255,255,0.24);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.eho svg { width: 20px; height: 20px; fill: rgba(255,255,255,0.24); flex-shrink: 0; }
.nmls-a { font-size: 0.62rem; color: rgba(255,255,255,0.24); }
.nmls-a a { color: rgba(255,255,255,0.35); text-decoration: none; }
.nmls-a a:hover { color: rgba(255,255,255,0.65); }

/* ══════════════════════════════════════
   MOBILE STICKY CTA BAR
   ══════════════════════════════════════ */
#mobile-cta {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 800;
  padding: 0.75rem 1.25rem calc(0.75rem + env(safe-area-inset-bottom));
  background: rgba(5,13,34,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,0.08);
  gap: 0.75rem;
}
.mcta {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity 0.2s;
}
.mcta.gold { background: linear-gradient(135deg, #3aa0f5, #2e8fd9); color: #fff; }
.mcta:not(.gold) {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.88);
  border: 1px solid rgba(255,255,255,0.12);
}
.mcta:hover { opacity: 0.88; }

@media (max-width: 820px) {
  #mobile-cta { display: flex; }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}

/* ══════════════════════════════════════
   ABOUT PAGE
   ══════════════════════════════════════ */
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr !important; gap: 2.5rem !important; }
  .founder-grid { grid-template-columns: 1fr !important; gap: 2.5rem !important; }
  .values-grid { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 540px) {
  .values-grid { grid-template-columns: 1fr !important; }
}

/* ══════════════════════════════════════
   TYPOGRAPHY SCALE (interior h2)
   ══════════════════════════════════════ */
@media (max-width: 600px) {
  h2 { font-size: clamp(1.4rem, 5vw, 1.9rem) !important; }
}

/* ══════════════════════════════════════
   LARGE DESKTOP (1600px+)
   ══════════════════════════════════════ */
@media (min-width: 1600px) {
  .container { max-width: 1440px !important; }
  .nav-inner { max-width: 1440px !important; }
  .page-hero { padding: 11rem 0 6rem; }
  .layout { gap: 6rem; }
  .content { padding: 7rem 0 9rem; }
  footer { padding: 6rem 0 3rem; }
}

/* ══════════════════════════════════════
   GOOGLE REVIEWS SECTION
   ══════════════════════════════════════ */
#google-reviews-section {
  position: relative;
  z-index: 2;
  padding: 0 0 5rem;
}
.reviews-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.reviews-rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 1rem 1.5rem;
}
.reviews-rating-num {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
  letter-spacing: -0.03em;
}
.reviews-stars {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.reviews-stars-row { display: flex; gap: 3px; }
.reviews-stars-row svg { width: 16px; height: 16px; fill: #3aa0f5; }
.reviews-count { font-size: 0.68rem; color: rgba(255,255,255,0.42); }
.google-badge-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.42);
  text-decoration: none;
  transition: color 0.2s;
}
.google-badge-link:hover { color: rgba(255,255,255,0.75); }
.google-badge-link svg { width: 16px; height: 16px; }

/* Live reviews grid */
.live-reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 900px) { .live-reviews-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 580px) { .live-reviews-grid { grid-template-columns: 1fr; } }

.live-review-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  transition: background 0.3s, transform 0.3s;
}
.live-review-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #3aa0f5, #1e7fd6);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
.live-review-card:hover { background: rgba(255,255,255,0.07); transform: translateY(-2px); }
.live-review-card:hover::before { transform: scaleX(1); }

.lrc-stars { display: flex; gap: 3px; margin-bottom: 1rem; }
.lrc-stars svg { width: 13px; height: 13px; fill: #3aa0f5; }
.lrc-text {
  font-size: 0.86rem;
  font-weight: 300;
  color: rgba(255,255,255,0.55);
  line-height: 1.8;
  margin-bottom: 1.25rem;
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lrc-author { display: flex; align-items: center; gap: 0.75rem; }
.lrc-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0a2050, #0d1c38);
  border: 1px solid rgba(58,160,245,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.62rem; font-weight: 700;
  color: #3aa0f5;
  flex-shrink: 0;
  overflow: hidden;
  line-height: 1;
  text-align: center;
}
.lrc-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.lrc-name { font-size: 0.8rem; font-weight: 600; color: rgba(255,255,255,0.88); }
.lrc-date { font-size: 0.66rem; color: rgba(255,255,255,0.28); margin-top: 1px; }

.reviews-loading {
  text-align: center;
  padding: 3rem;
  color: rgba(255,255,255,0.3);
  font-size: 0.85rem;
}
.reviews-error {
  text-align: center;
  padding: 2rem;
  color: rgba(255,255,255,0.25);
  font-size: 0.8rem;
}
.reviews-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #3aa0f5;
  text-decoration: none;
  transition: gap 0.25s;
}
.reviews-cta-link:hover { gap: 0.8rem; }
.reviews-cta-link svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2.5; fill: none; }