/* 
 * Core Design System
 * Inspired by Moertgages.ca
 */

:root {
    /* Color Palette */
    --color-primary: #4A5D73; /* Slate Blue */
    --color-primary-dark: #3A4D63;
    --color-secondary: #0F1E2E; /* Deep Navy */
    --color-navy: #0F1E2E; /* Alias used across calculators */
    --color-accent: #D3BD73; /* Gold */
    
    /* Brand Colors (Tailwind Sync) */
    --brand-navy: #0F1E2E;
    --brand-gold: #D3BD73;
    --brand-slate: #1A2E44;
    --brand-warm: #F8F5F0;
    
    /* Neutral Colors */
    --color-bg: #FFFFFF;
    --color-bg-alt: #F8FAFC;
    --color-text: #334155;
    --color-heading: #0F172A;
    --color-border: #E2E8F0;
    
    /* Typography */
    --font-primary: 'Manrope', sans-serif;
    --font-accent: 'Pinyon Script', cursive;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 300ms ease-in-out;

    /* Glassmorphism Tokens */
    --glass-blur: 16px;
    --glass-border: 1px solid rgba(255, 255, 255, 0.2);
    --glass-bg-navy: rgba(15, 30, 46, 0.75);
    --glass-bg-slate: rgba(74, 93, 115, 0.7);
    --glass-bg-white: rgba(255, 255, 255, 0.6);
    --glass-bg-gold: rgba(211, 189, 115, 0.7);
    
    /* Animation Tokens */
    --reveal-duration: 0.8s;
    --reveal-timing: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

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

h1, h2, h3, h4, h5, h6 {
    color: var(--color-heading);
    line-height: 1.2;
    font-weight: 800; /* Extra Bold per Bespoke requirement */
}

/* Phosphor Icon Stabilization */
i.ph, .ph {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    line-height: 1;
}

i.ph {
    width: 1em;
    height: 1em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

.hover-lift {
  transition: transform 0.3s ease;
}
.hover-lift:hover {
  transform: translateY(-5px);
}
/* Glassmorphism Classes */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.hero-gradient-overlay {
    background: linear-gradient(135deg, rgba(0, 3, 9, 0.85) 0%, rgba(15, 30, 46, 0.6) 100%);
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    /* backdrop-filter removed */
    -webkit-/* backdrop-filter removed */
}

.glass-section {
    position: relative;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

.glass-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    z-index: -1;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    will-change: opacity, transform;
    transition: opacity var(--reveal-duration) var(--reveal-timing),
                transform var(--reveal-duration) var(--reveal-timing);
}

.reveal-up { transform: translateY(30px); }
.reveal-down { transform: translateY(-30px); }
.reveal-left { transform: translateX(30px); }
.reveal-right { transform: translateX(-30px); }

.reveal.revealed {
    opacity: 1;
    transform: translate(0, 0);
    will-change: auto;
}

/* Background Enhancement */
.bg-rich {
    position: relative;
    overflow: hidden;
}

.bg-rich-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-image: url('assets/calculators_bg.webp');
    background-size: 450px;
    background-position: top left;
    background-repeat: repeat;
    opacity: 0.12;
    /* filter: blur(12px) grayscale(20%); */
    transform: scale(1.0);
    z-index: 0;
    transition: transform 1.5s var(--reveal-timing);
}

/* Static Shape Dividers */
.section-divider {
    position: absolute;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 5;
    pointer-events: none;
}

.section-divider-top {
    top: 0;
    transform: rotate(180deg);
}

.section-divider-bottom {
    bottom: -1px; /* Overlap slightly to prevent gaps */
}

.section-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

/* Bespoke Typography Utils */
.font-pinyon {
    font-family: var(--font-accent);
    letter-spacing: normal;
    text-transform: none;
}

.text-hero-main {
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -0.04em;
}

.text-hero-accent {
    font-family: var(--font-accent);
    color: var(--brand-gold);
    font-size: 1.1em;
    font-weight: 400;
    display: inline-block;
    transform: translateY(0.1em);
}
/* Specific Divider Fills */
.fill-brand-navy { fill: var(--brand-navy); }
.fill-brand-gold { fill: var(--brand-gold); }
.fill-brand-warm { fill: var(--brand-warm); }
.fill-brand-slate { fill: var(--brand-slate); }
.fill-white { fill: #FFFFFF; }

.bg-rich-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--brand-navy) 0%, transparent 50%, var(--brand-navy) 100%);
    z-index: 1;
}
.glass-card-light {
  background: rgba(255, 255, 255, 0.2);
  /* backdrop-filter removed */
  -webkit-/* backdrop-filter removed */
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.glass-card-dark {
  background: #0F1E2E;
  /* backdrop-filter removed */
  -webkit-/* backdrop-filter removed */
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-hover {
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.glass-hover:hover {
  background: rgba(255, 255, 255, 0.05);
  /* backdrop-filter removed */
  -webkit-/* backdrop-filter removed */
  border: 1px solid rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.2);
}

.glass-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0.05), transparent, rgba(0,0,0,0.05));
    pointer-events: none;
    z-index: 1;
}

.glass-section {
    transition: all 0.5s ease;
}

.glass-section:hover {
    backdrop-filter: blur(calc(var(--glass-blur) + 4px));
    -webkit-backdrop-filter: blur(calc(var(--glass-blur) + 4px));
}

.glass-nav-link {
  background: transparent;
  /* backdrop-filter removed */
  -webkit-/* backdrop-filter removed */
  border: 1px solid transparent;
  transition: all 0.3s ease;
  font-weight: 600; /* Semi-bold for navigation */
  letter-spacing: 0.05em;
}

.glass-nav-link:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

/* Components */

/* About Section Custom Styles */
#about {
    position: relative;
    overflow: hidden;
}

#about h2 {
    letter-spacing: -0.02em;
}

#about p {
    font-size: 1.125rem;
}

#about i.ph-quotes {
    pointer-events: none;
}

/* 3D-ish image frame matching the user design */
.portrait-frame {
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.25), 0 30px 60px -30px rgba(0, 0, 0, 0.3);
}

.stat-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(211, 189, 115, 0.1);
    color: #D3BD73;
    margin-bottom: 1rem;
}

.about-link-group:hover i {
    transform: translateX(4px);
}

/* Buttons */
.testimonial-slide.active {
    opacity: 1 !important;
    transform: translateX(0) !important;
    pointer-events: auto;
}

.testimonial-slide {
    pointer-events: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 2px solid transparent;
}

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

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

.btn-secondary {
    background-color: transparent;
    border-color: white;
    color: white;
}

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

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    /* backdrop-filter removed */
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    transition: all var(--transition-normal);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-heading);
}

.brand-icon {
    color: var(--color-primary);
    font-size: 1.75rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--color-text);
}

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



/* General Section Styles */
.section {
    padding: 6rem 2rem;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--color-text);
    margin-bottom: 4rem;
    max-width: 600px;
    margin-inline: auto;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--color-primary);
    border-radius: 1rem;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.service-card p {
    color: var(--color-text);
    font-size: 0.95rem;
}

/* Features Section */
.features-section {
    background-color: var(--color-bg-alt);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    text-align: left;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.feature-item .service-icon {
    margin-bottom: 1rem;
}

/* About / Personal Info Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.agent-photo {
    position: relative;
}

.agent-photo img {
    width: 100%;
    max-width: 500px;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    display: block;
}

.agent-quote {
    position: absolute;
    bottom: -2rem;
    right: -2rem;
    background: var(--color-secondary);
    color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    max-width: 300px;
    box-shadow: var(--shadow-lg);
    font-style: italic;
}

.about-content h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.agent-title {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.about-content p {
    margin-bottom: 1.5rem;
    white-space: pre-line;
}

/* Contact Section */
.contact-section {
    background-color: var(--color-bg-alt);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-icon {
    color: var(--color-primary);
    font-size: 1.5rem;
    margin-top: 0.25rem;
}

.contact-item h4 {
    margin-bottom: 0.25rem;
}

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

.contact-form {
    background: var(--color-bg);
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-heading);
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

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

/* Footer */
.footer {
    background-color: var(--color-secondary);
    color: rgba(255, 255, 255, 0.7);
    padding: 4rem 2rem 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand .brand {
    color: white;
    margin-bottom: 1rem;
}

.footer-nav ul, .footer-contact ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer h4 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer a:hover {
    color: white;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.875rem;
}

/* Calculators Section */
.calculators-section {
    background-color: var(--color-bg);
}

.calculator-container {
    background: #fff;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    overflow: hidden;
    margin-top: 2rem;
}

.calculator-tabs {
    display: flex;
    border-bottom: 2px solid var(--color-border);
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
}

.calculator-tabs::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.calc-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem 1rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #94a3b8; /* Light slate gray */
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    min-width: 150px;
    font-family: inherit;
    position: relative;
}

.calc-tab i {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.calc-tab:hover {
    color: var(--color-text);
}

.calc-tab.active {
    color: var(--color-primary);
}

/* Tab indicator line as seen in screenshot */
.calc-tab::after {
    content: '';
    position: absolute;
    bottom: -9px; /* adjust to center on border */
    width: 14px;
    height: 14px;
    background-color: #e2e8f0;
    border-radius: 50%;
    z-index: 2;
    transition: all var(--transition-fast);
}

.calc-tab.active::after {
    background-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.calculator-bodies {
    padding: 3rem 2rem;
    background-color: #fff;
}

.calc-body {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.calc-body.active {
    display: block;
}

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

.calc-scroll-wrapper {
    overflow-x: auto;
    margin: 0 -1rem;
    padding: 0 1rem;
    background: #fff;
    -webkit-overflow-scrolling: touch;
}

/* Payment Calculator Grid */
.payment-grid {
    display: grid;
    grid-template-columns: 180px repeat(4, 200px);
    gap: 1rem;
    align-items: center;
    min-width: 980px; /* Force minimum width to enable scrolling on mobile */
}

.payment-grid .label-cell {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 10;
    font-weight: 700;
}

.calc-cell {
    padding: 0.5rem;
}

.label-cell {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-navy);
    letter-spacing: -0.01em;
}

.label-sub {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(15, 30, 46, 0.5);
    margin-top: 2px;
}

.calc-span-1 { grid-column: span 1; }
.calc-span-2 { grid-column: span 2; }
.calc-span-5 { grid-column: span 5; }

.calc-divider {
    height: 1px;
    background-color: var(--color-border);
    margin: 1rem 0;
}

.calc-input-group {
    position: relative;
    width: 100%;
}

.calc-input-group.outlined {
    border: 1px solid rgba(15, 30, 46, 0.1);
    border-radius: 1rem;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.calc-input-group.outlined:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(211, 189, 115, 0.1);
}

.calc-input-group.border-red {
    border-color: rgba(239, 68, 68, 0.2); /* Subtle red instead of harsh */
}

.calc-input-group.border-red.has-error {
    border-color: #ef4444; /* Only harsh when actually empty/invalid */
}

.calc-input-group .floating-label,
.calc-input-wrapper .floating-label {
    position: absolute;
    top: -10px;
    left: 1rem;
    background: #fff;
    padding: 0 8px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-primary);
    z-index: 5;
}

.calc-input-group input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-navy);
    background: transparent;
}

.calc-input-wrapper.with-symbol {
    display: flex;
    align-items: center;
    border: 1px solid rgba(15, 30, 46, 0.1);
    border-radius: 1rem;
    padding: 0.75rem 1.25rem;
    transition: all 0.3s ease;
    position: relative;
    background: #fff;
}

.calc-input-wrapper.with-symbol:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(211, 189, 115, 0.1);
}

.calc-input-wrapper.with-symbol.text-red {
    border-color: #ef4444;
}

.calc-input-wrapper .symbol {
    color: var(--color-primary);
    font-weight: 500;
    font-size: 1rem;
    flex-shrink: 0;
    opacity: 0.4;
}
.calc-input-wrapper .symbol:first-child { margin-right: 0.75rem; }
.calc-input-wrapper .symbol:last-child { margin-left: 0.75rem; }

/* FIX Double Outline */
.calc-input-wrapper {
    position: relative;
}

.calc-input-wrapper .calc-input {
    flex: 1;
    height: 100%;
    min-height: 24px;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    outline: none !important;
}

/* Custom Autocomplete Results */
.calc-autocomplete-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    /* backdrop-filter removed */
    border: 1.5px solid rgba(15, 30, 46, 0.1);
    border-radius: 1.25rem;
    box-shadow: 0 15px 35px rgba(15, 30, 46, 0.15);
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
    display: none;
    padding: 8px;
    animation: slideInDown 0.2s ease-out;
}

.calc-autocomplete-results.active {
    display: block;
}

.autocomplete-item {
    padding: 12px 18px;
    cursor: pointer;
    border-radius: 0.85rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-navy);
    transition: all 0.2s ease;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    gap: 10px;
}

.autocomplete-item:hover {
    background: rgba(211, 189, 115, 0.08);
    color: var(--color-primary) !important;
    padding-left: 22px;
}

@keyframes slideInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.calc-input-wrapper .calc-input:focus {
    box-shadow: none !important;
    transform: none !important;
}

.calc-input {
    width: 100%;
    border: 1.5px solid rgba(15, 30, 46, 0.15);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    outline: none;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--color-navy);
    background: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(15, 30, 46, 0.05), 0 2px 4px -1px rgba(15, 30, 46, 0.03);
    transition: all 0.3s ease;
}

.calc-input:focus {
    border-color: var(--color-primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(211, 189, 115, 0.15);
    transform: translateY(-1px);
}

.calc-readonly {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    color: var(--color-navy);
    display: flex;
    align-items: center;
}

.highlight-row {
    background: rgba(211, 189, 115, 0.03) !important;
}

.text-gold-elite {
    color: var(--color-primary);
    font-weight: 850;
    text-shadow: 0 2px 4px rgba(211, 189, 115, 0.1);
}

.calc-bottom-section {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(15, 30, 46, 0.05);
}

.toggle-group {
    display: inline-flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 1rem;
    width: fit-content;
}

.toggle-btn {
    padding: 0.6rem 1.8rem;
    background: transparent;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.toggle-btn.active {
    background: #fff;
    color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.tax-dots {
    flex-grow: 1;
    border-bottom: 2px dotted rgba(15, 30, 46, 0.05);
    margin: 0 0.8rem;
}

/* Static Scenario Headers - Desktop Only */
.scenario-header-tag {
    background: rgba(15, 30, 46, 0.05);
    color: var(--color-navy);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-align: center;
    display: inline-block;
}

/* Mobile Scenario Selector */
.scenario-selector-mobile {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
    justify-content: center;
}

.scenario-selector-mobile::-webkit-scrollbar { display: none; }

.scenario-btn-mobile {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 0.25rem;
    border-radius: 0.5rem;
    background: rgba(15, 30, 46, 0.03);
    border: 1px solid rgba(15, 30, 46, 0.08);
    color: var(--color-navy);
    font-size: 0.7rem;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    white-space: nowrap;
}

.scenario-btn-mobile:hover {
    background: rgba(15, 30, 46, 0.08);
    transform: translateY(-1px);
}

.scenario-btn-mobile.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    box-shadow: 0 12px 24px -6px rgba(15, 30, 46, 0.25);
}



.calc-collapsible-list {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.calc-collapsible-item {
    border: 1px solid rgba(15, 30, 46, 0.05);
    border-radius: 1.25rem;
    background: #f8fafc;
    overflow: hidden;
    transition: all 0.3s ease;
}

.calc-collapsible-item.active {
    border-color: var(--color-primary);
    background: #ffffff;
    box-shadow: 0 10px 30px -10px rgba(15, 30, 46, 0.1);
}

.calc-collapsible-header {
    width: 100%;
    padding: 1.25rem 2rem;
    color: var(--color-navy);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 800;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    text-align: left;
}

.calc-collapsible-header:hover {
    background: #f1f5f9;
}

.calc-collapsible-item.active .calc-collapsible-header {
    background: transparent;
    border-bottom: 1px solid rgba(15, 30, 46, 0.05);
}

.calc-collapsible-header i {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--color-primary);
    font-size: 1.25rem;
}

.calc-collapsible-item.active .calc-collapsible-header i {
    transform: rotate(180deg);
}

.calc-collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.calc-collapsible-inner {
    padding: 1.5rem 2rem;
}

/* Data Rows inside Collapsibles */
.collapse-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    font-size: 1rem;
    color: var(--color-navy);
}

.collapse-row:not(:last-child) {
    border-bottom: 1px solid rgba(15, 30, 46, 0.05);
}

.collapse-row.total-row {
    font-weight: 800;
    font-size: 1.1rem;
    border-top: 2px solid rgba(15, 30, 46, 0.1);
    border-bottom: none;
    padding-top: 1rem;
    margin-top: 0.5rem;
}

.collapse-val {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}
.collapse-row.total-row .collapse-val {
    color: var(--color-primary);
    font-size: 1.25rem;
}

/* 1:1 Realtor Expansion Panel Styles */
.split-pane-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .split-pane-grid {
        grid-template-columns: 300px minmax(0, 1fr);
        gap: 3rem;
    }
}

.split-desc {
    font-size: 0.9rem;
    color: rgba(15, 30, 46, 0.8);
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.leader-row {
    display: flex;
    align-items: flex-end;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    color: var(--color-navy);
}

.leader-label {
    white-space: nowrap;
    color: rgba(15, 30, 46, 0.8);
}

.leader-dots {
    flex-grow: 1;
    border-bottom: 2px dotted rgba(15, 30, 46, 0.2);
    margin: 0 0.75rem 0.35rem 0.75rem;
    min-width: 1rem;
}

.leader-value {
    white-space: nowrap;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

.calc-mini-input {
    width: 110px;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(15, 30, 46, 0.15);
    border-radius: 0.25rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--color-navy);
    text-align: left;
    transition: all 0.2s;
    font-size: 0.95rem;
    background: #fff;
}

.calc-mini-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(45, 122, 224, 0.1);
}

.leader-row.total-row {
    margin-top: 2rem;
    align-items: center;
}
.leader-row.total-row .leader-label {
    font-weight: 800;
    font-size: 1.05rem;
}
.leader-row.total-row .leader-dots {
    border-bottom: none;
    flex-grow: 1;
}
.leader-row.total-row .leader-value {
    font-size: 1.6rem;
    color: var(--color-primary);
}

/* Header Dynamic Totals */
.calc-collapsible-header-text {
    display: flex;
    flex-direction: column;
}

.calc-collapsible-header-title {
    font-size: 1.05rem;
    font-weight: 800;
}

.calc-collapsible-header-total {
    font-size: 1.75rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    color: var(--color-primary);
    margin-top: 0.25rem;
    transition: opacity 0.3s, max-height 0.3s;
    max-height: 50px;
    opacity: 1;
}

.calc-collapsible-item.active .calc-collapsible-header-total {
    opacity: 0;
    max-height: 0;
    margin-top: 0;
    overflow: hidden;
}

/* Special Rate Risk Matrix */
.rate-matrix-box {
    background: #EAF4FB;
    border: 1px solid var(--color-primary);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.rate-matrix-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--color-primary);
    border-radius: 0.5rem;
    overflow: hidden;
}
.rate-matrix-table th, .rate-matrix-table td {
    padding: 1rem;
    text-align: right;
}
.rate-matrix-table th:first-child, .rate-matrix-table td:first-child {
    text-align: left;
}
.rate-matrix-table th {
    background: #fff;
    color: var(--color-primary);
    font-weight: 600;
    border-bottom: 1px solid rgba(15, 30, 46, 0.1);
}
.rate-matrix-table tr:nth-child(even) {
    background: #f8fafc;
}
.rate-matrix-table tr {
    background: #fff;
}


/* Media Queries */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero {
        padding-top: 8rem;
    }
    
    .about-grid, .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .agent-quote {
        position: relative;
        bottom: 0;
        right: 0;
        margin-top: -2rem;
        margin-left: auto;
        margin-right: -1rem;
        max-width: 90%;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Calculator Mobile Stacking */
    .payment-grid {
        display: flex;
        flex-direction: column;
        min-width: 0;
        gap: 1.5rem;
    }

    .payment-grid .label-cell {
        position: static;
        width: 100%;
        padding-bottom: 0.5rem;
        border-bottom: 2px solid var(--color-primary);
        margin-bottom: 0.5rem;
    }

    .calc-bottom-section {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .calc-tab {
        min-width: 110px;
        padding: 0.75rem 0.25rem;
        font-size: 0.8rem;
    }

    /* Scenario Card System */
    .scenario-selector-mobile {
        display: flex;
        gap: 0.5rem;
        margin-bottom: 2rem;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        scrollbar-width: none;
    }

    .scenario-selector-mobile::-webkit-scrollbar { display: none; }

    .scenario-btn-mobile.active {
        box-shadow: 0 10px 20px -5px rgba(15, 30, 46, 0.3);
    }

    /* Hide inactive scenarios on mobile */
    .calc-cell.mobile-hide {
        display: none !important;
    }

    /* Sticky Result Bar */
    .sticky-result-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.9);
        /* backdrop-filter removed */
        -webkit-/* backdrop-filter removed */
        border-top: 1px solid rgba(15, 30, 46, 0.1);
        padding: 1rem 1.5rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        z-index: 100;
        box-shadow: 0 -10px 30px rgba(0,0,0,0.1);
        transform: translateY(100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .sticky-result-bar.visible {
        transform: translateY(0);
    }

    .sticky-label {
        font-size: 0.7rem;
        font-weight: 800;
        text-transform: uppercase;
        color: var(--color-primary);
        letter-spacing: 0.05em;
    }

    .sticky-value {
        font-size: 1.5rem;
        font-weight: 900;
        color: var(--brand-navy);
    }
}

/* =========================================
   NEW CALCULATORS (LTT & Affordability)
========================================= */

/* LTT Calculator */
.ltt-calculator {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 0;
}

.ltt-results-box {
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 1.5rem;
    background-color: #f8fafc;
}

/* Affordability Calculator */
.aff-calculator {
    max-width: 750px;
    margin: 0 auto;
    padding: 1rem 0;
}

.aff-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

@media (max-width: 768px) {
    .aff-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.aff-label-col {
    display: flex;
    flex-direction: column;
}

.aff-row-title {
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.aff-row-desc {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin: 0;
    line-height: 1.4;
}

.aff-input-col {
    display: flex;
    flex-direction: column;
}

.outlined-soft {
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 0.75rem;
    font-size: 1rem;
    color: var(--color-text);
    transition: border-color var(--transition-fast);
}

.outlined-soft:focus {
    border-color: var(--color-primary);
    outline: none;
}


/* --- Advanced UI Refinements --- */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.skeleton-shimmer {
    background: linear-gradient(90deg, rgba(15, 30, 46, 0.03) 25%, rgba(15, 30, 46, 0.08) 50%, rgba(15, 30, 46, 0.03) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 4px;
    display: inline-block;
    min-width: 60px;
    min-height: 1em;
}
.tooltip-trigger { position: relative; cursor: help; }
.tooltip-trigger::after {
    content: attr(data-tip);
    font-family: 'Outfit', sans-serif;
    font-style: normal;
    text-transform: none;
    position: absolute; bottom: 125%; left: 50%; transform: translateX(-50%) translateY(10px);
    padding: 0.75rem 1rem; background: rgba(255, 255, 255, 0.95); /* backdrop-filter removed */ -webkit-/* backdrop-filter removed */
    border: 1px solid rgba(15, 30, 46, 0.1); color: var(--color-navy); font-size: 0.8rem; font-weight: 500; line-height: 1.5;
    border-radius: 1rem; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15); white-space: normal; width: 220px; z-index: 1000;
    opacity: 0; visibility: hidden; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); pointer-events: none;
}
.tooltip-trigger:hover::after, .tooltip-trigger:focus::after { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.tooltip-trigger.tooltip-down::after {
    bottom: auto;
    top: 125%;
    transform: translateX(-50%) translateY(-10px);
}
.tooltip-trigger.tooltip-down:hover::after, .tooltip-trigger.tooltip-down:focus::after {
    transform: translateX(-50%) translateY(0);
}
#sticky-mobile-summary {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.9); /* backdrop-filter removed */ -webkit-/* backdrop-filter removed */
    border-top: 1px solid rgba(15, 30, 46, 0.05); padding: 1rem; display: none; z-index: 1000;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.05);
}
@media (max-width: 1024px) { #sticky-mobile-summary.visible { display: block; } }


@media print {
    body.is-printing nav, body.is-printing footer, body.is-printing button, body.is-printing .lg\:hidden { display: none !important; }
    body.is-printing .glass-card { box-shadow: none !important; border: 1px solid rgba(15, 30, 46, 0.1) !important; background: #fff !important; }
    body.is-printing .calc-grid { display: grid !important; }
    body.is-printing svg { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    body.is-printing .calc-cell { color: #000 !important; }
    body.is-printing .text-white { color: #000 !important; }
}
/* Utilities */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

/* responsive table fixes */
@media (max-width: 640px) {
    .admin-table-container {
        margin: 0 -1rem;
        padding: 0 1rem;
    }
}
