/* ==========================================================================
   ESTATEAGENTSCWMBRAN.CO.UK — CORE DESIGN SYSTEM & STYLESHEET
   Independent Cwmbran Property Comparison & Market Resource
   Built Mobile-First with WCAG 2.2 AA Compliance
   ========================================================================== */

:root {
  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;

  /* Colour Palette — Professional Polish (Welsh Forest Green & Crimson Heritage) */
  --color-brand-primary: #064e3b;    /* Welsh Heritage Forest Green */
  --color-brand-secondary: #022c22;  /* Deep Forest Slate */
  --color-brand-accent: #991b1b;     /* Rich Welsh Crimson */
  --color-brand-accent-hover: #7f1d1d; /* Darker Crimson */
  --color-brand-light: #f0fdf4;      /* Soft Mint / Emerald Tint */
  --color-brand-highlight: #f8faf9;  /* Crisp Off-White */
  
  --color-text-main: #1e293b;        /* Slate 800 */
  --color-text-muted: #475569;       /* Slate 600 */
  --color-text-light: #64748b;       /* Slate 500 */
  --color-text-inverse: #ffffff;
  
  --color-bg-body: #f8faf9;          /* Theme Canvas Background */
  --color-bg-surface: #ffffff;
  --color-bg-alt: #f1f5f3;
  --color-bg-dark: #0f172a;          /* Slate 900 */
  
  --color-border: #e2e8f0;          /* Slate 200 */
  --color-border-subtle: #f1f5f9;
  --color-border-focus: #064e3b;

  --color-success: #064e3b;
  --color-success-bg: #f0fdf4;
  --color-warning: #991b1b;
  --color-warning-bg: #fef2f2;

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

  /* Layout */
  --container-max: 1180px;
  --container-narrow: 860px;
  --header-height: 76px;

  /* Radii - Clean, polished, and structured */
  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px 0 rgba(6, 78, 59, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(6, 78, 59, 0.07), 0 2px 4px -2px rgba(6, 78, 59, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(6, 78, 59, 0.08), 0 4px 6px -4px rgba(6, 78, 59, 0.04);
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-main);
  background-color: var(--color-bg-body);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--color-text-main);
  background-color: var(--color-bg-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-brand-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-brand-accent);
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--color-brand-accent);
  outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  background: var(--color-brand-primary);
  color: var(--color-text-inverse);
  padding: var(--space-3) var(--space-6);
  z-index: 9999;
  font-weight: 600;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  text-decoration: none;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  color: var(--color-brand-secondary);
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-4);
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(2rem, 5.5vw, 3rem);
  letter-spacing: -0.025em;
  color: #0f172a;
}

h2 {
  font-size: clamp(1.5rem, 3.8vw, 2.15rem);
  letter-spacing: -0.02em;
  margin-top: var(--space-8);
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  margin-top: var(--space-6);
}

h4 {
  font-size: 1.125rem;
  font-family: var(--font-sans);
  font-weight: 700;
  margin-top: var(--space-4);
}

p {
  margin-bottom: var(--space-4);
  color: var(--color-text-main);
  line-height: 1.65;
}

.lead {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--color-text-muted);
}

.text-muted {
  color: var(--color-text-muted);
}

.text-small {
  font-size: 0.875rem;
  line-height: 1.5;
}

.text-bold {
  font-weight: 600;
}

.text-overline {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-text-light);
}

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

li {
  margin-bottom: var(--space-2);
}

hr {
  border: 0;
  height: 1px;
  background: var(--color-border);
  margin: var(--space-8) 0;
}

/* ==========================================================================
   LAYOUT & CONTAINERS
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

@media (min-width: 768px) {
  .container {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}

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

.section {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

.section-alt {
  background-color: var(--color-bg-alt);
}

.section-dark {
  background-color: var(--color-brand-primary);
  color: var(--color-text-inverse);
}

.section-dark h1, .section-dark h2, .section-dark h3, .section-dark p {
  color: var(--color-text-inverse);
}

.section-dark .text-muted {
  color: rgba(255, 255, 255, 0.8);
}

/* ==========================================================================
   HEADER & NAVIGATION — Professional Polish
   ========================================================================== */

.site-header {
  background: #ffffff;
  border-bottom: 4px solid var(--color-brand-accent); /* Crimson heritage trim */
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-brand-primary);
  letter-spacing: -0.01em;
}

.site-logo svg {
  color: #ffffff;
  background: var(--color-brand-primary);
  padding: 6px;
  border-radius: var(--radius-sm);
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.site-logo-tag {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-family: var(--font-sans);
}

/* Desktop Nav */
.main-nav {
  display: none;
}

@media (min-width: 992px) {
  .main-nav {
    display: flex;
    align-items: center;
    gap: var(--space-6);
  }

  .nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    gap: var(--space-2);
    margin: 0;
    padding: 0;
  }

  .nav-link {
    display: inline-flex;
    align-items: center;
    padding: var(--space-2) var(--space-3);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-text-main);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background-color var(--transition-fast);
  }

  .nav-link:hover {
    color: var(--color-brand-accent);
    background: var(--color-brand-light);
  }

  .nav-link[aria-current="page"] {
    color: var(--color-brand-primary);
    background: var(--color-brand-light);
    border-bottom: 2px solid var(--color-brand-primary);
  }

  /* Dropdown Nav */
  .nav-item-has-dropdown {
    position: relative;
  }

  .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: var(--space-2);
    min-width: 240px;
    display: none;
    list-style: none;
    z-index: 1010;
  }

  .nav-item-has-dropdown:hover .dropdown-menu,
  .nav-item-has-dropdown:focus-within .dropdown-menu {
    display: block;
  }

  .dropdown-link {
    display: block;
    padding: var(--space-2) var(--space-3);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-main);
    text-decoration: none;
    border-radius: var(--radius-sm);
  }

  .dropdown-link:hover {
    background: var(--color-brand-light);
    color: var(--color-brand-primary);
  }
}

/* Mobile Nav Toggle */
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-brand-primary);
  cursor: pointer;
}

@media (min-width: 992px) {
  .menu-toggle {
    display: none;
  }
}

/* Mobile Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-4);
  overflow-y: auto;
  display: none;
  z-index: 999;
}

.mobile-nav-drawer.is-open {
  display: block;
}

.mobile-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav-item {
  border-bottom: 1px solid var(--color-border-subtle);
  padding: var(--space-3) 0;
}

.mobile-nav-link {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-brand-secondary);
  text-decoration: none;
  padding: var(--space-1) 0;
}

.mobile-sub-list {
  list-style: none;
  padding-left: var(--space-4);
  margin-top: var(--space-2);
}

.mobile-sub-link {
  display: block;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: var(--space-1) 0;
}

/* ==========================================================================
   BUTTONS & CTAs — Professional Polish
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
  min-height: 44px;
}

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

.btn-primary:hover {
  background-color: #053d2f;
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background-color: var(--color-brand-accent);
  color: #ffffff;
}

.btn-secondary:hover {
  background-color: var(--color-brand-accent-hover);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--color-brand-primary);
  color: var(--color-brand-primary);
}

.btn-outline:hover {
  background-color: var(--color-brand-primary);
  color: #ffffff;
}

.btn-outline-light {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.8);
  color: #ffffff;
  backdrop-filter: blur(4px);
}

.btn-outline-light:hover {
  background-color: #ffffff;
  border-color: #ffffff;
  color: var(--color-brand-primary);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: 0.85rem;
  min-height: 38px;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

/* ==========================================================================
   HERO SECTION — Full-Bleed Background Polish
   ========================================================================== */

.hero {
  position: relative;
  padding: var(--space-16) 0;
  background-color: var(--color-brand-primary);
  background-image: linear-gradient(135deg, rgba(6, 46, 36, 0.65) 0%, rgba(13, 92, 70, 0.50) 45%, rgba(6, 46, 36, 0.75) 100%), url('../images/cwmbran-estate-agents.webp'), url('/assets/images/cwmbran-estate-agents.webp');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  border-bottom: 3px solid var(--color-brand-accent);
  color: #ffffff;
}

.hero h1 {
  color: #ffffff;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-top: 0;
  margin-bottom: var(--space-4);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.hero .lead {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.15rem;
  line-height: 1.65;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  max-width: 620px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  align-items: center;
}

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

/* Badge styles — high contrast on light canvas by default */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 5px 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  color: #064e3b; /* Welsh Heritage Forest Green - WCAG AAA 7:1+ contrast */
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-4);
}

.hero-badge svg {
  color: #059669;
  flex-shrink: 0;
}

.hero-badge::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #059669;
  box-shadow: 0 0 6px rgba(5, 150, 105, 0.4);
}

/* Specific styling when hero-badge is inside dark hero banner */
.hero .hero-badge {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero .hero-badge svg {
  color: #ffffff;
}

.hero .hero-badge::before {
  background: #facc15;
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.9);
}

.hero-quick-form {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 10px 10px -5px rgba(0, 0, 0, 0.15);
  border-top: 4px solid var(--color-brand-accent);
  color: var(--color-text-main);
}

.hero-quick-form h2 {
  color: var(--color-brand-secondary);
}

/* ==========================================================================
   CARDS & GRIDS — Professional Polish
   ========================================================================== */

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

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

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

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

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

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

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

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

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

.card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}

.card-header {
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border-subtle);
  padding-bottom: var(--space-3);
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: var(--space-1);
}

/* Market Stat Card */
.stat-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-brand-primary);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  text-align: left;
}

.stat-value {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--color-brand-primary);
  font-family: var(--font-serif);
  line-height: 1.1;
  margin-bottom: var(--space-1);
}

.stat-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.stat-meta {
  font-size: 0.75rem;
  color: var(--color-text-light);
  border-top: 1px dashed var(--color-border);
  padding-top: var(--space-2);
}

/* Callout Boxes */
.callout {
  border-radius: var(--radius-sm);
  padding: var(--space-5);
  margin: var(--space-6) 0;
  border-left: 4px solid var(--color-brand-primary);
  background: #f0fdf4;
  border-top: 1px solid #dcfce7;
  border-right: 1px solid #dcfce7;
  border-bottom: 1px solid #dcfce7;
}

.callout-warning {
  border-left-color: var(--color-brand-accent);
  background: #fef2f2;
  border-top: 1px solid #fee2e2;
  border-right: 1px solid #fee2e2;
  border-bottom: 1px solid #fee2e2;
}

.callout-success {
  border-left-color: var(--color-brand-primary);
  background: #f0fdf4;
}

/* ==========================================================================
   AGENT COMPARISON DIRECTORY & CARDS
   ========================================================================== */

.filter-bar {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  justify-content: space-between;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.filter-btn {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-4);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-main);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--color-brand-primary);
  border-color: var(--color-brand-primary);
  color: #ffffff;
}

.agent-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  transition: border-color var(--transition-fast);
}

.agent-card:hover {
  border-color: #cbd5e1;
}

/* Featured Top Agent Styling */
.agent-card-featured {
  border: 1.5px solid #059669;
  border-top: 3px solid #008751;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  position: relative;
}

.agent-card-featured:hover {
  border-color: #008751;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.featured-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #065f46;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.agent-stars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #eab308;
  font-size: 0.875rem;
  margin-left: 4px;
  font-weight: 700;
}

.agent-row-featured {
  background: #f8fcf9 !important;
  font-weight: 500;
}

.agent-row-featured td {
  border-bottom: 1.5px solid #d1fae5 !important;
}

.agent-row-featured:hover td {
  background: #f0fdf4 !important;
}

@media (min-width: 768px) {
  .agent-card {
    grid-template-columns: 1.2fr 1.5fr 1fr;
    align-items: center;
  }
}

.agent-name {
  font-size: 1.35rem;
  font-weight: 700;
  font-family: var(--font-serif);
  color: var(--color-brand-secondary);
  margin-bottom: var(--space-1);
}

.agent-type-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  background: #f0fdf4;
  color: var(--color-brand-primary);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-2);
}

.agent-spec-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.875rem;
}

.agent-spec-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin-bottom: var(--space-1);
  color: var(--color-text-muted);
}

.agent-spec-item svg {
  color: var(--color-success);
  flex-shrink: 0;
  margin-top: 3px;
}

/* Comparison Table (Desktop) */
.comparison-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-6);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9375rem;
}

.comparison-table th, .comparison-table td {
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.comparison-table th {
  background: #f1f5f3;
  color: var(--color-brand-secondary);
  font-weight: 700;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.comparison-table tr:hover td {
  background: #f0fdf4;
}

/* ==========================================================================
   FORMS & INPUTS — Professional Polish
   ========================================================================== */

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

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: var(--space-2);
  color: #0f172a;
}

.form-control {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: 1rem;
  font-family: inherit;
  color: var(--color-text-main);
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  min-height: 44px;
}

.form-control:focus {
  border-color: var(--color-brand-primary);
  box-shadow: 0 0 0 3px rgba(6, 78, 59, 0.15);
  outline: none;
}

.form-hint {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.radio-group, .checkbox-group {
  display: grid;
  gap: var(--space-2);
}

.choice-box {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: #ffffff;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.choice-box:hover {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.choice-box input[type="radio"], .choice-box input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--color-brand-primary);
}

/* Multi-Step Valuation Form */
.multi-step-form {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  box-shadow: var(--shadow-lg);
  border-top: 4px solid var(--color-brand-primary);
}

.step-indicator {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  position: relative;
}

.step-item {
  text-align: center;
  flex: 1;
  position: relative;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.step-item.active {
  color: var(--color-brand-primary);
}

.step-item.completed {
  color: var(--color-brand-primary);
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--color-bg-alt);
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-1);
  font-weight: 700;
}

.step-item.active .step-circle {
  border-color: var(--color-brand-primary);
  background: var(--color-brand-primary);
  color: #ffffff;
}

.step-item.completed .step-circle {
  border-color: var(--color-brand-primary);
  background: var(--color-brand-primary);
  color: #ffffff;
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
}

/* ==========================================================================
   TYPEFORM-STYLE INTERACTIVE FORMS — High Conversion & Fluid Flow
   ========================================================================== */

.tf-wrapper {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.08), 0 0 1px 1px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  position: relative;
  transition: all 0.3s ease;
}

.tf-progress-header {
  background: #f8faf9;
  border-bottom: 1px solid var(--color-border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tf-progress-bar-bg {
  flex: 1;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.tf-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #008751 0%, #10b981 100%);
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tf-step-badge {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-brand-primary);
  white-space: nowrap;
}

.tf-btn-back {
  background: none;
  border: none;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.tf-btn-back:hover {
  color: var(--color-brand-primary);
  background: #f1f5f3;
}

.tf-card-body {
  padding: 32px 28px;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 640px) {
  .tf-card-body {
    padding: 40px 36px;
  }
}

.tf-step {
  display: none;
  animation-duration: 0.32s;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  animation-fill-mode: both;
}

.tf-step.active {
  display: block;
}

.tf-step.slide-right {
  animation-name: tfSlideInRight;
}

.tf-step.slide-left {
  animation-name: tfSlideInLeft;
}

@keyframes tfSlideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes tfSlideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.tf-question-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #008751;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.tf-question-title {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--color-brand-secondary);
  margin: 0 0 8px 0;
  letter-spacing: -0.02em;
}

@media (min-width: 640px) {
  .tf-question-title {
    font-size: 1.75rem;
  }
}

.tf-question-desc {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin: 0 0 24px 0;
  line-height: 1.5;
}

/* Big Hero Input */
.tf-input-hero-wrapper {
  margin: 20px 0 28px 0;
  position: relative;
}

.tf-input-hero {
  width: 100%;
  font-size: 1.35rem;
  font-weight: 600;
  padding: 16px 20px;
  border: 2px solid var(--color-border);
  border-radius: 14px;
  color: #0f172a;
  background: #ffffff;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.tf-input-hero:focus {
  border-color: #008751;
  box-shadow: 0 0 0 4px rgba(0, 135, 81, 0.15);
  outline: none;
}

.tf-input-hero::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

/* Choice Grid & Tiles */
.tf-choice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

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

@media (min-width: 680px) {
  .tf-choice-grid.grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
  .tf-choice-grid.grid-5 {
    grid-template-columns: repeat(5, 1fr);
  }
}

.tf-choice-tile {
  background: #ffffff;
  border: 2px solid var(--color-border);
  border-radius: 14px;
  padding: 16px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  user-select: none;
  position: relative;
}

.tf-choice-tile:hover {
  border-color: #008751;
  background: #f0fdf4;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 135, 81, 0.08);
}

.tf-choice-tile.selected {
  border-color: #008751;
  background: #f0fdf4;
  box-shadow: 0 0 0 2px rgba(0, 135, 81, 0.2);
}

.tf-tile-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tf-tile-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.tf-choice-tile:hover .tf-tile-key,
.tf-choice-tile.selected .tf-tile-key {
  background: #008751;
  border-color: #008751;
  color: #ffffff;
}

.tf-tile-label {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
}

.tf-tile-sub {
  font-size: 0.78rem;
  color: #64748b;
  display: block;
  margin-top: 2px;
}

.tf-tile-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #008751;
  flex-shrink: 0;
}

.tf-tile-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.tf-choice-tile.selected .tf-tile-check {
  background: #008751;
  border-color: #008751;
  color: #ffffff;
}

/* Bedroom Numbers Grid */
.tf-number-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.tf-number-tile {
  background: #ffffff;
  border: 2px solid var(--color-border);
  border-radius: 14px;
  padding: 16px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.tf-number-tile:hover {
  border-color: #008751;
  background: #f0fdf4;
  transform: translateY(-2px);
}

.tf-number-tile.selected {
  border-color: #008751;
  background: #f0fdf4;
  box-shadow: 0 0 0 2px rgba(0, 135, 81, 0.2);
}

.tf-number-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}

.tf-number-lbl {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 4px;
}

/* Action Bars & Buttons */
.tf-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}

.tf-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  background: #008751;
  color: #ffffff;
  font-weight: 700;
  font-size: 1.05rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 135, 81, 0.25);
  transition: all 0.18s ease;
}

.tf-btn-primary:hover {
  background: #007043;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 135, 81, 0.35);
}

.tf-btn-primary:active {
  transform: translateY(0);
}

.tf-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.tf-btn-shortcut {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.18);
  padding: 2px 6px;
  border-radius: 4px;
}

.tf-helper-text {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Contact Details Multi-Grid */
.tf-contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

@media (min-width: 520px) {
  .tf-contact-grid.cols-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.tf-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tf-input-group label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #0f172a;
}

.tf-input-field {
  width: 100%;
  padding: 12px 14px;
  font-size: 0.95rem;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  color: #0f172a;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tf-input-field:focus {
  border-color: #008751;
  box-shadow: 0 0 0 3px rgba(0, 135, 81, 0.15);
  outline: none;
}

/* Success Celebration Screen */
.tf-celebration {
  text-align: center;
  padding: 30px 10px;
}

.tf-celebration-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  animation: tfPop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes tfPop {
  0% { transform: scale(0.5); opacity: 0; }
  80% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   CALCULATOR UI
   ========================================================================== */

.calc-container {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  box-shadow: var(--shadow-card);
  border-top: 4px solid var(--color-brand-primary);
}

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

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

.calc-result-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  padding: var(--space-5);
}

.calc-result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--space-2) 0;
  border-bottom: 1px dashed #cbd5e1;
}

.calc-result-row.total {
  border-top: 2px solid var(--color-brand-primary);
  border-bottom: none;
  font-weight: 700;
  font-size: 1.2rem;
  font-family: var(--font-serif);
  color: var(--color-brand-primary);
  margin-top: var(--space-2);
  padding-top: var(--space-3);
}

/* ==========================================================================
   BREADCRUMBS & ARTICLE CONTENT
   ========================================================================== */

.breadcrumbs {
  padding: var(--space-3) 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border-subtle);
  background: #ffffff;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: var(--space-2);
}

.breadcrumbs li + li::before {
  content: "/";
  padding-right: var(--space-2);
  color: var(--color-text-light);
}

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

.breadcrumbs a:hover {
  color: var(--color-brand-accent);
  text-decoration: underline;
}

.article-content {
  line-height: 1.75;
}

.article-content h2 {
  border-bottom: 1px solid var(--color-border-subtle);
  padding-bottom: var(--space-2);
  margin-top: var(--space-8);
}

.article-content p {
  margin-bottom: var(--space-5);
}

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

.article-content li {
  margin-bottom: var(--space-2);
}

/* Direct Answer Box for Featured Snippet Targeting */
.direct-answer-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-left: 4px solid var(--color-brand-primary);
  border-radius: var(--radius-sm);
  padding: var(--space-5);
  margin: var(--space-6) 0;
}

.direct-answer-box p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   AREA / AGENT HUB LINKS
   ========================================================================== */

.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-4) 0;
}

.pill-link {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-brand-primary);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.pill-link:hover {
  background: var(--color-brand-primary);
  color: #ffffff;
  border-color: var(--color-brand-primary);
}

/* ==========================================================================
   FOOTER — Professional Polish
   ========================================================================== */

.site-footer {
  background-color: #0f172a; /* Deep Slate 900 */
  color: rgba(255, 255, 255, 0.85);
  padding-top: var(--space-12);
  padding-bottom: var(--space-8);
  margin-top: auto;
  border-top: 4px solid var(--color-brand-accent); /* Crimson heritage bar */
}

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

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

@media (min-width: 992px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  }
}

.footer-heading {
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  font-family: var(--font-sans);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: var(--space-2);
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  font-size: 0.8125rem;
  color: #64748b;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-6);
}

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

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

.faq-question {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: var(--space-4);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-brand-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-question:hover {
  background: var(--color-bg-alt);
}

.faq-answer {
  padding: 0 var(--space-4) var(--space-4);
  color: var(--color-text-muted);
  display: none;
}

.faq-item.is-open .faq-answer {
  display: block;
}

.faq-icon {
  transition: transform var(--transition-fast);
}

.faq-item.is-open .faq-icon {
  transform: rotate(180deg);
}

/* ==========================================================================
   DISCLAIMERS & LEGAL NOTICE CARDS
   ========================================================================== */

.disclaimer-banner {
  background-color: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-brand-primary);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  margin-top: var(--space-5);
  margin-bottom: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.disclaimer-banner-compact {
  font-size: 0.72rem;
  line-height: 1.45;
  color: #64748b;
  background-color: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: var(--space-4);
}

.disclaimer-banner-compact a {
  color: var(--color-brand-primary);
  text-decoration: underline;
}

.footer-disclaimer {
  font-size: 0.72rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.55);
  margin-top: var(--space-6);
  margin-bottom: var(--space-6);
  padding: var(--space-4) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-disclaimer p {
  font-size: 0.72rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
}

.footer-disclaimer a {
  color: var(--color-brand-accent);
  text-decoration: underline;
}

.disclaimer-banner h4,
.disclaimer-banner h3 {
  color: var(--color-brand-secondary);
  margin-top: 0;
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.9375rem;
}

.disclaimer-banner p {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.disclaimer-banner p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   COOKIE CONSENT & GDPR BANNER
   ========================================================================== */

.cookie-consent-wrapper {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: var(--space-4);
  pointer-events: none;
  display: flex;
  justify-content: center;
}

.cookie-consent-card {
  pointer-events: auto;
  width: 100%;
  max-width: 720px;
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  padding: var(--space-5);
  animation: slideUpConsent 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpConsent {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cookie-consent-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.cookie-consent-header h3 {
  font-size: 1.0625rem;
  color: var(--color-brand-secondary);
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 700;
}

.cookie-consent-body {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.cookie-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

.cookie-consent-btn-accept {
  background-color: var(--color-brand-primary);
  color: #ffffff;
  border: 1px solid var(--color-brand-primary);
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.cookie-consent-btn-accept:hover {
  background-color: var(--color-brand-secondary);
}

.cookie-consent-btn-reject {
  background-color: transparent;
  color: var(--color-text-main);
  border: 1px solid var(--color-border);
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.cookie-consent-btn-reject:hover {
  background-color: var(--color-bg-alt);
  border-color: var(--color-text-muted);
}

.cookie-consent-btn-settings {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
  text-decoration: underline;
  cursor: pointer;
  margin-left: auto;
  padding: 0.25rem;
}

.cookie-consent-btn-settings:hover {
  color: var(--color-brand-primary);
}

/* Cookie Settings Modal */
.cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.cookie-modal {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--space-6);
  box-shadow: var(--shadow-lg);
}

.cookie-pref-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border-subtle);
}

.cookie-pref-item:last-child {
  border-bottom: none;
}

.cookie-toggle-locked {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-brand-primary);
  background-color: var(--color-brand-light);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   SCROLL QUOTE POPUP (BOTTOM-RIGHT) & QUOTE MODAL
   ========================================================================== */

.quote-scroll-popup {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 990;
  background: #008751;
  color: #ffffff;
  border-radius: 16px;
  padding: 22px 24px 18px;
  width: 330px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.24), 0 4px 14px rgba(0, 135, 81, 0.35);
  opacity: 0;
  transform: translateY(32px) scale(0.94);
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.quote-scroll-popup.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.quote-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.quote-popup-close:hover {
  background-color: rgba(255, 255, 255, 0.36);
  transform: scale(1.08);
}

.quote-popup-close:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.quote-popup-title {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 6px 0;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.quote-popup-subtitle {
  font-size: 0.9375rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.95);
  margin: 0 0 16px 0;
}

.quote-popup-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 13px 20px;
  background: #ffffff;
  color: #008751;
  font-weight: 700;
  font-size: 1.02rem;
  border-radius: 12px;
  border: none;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.quote-popup-btn:hover {
  background-color: #f8faf9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.quote-popup-btn:active {
  transform: translateY(0);
}

.quote-popup-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.96);
  letter-spacing: 0.01em;
  text-align: center;
}

/* Quote Request Modal */
.quote-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: quoteFadeIn 0.25s ease-out forwards;
}

.quote-modal-card {
  background: #ffffff;
  border-radius: 18px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--color-border);
  padding: 28px;
  position: relative;
  animation: quoteSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes quoteFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes quoteSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.quote-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
}

.quote-modal-close {
  background: #f1f5f9;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.quote-modal-close:hover {
  background: #e2e8f0;
  color: var(--color-text-main);
}

.quote-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  color: #008751;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.quote-modal-badge::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #008751;
}

/* ==========================================================================
   MOBILE RESPONSIVE PERFECTION (Tablets & Mobile Phones)
   ========================================================================== */

@media (max-width: 768px) {
  :root {
    --header-height: 64px;
    --container-padding: 16px;
  }

  /* Prevent iOS zoom on input focus */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px !important;
  }

  .hero {
    padding: 2.5rem 0 3rem;
  }

  .hero h1 {
    font-size: clamp(1.75rem, 6.5vw, 2.35rem);
    margin-bottom: 0.75rem;
  }

  .hero .lead {
    font-size: 1rem;
    line-height: 1.55;
  }

  .hero-badge {
    font-size: 0.7rem;
    padding: 4px 10px;
    margin-bottom: 0.75rem;
  }

  .hero-quick-form {
    padding: 1.25rem 1rem;
  }

  .btn-group {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
    margin-top: 1.25rem;
  }

  .btn-group .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* Smooth table scrolling */
  .comparison-table-wrapper,
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
    margin-left: -4px;
    margin-right: -4px;
  }

  .comparison-table {
    min-width: 640px;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 10px 12px;
    font-size: 0.875rem;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 1rem;
  }

  .filter-pills {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .filter-btn {
    white-space: nowrap;
    padding: 8px 14px;
    font-size: 0.8125rem;
    flex-shrink: 0;
  }

  /* Card and Grid mobile layouts */
  .card {
    padding: 1.25rem 1rem;
  }

  .agent-card {
    padding: 1.25rem 1rem;
  }

  .pill-grid {
    gap: 6px;
  }

  .pill-link {
    font-size: 0.8125rem;
    padding: 6px 12px;
  }

  /* Multi-step valuation form mobile styling */
  .multi-step-form {
    padding: 1.25rem 1rem;
  }

  .step-indicator {
    margin-bottom: 1.25rem;
  }

  .step-item {
    font-size: 0.7rem;
  }

  .step-circle {
    width: 28px;
    height: 28px;
    font-size: 0.8125rem;
  }

  /* Mobile Drawer full-width comfort */
  .mobile-nav-drawer {
    z-index: 1050;
  }

  .mobile-nav-link {
    padding: 8px 0;
    font-size: 1.05rem;
  }
}

@media (max-width: 480px) {
  .site-logo {
    font-size: 1.02rem;
    gap: 8px;
  }

  .site-logo svg {
    width: 30px;
    height: 30px;
    padding: 5px;
  }

  .site-logo-tag {
    font-size: 0.625rem;
    letter-spacing: 0.12em;
  }

  .quote-scroll-popup {
    bottom: 12px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
    padding: 16px;
  }

  .quote-modal-card {
    padding: 20px 14px;
    width: calc(100% - 16px);
    max-height: 94vh;
    border-radius: 14px;
  }

  .quote-modal-header h3 {
    font-size: 1.15rem;
  }

  .choice-box {
    padding: 10px 12px;
    font-size: 0.875rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .btn,
  .menu-toggle,
  .mobile-nav-drawer,
  .filter-bar,
  .hero-quick-form {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 12pt;
  }

  .container {
    max-width: 100% !important;
    padding: 0 !important;
  }

  .card, .calc-container {
    border: 1px solid #cccccc !important;
    box-shadow: none !important;
    break-inside: avoid;
  }

  a {
    color: #000000 !important;
    text-decoration: underline !important;
  }
}

/* ==========================================================================
   ACCESSIBILITY & REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
