@charset "UTF-8";

/* ==========================================================================
   MORTGAGE CALCULATOR DESIGN SYSTEM
   Phase 2 Blueprint Compliant (~1200+ Lines Functionality)
   ========================================================================== */

:root {
  /* Core Colors - Dark Theme with Premium Depth */
  --bg: #060612;
  --bg-subtle: #0a0a18;
  --surface: #0e0e1e;
  --surface-light: #161630;
  --glass: rgba(255, 255, 255, 0.035);
  --glass-hover: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-strong: rgba(255, 255, 255, 0.14);

  /* Brand Accent */
  --gold: #2ecc71;
  --gold-light: #58d68d;
  --gold-dark: #27ae60;
  --gold-glow: rgba(46, 204, 113, 0.12);

  /* Typography Colors */
  --text-primary: #f0f0f5;
  --text-secondary: #b0b0c8;
  --text-muted: #6a6a84;
  --text-inverse: #060612;

  /* Layout & Sizing */
  --max-w: 1280px;
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  --spacing-4xl: 5rem;
  --spacing-5xl: 8rem;

  /* UI Elements */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  /* Shadows & Effects */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25), 0 1px 3px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45), 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 24px rgba(46, 204, 113, 0.12), 0 0 60px rgba(46, 204, 113, 0.06);

  /* Animations */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  overflow-wrap: break-word;
  word-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(46, 204, 113, 0.06) 0%, transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(46, 204, 113, 0.03) 0%, transparent 40%);
  background-attachment: fixed;
}

body.nav-open {
  overflow: hidden;
}

/* Typography Base */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 3.5vw, 2.5rem);
}

h3 {
  font-size: clamp(1.5rem, 2.5vw, 1.8rem);
  margin-bottom: var(--spacing-sm);
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.1rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: var(--spacing-md);
  color: var(--text-secondary);
}

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

a:hover,
a:focus {
  color: var(--gold-light);
  text-decoration: underline;
}

ul,
ol {
  margin-bottom: var(--spacing-md);
  padding-left: var(--spacing-lg);
  color: var(--text-secondary);
}

li {
  margin-bottom: var(--spacing-xs);
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
  /* Responsive padding: 16px on small → 32px on large */
}

.section {
  padding-block: var(--spacing-5xl);
}

.section-sm {
  padding-block: var(--spacing-3xl);
}

/* Reduced section padding for mobile — prevents excessive whitespace */
@media (max-width: 768px) {
  .section {
    padding-block: 4rem;
  }

  .section-sm {
    padding-block: 2rem;
  }

  /* Reduce glass-card inner padding on tablet */
  .glass-card {
    padding: var(--spacing-xl);
    /* 2rem instead of 3rem */
  }
}

@media (max-width: 480px) {
  .section {
    padding-block: 2.5rem;
  }

  .section-sm {
    padding-block: 1.5rem;
  }

  /* Further reduce glass-card padding on phones */
  .glass-card {
    padding: var(--spacing-lg);
    /* 1.5rem */
    border-radius: var(--radius-sm);
    /* Slightly less rounding on tiny screens */
  }

  .glass-card-sm {
    padding: var(--spacing-md);
  }

  /* Prose max-width fill on mobile */
  .prose {
    font-size: 1rem;
  }
}

/* ==========================================================================
   HEADER & NAVBAR
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  z-index: 1000;
  background: rgba(6, 6, 18, 0.6);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  transition: all var(--transition);
}

.navbar.scrolled {
  background: rgba(6, 6, 18, 0.92);
  border-bottom-color: rgba(46, 204, 113, 0.1);
  box-shadow: 0 1px 30px rgba(0, 0, 0, 0.4), 0 0 60px rgba(46, 204, 113, 0.03);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
  /* Match .container padding */
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  text-decoration: none;
  z-index: 1001;
}

.nav-logo svg {
  width: 32px;
  height: 32px;
}

.nav-logo:hover {
  text-decoration: none;
  color: var(--gold);
}

.nav-logo svg path {
  stroke: var(--gold);
}

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

.nav-links li {
  margin: 0;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
  padding: var(--spacing-xs) 0;
  position: relative;
}

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

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

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

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

.nav-highlight {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--text-inverse) !important;
  padding: 0.5rem 1.25rem !important;
  border-radius: var(--radius-pill);
  font-weight: 600 !important;
}

.nav-highlight::after {
  display: none;
}

.nav-highlight:hover {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(46, 204, 113, 0.25);
}

/* Dropdown Navigation */
.nav-dropdown {
  position: relative;
}

.nav-dropdown>a {
  cursor: pointer;
  user-select: none;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 230px;
  background: rgba(14, 14, 30, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0;
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
  z-index: 1010;
}

.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid var(--glass-border);
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-menu li {
  margin: 0;
}

.dropdown-menu li a {
  display: block;
  padding: 0.6rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.dropdown-menu li a:hover {
  background: var(--glass);
  color: var(--gold);
}

.dropdown-menu li a::after {
  display: none;
}

/* Nav Utils (Search & Translate) */
.nav-utils {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-left: var(--spacing-md);
  padding-left: var(--spacing-md);
  border-left: 1px solid var(--glass-border);
}

.nav-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.nav-icon-btn:hover {
  color: var(--gold);
  background: var(--glass);
}

.lang-selector {
  position: relative;
  display: flex;
  align-items: center;
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0;
  min-width: 150px;
  max-height: 320px;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition);
  z-index: 1010;
}

.lang-selector.active .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-dropdown button {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.lang-dropdown button:hover {
  background: var(--glass);
  color: var(--text-primary);
}

/* Hamburger */
.hamburger {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
  position: relative;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: all 0.3s ease-in-out;
  border-radius: 2px;
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Off-Canvas: hidden on desktop */
.nav-backdrop {
  display: none;
}

.nav-menu-header,
.nav-menu-search {
  display: none;
}

/* ==========================================================================
   HERO SECTIONS
   ========================================================================== */
.page-hero {
  padding: 140px 0 70px;
  position: relative;
  text-align: center;
  overflow: hidden;
}

/* Ensure hero content doesn't touch edges on mobile */
.page-hero .container,
.page-hero .breadcrumb {
  padding-left: clamp(1rem, 4vw, 2rem);
  padding-right: clamp(1rem, 4vw, 2rem);
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 80vw;
  height: 80vw;
  max-width: 1100px;
  max-height: 1100px;
  background:
    radial-gradient(circle, rgba(46, 204, 113, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 30% 50%, rgba(46, 204, 113, 0.06) 0%, transparent 50%);
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
  animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% {
    opacity: 0.7;
    transform: translateX(-50%) scale(1);
  }

  100% {
    opacity: 1;
    transform: translateX(-50%) scale(1.05);
  }
}

.page-hero .breadcrumb {
  justify-content: center;
  margin-bottom: var(--spacing-lg);
}

.page-hero h1 {
  max-width: 900px;
  margin: 0 auto 1.5rem;
  text-wrap: balance;
  letter-spacing: -0.03em;
}

.page-hero h1 strong {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-hero p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Variants */
.hero-premium {
  padding: 150px 0 80px;
}

.hero-premium::before {
  background: radial-gradient(circle, rgba(46, 204, 113, 0.2) 0%, transparent 70%);
}

.hero-bg-glow {
  background: linear-gradient(180deg, rgba(46, 204, 113, 0.05) 0%, transparent 100%);
}

/* Breadcrumbs */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  text-decoration: underline;
  color: var(--gold);
}

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

.breadcrumb .current {
  color: var(--gold);
  font-weight: 500;
}

/* ==========================================================================
   CARDS & CONTAINERS (GLASSMORPHISM)
   ========================================================================== */
.glass-card {
  background: linear-gradient(145deg, rgba(14, 14, 30, 0.9) 0%, rgba(10, 10, 24, 0.95) 100%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: var(--spacing-2xl);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  position: relative;
  overflow-wrap: break-word;
  word-break: break-word;
}

.glass-card:hover {
  border-color: rgba(46, 204, 113, 0.25);
  box-shadow: var(--shadow-glow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateY(-3px);
}

.glass-card-sm {
  padding: var(--spacing-lg);
}

/* Highlight Box */
.highlight-box {
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.05) 0%, rgba(46, 204, 113, 0.02) 100%);
  border-left: 3px solid var(--gold);
  padding: var(--spacing-lg) var(--spacing-xl);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: var(--spacing-xl) 0;
}

.highlight-box h3,
.highlight-box h4 {
  color: var(--gold);
  margin-top: 0;
}

/* Divider */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
  margin: var(--spacing-3xl) 0;
  border: none;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  font-family: 'Inter', sans-serif;
  gap: 0.5rem;
  text-align: center;
}

.btn-gold,
.btn-accent {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--text-inverse) !important;
  border-color: transparent;
  text-decoration: none !important;
}

.btn-gold:hover,
.btn-accent:hover {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(46, 204, 113, 0.3), 0 0 0 1px rgba(46, 204, 113, 0.3);
}

.btn-outline {
  background-color: transparent;
  color: var(--gold) !important;
  border-color: rgba(46, 204, 113, 0.4);
  text-decoration: none !important;
}

.btn-outline:hover {
  background-color: var(--gold);
  color: var(--text-inverse) !important;
  border-color: var(--gold);
  box-shadow: 0 4px 16px rgba(46, 204, 113, 0.25);
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ==========================================================================
   FORMS & INPUTS
   ========================================================================== */
.form-group {
  margin-bottom: var(--spacing-lg);
}

.input-group {
  margin-bottom: var(--spacing-md);
  position: relative;
}

.input-group label {
  display: block;
  margin-bottom: var(--spacing-xs);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
}

.input-group input,
.input-group select,
.input-group textarea {
  width: 100%;
  padding: 0.9rem 1.15rem;
  background: rgba(22, 22, 48, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  outline: none;
}

.input-group input:hover,
.input-group select:hover,
.input-group textarea:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(22, 22, 48, 0.8);
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.12);
  background: rgba(22, 22, 48, 0.9);
}

.input-group input::placeholder,
.input-group textarea::placeholder {
  color: var(--text-muted);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f0f0f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1em;
  padding-right: 3rem !important;
}

/* Custom Checkbox/Radio */
.check-group {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  cursor: pointer;
}

.check-group input[type="checkbox"],
.check-group input[type="radio"] {
  width: auto;
  accent-color: var(--gold);
  transform: scale(1.2);
}

/* ==========================================================================
   TABLES
   ========================================================================== */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: linear-gradient(160deg, var(--surface) 0%, rgba(10, 10, 24, 0.9) 100%);
  margin: var(--spacing-xl) 0;
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th,
td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--glass-border);
}

th {
  background: rgba(22, 22, 48, 0.8);
  color: var(--gold);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

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

tbody tr {
  transition: background var(--transition-fast);
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.table-numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   FAQ ACCORDION
   ========================================================================== */
.faq-section {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: var(--spacing-sm);
}

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

.faq-q {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: var(--spacing-lg) 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color var(--transition);
}

.faq-q:hover {
  color: var(--gold);
}

.faq-icon {
  width: 24px;
  height: 24px;
  position: relative;
  transition: transform var(--transition);
}

.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background: var(--text-secondary);
  transition: all var(--transition);
}

.faq-icon::before {
  top: 11px;
  left: 4px;
  width: 16px;
  height: 2px;
}

.faq-icon::after {
  top: 4px;
  left: 11px;
  width: 2px;
  height: 16px;
}

.faq-item.active .faq-q {
  color: var(--gold);
}

.faq-item.active .faq-icon::before,
.faq-item.active .faq-icon::after {
  background: var(--gold);
}

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

.faq-item.active .faq-icon::after {
  opacity: 0;
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition);
}

.faq-a-inner {
  padding-bottom: var(--spacing-lg);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ==========================================================================
   BLOG CARDS & CAROUSEL
   ========================================================================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--spacing-xl);
  margin-top: var(--spacing-xl);
}

.blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: linear-gradient(160deg, var(--surface) 0%, rgba(10, 10, 24, 0.95) 100%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(46, 204, 113, 0.06);
  border-color: rgba(46, 204, 113, 0.2);
}

.blog-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--surface-light);
  border-bottom: 1px solid var(--glass-border);
}

.blog-card-content {
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-badge {
  display: inline-block;
  background: rgba(46, 204, 113, 0.1);
  /* gold with opacity */
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  margin-bottom: var(--spacing-md);
  align-self: flex-start;
}

.blog-card-title {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
  line-height: 1.4;
}

.blog-card-title a {
  color: inherit;
  text-decoration: none;
}

.blog-card-title a:hover {
  color: var(--gold);
}

.blog-card-excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: var(--spacing-lg);
  flex: 1;
}

.blog-cta {
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
}

.blog-cta svg {
  transition: transform var(--transition);
}

.blog-card:hover .blog-cta {
  color: var(--gold-light);
}

.blog-card:hover .blog-cta svg {
  transform: translateX(4px);
}

/* Swiper Overrides */
.swiper-pagination-bullet {
  background: var(--text-muted) !important;
  opacity: 0.5 !important;
}

.swiper-pagination-bullet-active {
  background: var(--gold) !important;
  opacity: 1 !important;
}

.swiper-button-next,
.swiper-button-prev {
  color: var(--gold) !important;
  background: var(--surface);
  width: 44px !important;
  height: 44px !important;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
}

.swiper-button-next:after,
.swiper-button-prev:after {
  font-size: 1.2rem !important;
}

/* ==========================================================================
   PROSE / ARTICLE CONTENT
   ========================================================================== */
.prose {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.prose h2,
.prose h3,
.prose h4 {
  color: var(--text-primary);
  margin-top: 2.5em;
  margin-bottom: 1em;
}

.prose h2 {
  font-size: 2rem;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 0.5rem;
}

.prose h3 {
  font-size: 1.5rem;
}

.prose p {
  margin-bottom: 1.5em;
}

.prose ul,
.prose ol {
  margin-bottom: 1.5em;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5em;
}

.prose blockquote {
  border-left: 4px solid var(--gold);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text-primary);
  background: rgba(46, 204, 113, 0.05);
  padding: 1.5rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.prose a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: rgba(46, 204, 113, 0.4);
  text-underline-offset: 4px;
}

.prose a:hover {
  color: var(--gold-light);
  text-decoration-color: var(--gold-light);
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: 2rem 0;
  border: 1px solid var(--glass-border);
}

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

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-lg);
  justify-content: center;
  margin-top: var(--spacing-lg);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.article-meta a {
  color: var(--text-secondary);
}

.article-meta a:hover {
  color: var(--gold);
}

/* Table of Contents */
.toc-container {
  background: linear-gradient(145deg, rgba(14, 14, 30, 0.8) 0%, rgba(10, 10, 24, 0.9) 100%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: var(--spacing-xl);
  margin: 2rem 0 3rem;
}

.toc-container h3 {
  margin-top: 0;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.toc-container ul {
  list-style-type: none;
  padding-left: 0;
  margin-bottom: 0;
}

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

.toc-container a {
  text-decoration: none;
  color: var(--text-secondary);
}

.toc-container a:hover {
  text-decoration: underline;
  color: var(--gold);
}

/* Related Grid (Internal Linking) */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

/* Social Share Section */
.social-share-section {
  max-width: 800px;
  margin: 3rem auto;
  padding: 2rem;
  background: linear-gradient(145deg, var(--surface-light) 0%, rgba(14, 14, 30, 0.6) 100%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  text-align: center;
}

.social-share-section p {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.social-share {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.social-share .btn {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* ==========================================================================
   FOOTER & LSI KEYWORD GRID
   ========================================================================== */
.lsi-footer-block {
  background: linear-gradient(180deg, var(--surface-light) 0%, var(--bg-subtle) 100%);
  padding: var(--spacing-3xl) 0;
  margin-top: var(--spacing-4xl);
  border-top: 1px solid var(--glass-border);
}

.lsi-footer-block h3 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: var(--spacing-xl);
}

.lsi-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
  /* Match .container padding */
}

.lsi-grid a {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
}

.lsi-grid a::after {
  content: " \2022";
  padding-left: 1rem;
  color: var(--glass-border);
}

.lsi-grid a:last-child::after {
  content: "";
}

.lsi-grid a:hover {
  color: var(--gold);
}

/* Main Footer */
footer {
  background: linear-gradient(180deg, var(--bg-subtle) 0%, var(--bg) 100%);
  border-top: 1px solid var(--glass-border);
  padding: var(--spacing-4xl) 0 2rem;
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(46, 204, 113, 0.2), transparent);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
  /* Match .container padding */
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--spacing-3xl);
}

/* Tablet: brand goes full-width, link cols share second row */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--spacing-xl);
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

.footer-brand h3 {
  font-size: 1.8rem;
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
}

.footer-brand p {
  font-size: 0.95rem;
  margin-bottom: var(--spacing-md);
}

.footer-email a {
  color: var(--gold);
  font-weight: 600;
  font-size: 1.1rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.footer-social a {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  transition: all var(--transition);
}

.footer-social a:hover {
  color: var(--gold);
  border-color: rgba(46, 204, 113, 0.4);
  transform: translateY(-3px);
  background: rgba(46, 204, 113, 0.08);
  box-shadow: 0 4px 12px rgba(46, 204, 113, 0.1);
}

.footer-social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-col h4 {
  color: var(--text-primary);
  font-size: 1.1rem;
  margin-bottom: var(--spacing-lg);
}

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

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

.footer-col ul a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: color var(--transition);
}

.footer-col ul a:hover {
  color: var(--gold);
}

.footer-bottom {
  margin-top: var(--spacing-4xl);
  padding-top: var(--spacing-xl);
  border-top: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.dmca-badge img {
  opacity: 0.7;
  transition: opacity var(--transition);
}

.dmca-badge:hover img {
  opacity: 1;
}

/* ==========================================================================
   GLOBAL UI (Chatbot, Search Overlay, Back to Top)
   ========================================================================== */
/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 46px;
  height: 46px;
  background: var(--surface);
  color: var(--gold);
  border: 1px solid rgba(46, 204, 113, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--gold);
  color: var(--text-inverse);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(46, 204, 113, 0.25);
}

/* Search Overlay */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 5, 16, 0.95);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-container {
  width: 100%;
  max-width: 800px;
  padding: 0 var(--spacing-xl);
  position: relative;
  transform: translateY(30px);
  transition: transform var(--transition);
}

.search-overlay.active .search-container {
  transform: translateY(0);
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--text-muted);
  color: var(--text-primary);
  font-size: clamp(2rem, 4vw, 3rem);
  padding: 1rem 0;
  font-family: 'Playfair Display', serif;
  transition: border-color var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--gold);
}

.search-close {
  position: absolute;
  top: 40px;
  right: 40px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 2rem;
  cursor: pointer;
  transition: color var(--transition);
}

.search-close:hover {
  color: var(--gold);
}

/* Chatbot UI */
.chatbot-widget {
  position: fixed;
  bottom: 88px;
  /* Sits above the back-to-top button */
  right: 24px;
  z-index: 999;
  /* Panel is position:absolute relative to this fixed parent */
}

.chatbot-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 8px 24px rgba(46, 204, 113, 0.2), 0 2px 8px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}

.chatbot-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 30px rgba(46, 204, 113, 0.3), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.chatbot-btn svg {
  width: 28px;
  height: 28px;
  fill: var(--text-inverse);
}

.chatbot-panel {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 360px;
  min-height: 300px;
  max-height: min(480px, calc(100dvh - 200px));
  background: rgba(14, 14, 30, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.96);
  transition: all var(--transition);
  transform-origin: bottom right;
}

.chatbot-panel.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.chatbot-header {
  padding: 1rem;
  background: var(--surface-light);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-family: 'Inter', sans-serif;
}

.chatbot-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
}

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

.chatbot-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chatbot-msg {
  max-width: 85%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.4;
}

.chatbot-msg.bot {
  background: var(--surface-light);
  border: 1px solid var(--glass-border);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chatbot-msg.user {
  background: var(--gold);
  color: var(--text-inverse);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chatbot-input-area {
  padding: 1rem;
  border-top: 1px solid var(--glass-border);
  display: flex;
  gap: 0.5rem;
}

.chatbot-input {
  flex: 1;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border);
  background: var(--surface-light);
  color: var(--text-primary);
  outline: none;
}

.chatbot-input:focus {
  border-color: var(--gold);
}

.chatbot-send {
  background: var(--gold);
  color: var(--text-inverse);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Selection highlight */
::selection {
  background: rgba(46, 204, 113, 0.2);
  color: var(--text-primary);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.18);
}

.pulsing-badge {
  position: relative;
}

.pulsing-badge::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
  animation: pulse 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulse {
  to {
    box-shadow: 0 0 0 10px rgba(46, 204, 113, 0);
  }
}

/* Live Rates Ticker Bar */
.ticker-bar {
  background: var(--surface-light);
  border-bottom: 1px solid var(--glass-border);
  padding: 0.5rem 0;
  width: 100%;
  font-size: 0.85rem;
  overflow: hidden;
  position: fixed;
  top: 80px;
  /* Below navbar */
  z-index: 900;
}

.ticker-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  animation: ticker 30s linear infinite;
}

@media (max-width: 768px) {
  .ticker-content {
    justify-content: left;
    white-space: nowrap;
    width: max-content;
  }
}

.ticker-item strong {
  color: var(--gold);
}

@keyframes ticker {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* Adjusted spacing for fixed navbar */
body {
  padding-top: 80px;
}


/* ==========================================================================
   SPECIFIC CALCULATOR LAYOUTS
   ========================================================================== */
.calculator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-3xl);
}

.calculator-inputs {
  padding-right: var(--spacing-xl);
  border-right: 1px solid var(--glass-border);
}

.results-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: var(--spacing-2xl);
  background: linear-gradient(160deg, rgba(46, 204, 113, 0.06) 0%, rgba(14, 14, 30, 0.8) 40%, rgba(46, 204, 113, 0.03) 100%);
  border-radius: var(--radius);
  border: 1px solid rgba(46, 204, 113, 0.15);
  box-shadow: 0 0 50px rgba(46, 204, 113, 0.05), inset 0 1px 0 rgba(46, 204, 113, 0.1);
  position: relative;
  overflow: hidden;
}

.results-panel::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -30%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(46, 204, 113, 0.08) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
  animation: panelGlow 6s ease-in-out infinite alternate;
}

@keyframes panelGlow {
  0% {
    opacity: 0.6;
  }

  100% {
    opacity: 1;
  }
}

.result-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.result-value {
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin: var(--spacing-sm) 0 var(--spacing-lg);
  font-feature-settings: "tnum";
  filter: drop-shadow(0 0 20px rgba(46, 204, 113, 0.25));
}

.result-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--glass-border);
  font-size: 0.95rem;
}

.result-row:last-child {
  border-bottom: none;
}

.result-row-label {
  color: var(--text-secondary);
}

.result-row-value {
  color: var(--text-primary);
  font-weight: 600;
  font-feature-settings: "tnum";
}

/* ── Donut Chart ── */
.result-donut-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: var(--spacing-lg);
}

.result-donut-wrap svg {
  filter: drop-shadow(0 0 12px rgba(46, 204, 113, 0.15));
}

.donut-legend {
  display: flex;
  gap: 1.5rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* ── Stat Cards Grid ── */
.result-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  width: 100%;
  margin-bottom: var(--spacing-lg);
}

.result-stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  transition: border-color 0.2s ease;
}

.result-stat-card:hover {
  border-color: rgba(46, 204, 113, 0.2);
}

.result-stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.result-stat-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  font-feature-settings: "tnum";
}

/* ── Action Buttons Row ── */
.result-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
}

.result-actions .btn {
  justify-content: center;
  font-size: 0.9rem;
}

.calculator-grid.glass-card {
  background: linear-gradient(160deg, rgba(14, 14, 30, 0.95) 0%, rgba(10, 10, 20, 0.98) 50%, rgba(14, 14, 30, 0.95) 100%);
  border: 1px solid rgba(46, 204, 113, 0.12);
  box-shadow:
    0 25px 80px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(46, 204, 113, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.calculator-grid.glass-card:hover {
  transform: none;
}

.calculator-inputs h3 {
  color: var(--text-primary);
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.calculator-inputs h3::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 1.4em;
  background: var(--gold);
  border-radius: 2px;
  flex-shrink: 0;
}

/* Tools Section Above Fold */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
  gap: var(--spacing-md);
  margin: var(--spacing-2xl) 0;
}

.tool-card {
  background: linear-gradient(145deg, rgba(14, 14, 30, 0.8) 0%, rgba(10, 10, 24, 0.9) 100%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 1.15rem 1.35rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
}

.tool-card:hover {
  border-color: rgba(46, 204, 113, 0.3);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--gold);
  box-shadow: 0 4px 20px rgba(46, 204, 113, 0.08);
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.tool-card-name {
  font-size: 0.9rem;
  font-weight: 600;
}


/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* Tablet Landscape */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }

  .footer-grid>div:last-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
  }

  .calculator-grid {
    gap: var(--spacing-xl);
  }

  .calculator-inputs {
    padding-right: var(--spacing-md);
  }
}

/* Tablet Portrait / Mobile Landscape */
@media (max-width: 768px) {

  .navbar {
    height: 70px;
  }

  .hamburger {
    display: block;
  }

  /* ── Off-Canvas Backdrop ── */
  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
  }

  .nav-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }

  /* ── Off-Canvas Panel ── */
  .nav-links {
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    bottom: auto;
    height: 100vh;
    height: 100dvh;
    width: 85%;
    max-width: 380px;
    background: rgba(6, 6, 18, 0.75);
    backdrop-filter: blur(24px) saturate(1.5);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    gap: 0;
    transform: translateX(100%);
    opacity: 1;
    pointer-events: none;
    transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1);
    z-index: 1002;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.6), inset 1px 0 0 rgba(255, 255, 255, 0.02);
  }

  .nav-links.active {
    transform: translateX(0);
    pointer-events: auto;
  }

  /* ── Menu Header ── */
  .nav-menu-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, rgba(46, 204, 113, 0.05) 0%, transparent 100%);
  }

  .nav-menu-header .menu-brand {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    font-family: 'Playfair Display', serif;
  }

  .nav-menu-header .menu-brand svg {
    width: 24px;
    height: 24px;
    margin-right: 0.5rem;
  }

  .nav-menu-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .nav-menu-close:hover {
    background: rgba(46, 204, 113, 0.15);
    border-color: rgba(46, 204, 113, 0.4);
    color: var(--gold);
    transform: rotate(90deg);
  }

  /* ── Menu Search ── */
  .nav-menu-search {
    display: block !important;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  }

  .nav-menu-search input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.75rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238a8a9e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 1rem center;
  }

  .nav-menu-search input:focus {
    border-color: rgba(46, 204, 113, 0.4);
    background: rgba(46, 204, 113, 0.04);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
  }

  .nav-menu-search input::placeholder {
    color: var(--text-muted);
  }

  /* ── Menu Links ── */
  .nav-links>li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  }

  .nav-links>li:last-child {
    border-bottom: none;
  }

  .nav-links a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.05rem;
    font-weight: 500;
    padding: 1.1rem 1.5rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-links a:hover,
  .nav-links a.active {
    color: var(--gold);
    background: rgba(46, 204, 113, 0.05);
    padding-left: 1.75rem;
  }

  .nav-links a.active {
    border-right: 3px solid var(--gold);
    background: linear-gradient(90deg, transparent, rgba(46, 204, 113, 0.08));
  }

  .nav-links .nav-highlight {
    margin: 1rem 1.5rem;
    justify-content: center;
    border-radius: var(--radius-pill);
    padding: 0.8rem 1.25rem !important;
    background: var(--gold) !important;
    color: var(--bg) !important;
    font-weight: 600;
    transform: none !important;
    border-right: none !important;
  }

  .nav-utils {
    display: none;
  }

  /* ── Mobile Dropdown Accordion ── */
  .nav-dropdown>a {
    justify-content: space-between;
  }

  .nav-dropdown>a::after {
    content: '';
    display: block !important;
    width: 6px !important;
    height: 6px !important;
    border-right: 2px solid currentColor !important;
    border-bottom: 2px solid currentColor !important;
    border-left: none !important;
    border-top: none !important;
    transform: rotate(45deg);
    transition: transform 0.3s ease !important;
    position: static !important;
    background: none !important;
    opacity: 0.7;
    margin-right: 0.5rem;
  }

  .nav-dropdown.open>a::after {
    transform: rotate(-135deg);
  }

  .dropdown-menu {
    position: static !important;
    width: 100%;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    box-shadow: none !important;
    border: none;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease !important;
    border-radius: 0;
  }

  .dropdown-menu::before {
    display: none;
  }

  .nav-dropdown.open .dropdown-menu {
    max-height: 600px;
  }

  .dropdown-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  }

  .dropdown-menu li:last-child {
    border-bottom: none;
  }

  .dropdown-menu li a {
    padding: 0.8rem 1.5rem 0.8rem 2.5rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    border-right: none;
    background: transparent !important;
  }

  .dropdown-menu li a:hover {
    color: var(--white);
    padding-left: 2.75rem;
  }

  .dropdown-menu li a::before {
    content: '';
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--gold);
    opacity: 0.5;
    transition: all 0.3s ease;
  }

  .dropdown-menu li a:hover::before {
    opacity: 1;
    transform: translateY(-50%) scale(1.5);
  }

  .calculator-grid {
    grid-template-columns: 1fr;
  }

  .calculator-inputs {
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: var(--spacing-xl);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .page-hero {
    padding: 110px 0 50px;
  }

  .chatbot-panel {
    width: 320px;
    right: 0;
  }

  .lsi-grid {
    flex-direction: column;
    align-items: center;
  }

  .lsi-grid a::after {
    display: none;
  }
}

/* Mobile Portrait */
@media (max-width: 480px) {

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--spacing-lg);
  }

  .footer-brand {
    grid-column: 1;
  }

  .footer-social {
    justify-content: center;
  }

  .page-hero {
    padding: 100px 0 40px;
  }

  .result-value {
    font-size: 2.5rem;
  }

  /* Chatbot panel fills available width on small phones */
  .chatbot-panel {
    width: calc(100vw - 48px);
    max-width: 320px;
    right: 0;
    height: 420px;
  }

  .chatbot-widget {
    right: 12px;
    bottom: 72px;
  }

  .chatbot-btn {
    width: 48px;
    height: 48px;
  }

  .back-to-top {
    right: 12px;
    bottom: 16px;
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .tools-grid-expanded {
    grid-template-columns: 1fr;
  }

  .social-share {
    flex-direction: column;
  }

  .social-share .btn {
    width: 100%;
  }
}

/* ==========================================================================
   NEW COMPONENTS — Expansion to 91+ Pages
   ========================================================================== */

/* Key Takeaways Box (Blog Posts) */
.key-takeaways {
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.04) 0%, rgba(14, 14, 30, 0.6) 100%);
  border: 1px solid rgba(46, 204, 113, 0.12);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: var(--spacing-lg) var(--spacing-xl);
  margin: var(--spacing-xl) 0;
}

.key-takeaways h3 {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: var(--spacing-md);
}

.key-takeaways ul {
  list-style: none;
  padding: 0;
}

.key-takeaways li {
  padding: var(--spacing-xs) 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.key-takeaways li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}

/* Comparison Table (Rate/Term Tables) */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--spacing-xl) 0;
}

.comparison-table th {
  background: var(--surface);
  color: var(--gold);
  padding: var(--spacing-sm) var(--spacing-md);
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  border-bottom: 2px solid var(--gold);
}

.comparison-table td {
  padding: var(--spacing-sm) var(--spacing-md);
  text-align: center;
  border-bottom: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.comparison-table tr:hover td {
  background: var(--glass-hover);
}

.comparison-table td:first-child {
  font-weight: 600;
  color: var(--text-primary);
}

/* State Data Card */
.state-data-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
  margin: var(--spacing-xl) 0;
}

.state-data-item {
  background: linear-gradient(145deg, rgba(14, 14, 30, 0.7) 0%, rgba(10, 10, 24, 0.8) 100%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: var(--spacing-lg);
  text-align: center;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.state-data-item:hover {
  border-color: rgba(46, 204, 113, 0.2);
  box-shadow: 0 4px 16px rgba(46, 204, 113, 0.06);
}

.state-data-item .data-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: var(--spacing-xs);
}

.state-data-item .data-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
}

/* Mega Menu Styles for Expanded Nav */
.dropdown-menu .menu-group {
  padding: var(--spacing-sm) 0;
}

.dropdown-menu .menu-group-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold);
  padding: var(--spacing-xs) var(--spacing-md);
  margin-bottom: var(--spacing-xs);
}

@media (min-width: 769px) {
  .dropdown-menu.mega-menu {
    width: 600px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0;
    padding: var(--spacing-md);
  }

  .dropdown-menu.mega-menu .menu-group {
    border-right: 1px solid var(--glass-border);
    padding: 0 var(--spacing-md);
  }

  .dropdown-menu.mega-menu .menu-group:last-child {
    border-right: none;
  }
}

/* Formula Display Block */
.formula-block {
  background: linear-gradient(145deg, rgba(14, 14, 30, 0.8) 0%, rgba(10, 10, 24, 0.9) 100%);
  border: 1px solid rgba(46, 204, 113, 0.1);
  border-radius: var(--radius-sm);
  padding: var(--spacing-xl);
  margin: var(--spacing-xl) 0;
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--gold);
  letter-spacing: 0.02em;
  overflow-x: auto;
}

.formula-block .formula-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: var(--spacing-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.formula-block .formula-variables {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: var(--spacing-md);
  text-align: left;
  line-height: 1.8;
}

/* FAQ Section in Blog Posts */
.faq-section {
  margin: var(--spacing-2xl) 0;
}

.faq-section .faq-item {
  margin-bottom: var(--spacing-sm);
}

/* Expanded Tools Grid */
.tools-grid-expanded {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--spacing-md);
  margin: var(--spacing-xl) 0;
}

@media (max-width: 480px) {
  .tools-grid-expanded {
    grid-template-columns: 1fr;
  }
}

/* Silo Section Headers */
.silo-header {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  padding-bottom: var(--spacing-xs);
  border-bottom: 1px solid var(--glass-border);
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
}

/* Print Styles for Reference Pages */
@media print {
  body {
    background: #fff;
    color: #000;
  }

  .navbar,
  footer,
  .chatbot-widget,
  .back-to-top,
  .search-overlay,
  .social-share-section,
  .btn {
    display: none !important;
  }

  .glass-card {
    border: 1px solid #ccc;
    box-shadow: none;
    color: #000;
  }

  table th {
    background: #eee;
    color: #000;
  }

  .result-value {
    color: #000;
  }
}

/* #back-to-top — removed duplicate; use .back-to-top class (managed by site-ui.js) */

.footer-heading {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}