/* ==========================================
   CSS Design Tokens & Theme Variables
   ========================================== */
:root {
    /* Light Mode Palette */
    --bg-primary: #F8FAFC;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #F1F5F9;
    --border-color: rgba(15, 23, 42, 0.08);
    --border-hover: rgba(29, 78, 216, 0.2);
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #64748B;
    
    --card-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.02);
    --card-shadow-hover: 0 20px 45px -15px rgba(29, 78, 216, 0.12), 0 0 0 1px rgba(29, 78, 216, 0.15);
    
    /* Accents: Federal Blue & Military Gold */
    --accent: #1D4ED8;
    --accent-rgb: 29, 78, 216;
    --accent-light: #3B82F6;
    --accent-dark: #1E40AF;
    
    --gold: #B45309;
    --gold-rgb: 180, 83, 9;
    --gold-light: #F59E0B;
    --gold-dark: #78350F;
    
    --success: #10B981;
    
    --font-headings: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html.dark {
    /* Dark Mode Palette */
    --bg-primary: #080D1A;
    --bg-secondary: #0F172A;
    --bg-tertiary: #1E293B;
    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(59, 130, 246, 0.4);
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    
    --card-shadow: 0 10px 35px -12px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.3);
    --card-shadow-hover: 0 22px 50px -18px rgba(59, 130, 246, 0.22), 0 0 0 1px rgba(59, 130, 246, 0.35);
    
    --accent: #3B82F6;
    --accent-rgb: 59, 130, 246;
    --accent-light: #60A5FA;
    --accent-dark: #1D4ED8;
}

/* ==========================================
   Base Resets and Styling
   ========================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

h1, h2, h3, h4 {
    font-family: var(--font-headings);
    color: var(--text-primary);
    font-weight: 700;
}

a {
    transition: var(--transition);
}

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

/* ==========================================
   Header Navbar Layout
   ========================================== */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

html.dark header {
    background-color: rgba(15, 23, 42, 0.75);
}

html:not(.dark) header {
    background-color: rgba(255, 255, 255, 0.75);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

.back-link:hover {
    color: var(--accent);
    background: var(--border-color);
    transform: translateX(-2px);
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-headings);
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.025em;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(var(--accent-rgb), 0.25);
}

.logo-text-accent {
    color: var(--accent);
}

.theme-toggle-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    background: var(--border-color);
    transform: scale(1.05);
}

.theme-toggle-btn svg {
    width: 18px;
    height: 18px;
    position: absolute;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.sun-icon {
    opacity: 0;
    transform: translateY(30px) rotate(180deg);
}

.moon-icon {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
}

html.dark .sun-icon {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
}

html.dark .moon-icon {
    opacity: 0;
    transform: translateY(-30px) rotate(-180deg);
}

/* ==========================================
   Navigation Bar (Anchor)
   ========================================== */
.calculator-nav {
    position: sticky;
    top: 60px;
    z-index: 90;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    backdrop-filter: blur(8px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    gap: 1.5rem;
}

.nav-anchor {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-family: var(--font-headings);
    font-weight: 600;
    padding: 1rem 0.25rem;
    position: relative;
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-anchor:hover {
    color: var(--accent);
}

.nav-anchor.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ==========================================
   Hero Section
   ========================================== */
.calculator-hero {
    background: linear-gradient(135deg, #0B1530 0%, #152238 100%);
    padding: 4.5rem 1.5rem;
    text-align: center;
    color: #FFFFFF;
    position: relative;
    overflow: hidden;
}

.calculator-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 80% 20%, rgba(29, 78, 216, 0.18) 0%, transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(180, 83, 9, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: 30px 30px;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.01) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.01) 1px, transparent 1px);
    mask-image: radial-gradient(circle, black, transparent 80%);
    -webkit-mask-image: radial-gradient(circle, black, transparent 80%);
    pointer-events: none;
}

.hero-content {
    max-width: 750px;
    margin: 0 auto;
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-badge-container {
    margin-bottom: 1.25rem;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.3));
}

.hero-badge {
    width: 72px;
    height: 72px;
    fill: #B45309;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid #B45309;
    border-radius: 50%;
    padding: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s ease;
}

.hero-badge:hover {
    transform: scale(1.1) rotate(5deg);
}

.hero-title {
    font-size: clamp(2.15rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 0.85rem;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    color: #94A3B8;
    line-height: 1.6;
    max-width: 650px;
}

/* ==========================================
   Main Grid Layout
   ========================================== */
.main-calculator-layout {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.calc-grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: -2.5rem;
    position: relative;
    z-index: 10;
    margin-bottom: 3.5rem;
}

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

.calc-panel {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.25rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.calc-panel:hover {
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.05);
}

html.dark .calc-panel:hover {
    box-shadow: 0 20px 45px -15px rgba(0, 0, 0, 0.4);
}

.panel-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.panel-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--font-headings);
}

/* ==========================================
   Forms & Custom Inputs
   ========================================== */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.input-wrapper-prefix, .input-wrapper-suffix {
    display: flex;
    align-items: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: var(--transition);
    overflow: hidden;
}

.input-wrapper-prefix:focus-within, .input-wrapper-suffix:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
    background: var(--bg-secondary);
}

.input-prefix, .input-suffix {
    padding: 0 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    user-select: none;
}

.input-wrapper-prefix input, .input-wrapper-suffix input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 0.9rem 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    outline: none;
    font-family: var(--font-body);
}

.input-wrapper-prefix input {
    padding-left: 0.25rem;
}

.input-wrapper-suffix input {
    padding-right: 0.25rem;
    text-align: right;
}

/* Form row structure */
.form-row-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.downpayment-row {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 1rem;
}

.input-help-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
    line-height: 1.4;
}

/* Toggle Switch Control (Yes/No Toggles) */
.toggle-switch-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-tertiary);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 1.25rem;
}

.toggle-label-desc {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--text-muted);
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--accent);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Custom Select Dropdowns */
.select-wrapper {
    position: relative;
    width: 100%;
}

.select-wrapper select {
    width: 100%;
    padding: 0.9rem 2.5rem 0.9rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-body);
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}

.select-wrapper select:focus {
    border-color: var(--accent);
    background-color: var(--bg-secondary);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}

.select-wrapper::after {
    content: "";
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--text-muted);
    pointer-events: none;
}

/* Term toggle buttons (15 vs 30) */
.toggle-btn-group {
    display: flex;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 0.25rem;
    border-radius: 12px;
    width: 100%;
}

.toggle-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--font-headings);
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 9px;
    transition: var(--transition);
}

.toggle-btn:hover {
    color: var(--text-primary);
}

.toggle-btn.active {
    background: var(--bg-secondary);
    color: var(--accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

html.dark .toggle-btn.active {
    background: var(--bg-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Funding fee block style */
.funding-fee-highlight-box {
    background: rgba(180, 83, 9, 0.04);
    border: 1px dashed rgba(180, 83, 9, 0.25);
    padding: 1.25rem;
    border-radius: 16px;
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

html.dark .funding-fee-highlight-box {
    background: rgba(180, 83, 9, 0.08);
    border-color: rgba(180, 83, 9, 0.35);
}

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

.ff-rate-badge {
    background: var(--gold);
    color: #FFFFFF;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.15rem 0.6rem;
    border-radius: 9999px;
    display: inline-block;
    margin-top: 0.25rem;
}

.ff-value-col {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--gold);
}

/* ==========================================
   Results Display Panel
   ========================================== */
.results-panel {
    border-top: 6px solid var(--accent);
}

.payment-highlight-card {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.06) 0%, rgba(var(--accent-rgb), 0.01) 100%);
    border: 1px solid rgba(var(--accent-rgb), 0.15);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.highlight-label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.08em;
}

.highlight-value {
    font-size: clamp(2.25rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--accent);
    margin: 0.35rem 0;
    letter-spacing: -0.03em;
}

.highlight-subtext {
    font-size: 0.825rem;
    color: var(--text-muted);
}

.results-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.15rem;
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.stat-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

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

/* ==========================================
   Breakdown List & Chart Layout
   ========================================== */
.breakdown-section {
    border-top: 1px dashed var(--border-color);
    padding-top: 2rem;
    margin-bottom: 2rem;
}

.breakdown-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-family: var(--font-headings);
}

.chart-flex-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 576px) {
    .chart-flex-wrapper {
        flex-direction: row;
        justify-content: space-around;
    }
}

.donut-chart-container {
    position: relative;
    width: 170px;
    height: 170px;
}

#donut-svg {
    transform: rotate(-90deg);
}

.donut-track {
    fill: none;
    stroke: var(--bg-tertiary);
    stroke-width: 14;
}

.donut-segment {
    fill: none;
    stroke-width: 14;
    transition: stroke-dasharray 0.5s ease-out, stroke-dashoffset 0.5s ease-out;
}

.donut-center-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    width: 80%;
}

.donut-center-val {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.donut-center-lbl {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 0.15rem;
}

.breakdown-list {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: 100%;
    max-width: 300px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
}

.breakdown-item-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-secondary);
}

.legend-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.breakdown-item-value {
    color: var(--text-primary);
    font-weight: 700;
}

/* ==========================================
   VA vs Conventional Comparison Module
   ========================================== */
.comparison-section {
    border-top: 1px dashed var(--border-color);
    padding-top: 2rem;
}

.comparison-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-family: var(--font-headings);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.comparison-card {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.comparison-card.va-card {
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.03) 0%, rgba(29, 78, 216, 0.01) 100%);
    border-color: rgba(29, 78, 216, 0.2);
}

.comparison-card.va-card::after {
    content: "RECOMMENDED";
    position: absolute;
    top: 12px;
    right: -24px;
    background: var(--gold);
    color: white;
    font-size: 0.55rem;
    font-weight: 800;
    padding: 0.25rem 2rem;
    transform: rotate(45deg);
    letter-spacing: 0.05em;
}

.comparison-card.conv-card {
    background: var(--bg-secondary);
}

.comp-header {
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--font-headings);
    margin-bottom: 1rem;
}

.va-card .comp-header {
    color: var(--accent);
}

.comp-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.825rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.comp-row strong {
    color: var(--text-primary);
    font-weight: 700;
}

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

.comp-payment-box {
    margin-top: auto;
    padding-top: 0.5rem;
}

.comp-payment-lbl {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.comp-payment-val {
    font-size: 1.25rem;
    font-weight: 800;
}

.va-card .comp-payment-val {
    color: var(--accent);
}

/* Savings Highlight banner */
.savings-banner {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.02) 100%);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
}

.savings-title {
    color: #047857;
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

html.dark .savings-title {
    color: #10B981;
}

.savings-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.savings-desc strong {
    color: var(--text-primary);
}

/* ==========================================
   Responsive Grid Adjustments
   ========================================== */
@media (max-width: 576px) {
    .form-row-2col, .downpayment-row, .comparison-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .downpayment-row .input-group:last-child {
        margin-top: -0.5rem;
    }
}

/* ==========================================
   SEO content styling (Article / FAQ)
   ========================================== */
.seo-content-container {
    max-width: 850px;
    margin: 0 auto 5rem auto;
    padding: 0 1.5rem;
}

.seo-article {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    box-shadow: var(--card-shadow);
}

@media (max-width: 768px) {
    .seo-article {
        padding: 2rem 1.5rem;
    }
}

.seo-article h2 {
    font-size: 1.95rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.75rem;
    line-height: 1.3;
}

.seo-article h3 {
    font-size: 1.35rem;
    color: var(--text-primary);
    margin-top: 2.25rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.seo-article p {
    font-size: 1.025rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.seo-article ul, .seo-article ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.seo-article li {
    font-size: 1.025rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

/* Informative highlight calls in SEO copy */
.seo-callout {
    background-color: var(--bg-tertiary);
    border-left: 4px solid var(--accent);
    padding: 1.25rem 1.75rem;
    border-radius: 0 12px 12px 0;
    margin: 1.75rem 0;
}

.seo-callout-gold {
    background-color: var(--bg-tertiary);
    border-left: 4px solid var(--gold);
    padding: 1.25rem 1.75rem;
    border-radius: 0 12px 12px 0;
    margin: 1.75rem 0;
}

.seo-callout p, .seo-callout-gold p {
    margin-bottom: 0;
    font-size: 0.95rem;
    font-style: italic;
    color: var(--text-secondary);
}

.seo-table-wrapper {
    overflow-x: auto;
    margin: 1.75rem 0;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

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

.seo-table th {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 700;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.seo-table td {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

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

.seo-table tr:nth-child(even) {
    background-color: rgba(var(--accent-rgb), 0.01);
}

/* ==========================================
   Footer Layout
   ========================================== */
footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 1.5rem;
    margin-top: auto;
    transition: var(--transition);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.footer-brand {
    font-family: var(--font-headings);
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--text-primary);
}

.footer-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.footer-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.footer-link:hover {
    color: var(--accent);
}

.footer-copyright {
    font-size: 0.85rem;
    color: var(--text-muted);
}
