/* ============================================================
   RENEGADE HOME MORTGAGE — Design Tokens & Component Styles
   Art Direction: Dark Patriotic — Navy, Red, White
   ============================================================ */

/* --- Type Scale (fluid clamp) --- */
:root {
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);

  /* Spacing (4px base) */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;

  /* Fonts */
  --font-display: 'Zodiak', 'Georgia', serif;
  --font-body: 'Inter', 'Helvetica Neue', sans-serif;

  /* Brand Colors (constant) */
  --brand-navy: #1D3857;
  --brand-red: #E63946;
  --brand-red-hover: #CF2F3C;
  --brand-red-active: #B82633;
}

/* --- DARK MODE (default) --- */
:root, [data-theme="dark"] {
  --color-bg:             #0D1117;
  --color-surface:        #161B22;
  --color-surface-2:      #1C2333;
  --color-surface-offset: #121820;
  --color-divider:        rgba(255,255,255,0.08);
  --color-border:         rgba(255,255,255,0.1);

  --color-text:           #F0F0F0;
  --color-text-muted:     #9CA3AF;
  --color-text-faint:     #6B7280;
  --color-text-inverse:   #0D1117;

  --color-primary:        #E63946;
  --color-primary-hover:  #CF2F3C;
  --color-primary-active: #B82633;
  --color-primary-light:  rgba(230, 57, 70, 0.12);

  --color-accent:         #1D3857;
  --color-accent-hover:   #264A72;
  --color-accent-light:   rgba(29, 56, 87, 0.25);

  --color-secondary:      #1D3857;

  --color-success:        #34D399;
  --color-error:          #F87171;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);

  --header-bg: rgba(13, 17, 23, 0.92);
}

/* --- LIGHT MODE --- */
[data-theme="light"] {
  --color-bg:             #FAFAFA;
  --color-surface:        #F0F0F0;
  --color-surface-2:      #FFFFFF;
  --color-surface-offset: #E8E8E8;
  --color-divider:        #D4D4D8;
  --color-border:         #C4C4CC;

  --color-text:           #1A1A2E;
  --color-text-muted:     #52525B;
  --color-text-faint:     #A1A1AA;
  --color-text-inverse:   #FFFFFF;

  --color-primary:        #E63946;
  --color-primary-hover:  #CF2F3C;
  --color-primary-active: #B82633;
  --color-primary-light:  rgba(230, 57, 70, 0.08);

  --color-accent:         #1D3857;
  --color-accent-hover:   #264A72;
  --color-accent-light:   rgba(29, 56, 87, 0.08);

  --color-secondary:      #1D3857;

  --color-success:        #16A34A;
  --color-error:          #DC2626;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);

  --header-bg: rgba(250, 250, 250, 0.92);
}

/* ============================================================
   LAYOUT
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container--narrow {
  max-width: var(--content-default);
}

.section {
  padding-block: clamp(var(--space-12), 8vw, var(--space-24));
}

.section--sm {
  padding-block: clamp(var(--space-8), 5vw, var(--space-16));
}

/* ============================================================
   HEADER
   ============================================================ */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-divider);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header--hidden {
  transform: translateY(-100%);
}

.header--scrolled {
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-4);
  gap: var(--space-4);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
  flex-shrink: 0;
}

.header__logo svg {
  width: 40px;
  height: 40px;
}

.header__logo-img {
  height: 44px;
  width: auto;
  display: block;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

/* Dark mode: show white logo, hide blue */
.header__logo-img--dark {
  display: block;
}
.header__logo-img--light {
  display: none;
}

[data-theme="light"] .header__logo-img--dark {
  display: none;
}
[data-theme="light"] .header__logo-img--light {
  display: block;
}

.header__logo-text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.1;
  color: var(--color-text);
}

.header__logo-text span {
  display: block;
  font-size: var(--text-xs);
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

.header__nav {
  display: none;
}

.header__nav ul {
  display: flex;
  list-style: none;
  gap: var(--space-6);
  align-items: center;
}

.header__nav a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  position: relative;
}

.header__nav a:hover,
.header__nav a.active {
  color: var(--color-text);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
}

.theme-toggle:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

/* Mobile menu */
.mobile-menu-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
}

.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  top: 73px;
  z-index: 49;
  background: var(--color-bg);
  padding: var(--space-8) var(--space-6);
}

.mobile-nav.active {
  display: block;
}

.mobile-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.mobile-nav a {
  display: block;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-lg);
  font-family: var(--font-display);
  color: var(--color-text);
  text-decoration: none;
  border-radius: var(--radius-md);
}

.mobile-nav a:hover,
.mobile-nav a.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.mobile-nav .btn {
  margin-top: var(--space-4);
  display: block;
  text-align: center;
}

@media (min-width: 768px) {
  .header__nav {
    display: block;
  }
  .mobile-menu-btn {
    display: none;
  }
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--transition-interactive);
  cursor: pointer;
  border: none;
}

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

.btn--primary:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 4px 20px rgba(230, 57, 70, 0.35);
}

.btn--secondary {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}

.btn--secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-light);
}

.btn--accent {
  background: var(--brand-navy);
  color: #fff;
}

.btn--accent:hover {
  background: var(--color-accent-hover);
}

.btn--sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}

.btn--lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  position: relative;
  padding-block: clamp(var(--space-16), 12vw, var(--space-32));
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(160deg,
    #0D1117 0%,
    #111827 40%,
    #0F1A2E 100%
  );
}

[data-theme="light"] .hero__bg {
  background: linear-gradient(160deg,
    #F0F0F0 0%,
    #FAFAFA 40%,
    #E8EDF2 100%
  );
}

.hero__bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 85%, rgba(230, 57, 70, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 85% 15%, rgba(29, 56, 87, 0.12) 0%, transparent 50%);
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  background: rgba(230, 57, 70, 0.12);
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-6);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid rgba(230, 57, 70, 0.2);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-6);
  line-height: 1.05;
}

.hero h1 em {
  color: var(--color-primary);
  font-style: normal;
}

.hero p {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
  max-width: 560px;
}

.hero__actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: all var(--transition-interactive);
}

.card:hover {
  box-shadow: 0 4px 20px rgba(230, 57, 70, 0.08);
  border-color: rgba(230, 57, 70, 0.2);
}

.card--link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}

.card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.card__text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

.card__tag {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: 500;
  border-radius: var(--radius-sm);
  margin-top: var(--space-4);
}

/* ============================================================
   GRID LAYOUTS
   ============================================================ */

.grid {
  display: grid;
  gap: var(--space-6);
}

.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================
   STATS
   ============================================================ */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-6);
  padding-block: var(--space-8);
}

.stat {
  text-align: center;
}

.stat__number {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

.stat__label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
}

/* ============================================================
   SECTION HEADINGS
   ============================================================ */

.section-header {
  margin-bottom: var(--space-10);
}

.section-header--center {
  text-align: center;
}

.section-header__label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-3);
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.section-header p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 600px;
}

.section-header--center p {
  margin-inline: auto;
}

/* ============================================================
   TESTIMONIAL
   ============================================================ */

.testimonial {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  position: relative;
}

.testimonial::before {
  content: '\201C';
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 6rem);
  color: var(--color-primary);
  opacity: 0.2;
  position: absolute;
  top: var(--space-4);
  left: var(--space-6);
  line-height: 1;
}

.testimonial__text {
  font-size: var(--text-base);
  color: var(--color-text);
  font-style: italic;
  margin-bottom: var(--space-4);
  position: relative;
}

.testimonial__author {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

.testimonial__role {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ============================================================
   CTA BAND
   ============================================================ */

.cta-band {
  background: linear-gradient(135deg, var(--brand-navy), #264A72);
  color: #FFFFFF;
  padding: clamp(var(--space-10), 6vw, var(--space-16));
  border-radius: var(--radius-xl);
  text-align: center;
  border: 1px solid rgba(255,255,255,0.1);
}

.cta-band h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-3);
  color: inherit;
}

.cta-band p {
  font-size: var(--text-base);
  opacity: 0.85;
  margin-bottom: var(--space-6);
  max-width: 500px;
  margin-inline: auto;
  color: inherit;
}

.cta-band .btn {
  background: var(--brand-red);
  color: #FFFFFF;
}

.cta-band .btn:hover {
  background: var(--brand-red-hover);
  box-shadow: 0 4px 20px rgba(230, 57, 70, 0.4);
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-divider);
  padding-block: var(--space-12);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

@media (min-width: 768px) {
  .footer__inner {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer__logo-img {
  height: 36px;
  width: auto;
  display: block;
  margin-bottom: var(--space-3);
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.footer__brand p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-3);
  max-width: 280px;
}

.footer__col h4 {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.footer__col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer__col a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}

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

.footer__bottom {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
}

.footer__bottom p,
.footer__bottom a {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.footer__bottom a {
  text-decoration: none;
}

.footer__bottom a:hover {
  color: var(--color-primary);
}

.footer__legal {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-4);
  line-height: 1.7;
  max-width: none;
  text-align: left;
  width: 100%;
}

.footer__legal p,
.footer__powered p {
  max-width: none;
}

/* ============================================================
   NEIGHBORHOOD / CONTENT PAGES
   ============================================================ */

.page-hero {
  padding-block: clamp(var(--space-12), 8vw, var(--space-20));
  background: linear-gradient(160deg,
    var(--color-bg) 0%,
    var(--color-surface) 100%
  );
  border-bottom: 1px solid var(--color-divider);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.page-hero p {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 640px;
}

.breadcrumb {
  display: flex;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

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

.breadcrumb a:hover {
  color: var(--color-primary);
}

.breadcrumb span {
  color: var(--color-text-faint);
}

/* Neighborhood cards */
.neighborhood {
  scroll-margin-top: 100px;
  padding-block: var(--space-8);
  border-bottom: 1px solid var(--color-divider);
}

.neighborhood:last-child {
  border-bottom: none;
}

.neighborhood__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.neighborhood h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text);
}

.neighborhood__price {
  font-size: var(--text-sm);
  color: var(--color-primary);
  font-weight: 600;
}

.neighborhood__map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-6);
  border: 1px solid var(--color-divider);
}

.neighborhood__map img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 5;
  object-fit: cover;
}

.neighborhood__details {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 640px) {
  .neighborhood__details {
    grid-template-columns: 2fr 1fr;
  }
}

.neighborhood__description {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
}

.neighborhood__meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.neighborhood__meta-item {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.neighborhood__meta-item strong {
  color: var(--color-text);
  display: block;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-1);
}

.neighborhood__programs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.neighborhood__programs a {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(230, 57, 70, 0.15);
}

.neighborhood__programs a:hover {
  background: var(--color-primary);
  color: #FFFFFF;
}

/* Table of contents for neighborhoods */
.toc {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-8);
}

.toc h2 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-4);
}

.toc ul {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
}

@media (min-width: 640px) {
  .toc ul {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .toc ul {
    grid-template-columns: repeat(3, 1fr);
  }
}

.toc a {
  font-size: var(--text-sm);
  color: var(--color-primary);
  text-decoration: none;
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  display: block;
}

.toc a:hover {
  background: var(--color-primary-light);
}

/* ============================================================
   BLOG
   ============================================================ */

.blog-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-interactive);
}

.blog-card:hover {
  box-shadow: 0 4px 20px rgba(230, 57, 70, 0.08);
  border-color: rgba(230, 57, 70, 0.2);
}

.blog-card__image {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, rgba(29, 56, 87, 0.3), rgba(230, 57, 70, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-card__image svg {
  width: 48px;
  height: 48px;
  color: var(--color-primary);
  opacity: 0.4;
}

.blog-card__body {
  padding: var(--space-6);
}

.blog-card__date {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-bottom: var(--space-2);
}

.blog-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.blog-card__title a {
  color: var(--color-text);
  text-decoration: none;
}

.blog-card__title a:hover {
  color: var(--color-primary);
}

.blog-card__excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-4);
}

.blog-card__link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
}

.blog-card__link:hover {
  color: var(--color-primary-hover);
}

/* Article */
.article {
  max-width: 720px;
  margin-inline: auto;
}

.article__meta {
  display: flex;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.article h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text);
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
}

.article h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.article p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-4);
}

.article ul, .article ol {
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
}

.article li {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-2);
}

.article blockquote {
  border-left: 3px solid var(--color-primary);
  padding-left: var(--space-6);
  margin-block: var(--space-6);
  font-style: italic;
  color: var(--color-text);
}

.article a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ============================================================
   FAQ
   ============================================================ */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.faq-item {
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-item__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  text-align: left;
  background: var(--color-surface);
  cursor: pointer;
  gap: var(--space-4);
}

.faq-item__question:hover {
  background: var(--color-surface-2);
}

.faq-item__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.faq-item.active .faq-item__icon {
  transform: rotate(180deg);
}

.faq-item__answer {
  display: none;
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  background: var(--color-bg);
}

.faq-item.active .faq-item__answer {
  display: block;
}

/* ============================================================
   CONTACT FORM
   ============================================================ */

.form-group {
  margin-bottom: var(--space-5);
}

.form-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  font-size: var(--text-base);
  color: var(--color-text);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

/* ============================================================
   PROGRAMS TABLE
   ============================================================ */

.program-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  margin-block: var(--space-8);
}

.program-table {
  min-width: 700px;
}

.program-table th {
  background: var(--color-surface);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: var(--space-3) var(--space-4);
  text-align: left;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-divider);
}

.program-table td {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-divider);
}

.program-table tr:last-child td {
  border-bottom: none;
}

.program-table tr:hover td {
  background: var(--color-surface);
}

/* Program sections */
.program-section {
  scroll-margin-top: 100px;
  padding-block: var(--space-8);
  border-bottom: 1px solid var(--color-divider);
}

.program-section:last-child {
  border-bottom: none;
}

.program-section h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.program-section__subtitle {
  font-size: var(--text-sm);
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: var(--space-4);
}

.program-section p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-4);
}

.program-section ul {
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
}

.program-section li {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
  line-height: 1.6;
}

/* ============================================================
   ABOUT
   ============================================================ */

/* About page — grid layout */
.about-intro {
  display: grid;
  gap: var(--space-8);
  align-items: start;
  margin-bottom: var(--space-8);
}

@media (min-width: 768px) {
  .about-intro {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-10);
  }
}

.about-intro__photo img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-divider);
}

.about-intro__text h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
}

.about-intro__text p,
.about-body p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.75;
  margin-bottom: var(--space-4);
}

.about-intro__text p:last-child,
.about-body p:last-child {
  margin-bottom: 0;
}

.about-body {
  display: grid;
  gap: var(--space-8);
}

@media (min-width: 768px) {
  .about-body {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-10);
  }
}

.about-credentials {
  margin-top: var(--space-4);
  padding: var(--space-5);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-primary);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.value-card {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
}

.value-card__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: var(--radius-sm);
}

.value-card__content h3 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.value-card__content p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ============================================================
   COMMUNITY LINK
   ============================================================ */

.community-band {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.community-band__icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-light);
  color: #5B93D1;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  overflow: hidden;
}

.community-band__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.community-band__content {
  flex: 1;
  min-width: 200px;
}

.community-band__content h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.community-band__content p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ============================================================
   CONTACT INFO
   ============================================================ */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.contact-item {
  display: flex;
  gap: var(--space-4);
}

.contact-item__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: var(--radius-md);
}

.contact-item__text h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.contact-item__text p, .contact-item__text a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}

.contact-item__text a:hover {
  color: var(--color-primary);
}

/* Map placeholder */
.map-placeholder {
  aspect-ratio: 16/9;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-faint);
  font-size: var(--text-sm);
  margin-top: var(--space-6);
}

/* Booking embed */
.booking-embed {
  max-width: 52rem;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-divider);
}

.booking-embed iframe {
  display: block;
  background: #fff;
}

/* ============================================================
   SCROLL REVEAL ANIMATION
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   UTILITIES
   ============================================================ */

.text-center { text-align: center; }
.text-primary { color: var(--color-primary); }
.text-accent { color: var(--color-accent); }
.text-muted { color: var(--color-text-muted); }
.mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.gap-4 { gap: var(--space-4); }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }

/* ============================================================
   SECTION BACKGROUNDS (DARK THEME)
   ============================================================ */

/* Alternating section backgrounds for visual interest */
.section-dark-alt {
  background: var(--color-surface);
}

/* Red accent divider line */
.divider-red {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  border: none;
  margin-block: var(--space-2);
}

/* ============================================================
   APP SHOWCASE / GET OUR APP SECTION
   ============================================================ */

/* App Showcase - Section Layout */
.app-showcase {
  padding: var(--space-12) 0;
  overflow: hidden;
}

.app-showcase__header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.app-showcase__header h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.app-showcase__header > p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 540px;
  margin: 0 auto;
}

.app-showcase__ctas {
  text-align: center;
  margin-top: var(--space-8);
}

/* Phone Frame */
.phone-frame {
  width: 220px;
  height: 450px;
  background: #000;
  border-radius: 32px;
  position: relative;
  overflow: hidden;
  border: 3px solid #2a2a2a;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(230, 57, 70, 0.08), inset 0 0 0 1px rgba(255,255,255,0.05);
  flex-shrink: 0;
}

.phone-frame__notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 22px;
  background: #000;
  border-radius: 0 0 14px 14px;
  z-index: 2;
}

.phone-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

/* App Carousel */
.app-carousel {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  justify-content: center;
  position: relative;
}

.app-carousel__track-wrapper {
  overflow: hidden;
  width: 100%;
  max-width: 800px;
}

.app-carousel__track {
  display: flex;
  gap: var(--space-5);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.app-carousel__slide {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0.35;
  transform: scale(0.85);
  transition: opacity 0.5s ease, transform 0.5s ease;
  cursor: pointer;
}

.app-carousel__slide.active {
  opacity: 1;
  transform: scale(1);
}

.app-carousel__slide.adjacent {
  opacity: 0.6;
  transform: scale(0.92);
}

.app-carousel__arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  z-index: 2;
}

.app-carousel__arrow:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.app-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: var(--space-5);
}

.app-carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.app-carousel__dot.active {
  background: var(--color-primary);
  width: 24px;
  border-radius: 4px;
}

/* Feature Highlights Row */
.app-highlights {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.app-highlight {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
}

/* Mobile responsive */
@media (max-width: 767px) {
  .phone-frame {
    width: 180px;
    height: 370px;
    border-radius: 26px;
  }
  .phone-frame__notch {
    width: 70px;
    height: 18px;
    border-radius: 0 0 10px 10px;
  }
  .app-carousel__arrow {
    width: 36px;
    height: 36px;
  }
  .app-carousel__arrow svg {
    width: 16px;
    height: 16px;
  }
  .app-carousel__track {
    gap: var(--space-3);
  }
  .app-highlights {
    gap: var(--space-4);
  }
  .app-highlight {
    font-size: var(--text-xs);
  }
}

/* ============================================================
   GET THE APP FORM
   ============================================================ */

.get-app-form-wrap {
  max-width: var(--content-wide);
  margin: var(--space-10) auto 0;
}

.get-app-form {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
}

.get-app-form__header {
  text-align: center;
  margin-bottom: var(--space-6);
}

.get-app-form__header svg {
  margin-bottom: var(--space-3);
}

.get-app-form__header h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 var(--space-2);
}

.get-app-form__header p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0;
  max-width: none;
}

.get-app-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.get-app-form__field label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-2);
}

.get-app-form__field input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: var(--text-base);
  font-family: var(--font-body);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
  box-sizing: border-box;
}

.get-app-form__field input::placeholder {
  color: var(--color-text-muted);
  opacity: 0.5;
}

.get-app-form__field input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
}

.get-app-form__submit {
  width: 50%;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

.get-app-form__submit-loading .spin-icon {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.get-app-form__success {
  text-align: center;
  padding: var(--space-6);
}

.get-app-form__success svg {
  margin-bottom: var(--space-3);
}

.get-app-form__success p {
  color: var(--color-accent, #22c55e);
  font-size: var(--text-sm);
  font-weight: 500;
  margin: 0;
}

.get-app-form__error {
  text-align: center;
  padding: var(--space-4);
  margin-top: var(--space-4);
  background: rgba(230, 57, 70, 0.1);
  border-radius: var(--radius-md);
}

.get-app-form__error p {
  color: var(--color-primary);
  font-size: var(--text-sm);
  margin: 0;
}

.get-app-form__error a {
  color: var(--color-primary);
  font-weight: 600;
}

@media (max-width: 900px) {
  .get-app-form__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .get-app-form__grid {
    grid-template-columns: 1fr;
  }
  .get-app-form {
    padding: var(--space-6);
  }
}

/* ============================================================
   CALCULATOR CTA (homepage link to dedicated calculator page)
   ============================================================ */

.calc-cta {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-8);
  background: var(--color-surface-2);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  max-width: 800px;
  margin-inline: auto;
}

.calc-cta__icon {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(230, 57, 70, 0.1);
  border-radius: var(--radius-md);
}

.calc-cta__content {
  flex: 1;
  min-width: 0;
}

.calc-cta__content h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.calc-cta__content p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

@media (max-width: 640px) {
  .calc-cta {
    flex-direction: column;
    text-align: center;
    padding: var(--space-6);
  }
  .calc-cta .btn {
    width: 100%;
  }
}

/* ============================================================
   FLOATING MOBILE CTA
   ============================================================ */

.floating-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 45;
  background: var(--color-surface);
  border-top: 1px solid var(--color-divider);
  padding: var(--space-3) var(--space-4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.floating-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  max-width: var(--content-wide);
  margin-inline: auto;
}

.floating-cta__text {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.3;
}

.floating-cta__text strong {
  color: var(--color-text);
  display: block;
}

.floating-cta .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .floating-cta {
    display: block;
  }
  body {
    padding-bottom: 72px;
  }
}

/* ============================================================
   CHATBOT
   ============================================================ */

.chatbot-bubble {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  width: 60px;
  height: 60px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(230, 57, 70, 0.4);
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive);
}

.chatbot-bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(230, 57, 70, 0.5);
}

.chatbot-bubble svg {
  width: 28px;
  height: 28px;
}

@media (max-width: 767px) {
  .chatbot-bubble {
    bottom: 84px;
  }
}

.chatbot-panel {
  position: fixed;
  bottom: 96px;
  right: 24px;
  z-index: 101;
  width: 350px;
  max-width: calc(100vw - 32px);
  height: 500px;
  max-height: calc(100vh - 140px);
  background: var(--color-bg);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.chatbot-panel--open {
  display: flex;
}

.chatbot-bubble--hidden {
  transform: scale(0);
  pointer-events: none;
  opacity: 0;
}

.chatbot-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  margin-left: auto;
  flex-shrink: 0;
}

.chatbot-close:hover {
  background: rgba(255,255,255,0.2);
}

.chatbot-typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: var(--space-3) var(--space-4);
}

.chatbot-typing span {
  width: 8px;
  height: 8px;
  background: var(--color-text-muted);
  border-radius: 50%;
  animation: chatbot-dot 1.4s infinite ease-in-out both;
}

.chatbot-typing span:nth-child(1) { animation-delay: 0s; }
.chatbot-typing span:nth-child(2) { animation-delay: 0.16s; }
.chatbot-typing span:nth-child(3) { animation-delay: 0.32s; }

@keyframes chatbot-dot {
  0%, 80%, 100% { transform: scale(0.5); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

@media (max-width: 767px) {
  .chatbot-panel {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }
}

.chatbot-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--brand-navy);
  color: #fff;
  flex-shrink: 0;
}

.chatbot-header__avatar {
  width: 36px;
  height: 36px;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chatbot-header__avatar svg {
  width: 18px;
  height: 18px;
  color: #fff;
}

.chatbot-header__info {
  flex: 1;
}

.chatbot-header__info h4 {
  font-size: var(--text-sm);
  font-weight: 600;
}

.chatbot-header__info p {
  font-size: 11px;
  opacity: 0.7;
}

.chatbot-header__close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
}

.chatbot-header__close:hover {
  background: rgba(255,255,255,0.2);
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.chatbot-msg {
  max-width: 85%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  line-height: 1.5;
  word-wrap: break-word;
}

.chatbot-msg--bot {
  background: var(--color-surface);
  color: var(--color-text);
  align-self: flex-start;
  border-bottom-left-radius: var(--radius-sm);
}

.chatbot-msg--user {
  background: var(--color-primary);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: var(--radius-sm);
}

.chatbot-msg--bot a {
  color: var(--color-primary);
  text-decoration: underline;
}

.chatbot-input {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-divider);
  background: var(--color-surface);
  flex-shrink: 0;
}

.chatbot-input input {
  flex: 1;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: var(--text-sm);
}

.chatbot-input input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.chatbot-input button {
  padding: var(--space-2) var(--space-3);
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatbot-input button:hover {
  background: var(--color-primary-hover);
}

.chatbot-disclaimer {
  font-size: 10px;
  color: var(--color-text-faint);
  text-align: center;
  padding: var(--space-1) var(--space-3) var(--space-2);
  background: var(--color-surface);
}

.chatbot-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: 0 var(--space-4) var(--space-3);
}

.chatbot-suggestion {
  padding: var(--space-1) var(--space-3);
  background: var(--color-primary-light);
  color: var(--color-primary);
  border: 1px solid rgba(230, 57, 70, 0.2);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-interactive);
}

.chatbot-suggestion:hover {
  background: var(--color-primary);
  color: #fff;
}

/* ============================================================
   REFERRAL FORM
   ============================================================ */

.referral-form {
  max-width: 720px;
  margin-inline: auto;
}

.referral-form .form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .referral-form .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.referral-form .form-section-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-divider);
}

.referral-form .form-section-title:not(:first-child) {
  margin-top: var(--space-8);
}

.form-success, .form-error {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  display: none;
}

.form-success {
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--color-success);
}

.form-error {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: var(--color-error);
}

.form-success svg, .form-error svg {
  vertical-align: middle;
  margin-right: var(--space-2);
}

/* ============================================================
   LOAN STATUS TRACKER
   ============================================================ */

.status-tracker {
  max-width: 720px;
  margin-inline: auto;
}

.status-lookup {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.status-lookup input {
  flex: 1;
  min-width: 240px;
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  font-size: var(--text-base);
  color: var(--color-text);
}

.status-lookup input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
}

.status-results {
  display: none;
}

.status-results.active {
  display: block;
}

.loan-summary {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-8);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-4);
}

.loan-summary__item {
  text-align: center;
}

.loan-summary__item strong {
  display: block;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-faint);
  margin-bottom: var(--space-1);
}

.loan-summary__item span {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
}

.milestones {
  position: relative;
  padding-left: var(--space-8);
}

.milestones::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-divider);
}

.milestone {
  position: relative;
  padding-bottom: var(--space-6);
}

.milestone:last-child {
  padding-bottom: 0;
}

.milestone__dot {
  position: absolute;
  left: calc(-1 * var(--space-8) + 8px);
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-surface-2);
  border: 2px solid var(--color-border);
  z-index: 1;
}

.milestone--complete .milestone__dot {
  background: var(--color-success);
  border-color: var(--color-success);
}

.milestone--active .milestone__dot {
  background: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.2);
}

.milestone__title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.milestone--complete .milestone__title {
  color: var(--color-success);
}

.milestone__date {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.conditions-list {
  margin-top: var(--space-8);
}

.conditions-list h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.condition-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2);
}

.condition-badge {
  flex-shrink: 0;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.condition-badge--received {
  background: rgba(52, 211, 153, 0.15);
  color: var(--color-success);
}

.condition-badge--pending {
  background: rgba(251, 191, 36, 0.15);
  color: #FBBF24;
}

.condition-badge--waived {
  background: rgba(156, 163, 175, 0.15);
  color: var(--color-text-muted);
}

.condition-item__text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ============================================================
   ADMIN PANEL
   ============================================================ */

.admin-login {
  max-width: 400px;
  margin: var(--space-16) auto;
  text-align: center;
}

.admin-login h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-6);
}

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

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.admin-stat {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  text-align: center;
}

.admin-stat__number {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-primary);
}

.admin-stat__label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.admin-toolbar {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  align-items: center;
}

.admin-toolbar input {
  flex: 1;
  min-width: 200px;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  color: var(--color-text);
  font-size: var(--text-sm);
}

.admin-toolbar input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.admin-conversation {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
  overflow: hidden;
}

.admin-conversation__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  cursor: pointer;
  gap: var(--space-3);
}

.admin-conversation__header:hover {
  background: var(--color-surface-2);
}

.admin-conversation__meta {
  display: flex;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.admin-conversation__preview {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.admin-conversation__body {
  display: none;
  padding: var(--space-4);
  border-top: 1px solid var(--color-divider);
  max-height: 400px;
  overflow-y: auto;
}

.admin-conversation.expanded .admin-conversation__body {
  display: block;
}

.admin-msg {
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
}

.admin-msg--bot {
  background: var(--color-surface-2);
  color: var(--color-text-muted);
}

.admin-msg--user {
  background: var(--color-primary-light);
  color: var(--color-text);
}

.admin-msg__role {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-1);
}

.admin-msg--bot .admin-msg__role { color: var(--color-text-faint); }
.admin-msg--user .admin-msg__role { color: var(--color-primary); }

.admin-empty {
  text-align: center;
  padding: var(--space-12);
  color: var(--color-text-faint);
}

/* Button variants for admin */
.btn--danger {
  background: transparent;
  color: var(--color-error);
  border: 1px solid var(--color-error);
}

.btn--danger:hover {
  background: var(--color-error);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}
