﻿/* ========================================
   DESIGN SYSTEM - Tính Lãi Suất Vay
   ======================================== */

/* ===== CSS Variables (Design Tokens) ===== */
:root {
  /* Primary Colors - Banking Blue */
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-300: #93c5fd;
  --primary-400: #60a5fa;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a8a;

  /* Secondary Colors - Money Green */
  --secondary-50: #ecfdf5;
  --secondary-100: #d1fae5;
  --secondary-200: #a7f3d0;
  --secondary-300: #6ee7b7;
  --secondary-400: #34d399;
  --secondary-500: #10b981;
  --secondary-600: #059669;
  --secondary-700: #047857;
  --secondary-800: #065f46;
  --secondary-900: #064e3b;

  /* Neutral Colors */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;

  /* Gradients */
  --gradient-primary: linear-gradient(
    135deg,
    var(--primary-600) 0%,
    var(--primary-800) 100%
  );
  --gradient-secondary: linear-gradient(
    135deg,
    var(--secondary-500) 0%,
    var(--secondary-700) 100%
  );
  --gradient-hero: linear-gradient(
    135deg,
    #1e3a8a 0%,
    #3b82f6 50%,
    #60a5fa 100%
  );
  --gradient-card: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(255, 255, 255, 0.7) 100%
  );

  /* Typography */
  --font-family:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;

  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl:
    0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.3);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;

  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal: 1050;
  --z-tooltip: 1070;

  /* Container */
  --container-max: 1200px;
  --container-padding: var(--space-4);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--gray-50);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

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

/* ===== Typography ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: var(--font-bold);
  line-height: 1.2;
  color: var(--gray-900);
}

h1 {
  font-size: var(--font-size-4xl);
}

h2 {
  font-size: var(--font-size-3xl);
}

h3 {
  font-size: var(--font-size-2xl);
}

h4 {
  font-size: var(--font-size-xl);
}

h5 {
  font-size: var(--font-size-lg);
}

h6 {
  font-size: var(--font-size-base);
}

@media (max-width: 768px) {
  h1 {
    font-size: var(--font-size-3xl);
  }

  h2 {
    font-size: var(--font-size-2xl);
  }

  h3 {
    font-size: var(--font-size-xl);
  }
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: 70px;
}

.main-content {
  flex: 1;
  padding: var(--space-8) 0;
}

/* ===== Navigation ===== */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-200);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--z-fixed);
  transition: box-shadow var(--transition-base);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-xl);
  font-weight: var(--font-bold);
  color: var(--primary-700);
  flex-shrink: 0;
}

.navbar-brand svg {
  width: 32px;
  height: 32px;
}

.navbar-brand img {
  height: 36px;
  width: auto;
  min-width: 150px;
}

.footer-brand img {
  height: 28px;
  width: auto;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-sm);
  font-weight: var(--font-medium);
  color: var(--gray-600);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-600);
  background-color: var(--primary-50);
}

.navbar-toggle {
  display: none;
  padding: var(--space-2);
  background: none;
  border: none;
  cursor: pointer;
}

.navbar-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--gray-700);
  margin: 5px 0;
  transition: all var(--transition-fast);
}

@media (max-width: 1024px) {
  .navbar-toggle {
    display: block;
  }

  .navbar-nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: var(--space-4);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
  }

  .navbar-nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    width: 100%;
    padding: var(--space-3) var(--space-4);
  }
}

/* ===== Hero Section ===== */
.hero {
  background: var(--gradient-hero);
  color: white;
  padding: var(--space-16) 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,20 C25,-10 75,-10 100,20 C125,50 175,50 200,20' stroke='white' stroke-width='1.2' fill='none' opacity='0.8'/%3E%3Cpath d='M0,60 C25,30 75,30 100,60 C125,90 175,90 200,60' stroke='white' stroke-width='1.2' fill='none' opacity='0.8'/%3E%3Cpath d='M0,100 C25,70 75,70 100,100 C125,130 175,130 200,100' stroke='white' stroke-width='1.2' fill='none' opacity='0.8'/%3E%3Cpath d='M0,140 C25,110 75,110 100,140 C125,170 175,170 200,140' stroke='white' stroke-width='1.2' fill='none' opacity='0.8'/%3E%3Cpath d='M0,180 C25,150 75,150 100,180 C125,210 175,210 200,180' stroke='white' stroke-width='1.2' fill='none' opacity='0.8'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.18;
}

.hero::before,
.page-header::before {
  pointer-events: none;
}

/* ===== Page Header (sub-pages) ===== */
.page-header {
  position: relative;
  color: white;
  padding: var(--space-10) 0;
  overflow: hidden;
}

.page-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,20 C25,-10 75,-10 100,20 C125,50 175,50 200,20' stroke='white' stroke-width='1.2' fill='none' opacity='0.8'/%3E%3Cpath d='M0,60 C25,30 75,30 100,60 C125,90 175,90 200,60' stroke='white' stroke-width='1.2' fill='none' opacity='0.8'/%3E%3Cpath d='M0,100 C25,70 75,70 100,100 C125,130 175,130 200,100' stroke='white' stroke-width='1.2' fill='none' opacity='0.8'/%3E%3Cpath d='M0,140 C25,110 75,110 100,140 C125,170 175,170 200,140' stroke='white' stroke-width='1.2' fill='none' opacity='0.8'/%3E%3Cpath d='M0,180 C25,150 75,150 100,180 C125,210 175,210 200,180' stroke='white' stroke-width='1.2' fill='none' opacity='0.8'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.12;
  pointer-events: none;
}

.page-header h1 {
  color: white;
}

.page-header .container {
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .page-header {
    padding: var(--space-8) 0;
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  color: white;
  font-size: var(--font-size-5xl);
  margin-bottom: var(--space-4);
  animation: fadeInUp 0.6s ease-out;
}

.hero p {
  font-size: var(--font-size-xl);
  opacity: 0.9;
  margin-bottom: var(--space-8);
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

@media (max-width: 768px) {
  .hero {
    padding: var(--space-10) 0;
  }

  .hero h1 {
    font-size: var(--font-size-3xl);
  }

  .hero p {
    font-size: var(--font-size-base);
  }
}

/* ===== Cards ===== */
.card {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: var(--space-6);
  transition: all var(--transition-base);
  border: 1px solid var(--gray-100);
  display: flex;
  flex-direction: column;
}

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

.card-glass {
  background: var(--gradient-card);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.card-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  color: white;
}

.card-icon svg {
  width: 28px;
  height: 28px;
}

.card-title {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-2);
}

.card-text {
  color: var(--gray-600);
  margin-bottom: var(--space-4);
}

.card > .btn {
  margin-top: auto;
}

/* Tool Cards Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
  margin-top: calc(-1 * var(--space-12));
  position: relative;
  z-index: 10;
}

section .tools-grid {
  margin-top: 0;
  z-index: auto;
  position: static;
}

@media (max-width: 768px) {
  .tools-grid {
    grid-template-columns: 1fr;
    margin-top: calc(-1 * var(--space-8));
  }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-semibold);
  line-height: 1.5;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
  color: white;
}

.btn-secondary {
  background: var(--gradient-secondary);
  color: white;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.4);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.5);
  color: white;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-600);
  color: var(--primary-600);
}

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

.btn-white {
  background: white;
  color: var(--primary-700);
  box-shadow: var(--shadow-md);
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--primary-700);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-sm);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-lg);
}

.btn-block {
  width: 100%;
}

/* ===== Forms ===== */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-semibold);
  color: var(--gray-700);
  margin-bottom: var(--space-2);
}

.form-control {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--gray-800);
  background-color: white;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
  appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px var(--primary-100);
}

.form-control::placeholder {
  color: var(--gray-400);
}

.form-control:disabled {
  background-color: var(--gray-100);
  cursor: not-allowed;
}

/* Input with icon */
.input-group {
  position: relative;
}

.input-group .form-control {
  padding-left: var(--space-12);
}

.input-icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  pointer-events: none;
}

.input-suffix {
  position: absolute;
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
  font-weight: var(--font-medium);
  pointer-events: none;
}

.input-group .form-control.has-suffix {
  padding-right: var(--space-16);
}

/* Range Slider */
.range-slider {
  width: 100%;
  height: 8px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  background: var(--gradient-primary);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-fast);
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.range-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: var(--gradient-primary);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow-md);
}

/* Select */
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236b7280' 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 var(--space-3) center;
  background-size: 20px;
  padding-right: var(--space-12);
}

/* ===== Calculator Specific ===== */
.calculator-section {
  padding: var(--space-8) 0;
}

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

@media (max-width: 992px) {
  .calculator-grid {
    grid-template-columns: 1fr;
  }
}

.calculator-form {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-lg);
}

.calculator-result {
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  color: white;
  position: sticky;
  top: 90px;
}

.result-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.result-label {
  font-size: var(--font-size-sm);
  color: #ffffff;
  opacity: 1;
  margin-bottom: var(--space-1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.result-value {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-bold);
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.result-value.highlight {
  font-size: var(--font-size-3xl);
  color: #ffffff;
}

/* ===== Tables ===== */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  background: white;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.table th,
.table td {
  padding: var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}

.table th {
  background: var(--gray-50);
  font-weight: var(--font-semibold);
  color: var(--gray-700);
  position: sticky;
  top: 0;
}

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

.table tbody tr:hover {
  background-color: var(--primary-50);
}

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

.table-striped tbody tr:nth-child(even) {
  background-color: var(--gray-50);
}

.table-striped tbody tr:nth-child(even):hover {
  background-color: var(--primary-50);
}

/* Bank Logo in Table */
.bank-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.bank-name-cell {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.bank-name {
  font-weight: var(--font-semibold);
}

.bank-fullname {
  font-size: var(--font-size-xs);
  color: var(--gray-500);
}

/* Sortable Table Headers */
.sortable {
  cursor: pointer;
  user-select: none;
}

.sortable:hover {
  color: var(--primary-600);
}

.sortable::after {
  content: "↕";
  margin-left: var(--space-2);
  opacity: 0.5;
}

.sortable.asc::after {
  content: "↑";
  opacity: 1;
  color: var(--primary-600);
}

.sortable.desc::after {
  content: "↓";
  opacity: 1;
  color: var(--primary-600);
}

/* ===== Tabs ===== */
.tabs {
  display: flex;
  gap: var(--space-2);
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: var(--space-6);
}

.tab-btn {
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-medium);
  color: var(--gray-600);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  color: var(--primary-600);
}

.tab-btn.active {
  color: var(--primary-600);
  border-bottom-color: var(--primary-600);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* ===== Ad Space ===== */
.ad-space {
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
  color: var(--gray-500);
  font-size: var(--font-size-sm);
}

.ad-space-header {
  height: 90px;
  margin-bottom: var(--space-6);
}

.ad-space-sidebar {
  height: 250px;
  margin-bottom: var(--space-6);
}

.ad-space-inline {
  height: 100px;
  margin: var(--space-6) 0;
}

/* ===== Footer ===== */
.footer {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: var(--space-12) 0 var(--space-6);
}

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

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

.footer-brand {
  color: white;
  font-size: var(--font-size-xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-3);
}

.text-white {
  color: white;
}

.footer-text {
  font-size: var(--font-size-sm);
  line-height: 1.7;
}

.footer-title {
  color: white;
  font-size: var(--font-size-base);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-4);
}

.footer-links {
  list-style: none;
}

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

.footer-links a {
  color: var(--gray-300);
  font-size: var(--font-size-sm);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid var(--gray-800);
  padding-top: var(--space-6);
  text-align: center;
  font-size: var(--font-size-sm);
}

/* ===== Utilities ===== */
.text-center {
  text-align: center;
}

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

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

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

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

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

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

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

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

.bg-primary {
  background-color: var(--primary-600);
}

.bg-secondary {
  background-color: var(--secondary-600);
}

.bg-white {
  background-color: white;
}

.bg-gray {
  background-color: var(--gray-100);
}

.mt-0 {
  margin-top: 0;
}

.mt-4 {
  margin-top: var(--space-4);
}

.mt-6 {
  margin-top: var(--space-6);
}

.mt-8 {
  margin-top: var(--space-8);
}

.mb-0 {
  margin-bottom: 0;
}

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

.mb-6 {
  margin-bottom: var(--space-6);
}

.mb-8 {
  margin-bottom: var(--space-8);
}

.pt-0 {
  padding-top: 0;
}

.pt-8 {
  padding-top: var(--space-8);
}

.pb-0 {
  padding-bottom: 0;
}

.pb-8 {
  padding-bottom: var(--space-8);
}

.d-flex {
  display: flex;
}

.d-grid {
  display: grid;
}

.d-none {
  display: none;
}

.d-block {
  display: block;
}

.flex-wrap {
  flex-wrap: wrap;
}

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

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

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: var(--space-2);
}

.gap-4 {
  gap: var(--space-4);
}

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

.w-100 {
  width: 100%;
}

.h-100 {
  height: 100%;
}

.rounded {
  border-radius: var(--radius-lg);
}

.shadow {
  box-shadow: var(--shadow-md);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.5s ease;
}

.animate-fadeInUp {
  animation: fadeInUp 0.5s ease;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

/* ===== Section Headers ===== */
.section-header {
  text-align: center;
  margin-bottom: var(--space-10);
}

.section-header h2 {
  margin-bottom: var(--space-4);
}

.section-header p {
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== CTA Section ===== */
.cta-section {
  background: var(--gradient-secondary);
  color: white;
  padding: var(--space-12) 0;
  text-align: center;
  border-radius: var(--radius-2xl);
  margin: var(--space-12) 0;
}

.cta-section h2 {
  color: white;
  margin-bottom: var(--space-4);
}

.cta-section p {
  opacity: 0.9;
  margin-bottom: var(--space-6);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Update Badge ===== */
.update-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--secondary-100);
  color: var(--secondary-700);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-medium);
}

.update-badge svg {
  width: 16px;
  height: 16px;
}

/* ===== Interest Rate Badge ===== */
.rate-badge {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  background: var(--primary-100);
  color: var(--primary-700);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-semibold);
}

.rate-badge.low {
  background: var(--secondary-100);
  color: var(--secondary-700);
}

.rate-badge.high {
  background: #fef3c7;
  color: #d97706;
}

/* ===== Loading State ===== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--primary-600);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--gray-500);
  margin-bottom: var(--space-6);
}

.breadcrumb a {
  color: var(--gray-500);
}

.breadcrumb a:hover {
  color: var(--primary-600);
}

.breadcrumb-separator {
  color: var(--gray-400);
}

/* ===== Page Header ===== */
.page-header {
  background: var(--gradient-primary);
  color: white;
  padding: var(--space-10) 0;
  margin-bottom: var(--space-8);
}

.page-header h1 {
  color: white;
  margin-bottom: var(--space-2);
}

.page-header p {
  opacity: 0.9;
  font-size: var(--font-size-lg);
}

/* ===== Tooltip ===== */
.tooltip-container {
  position: relative;
  display: inline-block;
}

.tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-800);
  color: white;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--font-size-xs);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  z-index: var(--z-tooltip);
}

.tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--gray-800);
}

.tooltip-container:hover .tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-8px);
}

/* ===== Comparison Highlight ===== */
.best-rate {
  background: var(--secondary-50) !important;
}

.best-rate td:first-child::before {
  content: "🏆";
  margin-right: var(--space-2);
}

/* ===== Blog Article Mobile ===== */
@media (max-width: 640px) {
  /* Reduce article body padding on mobile */
  .article-body {
    padding: var(--space-4);
  }

  /* Make tables horizontally scrollable */
  .article-body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Reduce table cell padding and font size on mobile */
  .article-body table th,
  .article-body table td {
    padding: var(--space-2) var(--space-3);
    font-size: var(--font-size-xs);
  }

  /* Allow CTA buttons to wrap text on mobile */
  .cta-box .btn,
  .btn-lg {
    white-space: normal;
    text-align: center;
    word-break: keep-all;
  }

  /* CTA box padding reduction */
  .cta-box {
    padding: var(--space-4);
  }

  /* Article header title responsive */
  .article-header h1 {
    font-size: var(--font-size-2xl);
  }

  .article-header p {
    font-size: var(--font-size-base);
  }
}

/* ===== Calculator & Tools Mobile ===== */
@media (max-width: 640px) {
  .calculator-form,
  .calculator-result {
    padding: var(--space-4);
  }

  .tab-btn {
    padding: var(--space-2) var(--space-2);
    font-size: var(--font-size-sm);
  }

  /* Reduce gap on inline styles for mobile tabs if needed */
  .tabs [style*="gap: 8px"] {
    gap: 4px !important;
  }

  .card {
    padding: var(--space-4);
  }

  /* Prevent text overflow in tooltips or notes */
  .card ul {
    padding-left: var(--space-4) !important;
  }

  /* Make sure platform info text wraps nicely */
  #platform-info {
    font-size: 12px !important;
    padding: 8px !important;
  }
}

/* ===== Related Articles Section ===== */
.related-section {
  padding: var(--space-8) 0;
  border-top: 1px solid var(--gray-200);
  margin-top: var(--space-8);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-6);
}
.related-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.related-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-300);
}

.related-card-content {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  flex: 1;
}
.related-card-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-2);
}
.related-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--space-3);
  line-height: 1.4;
}
.related-card-title a {
  color: inherit;
  text-decoration: none;
}
.related-card-title a:hover {
  color: var(--primary-600);
}
.related-card-desc {
  color: var(--gray-600);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: var(--space-4);
  flex: 1;
}
.related-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--gray-100);
  padding-top: var(--space-4);
  margin-top: auto;
}
.related-card-date {
  font-size: 12px;
  color: var(--gray-500);
}
.related-card-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-600);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
.related-card-link:hover {
  color: var(--primary-700);
}
.related-card-link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}
.related-card-link:hover svg {
  transform: translateX(4px);
}

/* ===== Print Styles ===== */
@media print {
  .navbar,
  .footer,
  .ad-space,
  .btn,
  .no-print {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

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

/* ===== Animations ===== */
@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
  100% { transform: translateY(0); }
}
@keyframes pulseLight {
  0% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.05); opacity: 1; filter: brightness(1.2); }
  100% { transform: scale(1); opacity: 0.9; }
}
.card:hover .card-icon svg,
.card:hover .card-icon img {
  animation: float 2s ease-in-out infinite, pulseLight 2s infinite;
}
.btn:hover svg,
.btn:hover img {
  animation: float 1.5s ease-in-out infinite;
}


/* Fix icon alignment and scale */
.card-icon svg {
  width: 32px !important;
  height: 32px !important;
  display: block;
  margin: 0 auto;
}
