/* =============================================================================
   RWAddressâ¢ â main.css
   Shared styles: design tokens, reset, nav, buttons, footer, contact strip
   Loaded by: index.html, search.html, confirm.html, professionals.html,
              and all legal pages via css/legal.css import
   ============================================================================= */

/* ââ DESIGN TOKENS ââ */
:root {
  --blue:         #1F5FA6;
  --blue-dark:    #174D8A;
  --blue-light:   #EBF2FB;
  --blue-mid:     #D0E4F7;
  --text:         #333333;
  --text-muted:   #666666;
  --text-light:   #999999;
  --border:       #E0E0E0;
  --white:        #FFFFFF;
  --bg:           #FFFFFF;
  --bg-grey:      #F7F7F7;
  --max-width:    1080px;
  --max-width-legal: 860px;
}

/* ââ RESET ââ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
}

/* ââ NAV ââ */
nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* .nav-logo  = used in index.html and new pages
   .nav-brand = used in existing legal pages (legacy alias, do not remove) */
.nav-logo,
.nav-brand {
  font-size: 20px;
  font-weight: 700;
  color: var(--blue);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
}

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

/* Back link used on legal pages */
.nav-back {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 7px 16px;
  border-radius: 4px;
  transition: color 0.15s, border-color 0.15s;
}

.nav-back:hover {
  color: var(--blue);
  border-color: var(--blue);
}

/* ââ BUTTONS ââ */
.btn {
  display: inline-block;
  background: var(--blue);
  color: var(--white) !important;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 4px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

.btn:hover,
.btn:visited,
.btn:active {
  background: var(--blue-dark);
  color: var(--white) !important;
}

.btn-outline {
  background: transparent;
  color: var(--blue);
  border: 2px solid var(--blue);
}

.btn-outline:hover {
  background: var(--blue);
  color: var(--white);
}

.btn-lg {
  font-size: 16px;
  padding: 14px 36px;
  border-radius: 4px;
}

.btn-white {
  background: var(--white);
  color: var(--blue) !important;
  font-weight: 700;
}

.btn-white:hover {
  background: var(--blue-light);
  color: var(--blue-dark) !important;
}

/* ââ SHARED SECTION UTILITIES ââ */
.section {
  padding: 64px 40px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-grey {
  background: var(--bg-grey);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-grey .section {
  padding: 64px 40px;
}

.section h2 {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.section-sub {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 560px;
  font-weight: 300;
}

/* ââ CONTACT STRIP ââ */
.contact-strip {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 16px 40px;
  font-size: 13px;
  color: var(--text-light);
}

.contact-strip-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.contact-strip a {
  color: var(--text-muted);
  text-decoration: none;
}

.contact-strip a:hover {
  color: var(--blue);
}

/* ââ MAIN FOOTER (index + non-legal pages) ââ */
footer.site-footer {
  background: var(--bg-grey);
  border-top: 1px solid var(--border);
  padding: 36px 40px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--blue);
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--blue);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  font-size: 12px;
  color: var(--text-light);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ââ RESPONSIVE â SHARED ââ */
@media (max-width: 768px) {
  nav {
    padding: 0 20px;
  }

  .nav-links a:not(.btn) {
    display: none;
  }

  .section {
    padding: 48px 20px;
  }

  .section-grey .section {
    padding: 48px 20px;
  }

  .contact-strip {
    padding: 16px 20px;
  }

  .contact-strip-inner {
    flex-direction: column;
  }

  footer.site-footer {
    padding: 28px 20px;
  }

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-bottom {
    flex-direction: column;
  }
}
