/* ===========================
   CSS Custom Properties
   =========================== */
:root {
  --green-dark: #1B3C2D;
  --green-mid: #2A7D5B;
  --green-light: #3A9D6B;
  --green-pale: #E8F5EE;
  --cream: #F7F3EE;
  --white: #FFFFFF;
  --text-dark: #1A1A1A;
  --text-mid: #555555;
  --text-light: #888888;
  --border: #E0DCD6;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  color: var(--text-dark);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button, input, select {
  font-family: inherit;
  font-size: inherit;
}

/* ===========================
   Utilities
   =========================== */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

.section-eyebrow {
  display: block;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--green-mid);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
  color: var(--green-dark);
}

.section-title--serif {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: 2.4rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-mid);
  font-size: 1.05rem;
  margin-bottom: 48px;
}

/* ===========================
   Buttons
   =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 12px 24px;
  font-size: 0.95rem;
  white-space: nowrap;
}

.btn--primary {
  background: #22664a;
  color: var(--white);
}

.btn--primary:hover {
  background: #1b543c;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--white {
  background: var(--white);
  color: var(--green-dark);
  font-weight: 700;
}

.btn--white:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
}

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

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

.btn--outline-white {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn--outline-white:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
}

.btn--large {
  padding: 16px 32px;
  font-size: 1rem;
  border-radius: var(--radius-sm);
}

/* ===========================
   LIVE RATE TICKER
   =========================== */
.rate-ticker {
  background: #0f0f2d;
}

.rate-ticker__track {
  display: flex;
  justify-content: center;
}

.rate-ticker__content {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 10px 24px;
}

.rate-ticker__label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #25a60d;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rate-ticker__label::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #25a60d;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

.rate-ticker__item {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
}

.rate-ticker__item strong {
  color: #25a60d;
  font-weight: 700;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ===========================
   NAV BAR
   =========================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(247, 243, 238, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.rate-ticker + .navbar {
  top: 0;
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--green-dark);
  white-space: nowrap;
}

.navbar__links {
  display: flex;
  gap: 32px;
}

.navbar__links a {
  font-weight: 500;
  color: var(--text-mid);
  transition: color 0.2s;
  font-size: 0.95rem;
}

.navbar__links a:hover {
  color: var(--green-dark);
}

/* Navbar Dropdown */
.navbar__dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.navbar__dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
  font-size: inherit;
  font-weight: 500;
  color: var(--text-mid);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color 0.2s;
}

.navbar__dropdown-toggle:hover {
  color: var(--green-dark);
}

.navbar__dropdown-toggle svg {
  transition: transform 0.2s;
}

.navbar__dropdown:hover .navbar__dropdown-toggle svg {
  transform: rotate(180deg);
}

.navbar__dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: -12px;
  min-width: 220px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.navbar__dropdown:hover .navbar__dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.navbar__dropdown-menu a {
  display: block;
  padding: 10px 20px;
  color: var(--text-mid);
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.navbar__dropdown-menu a:hover {
  background: var(--green-pale);
  color: var(--green-dark);
}

.navbar__right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.navbar__phone {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--green-dark);
  white-space: nowrap;
}

.navbar__phone:hover {
  color: var(--green-mid);
}

.navbar__cta {
  flex-shrink: 0;
}

.navbar__admin {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.4;
  transition: opacity 0.2s;
  margin-left: 4px;
}
.navbar__admin:hover {
  opacity: 0.8;
}

.navbar__mobile-phone,
.navbar__mobile-cta {
  display: none;
}

.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}

.navbar__hamburger span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--green-dark);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.navbar__hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.navbar__hamburger.active span:nth-child(2) {
  opacity: 0;
}

.navbar__hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===========================
   HERO — Two-column layout
   =========================== */
.hero {
  padding: 80px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero__bg-blob {
  position: absolute;
  top: -100px;
  right: -200px;
  width: 800px;
  height: 800px;
  background: radial-gradient(ellipse at center, rgba(200, 230, 210, 0.5) 0%, rgba(200, 230, 210, 0.15) 40%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero__content {
  text-align: left;
}

.hero__badge {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--green-mid);
  background: var(--green-pale);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 24px;
}

.hero__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 4.375rem;
  font-weight: 700;
  line-height: 1.12;
  color: #0f0f2d;
  margin-bottom: 20px;
}

.hero__subtitle {
  font-size: 1.05rem;
  color: var(--text-mid);
  line-height: 1.7;
  max-width: 460px;
  margin-bottom: 32px;
}

.hero__buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
}

.hero__cta-wide {
  width: 100%;
  max-width: 380px;
}

.hero__mini-stats {
  display: flex;
  gap: 24px;
}

.hero__mini-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-mid);
  font-weight: 500;
}

.hero__form-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-lg);
}

.hero__form-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 16px;
}

.hero__helper {
  display: block;
  font-size: 0.75rem;
  color: var(--text-mid);
  margin-top: 4px;
}

.hero__result {
  display: none;
  border-top: 1.5px solid var(--border);
  margin-top: 20px;
  padding-top: 20px;
}

.hero__result.active {
  display: block;
}

.hero__result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

.hero__result-label {
  font-size: 0.82rem;
  color: var(--text-mid);
  font-weight: 500;
}

.hero__result-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-dark);
}

.hero__result-value--hero {
  font-size: 1.5rem;
  color: var(--green-mid);
}

.hero__result-cta {
  width: 100%;
  text-align: center;
  margin-top: 8px;
}

.hero__result-message {
  display: none;
  border-top: 1.5px solid var(--border);
  margin-top: 20px;
  padding-top: 20px;
  font-size: 0.88rem;
  color: var(--text-mid);
  text-align: center;
}

.hero__result-message.active {
  display: block;
}

.hero__form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.form-group--full {
  grid-column: 1 / -1;
}

.form-group {
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 6px;
}

.form-group select,
.form-group input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text-dark);
  font-weight: 500;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
  font-size: 0.92rem;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23555' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-group select:focus,
.form-group input:focus {
  outline: none;
  border-color: var(--green-mid);
}

.hero__submit {
  grid-column: 1 / -1;
  margin-top: 4px;
}

/* ===========================
   RATES
   =========================== */
.rates {
  padding: 80px 0;
}

.rates__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.rate-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--border);
}

.rate-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.rate-card__badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--green-mid);
  background: var(--green-pale);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.rate-card__value {
  display: block;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--green-dark);
  line-height: 1.2;
  margin-bottom: 6px;
}

.rate-card__meta {
  display: block;
  font-size: 0.78rem;
  color: var(--text-light);
  margin-bottom: 16px;
}

.rate-card__link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green-mid);
  transition: color 0.2s;
}

.rate-card__link:hover {
  color: var(--green-dark);
}

/* ===========================
   HOW IT WORKS
   =========================== */
.how-it-works {
  padding: 80px 0;
  background: var(--white);
}

.steps__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.step-card {
  background: var(--cream);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  border-top: 3px solid var(--green-mid);
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.step-card__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--green-pale);
  color: var(--green-mid);
  font-size: 1.1rem;
  font-weight: 800;
  border-radius: 50%;
  margin-bottom: 16px;
}

.step-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 10px;
}

.step-card__text {
  color: var(--text-mid);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===========================
   CALCULATORS
   =========================== */
.calculators {
  padding: 80px 0;
  background: var(--cream);
}

.calculators__layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  margin-top: 8px;
}

/* Featured card (left) */
.calculators__featured {
  background: var(--green-dark);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
}

.calculators__featured-icon {
  margin-bottom: 20px;
}

.calculators__featured-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.calculators__featured-text {
  color: rgba(255,255,255,0.75);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 24px;
  flex-grow: 1;
}

.calculators__featured-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
  opacity: 0.9;
  transition: opacity 0.2s;
}

.calculators__featured-link:hover {
  opacity: 1;
}

/* Calculator card grid (right) */
.calculators__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.calc-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.calc-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.calc-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 6px;
}

.calc-card__text {
  font-size: 0.82rem;
  color: var(--text-mid);
  line-height: 1.5;
  margin-bottom: 12px;
}

.calc-card__link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--green-mid);
}

.calc-card--span {
  grid-column: 1 / -1;
}

/* ===========================
   STATS
   =========================== */
.stats {
  padding: 80px 0;
  background: #0a0e13;
  position: relative;
  overflow: hidden;
}

.stats__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 10%, rgba(15, 80, 80, 0.5) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 90%, rgba(245, 197, 24, 0.135) 0%, transparent 50%);
  pointer-events: none;
}

.stats__eyebrow {
  color: var(--green-light);
}

.stats__title {
  color: var(--white);
}

.stats__subtitle {
  color: rgba(255, 255, 255, 0.5);
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
  margin-bottom: 48px;
}

.stat {
  text-align: center;
  padding: 16px;
}

.stat__value {
  display: block;
  font-family: 'Manrope', var(--font);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--green-light);
  margin-bottom: 4px;
}

.stat__label {
  display: block;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.95rem;
  font-weight: 500;
}

/* Testimonials */
.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.testimonial-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 28px 24px;
}

.testimonial-card__stars {
  color: #f5c518;
  font-size: 0.85rem;
  letter-spacing: 3px;
  margin-bottom: 14px;
}

.testimonial-card__quote {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 20px;
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-card__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.testimonial-card__name {
  display: block;
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
}

.testimonial-card__location {
  display: block;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.78rem;
}

/* ===========================
   GUIDES
   =========================== */
.guides {
  padding: 80px 0;
  background: var(--white);
}

.guides__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.guide-card {
  background: var(--cream);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--border);
}

.guide-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.guide-card__icon {
  padding: 28px 24px 0;
  text-align: center;
}

.guide-card__body {
  padding: 20px 24px 28px;
}

.guide-card__tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-light);
  margin-bottom: 10px;
}

.guide-card__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--green-dark);
  margin-bottom: 10px;
  line-height: 1.4;
}

.guide-card__excerpt {
  color: var(--text-mid);
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.guide-card__link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green-mid);
  transition: color 0.2s;
}

.guide-card__link:hover {
  color: var(--green-dark);
}

/* ===========================
   LENDERS
   =========================== */
.lenders {
  padding: 80px 0;
}

.lenders__row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.lender-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-mid);
  white-space: nowrap;
}

/* ===========================
   BLOG
   =========================== */
.blog {
  padding: 80px 0;
  background: var(--white);
}

.blog__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ===========================
   CTA SECTION
   =========================== */
.cta-section {
  padding: 100px 0;
  background: #0a0e13;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 10%, rgba(15, 80, 80, 0.5) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 90%, rgba(245, 197, 24, 0.135) 0%, transparent 50%);
  pointer-events: none;
}

.cta-section__inner {
  position: relative;
  z-index: 1;
}

.cta-section__title {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 16px;
}

.cta-section__buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.cta-section__text {
  color: rgba(255,255,255,0.8);
  font-size: 1.1rem;
  margin-bottom: 32px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ===========================
   FOOTER
   =========================== */
.footer {
  background: #0a0e13;
  color: rgba(255,255,255,0.7);
  padding: 64px 0 0;
}

.footer__top {
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 60px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer__brand .navbar__logo {
  margin-bottom: 12px;
}

.footer__brand .navbar__logo span {
  color: var(--white);
  font-size: 1rem;
}

.footer__tagline {
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 280px;
}

.footer__links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.footer__col h4 {
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer__col a {
  display: block;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  padding: 4px 0;
  transition: color 0.2s;
}

.footer__col a:hover {
  color: var(--white);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
}

.footer__legal {
  display: flex;
  gap: 24px;
}

.footer__legal a {
  color: rgba(255,255,255,0.4);
  transition: color 0.2s;
}

.footer__legal a:hover {
  color: rgba(255,255,255,0.7);
}

/* ===========================
   ARTICLE (Blog Pages)
   =========================== */
.article {
  padding: 100px 0 80px;
  background: var(--cream);
}

.article__container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
}

.article__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.article__back,
.article__next {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--green-mid);
  transition: color 0.2s;
}

.article__back:hover,
.article__next:hover {
  color: var(--green-dark);
}

.article__header {
  margin-bottom: 48px;
  text-align: center;
}

.article__tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--green-mid);
  background: var(--green-pale);
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.article__title {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-style: italic !important;
  font-size: 2.6rem !important;
  font-weight: 700 !important;
  color: var(--green-dark) !important;
  line-height: 1.2;
  margin-bottom: 20px;
}

.article__meta {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-light);
}

.article__body {
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--text-dark);
}

.article__body p {
  margin-bottom: 24px;
}

.article__body h2 {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-style: italic !important;
  font-size: 1.6rem !important;
  font-weight: 700 !important;
  color: var(--green-dark) !important;
  margin-top: 48px;
  margin-bottom: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.article__body ul {
  margin-bottom: 24px;
  padding-left: 0;
  list-style: none;
}

.article__body li {
  margin-bottom: 14px;
  padding-left: 24px;
  position: relative;
  line-height: 1.7;
}

.article__body li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  background: var(--green-mid);
  border-radius: 50%;
}

.article__body strong {
  font-weight: 700;
  color: var(--green-dark);
}

.article__cta-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
  margin-top: 56px;
  box-shadow: var(--shadow-md);
}

.article__cta-box h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 10px;
}

.article__cta-box p {
  color: var(--text-mid);
  font-size: 0.95rem;
  margin-bottom: 24px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* ===========================
   HELOC CALCULATOR PAGE
   =========================== */
.heloc {
  padding: 100px 0 80px;
  background: var(--cream);
}

.heloc__nav {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.heloc__back {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--green-mid);
  transition: color 0.2s;
}

.heloc__back:hover {
  color: var(--green-dark);
}

.heloc__header {
  margin-bottom: 48px;
  text-align: center;
}

.heloc__tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--green-mid);
  background: var(--green-pale);
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.heloc__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1.2;
  margin-bottom: 16px;
}

.heloc__subtitle {
  color: var(--text-mid);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto;
}

.heloc__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: stretch;
}

.heloc__form-card {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.heloc__form-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 24px;
}

.heloc__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.heloc__helper {
  display: block;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 4px;
  line-height: 1.4;
}

.heloc__toggle {
  display: flex;
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: 4px;
  border: 1.5px solid var(--border);
}

.heloc__toggle-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: #ede8e1;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-dark);
  transition: all 0.2s;
  font-size: 0.9rem;
}

.heloc__toggle-btn.active {
  background: var(--white);
  color: var(--green-dark);
  box-shadow: var(--shadow-sm);
}

.heloc__toggle--three .heloc__toggle-btn {
  font-size: 0.8rem;
  padding: 10px 8px;
}

.heloc__toggle--four .heloc__toggle-btn {
  font-size: 0.78rem;
  padding: 10px 6px;
}

.heloc__toggle--six {
  flex-wrap: wrap;
  gap: 4px;
}

.heloc__toggle--six .heloc__toggle-btn {
  font-size: 0.75rem;
  padding: 9px 6px;
  flex: 1 1 auto;
  min-width: calc(33.33% - 4px);
}

.heloc__split-row {
  display: flex;
  gap: 12px;
}
.heloc__split-row .form-group {
  flex: 1;
  min-width: 0;
}

.heloc__results-card {
  background: var(--green-dark);
  color: var(--white);
  border-radius: var(--radius-xl);
  padding: 0;
}

.heloc__results-inner {
  position: sticky;
  top: 100px;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
}

.heloc__results-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 28px;
}

.heloc__result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}

.heloc__result-label {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.heloc__result-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
}

.heloc__result-value--highlight {
  font-size: 1.4rem;
  font-weight: 800;
  color: #E8F5EE;
}

.heloc__result-value--savings {
  color: #7FE08A;
}

.heloc__result-value--warning {
  color: #F5A623;
}

.heloc__helper--result {
  font-weight: 600;
  color: var(--text-dark);
  margin-top: 4px;
}

.renewal-savings-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 0 24px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.renewal-savings-hero__label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 4px;
}

.renewal-savings-hero__amount {
  font-size: 2.4rem;
  font-weight: 800;
  color: #7FE08A;
  line-height: 1.1;
}

.renewal-savings-hero__term {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
}

.heloc__result-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.heloc__result-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 12px;
  margin-top: 8px;
}

.heloc__result-label--bold {
  font-weight: 700;
}

.heloc__warning {
  background: rgba(255, 200, 50, 0.15);
  border: 1px solid rgba(255, 200, 50, 0.3);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-top: 16px;
  font-size: 0.85rem;
  color: #FFD866;
  line-height: 1.5;
}

.heloc__results-cta {
  width: 100%;
  margin-top: 28px;
}

.heloc__results-disclosure {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  margin-top: 16px;
  line-height: 1.4;
}

/* HELOC Educational Content */
.heloc-info {
  padding: 80px 0;
  background: var(--white);
}

.heloc-info__container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 40px;
}

.heloc-info__body {
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--text-dark);
}

.heloc-info__body p {
  margin-bottom: 24px;
}

.heloc-info__body h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-top: 48px;
  margin-bottom: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.heloc-info__body h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.heloc-info__body ul {
  margin-bottom: 24px;
  padding-left: 0;
  list-style: none;
}

.heloc-info__body li {
  margin-bottom: 14px;
  padding-left: 24px;
  position: relative;
  line-height: 1.7;
}

.heloc-info__body li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  background: var(--green-mid);
  border-radius: 50%;
}

.heloc-info__body strong {
  font-weight: 700;
  color: var(--green-dark);
}

/* ===========================
   MODAL
   =========================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 40px;
  max-width: 480px;
  width: 100%;
  margin: auto 0;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 20px;
  z-index: 1;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--text-light);
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.modal__close:hover {
  color: var(--text-dark);
}

.modal__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 8px;
  text-align: center;
}

.modal__subtitle {
  font-size: 0.92rem;
  color: var(--text-mid);
  margin-bottom: 28px;
  line-height: 1.5;
  text-align: center;
}

.modal__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.modal__submit {
  width: 100%;
  margin-top: 8px;
}

.modal__disclosure {
  font-size: 0.72rem;
  color: var(--text-light);
  line-height: 1.5;
  margin-top: 16px;
  text-align: center;
}

.broker-result {
  text-align: center;
  padding: 16px 0;
}

.broker-result__heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 6px;
}

.broker-result__subtext {
  font-size: 0.92rem;
  color: var(--text-mid);
  margin-bottom: 28px;
}

.broker-result__logo {
  max-width: 200px;
  max-height: 80px;
  margin: 0 auto 20px;
  object-fit: contain;
}

.broker-result__name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 8px;
}

.broker-result__info {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 0.88rem;
  color: var(--text-mid);
  margin-bottom: 24px;
}

.broker-result__cta {
  width: 100%;
}

/* Help Modal — Progress Bar */
.help-progress {
  background: var(--border);
  border-radius: 4px;
  height: 6px;
  margin-bottom: 28px;
  overflow: hidden;
}

.help-progress__fill {
  height: 100%;
  background: var(--green-mid);
  border-radius: 4px;
  transition: width 0.35s ease;
}

/* Help Modal — Loading Screen */
.help-loading {
  text-align: center;
  padding: 48px 0;
}

.help-loading__spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--green-mid);
  border-radius: 50%;
  margin: 0 auto 24px;
  animation: help-spin 0.8s linear infinite;
}

@keyframes help-spin {
  to { transform: rotate(360deg); }
}

.help-loading__text {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--green-dark);
}

/* Help Modal — Page Toggle */
.help-page {
  display: none;
}

.help-page.active {
  display: block;
}

@media (max-width: 480px) {
  .modal {
    padding: 28px 20px;
  }

  .modal__row {
    grid-template-columns: 1fr;
  }

  .broker-result__info {
    flex-direction: column;
    gap: 4px;
  }
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 1024px) {
  .hero__inner {
    gap: 40px;
  }

  .hero__title {
    font-size: 2.8rem;
  }

  .rates__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .guides__grid,
  .blog__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* Ticker */
  .rate-ticker__content {
    gap: 20px;
    padding: 8px 16px;
    font-size: 0.75rem;
  }

  .rate-ticker__label,
  .rate-ticker__item {
    font-size: 0.75rem;
  }

  /* Navbar */
  .navbar__links,
  .navbar__right {
    display: none;
  }

  .navbar__hamburger {
    display: flex;
  }

  .navbar__links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--cream);
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    z-index: 999;
  }

  .navbar__links.active .navbar__mobile-phone,
  .navbar__links.active .navbar__mobile-cta {
    display: block;
  }

  .navbar__mobile-phone {
    font-weight: 600;
    color: var(--green-dark);
    padding-top: 8px;
    border-top: 1px solid var(--border);
  }

  .navbar__mobile-cta {
    text-align: center;
  }

  /* Navbar Dropdown - mobile */
  .navbar__dropdown {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .navbar__dropdown-toggle {
    display: none;
  }

  .navbar__dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: none;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .navbar__dropdown-menu a {
    padding: 0;
    padding-left: 12px;
    font-size: inherit;
    color: var(--text-mid);
  }

  /* Hero */
  .hero {
    padding: 40px 0 48px;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero__content {
    text-align: center;
  }

  .hero__title {
    font-size: 2.4rem;
  }

  .hero__title br {
    display: none;
  }

  .hero__subtitle {
    margin: 0 auto 24px;
    font-size: 0.95rem;
  }

  .hero__badge {
    font-size: 0.75rem;
  }

  .hero__buttons {
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero__buttons .btn {
    width: 100%;
  }

  .hero__mini-stats {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .hero__form-card {
    padding: 20px;
  }

  .hero__form {
    grid-template-columns: 1fr;
  }

  /* Larger touch targets for form inputs on mobile */
  .form-group input,
  .form-group select {
    padding: 13px 14px;
    min-height: 44px;
  }

  /* Section titles */
  .section-title {
    font-size: 1.6rem;
  }

  .section-title--serif {
    font-size: 1.8rem;
  }

  /* Rates */
  .rates__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .rate-card {
    padding: 20px 16px;
  }

  .rate-card__value {
    font-size: 1.8rem;
  }

  .rate-card__meta {
    font-size: 0.7rem;
  }

  /* Steps */
  .steps__grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Calculators */
  .calculators__layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .calculators__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Stats */
  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .stat__value {
    font-size: 1.8rem;
  }

  .testimonials__grid {
    grid-template-columns: 1fr;
  }

  .testimonial-card {
    padding: 20px;
  }

  /* Articles */
  .article {
    padding: 80px 0 60px;
  }

  .article__container {
    padding: 0 20px;
  }

  .article__title {
    font-size: 1.8rem !important;
  }

  .article__body {
    font-size: 0.98rem;
  }

  .article__body h2 {
    font-size: 1.3rem !important;
    margin-top: 36px;
  }

  .article__cta-box {
    padding: 28px 20px;
  }

  /* Guides & Blog */
  .guides__grid {
    grid-template-columns: 1fr;
  }

  .blog__grid {
    grid-template-columns: 1fr;
  }

  /* Lenders */
  .lenders__row {
    gap: 20px 32px;
  }

  .lender-name {
    font-size: 0.92rem;
  }

  /* CTA */
  .cta-section {
    padding: 64px 0;
  }

  .cta-section__title {
    font-size: 1.8rem;
  }

  .cta-section__text {
    font-size: 0.95rem;
  }

  .cta-section__buttons {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .cta-section__buttons .btn {
    width: 100%;
    max-width: 300px;
  }

  /* Footer */
  .footer__top {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer__links {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  /* HELOC Calculator */
  .heloc { padding: 80px 0 60px; }
  .heloc__layout { grid-template-columns: 1fr; }
  .heloc__results-inner { position: static; }
  .heloc__title { font-size: 1.8rem; }
  .heloc__form-card { padding: 20px; }
  .heloc-info__container { padding: 0 20px; }
  .heloc-info__body { font-size: 0.98rem; }
  .heloc-info__body h2 { font-size: 1.3rem; margin-top: 36px; }

  /* Stack split-row on mobile */
  .heloc__split-row {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero__title {
    font-size: 2rem;
  }

  .hero__buttons .btn {
    padding: 14px 24px;
    font-size: 0.9rem;
  }

  .rate-ticker__content {
    gap: 14px;
    padding: 6px 12px;
  }

  .rate-ticker__label,
  .rate-ticker__item {
    font-size: 0.68rem;
  }

  .calculators__grid {
    grid-template-columns: 1fr;
  }

  .rates__grid {
    grid-template-columns: 1fr;
  }

  .rate-card {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .stat {
    padding: 20px 12px;
  }

  .stat__value {
    font-size: 1.5rem;
  }

  .lenders__row {
    gap: 16px 24px;
  }

  .lender-name {
    font-size: 0.82rem;
  }

  .footer__links {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .section-title--serif {
    font-size: 1.5rem;
  }

  .article__title {
    font-size: 1.5rem !important;
  }

  .article__body h2 {
    font-size: 1.15rem !important;
  }

  /* HELOC Calculator */
  .heloc__title { font-size: 1.5rem; }
  .heloc__results-inner { padding: 28px 20px; }
  .heloc-info__body h2 { font-size: 1.15rem; }

  .transfer-quiz__question .heloc__toggle { max-width: 100%; }

  /* 3-button toggles on small screens */
  .heloc__toggle--three .heloc__toggle-btn {
    font-size: 0.75rem;
    padding: 10px 6px;
  }

  /* Modal on small screens */
  .modal-overlay {
    padding: 16px;
  }

  .modal__title {
    font-size: 1.5rem;
  }

  .modal__form {
    gap: 12px;
  }
}

/* ===== Transfer Quiz ===== */
.transfer-quiz {
  text-align: center;
}
.transfer-quiz > p {
  max-width: 100%;
  margin-bottom: 28px;
}
.transfer-quiz__question {
  margin-bottom: 20px;
}
.transfer-quiz__question label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 0.95rem;
  color: var(--text-dark);
}
.transfer-quiz__question .heloc__toggle {
  max-width: 240px;
  margin: 0 auto;
}
.transfer-quiz__result {
  margin-top: 24px;
  padding: 24px;
  background: var(--green-pale);
  border-radius: 10px;
  border: 2px solid var(--green-mid);
  text-align: center;
}
.transfer-quiz__result h4 {
  font-size: 0.95rem;
  color: var(--text-mid);
  margin-bottom: 4px;
}
.transfer-quiz__result .result-type {
  font-size: 1.4rem;
  font-weight: 800;
  display: block;
  margin-bottom: 8px;
}
.transfer-quiz__result p {
  font-size: 0.92rem;
  color: var(--text-dark);
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}
