/* ===========================================
   Mortgage site shared chrome
   Use on every page after style.css/responsive.css
   =========================================== */

:root {
  --mortgage-bg-top: #F9F7EF;
  --mortgage-bg-bottom: #FFFDF8;
  --mortgage-text: #102A43;
  --mortgage-muted: #546277;
  --mortgage-accent: #3BA268;
  --mortgage-accent-hover: #2f8655;
  --mortgage-dark: #0B3C5D;
  --mortgage-border: #E4E0D1;
  --mortgage-panel: #FFFFFF;
}

body {
  background: linear-gradient(180deg, var(--mortgage-bg-top) 0%, var(--mortgage-bg-bottom) 100%);
  color: var(--mortgage-text);
}

/* -------------------------------------------------
   Universal navbar
   Mirrors the working PMI stacking/dropdown method
   ------------------------------------------------- */

.navbar {
  background: linear-gradient(180deg, var(--mortgage-bg-top) 0%, var(--mortgage-bg-bottom) 100%) !important;
  box-shadow: 0 4px 16px rgba(16, 42, 67, 0.05);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  /* Keep dropdowns above hero/header imagery */
  position: relative;
  z-index: 10050;
  overflow: visible !important;
}

.navbar .navbar-collapse,
.navbar .navbar-nav,
.navbar .nav-item.dropdown {
  overflow: visible !important;
}

.navbar-brand img {
  height: 96px !important;
  width: auto;
  max-height: 100%;
}

.nav-link {
  font-family: 'Manrope', sans-serif;
  font-size: 22px !important;
  font-weight: 800;
  color: var(--mortgage-text) !important;
}

.nav-link:hover,
.nav-link:focus,
.nav-item.active > .nav-link {
  color: var(--mortgage-dark) !important;
}

/* Mortgages Explained / Market Health dropdowns */
.navbar .dropdown-menu {
  z-index: 10100 !important;
  min-width: 330px;
  margin-top: 0;
  padding: 0.4rem 0;
  background: #ffffff;
  border: 1px solid var(--mortgage-border);
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(16, 42, 67, 0.18);
  overflow: visible;
}

.navbar .dropdown-item {
  display: block;
  padding: 0.75rem 1rem;
  font-family: 'Manrope', sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--mortgage-text);
  background: #ffffff;
  white-space: normal;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
  color: var(--mortgage-dark);
  background: #f4f8f5;
}

.navbar .dropdown-item.active,
.navbar .dropdown-item:active {
  color: var(--mortgage-dark);
  background: #e8f4ec;
}

/* Same stacking protection used by the working PMI chrome */
.article-hero,
.explained-hero,
.topic-hero,
.mortgage-hero,
.market-health-hero,
.mortgage-market-health-hero,
.jumbotron,
.quote-hero {
  position: relative;
  z-index: 1;
}

/* Universal footer */
.site-footer {
  margin-top: 3rem;
  background: linear-gradient(135deg, #102A43, #153B59);
  color: rgba(255,255,255,0.94);
  border-top: 0;
  padding: 0;
}

.site-footer__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 2.25rem 1.25rem 1.15rem;
}

.site-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.9fr) minmax(220px, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.site-footer__brand-title,
.site-footer__title {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.site-footer__brand-title {
  font-size: clamp(1.75rem, 3vw, 2.3rem);
  line-height: 1.02;
  margin: 0 0 0.65rem;
}

.site-footer__title {
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
}

.site-footer p,
.site-footer li,
.site-footer a,
.site-footer small {
  font-family: 'Inter', sans-serif;
}

.site-footer__copy {
  margin: 0 0 0.9rem;
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.9);
}

.site-footer__micro {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.site-footer__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.94);
  font-size: 0.9rem;
  line-height: 1;
}

.site-footer__links,
.site-footer__contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.site-footer a {
  color: rgba(255,255,255,0.96);
  text-decoration: none;
  margin: 0;
}

.site-footer a:hover {
  color: #B8F0CC;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer__cta {
  padding: 1rem 1rem 1.05rem;
  border-radius: 18px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
}

.site-footer__cta-text {
  margin: 0 0 0.9rem;
  font-size: 0.98rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.9);
}

.site-footer__cta .btn {
  min-width: 0;
  font-size: 1rem;
  padding: 0.8rem 1.2rem;
}

.site-footer__bottom {
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  justify-content: space-between;
  align-items: center;
}

.site-footer__legal {
  margin: 0;
  font-size: 0.92rem;
  color: rgba(255,255,255,0.82);
}

.site-footer__legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

@media (max-width: 1200px) {
  .navbar-brand img {
    height: 84px !important;
  }

  .nav-link {
    font-size: 20px !important;
  }
}

@media (max-width: 991.98px) {
  .navbar .navbar-collapse {
    padding: 0.6rem 0 1rem;
  }

  .navbar .dropdown-menu {
    min-width: 0;
    width: auto;
    margin: 0 0.75rem 0.5rem;
    border-radius: 10px;
    box-shadow: none;
  }

  .site-footer__top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .navbar-brand img {
    height: 66px !important;
  }

  .nav-link {
    font-size: 18px !important;
  }

  .site-footer__inner {
    padding: 1.75rem 1rem 1rem;
  }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================
   NAVBAR MIGRATION COMPATIBILITY
   Mirrors the working PMI implementation.
   Remove only after every public page uses /includes/navbar.php.
   ========================================================== */
.navbar {
  position: relative;
  z-index: 10050;
  overflow: visible !important;
}

.navbar .navbar-collapse,
.navbar .navbar-nav,
.navbar .nav-item.dropdown {
  overflow: visible !important;
}

.navbar .dropdown-menu {
  z-index: 10100 !important;
}

.article-hero,
.explained-hero,
.topic-hero,
.mortgage-hero,
.market-health-hero,
.mortgage-market-health-hero,
.jumbotron,
.quote-hero {
  position: relative;
  z-index: 1;
}

