/* ============================================================================
   LOAN EMI CALCULATOR — GLOBAL STYLESHEET
   Complete CSS overhaul for AdSense-compliant design
   Version: 2026-04-26-v2 (button hover fix + sitemap update)
   ============================================================================ */

/* ============================================================================
   1. IMPORT GOOGLE FONTS
   ============================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@600;700&display=swap');

/* ============================================================================
   2. CSS CUSTOM PROPERTIES (Color System + Spacing)
   ============================================================================ */
:root {
  /* Colors */
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --primary-light: #ede9fe;
  --accent: #10b981;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --bg: #f9fafb;
  --surface: #ffffff;
  --border: #e5e7eb;
  --error: #ef4444;
  --warning: #f59e0b;
  
  /* Typography */
  --font-base: 'Inter', sans-serif;
  --font-heading: 'Poppins', sans-serif;
  --font-size-base: 16px;
  --line-height-base: 1.7;
  
  /* Spacing & Sizing */
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
  
  /* Z-index scale */
  --z-sticky-nav: 100;
  --z-progress-bar: 200;
  --z-sidebar: 50;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================================
   3. RESET & BASE STYLES
   ============================================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: var(--font-size-base);
}

body {
  font-family: var(--font-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--text);
  background-color: var(--bg);
  animation: fadeIn 0.3s ease;
}

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

/* ============================================================================
   4. TYPOGRAPHY
   ============================================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  margin-top: 0;
  margin-bottom: 0.75rem;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 0.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
}

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

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

strong {
  font-weight: 600;
  color: var(--text);
}

/* ============================================================================
   5. NAVIGATION BAR (Sticky)
   ============================================================================ */
header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky-nav);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

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

.brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand::before {
  content: '₹';
  font-size: 1.25rem;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
  margin: 0;
  padding: 0;
}

nav a {
  color: #374151;
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition-fast);
}

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

nav a:hover::after {
  width: 100%;
}

.nav-btn-apply {
  background: var(--primary);
  color: var(--surface) !important;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  transition: background var(--transition-fast);
}

.nav-btn-apply:hover {
  background: var(--primary-dark);
  text-decoration: none;
}

.nav-btn-apply::after {
  display: none;
}

/* Hamburger menu (hidden by default, shown at mobile) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 101;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

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

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

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

/* Mobile nav menu (hidden by default) */
.mobile-menu {
  display: none;
  position: absolute;
  top: 60px;
  right: 0;
  left: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-direction: column;
  gap: 0;
  padding: 1rem 1.5rem;
  z-index: 99;
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu a {
  padding: 1rem 0;
  color: #374151;
  border-bottom: 1px solid var(--border);
  display: block;
}

.mobile-menu a:last-child {
  border-bottom: none;
}

/* ============================================================================
   6. FOOTER
   ============================================================================ */
footer {
  background: var(--text);
  color: #d1d5db;
  padding: 3rem 1.5rem 1rem;
  margin-top: 4rem;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--surface);
  margin-bottom: 1rem;
}

.footer-col p {
  font-size: 0.9rem;
  line-height: 1.6;
}

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

.footer-col li {
  margin-bottom: 0.75rem;
}

.footer-col a {
  color: #d1d5db;
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--surface);
  text-decoration: none;
}

.footer-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: #9ca3af;
}

/* ============================================================================
   7. FAVICON
   ============================================================================ */
link[rel="icon"] {
  background: var(--surface);
}

/* ============================================================================
   8. HELPER CLASSES & CARDS
   ============================================================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-flat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

/* Badge / Chip styles */
.badge {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-primary {
  background: var(--primary-light);
  color: var(--primary);
}

.badge-accent {
  background: #dcfce7;
  color: var(--accent);
}

.badge-warning {
  background: #fef3c7;
  color: var(--warning);
}

/* Trust signal badges */
.trust-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.trust-signal {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--primary-light);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--primary);
}

.trust-signal::before {
  content: '✓';
  font-weight: 700;
  font-size: 1.1rem;
}

/* ============================================================================
   9. FORMS & INPUTS
   ============================================================================ */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select {
  display: block;
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-base);
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  margin-bottom: 1rem;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Range Slider Styling */
input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  margin-bottom: 1rem;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  transition: background var(--transition-fast);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-webkit-slider-thumb:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: none;
  transition: background var(--transition-fast);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-moz-range-thumb:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Form group wrapper */
.form-group {
  margin-bottom: 1.5rem;
}

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

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

/* ============================================================================
   10. BUTTONS
   ============================================================================ */
button,
.btn,
.button {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  text-align: center;
  font-family: var(--font-base);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  appearance: none;
}

.btn-primary,
.button-primary,
.btn {
  background: var(--primary);
  color: var(--surface);
  text-decoration: none;
}

.btn-primary:hover,
.button-primary:hover,
.btn:hover {
  background: var(--primary-dark);
  color: var(--surface);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-primary:active,
.button-primary:active,
.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.2);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--border);
  color: var(--text);
  text-decoration: none;
}

.btn-block {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
}

/* ============================================================================
   11. HERO SECTION
   ============================================================================ */
.hero {
  background: var(--surface);
  padding: 3rem 1.5rem;
  text-align: center;
  margin-bottom: 3rem;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  margin-bottom: 1rem;
  font-size: 2.5rem;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.hero-with-accent {
  border-left: 5px solid var(--primary);
  padding-left: 1.5rem;
  text-align: left;
}

/* ============================================================================
   12. STAT CARDS (for results)
   ============================================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stat-value.primary {
  color: var(--primary);
}

.stat-value.error {
  color: var(--error);
}

.stat-value.text {
  color: var(--text);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ============================================================================
   13. CALCULATOR CARD
   ============================================================================ */
.calculator-card {
  max-width: 500px;
  margin: 0 auto 2rem;
}

.input-field {
  margin-bottom: 1.5rem;
}

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

.input-field input[type="range"] {
  margin-bottom: 0.5rem;
}

.input-field input[type="number"] {
  margin-bottom: 0;
}

/* ============================================================================
   14. LOAN TYPE CARDS GRID
   ============================================================================ */
.loan-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.loan-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
}

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

.loan-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.loan-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  margin-top: 0;
}

.loan-rate {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ============================================================================
   15. BLOG & GUIDES GRID
   ============================================================================ */
.blog-grid,
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.post-card,
.guide-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition-base);
  min-height: 100%;
}

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

.card-stripe {
  height: 4px;
  width: 100%;
  background: var(--primary);
}

.card-stripe.home {
  background: #3b82f6;
}

.card-stripe.car {
  background: #f59e0b;
}

.card-stripe.personal {
  background: #ec4899;
}

.card-stripe.education {
  background: #8b5cf6;
}

.card-stripe.government {
  background: var(--accent);
}

.card-stripe.strategy {
  background: var(--primary);
}

.card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.card-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
}

.card-read-time {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
  font-family: var(--font-heading);
}

.card-description {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.card-link:hover {
  gap: 0.5rem;
  text-decoration: none;
}

.card-link::after {
  content: ' →';
  transition: transform var(--transition-fast);
}

.card-link:hover::after {
  transform: translateX(3px);
}

/* ============================================================================
   16. TABLES
   ============================================================================ */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
}

table th {
  background: var(--primary);
  color: var(--surface);
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  border: none;
}

table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
}

table tbody tr:nth-child(even) {
  background: var(--primary-light);
}

table tbody tr:hover {
  background: rgba(79, 70, 229, 0.15);
}

/* Responsive table wrapper */
.table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
}

/* ============================================================================
   17. ARTICLE LAYOUT
   ============================================================================ */
.article-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.article-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.article-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.article-intro {
  font-size: 1.05rem;
  color: var(--text-muted);
  font-style: italic;
  border-left: 3px solid var(--primary-light);
  padding-left: 1rem;
  margin: 2rem 0;
}

/* Article body - ensure proper max-width */
.article {
  max-width: 720px;
  margin: 0 auto;
}

.article p {
  margin-bottom: 1.5rem;
}

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

.article li {
  margin-bottom: 0.5rem;
  line-height: 1.8;
}

/* ============================================================================
   18. TOC (TABLE OF CONTENTS)
   ============================================================================ */
.toc-box {
  background: var(--primary-light);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
}

.toc-box h3 {
  margin-top: 0;
  color: var(--primary);
  font-size: 1rem;
}

.toc-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-box li {
  margin-bottom: 0.5rem;
}

.toc-box a {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.toc-box a:hover {
  text-decoration: underline;
}

.toc-box a.active {
  font-weight: 700;
  color: var(--primary-dark);
}

/* Sticky TOC sidebar (desktop only) */
.toc-sidebar {
  display: none;
  position: fixed;
  left: 0;
  top: 100px;
  width: 200px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1.5rem 1rem;
  z-index: var(--z-sidebar);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  font-size: 0.85rem;
}

.toc-sidebar h4 {
  font-size: 0.85rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.toc-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-sidebar li {
  margin-bottom: 0.5rem;
}

.toc-sidebar a {
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--transition-fast);
  display: block;
  padding: 0.25rem 0;
}

.toc-sidebar a:hover {
  color: var(--primary);
  padding-left: 0.5rem;
}

.toc-sidebar a.active {
  color: var(--primary);
  font-weight: 700;
  border-left: 2px solid var(--primary);
  padding-left: 0.5rem;
}

/* ============================================================================
   19. READING PROGRESS BAR
   ============================================================================ */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  z-index: var(--z-progress-bar);
  width: 0%;
  transition: width var(--transition-fast);
}

/* ============================================================================
   20. ACCORDION / FAQ
   ============================================================================ */
.faq {
  margin: 2rem 0;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}

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

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  user-select: none;
  transition: color var(--transition-fast);
}

.faq-question:hover {
  color: var(--primary);
}

.faq-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  text-align: center;
  line-height: 20px;
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base) ease;
  color: var(--text-muted);
  margin-top: 0.5rem;
  line-height: 1.8;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

/* ============================================================================
   21. CTA BOXES
   ============================================================================ */
.cta-calculator {
  border-left: 4px solid var(--accent);
  background: #f0fdf4;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
}

.cta-calculator h3 {
  margin-top: 0;
  color: var(--accent);
}

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

/* ============================================================================
   22. RELATED ARTICLES SECTION
   ============================================================================ */
.related-articles {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}

.related-articles h2 {
  border: none;
  padding-bottom: 0;
  margin-top: 0;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.related-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  text-align: center;
  transition: all var(--transition-base);
}

.related-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.related-card h4 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: var(--text);
}

.related-card a {
  font-size: 0.9rem;
  font-weight: 600;
}

/* ============================================================================
   23. GRID LAYOUT CUSTOMIZATION
   ============================================================================ */

/* Blog/Guides responsive grid */
@media (max-width: 1024px) {
  .blog-grid,
  .guides-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  .toc-sidebar {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .blog-grid,
  .guides-grid {
    grid-template-columns: 1fr;
  }
  
  nav ul {
    display: none;
  }
  
  .hamburger {
    display: flex;
  }
  
  .mobile-menu {
    position: fixed;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  h1 {
    font-size: 1.5rem;
  }
  
  h2 {
    font-size: 1.25rem;
  }
  
  .article-header h1 {
    font-size: 1.5rem;
  }
  
  .loan-types-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  nav {
    padding: 0.75rem 1rem;
  }
  
  .brand {
    font-size: 1.25rem;
  }
  
  .trust-signals {
    flex-direction: column;
  }
  
  .card-meta {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .loan-types-grid {
    grid-template-columns: 1fr;
  }
  
  .hero {
    padding: 2rem 1rem;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .calculator-card {
    padding: 0;
  }
  
  .article {
    padding: 0 0.5rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   24. ACCESSIBILITY & CONTRAST
   ============================================================================ */
/* Ensure all text meets WCAG AA contrast ratio of 4.5:1 */
body {
  color: var(--text); /* #1a1a2e on #f9fafb = 15.5:1 */
}

.text-muted {
  color: var(--text-muted); /* #6b7280 on #ffffff = 5.6:1 */
}

/* Focus states for keyboard navigation */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Skip to main content link (for assistive tech) */
.skip-to-main {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: var(--surface);
  padding: 8px;
  text-decoration: none;
  z-index: 1000;
}

.skip-to-main:focus {
  top: 0;
}

/* ============================================================================
   25. UTILITY CLASSES
   ============================================================================ */
.margin-top {
  margin-top: 2rem;
}

.margin-bottom {
  margin-bottom: 2rem;
}

.padding-top {
  padding-top: 2rem;
}

.padding-bottom {
  padding-bottom: 2rem;
}

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

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

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

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

/* ============================================================================
   END STYLESHEET
   ============================================================================ */
