/* ===========================
   GLOBAL STYLES & VARIABLES
   =========================== */

:root {
  /* Brand Colors - Modern Fintech Palette */
  --primary-color: #4F46E5;
  /* Indigo 600 */
  --primary-light: #818CF8;
  /* Indigo 400 */
  --primary-dark: #312E81;
  /* Indigo 900 */
  --secondary-color: #F3F4F6;
  /* Gray 100 */
  --accent-color: #06B6D4;
  /* Cyan 500 - Vibrant Accent */

  /* Text Colors */
  --text-dark: #111827;
  /* Gray 900 */
  --text-medium: #4B5563;
  /* Gray 600 */
  --text-light: #9CA3AF;
  /* Gray 400 */
  --text-white: #FFFFFF;

  /* State Colors */
  --success-color: #10B981;
  /* Emerald */
  --warning-color: #F59E0B;
  /* Amber */
  --danger-color: #EF4444;
  /* Red */
  --info-color: #3B82F6;
  /* Blue */

  /* UI Elements */
  --border-color: #E5E7EB;
  --border-radius: 16px;
  /* More modern rounded corners */
  --pill-radius: 9999px;

  /* Enhanced Shadows for "Pop" */
  --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-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 15px rgba(79, 70, 229, 0.3);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: #ffffff;
}

/* ===========================
   CONTAINER & LAYOUT
   =========================== */

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

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.col {
  flex: 1;
  min-width: 250px;
}

.col-full {
  flex: 0 0 100%;
}

.col-half {
  flex: 0 0 calc(50% - 10px);
}

.col-third {
  flex: 0 0 calc(33.333% - 14px);
}

@media (max-width: 768px) {

  .col-half,
  .col-third {
    flex: 0 0 100%;
  }
}

/* ===========================
   HEADER & NAVIGATION
   =========================== */

header {
  background-color: #ffffff;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--primary-color);
  font-weight: bold;
  font-size: 24px;
}

.logo-subtitle {
  font-size: 12px;
  color: var(--text-light);
  font-weight: normal;
}

nav {
  display: flex;
  gap: 30px;
  align-items: center;
}

nav a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

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

nav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

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

.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  min-width: 200px;
  box-shadow: var(--shadow-lg);
  margin-top: 10px;
  z-index: 101;
}

.dropdown.active .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 12px 20px;
  color: var(--text-dark);
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.dropdown-menu a:hover {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

/* Enable hover on desktop */
@media (min-width: 769px) {
  .dropdown:hover .dropdown-menu {
    display: block;
  }
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-dark);
}

@media (max-width: 768px) {
  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 20px;
  }

  nav.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  nav a {
    padding: 10px 0;
  }

  .dropdown-menu {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    margin-top: 0;
    padding-left: 20px;
  }

  .dropdown.active .dropdown-menu {
    display: block;
  }

  .dropdown-menu a {
    padding: 8px 0;
  }
}

/* ===========================
   HERO SECTION
   =========================== */

/* ===========================
   HERO SECTION
   =========================== */

/* HERO SECTIONS */
.hero {
  position: relative;
  min-height: 550px;
  /* Slightly reduced for better mobile feel */
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
  padding: 80px 0;
  overflow: hidden;
  color: var(--text-white);
  /* Add subtle texture or pattern if possible, for now just gradient */
}

/* Ensure readability */
.hero h1,
.hero p,
.hero-text h1,
.hero-text p {
  color: #ffffff !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  /* Enhance contrast against gradient */
}

/* Specific Calculator Hero Styles - Modern Gradients */
/* Specific Calculator Hero Styles moved to end of file for cascade */

.hero .container {
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.3;
  z-index: 1;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 80px;
  background: #ffffff;
  clip-path: polygon(0 100%, 100% 100%, 100% 0);
  z-index: 1;
}

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

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 24px;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  letter-spacing: -1px;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 30px;
  opacity: 0.9;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  justify-content: flex-start;
  margin-bottom: 30px;
}

.trust-signals {
  display: flex;
  gap: 20px;
  font-size: 0.9rem;
  opacity: 0.8;
}

.trust-signals span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  animation: float 6s ease-in-out infinite;
}

.hero-visual svg {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.2));
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}

@media (max-width: 992px) {
  .hero-layout {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

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

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

  .trust-signals {
    justify-content: center;
    margin-top: 20px;
  }

  .hero-visual {
    display: none;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding: 60px 0;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  .trust-signals {
    flex-direction: column;
    gap: 10px;
  }

  .hero-buttons {
    flex-direction: column;
  }
}

/* ===========================
   BUTTONS
   =========================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border: none;
  border-radius: var(--pill-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-normal);
  text-align: center;
  letter-spacing: 0.5px;
}

.btn-primary {
  background-color: var(--warning-color);
  /* Yellow for high contrast */
  color: var(--text-dark);
}

.btn-primary:hover {
  background-color: #f0b400;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(252, 196, 25, 0.3);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-3px);
  border-color: #ffffff;
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: var(--border-radius);
  padding: 10px 20px;
  width: 100%;
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: #ffffff;
}

.btn-small {
  padding: 8px 20px;
  font-size: 14px;
}

.btn-block {
  display: block;
  width: 100%;
}

/* ===========================
   SECTIONS
   =========================== */

section {
  padding: 60px 0;
}

section.light {
  background-color: var(--secondary-color);
}

section.dark {
  background-color: #f8f9fa;
}

.section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-dark);
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background-color: var(--primary-color);
  margin: 15px auto 0;
}

.section-subtitle {
  text-align: center;
  color: var(--text-medium);
  font-size: 1.1rem;
  margin-top: -30px;
  margin-bottom: 50px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ===========================
   HUB PAGES
   =========================== */

.hub-category {
  margin-bottom: 60px;
}

.hub-category h2 {
  font-size: 1.8rem;
  color: var(--text-dark);
  margin-bottom: 25px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
  display: inline-block;
}

/* ===========================
   CARDS
   =========================== */

/* Calculator Grid & Cards */
.calculator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  padding: 20px 0;
}

.calculator-card {
  background-color: #ffffff;
  border-radius: var(--border-radius);
  padding: 30px;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-normal);
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.calculator-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition-normal);
}

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

.calculator-card:hover::before {
  transform: scaleX(1);
}

.calculator-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
  background: var(--secondary-color);
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition-fast);
}

.calculator-card:hover .calculator-icon {
  background: var(--primary-color);
  color: #ffffff;
  transform: rotateY(180deg);
}

.calculator-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-dark);
}

.calculator-card p {
  color: var(--text-medium);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.calculator-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.feature-badge {
  font-size: 0.75rem;
  background: #e7f5ff;
  color: var(--primary-color);
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
}

/* ===========================
   FOOTER
   =========================== */

footer {
  background-color: #1a1a1a;
  color: #ffffff;
  padding: 40px 0 20px;
  margin-top: 60px;
}

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

.footer-section h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section a {
  color: #cccccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  border-top: 1px solid #333333;
  padding-top: 20px;
  text-align: center;
  color: #999999;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  color: #ffffff;
  border-radius: 50%;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.social-links a:hover {
  background-color: var(--primary-dark);
}

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

/* ===========================
   CALCULATOR SECTION
   =========================== */

.calculator-container {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 40px;
}

.calculator-title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 30px;
  color: var(--text-dark);
}

.form-group {
  margin-bottom: 20px;
}

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

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.3s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.btn-calculate {
  width: 100%;
  padding: 15px;
  font-size: 18px;
  margin-top: 20px;
}

.results-container {
  display: none;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 2px solid var(--border-color);
}

.results-container.show {
  display: block;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.result-box {
  background-color: var(--secondary-color);
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  border-left: 4px solid var(--primary-color);
}

.result-label {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 10px;
  font-weight: 600;
}

.result-value {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
}

.chart-container {
  position: relative;
  height: 400px;
  margin-bottom: 40px;
}

/* ===========================
   BLOG SECTION
   =========================== */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

.blog-card {
  background-color: #ffffff;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

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

.blog-card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image {
  transform: scale(1.05);
}

.blog-card-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.blog-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 8px;
  display: block;
}

.blog-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-dark);
  line-height: 1.4;
}

.blog-card-excerpt {
  color: var(--text-medium);
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.6;
  flex-grow: 1;
}

.blog-card-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
}

.blog-card-link {
  display: inline-flex;
  align-items: center;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.blog-card-link:hover {
  color: var(--text-dark);
  font-weight: 500;
  transition: all 0.2s ease;
}

.table-of-contents a:before {
  content: '→';
  margin-right: 10px;
  color: var(--primary-color);
  transition: transform 0.2s ease;
}

.table-of-contents a:hover {
  background-color: var(--primary-color);
  color: #ffffff;
  transform: translateX(5px);
}

.table-of-contents a:hover:before {
  color: #ffffff;
}

/* ===========================
   BLOG POST PAGE
   =========================== */

.blog-post {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

.blog-post-header {
  margin-bottom: 40px;
}

.blog-post-title {
  font-size: 36px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--text-dark);
}

.blog-post-meta {
  color: var(--text-light);
  font-size: 14px;
}

.blog-post-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 30px;
}

.blog-post-content {
  line-height: 1.8;
  color: var(--text-dark);
  font-size: 16px;
}

.blog-post-content h2 {
  font-size: 28px;
  font-weight: bold;
  margin: 30px 0 15px;
  color: var(--text-dark);
}

.blog-post-content h3 {
  font-size: 22px;
  font-weight: bold;
  margin: 25px 0 12px;
  color: var(--text-dark);
}

.blog-post-content p {
  margin-bottom: 15px;
}

.blog-post-content ul,
.blog-post-content ol {
  margin-left: 20px;
  margin-bottom: 15px;
}

.blog-post-content li {
  margin-bottom: 8px;
}

/* Table styles are now unified under MODERN CONTENT STYLING in the SEO Content section */

.blog-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px 0;
}

/* ===========================
   FAQ SECTION
   =========================== */

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

.faq-item {
  margin-bottom: 15px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.faq-question {
  background-color: var(--secondary-color);
  padding: 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--text-dark);
  transition: background-color 0.3s ease;
}

.faq-question:hover {
  background-color: #e0e8f0;
}

.faq-toggle {
  font-size: 20px;
  transition: transform 0.3s ease;
}

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

.faq-answer {
  display: none;
  padding: 20px;
  background-color: #ffffff;
  color: var(--text-light);
  line-height: 1.6;
}

.faq-answer.show {
  display: block;
}

/* ===========================
   FEATURES SECTION
   =========================== */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.feature-box {
  background: #ffffff;
  padding: 30px;
  border-radius: var(--border-radius);
  text-align: center;
  transition: var(--transition-normal);
  border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
}

.feature-box:hover {
  background: #ffffff;
  box-shadow: var(--shadow-lg);
  border-color: var(--border-color);
  transform: translateY(-5px);
}

.feature-box .feature-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  display: inline-block;
  background: linear-gradient(135deg, #e7f5ff 0%, #d0ebff 100%);
  width: 80px;
  height: 80px;
  line-height: 80px;
  border-radius: 50%;
  color: var(--primary-color);
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--text-dark);
}

.feature-description {
  color: var(--text-medium);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===========================
   FORM STYLES
   =========================== */

.form-container {
  max-width: 600px;
  margin: 0 auto;
  background-color: #ffffff;
  padding: 40px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
}

.form-container h2 {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 30px;
  color: var(--text-dark);
}

.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 16px;
  font-family: inherit;
  resize: vertical;
  min-height: 150px;
}

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

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }

  section {
    padding: 40px 0;
  }

  .section-title {
    font-size: 28px;
  }

  .calculator-container {
    padding: 20px;
  }

  .blog-post {
    padding: 20px 15px;
  }

  .blog-post-title {
    font-size: 28px;
  }

  .blog-post-image {
    height: 250px;
  }

  .form-container {
    padding: 20px;
  }
}

/* ===========================
   UTILITY CLASSES
   =========================== */

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

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

.mt-20 {
  margin-top: 20px;
}

.mt-40 {
  margin-top: 40px;
}

.mb-20 {
  margin-bottom: 20px;
}

.mb-40 {
  margin-bottom: 40px;
}

.hidden {
  display: none;
}

.visible {
  display: block;
}


/* ===========================
   HOME PAGE ENHANCEMENTS
   =========================== */

/* Calculator Showcase Grid */
.calculator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.calculator-card {
  background: #ffffff;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 30px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.calculator-icon {
  font-size: 48px;
  margin-bottom: 20px;
  text-align: center;
}

.calculator-card h3 {
  color: var(--primary-color);
  font-size: 22px;
  margin-bottom: 15px;
  text-align: center;
}

.calculator-card p {
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 20px;
  flex-grow: 1;
}

.calculator-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.feature-badge {
  background: var(--secondary-color);
  color: var(--primary-color);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

/* SEO Content Styles */
.seo-content {
  max-width: 900px;
  margin: 0 auto;
}

.article-title {
  font-size: 36px;
  color: var(--text-dark);
  margin-bottom: 20px;
  line-height: 1.3;
  text-align: center;
  padding-bottom: 15px;
  border-bottom: 3px solid var(--primary-color);
}

.article-meta {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
}

.article-meta span {
  color: var(--text-light);
  font-size: 14px;
}

/* Legacy Table of Contents block removed to fix conflict with new styles */

.content-section {
  margin: 50px 0;
}

.content-section h3 {
  color: var(--primary-color);
  font-size: 28px;
  margin-bottom: 20px;
  margin-top: 40px;
  padding-left: 15px;
  border-left: 4px solid var(--primary-color);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--secondary-color);
}

.content-section h4 {
  color: var(--text-dark);
  font-size: 22px;
  margin-bottom: 15px;
  margin-top: 30px;
  padding-left: 12px;
  border-left: 3px solid var(--primary-color);
}

.content-section p {
  color: var(--text-dark);
  line-height: 1.8;
  margin-bottom: 20px;
  text-align: justify;
}

/* Info Boxes */
.info-box,
.tip-box,
.warning-box,
.success-box,
.formula-box {
  padding: 25px;
  margin: 30px 0;
  border-radius: 8px;
  border-left: 5px solid;
}

.info-box {
  background: #e3f2fd;
  border-color: #2196f3;
}

.tip-box {
  background: #fff3e0;
  border-color: #ff9800;
}

.warning-box {
  background: #ffebee;
  border-color: #f44336;
}

.success-box {
  background: #e8f5e9;
  border-color: #4caf50;
}

.formula-box {
  background: #f5f5f5;
  border-color: var(--primary-color);
}

.info-box h4,
.tip-box h4,
.warning-box h4,
.success-box h4,
.formula-box h4 {
  margin-bottom: 15px;
  font-size: 18px;
}

.info-box p,
.tip-box p,
.warning-box p,
.success-box p {
  margin-bottom: 0;
  line-height: 1.7;
}

.formula-box ul {
  margin: 15px 0 0 0;
  padding-left: 20px;
}

.formula-box li {
  margin: 10px 0;
  line-height: 1.6;
}

/* Comparison Table */
.comparison-table {
  margin: 40px 0;
  overflow-x: auto;
}

.comparison-table h4 {
  margin-bottom: 20px;
  color: var(--primary-color);
  font-size: 22px;
}

.comparison-table table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  box-shadow: var(--shadow);
  border-radius: 8px;
  overflow: hidden;
}

.comparison-table thead {
  background: var(--primary-color);
  color: #ffffff;
}

.comparison-table th {
  padding: 15px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
}

.comparison-table td {
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
}

.comparison-table tbody tr:hover {
  background: var(--secondary-color);
}

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

/* FAQ Items */
.faq-item {
  margin: 30px 0;
  padding: 25px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.faq-item:hover {
  box-shadow: var(--shadow);
  border-color: var(--primary-color);
}

.faq-item h4 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 20px;
}

.faq-item p {
  color: var(--text-dark);
  line-height: 1.8;
  margin-bottom: 0;
}

/* CTA Box */
.cta-box {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: #ffffff;
  padding: 50px;
  border-radius: 12px;
  text-align: center;
  margin: 60px 0;
}

.cta-box h3 {
  font-size: 32px;
  margin-bottom: 20px;
  color: #ffffff;
}

.cta-box p {
  font-size: 18px;
  margin-bottom: 30px;
  opacity: 0.95;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.cta-box .btn {
  background: #ffffff;
  color: var(--primary-color);
  font-size: 18px;
  padding: 15px 40px;
}

.cta-box .btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

/* Blog Card Enhancements */
.blog-category {
  display: inline-block;
  background: var(--primary-color);
  color: #ffffff;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 18px;
  margin-top: -10px;
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* CTA Buttons */
.cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 30px;
}

.btn-large {
  padding: 15px 40px;
  font-size: 18px;
  font-weight: 600;
}

/* Responsive Design for New Elements */
@media (max-width: 768px) {
  .calculator-grid {
    grid-template-columns: 1fr;
  }

  .article-title {
    font-size: 28px;
  }

  .content-section h3 {
    font-size: 24px;
  }

  .content-section h4 {
    font-size: 20px;
  }

  .comparison-table {
    font-size: 14px;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 10px;
  }

  .cta-box {
    padding: 30px 20px;
  }

  .cta-box h3 {
    font-size: 24px;
  }

  .cta-box p {
    font-size: 16px;
  }

  .info-box,
  .tip-box,
  .warning-box,
  .success-box,
  .formula-box {
    padding: 20px;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .btn-large {
    width: 100%;
  }
}

/* Active Navigation State */
nav a.active {
  color: var(--primary-color);
  font-weight: 600;
}

/* Hero Section Enhancement - Removed conflicting background reset */

.hero-content h1 {
  font-size: 42px;
  line-height: 1.2;
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 28px;
  }
}


/* ===========================
   CALCULATOR PAGE STYLES
   =========================== */

.calculator-hero {
  position: relative;
  color: #ffffff;
  padding: 80px 0;
  text-align: center;
  overflow: hidden;
  /* Default Gradient if no specific class */
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
}

/* Remove old background images */
.calculator-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Use a subtle pattern overlay instead of images */
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.1;
  z-index: 0;
}

.calculator-hero::after {
  display: none;
}

/* Specific Calculator Hero Styles - Modern Gradients */
.calculator-hero.mortgage-hero {
  background: linear-gradient(120deg, #312E81 0%, #4F46E5 100%);
}

.calculator-hero.car-loan-hero {
  background: linear-gradient(120deg, #1E3A8A 0%, #3B82F6 100%);
}

.calculator-hero.personal-hero {
  background: linear-gradient(120deg, #065F46 0%, #10B981 100%);
}

.calculator-hero.savings-hero {
  background: linear-gradient(120deg, #5B21B6 0%, #8B5CF6 100%);
}

.calculator-hero.retirement-hero {
  background: linear-gradient(120deg, #92400E 0%, #F59E0B 100%);
}

.calculator-hero.debt-hero {
  background: linear-gradient(120deg, #9F1239 0%, #F43F5E 100%);
}

.calculator-hero.home-equity-hero {
  background: linear-gradient(120deg, #0F766E 0%, #14B8A6 100%);
}

.calculator-hero h1 {
  font-size: 42px;
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.calculator-hero p {
  font-size: 18px;
  opacity: 0.95;
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.calculator-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 40px;
  margin-top: 40px;
}

.calculator-inputs,
.calculator-results {
  background: #ffffff;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 30px;
}

.calculator-inputs h2,
.calculator-results h2 {
  color: var(--primary-color);
  font-size: 24px;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-color);
}

/* Input Groups */
.input-group {
  margin-bottom: 25px;
}

.input-group label {
  display: block;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 10px;
  font-size: 14px;
}

.input-with-slider {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: #ffffff;
  transition: border-color 0.3s ease;
}

.input-wrapper:focus-within {
  border-color: var(--primary-color);
}

.currency-symbol,
.unit-label {
  padding: 0 12px;
  color: var(--text-light);
  font-weight: 600;
  font-size: 14px;
}

.input-wrapper input[type="number"] {
  flex: 1;
  border: none;
  padding: 12px 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  background: transparent;
}

.input-wrapper input[type="number"]:focus {
  outline: none;
}

/* Remove number input spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Range Sliders */
input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--secondary-color);
  outline: none;
  -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: var(--primary-dark);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}

input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.2);
  background: var(--primary-dark);
}

/* Summary Cards */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 30px;
}

.summary-card {
  background: var(--secondary-color);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
}

.summary-card.primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-color: var(--primary-color);
  grid-column: 1 / -1;
}

.summary-card.primary .card-label {
  color: rgba(255, 255, 255, 0.9);
}

.summary-card.primary .card-value {
  color: #ffffff;
  font-size: 36px;
}

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

.card-label {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.card-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
}

/* Tab Navigation */
.tab-navigation {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  border-bottom: 2px solid var(--border-color);
}

.tab-btn {
  flex: 1;
  padding: 12px 20px;
  border: none;
  background: transparent;
  color: var(--text-light);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}

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

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

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.tab-content h3 {
  color: var(--text-dark);
  font-size: 20px;
  margin-bottom: 20px;
}

/* Chart Container */
.chart-container {
  max-width: 400px;
  margin: 0 auto 25px;
  padding: 20px;
}

.schedule-chart-container {
  margin-bottom: 30px;
  padding: 20px;
}

.chart-legend {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.legend-label {
  font-size: 14px;
  color: var(--text-dark);
  font-weight: 500;
}

/* Tables */
.breakdown-table-wrapper,
.amortization-table-wrapper {
  overflow-x: auto;
  margin-top: 20px;
}

.breakdown-table,
.amortization-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

.breakdown-table thead,
.amortization-table thead {
  background: var(--primary-color);
  color: #ffffff;
}

.breakdown-table th,
.amortization-table th {
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
}

.breakdown-table td,
.amortization-table td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

.breakdown-table tbody tr:hover,
.amortization-table tbody tr:hover {
  background: var(--secondary-color);
}

.breakdown-table .total-row {
  background: var(--secondary-color);
  font-weight: 700;
}

.breakdown-table .negative {
  color: var(--danger-color);
}

.breakdown-table .highlight {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 16px;
}

/* Info Section */
.info-content h2 {
  color: var(--primary-color);
  font-size: 32px;
  margin-bottom: 20px;
  text-align: center;
}

.info-content>p {
  text-align: center;
  color: var(--text-light);
  font-size: 16px;
  max-width: 700px;
  margin: 0 auto 40px;
}

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

.info-item {
  background: #ffffff;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 25px;
  transition: all 0.3s ease;
}

.info-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--primary-color);
}

.info-item h3 {
  color: var(--primary-color);
  font-size: 18px;
  margin-bottom: 12px;
}

.info-item p {
  color: var(--text-dark);
  line-height: 1.7;
  font-size: 14px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .calculator-layout {
    grid-template-columns: 1fr;
  }

  .calculator-inputs {
    order: 1;
  }

  .calculator-results {
    order: 2;
  }
}

@media (max-width: 768px) {
  .calculator-hero h1 {
    font-size: 28px;
  }

  .calculator-hero p {
    font-size: 16px;
  }

  .summary-cards {
    grid-template-columns: 1fr;
  }

  .summary-card.primary {
    grid-column: 1;
  }

  .tab-navigation {
    flex-direction: column;
  }

  .tab-btn {
    margin-bottom: 0;
    border-bottom: none;
    border-left: 3px solid transparent;
  }

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

  .chart-container {
    max-width: 100%;
  }

  .calculator-inputs,
  .calculator-results {
    padding: 20px;
  }

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

@media (max-width: 480px) {

  .breakdown-table th,
  .breakdown-table td,
  .amortization-table th,
  .amortization-table td {
    padding: 8px 10px;
    font-size: 12px;
  }
}


/* Input Hints */
.input-hint {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-light);
  font-weight: 500;
}

.input-hint span {
  color: var(--primary-color);
  font-weight: 600;
}


/* ===========================
   BLOG POST FULL STYLES
   =========================== */

.blog-post-full {
  max-width: 900px;
  margin: 40px auto;
}

.blog-post-image {
  width: 100%;
  height: auto;
  max-height: 450px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-lg);
}


/* ===========================
   BLOG GRID & CARDS
   =========================== */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.blog-card {
  background: #ffffff;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.blog-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.blog-card-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-content h3 {
  margin: 15px 0;
  font-size: 22px;
  line-height: 1.4;
}

.blog-card-content h3 a {
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.3s ease;
}

.blog-card-content h3 a:hover {
  color: var(--primary-color);
}

.blog-card-content p {
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 20px;
  flex-grow: 1;
}

.btn-text {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all 0.3s ease;
}

.btn-text:hover {
  color: var(--primary-dark);
  transform: translateX(5px);
}

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

/* Additional heading styles for h2 and h5 */
.content-section h2 {
  color: var(--primary-color);
  font-size: 32px;
  margin-bottom: 25px;
  margin-top: 50px;
  padding-left: 20px;
  border-left: 5px solid var(--primary-color);
  padding-bottom: 12px;
  border-bottom: 3px solid var(--secondary-color);
}

.content-section h5 {
  color: var(--text-dark);
  font-size: 18px;
  margin-bottom: 12px;
  margin-top: 25px;
  padding-left: 10px;
  border-left: 2px solid var(--primary-color);
}

/* Calculator hero styles are defined above in CALCULATOR PAGE STYLES section */

/* Info box styling for new calculators */
.info-box {
  background: var(--secondary-color);
  border-left: 4px solid var(--primary-color);
  padding: 20px;
  margin: 25px 0;
  border-radius: 8px;
}

.info-box h3 {
  color: var(--primary-color);
  font-size: 18px;
  margin-bottom: 15px;
  margin-top: 0 !important;
  padding-left: 0 !important;
  border-left: none !important;
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

.info-box ul {
  list-style: none;
  padding-left: 0;
}

.info-box li {
  padding: 8px 0;
  color: var(--text-dark);
  position: relative;
  padding-left: 25px;
}

.info-box li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success-color);
  font-weight: bold;
}

/* Select dropdown styling */
select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 16px;
  background-color: #ffffff;
  cursor: pointer;
  transition: all 0.3s ease;
}

select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* Highlight card for important results */
.highlight-card {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: #ffffff;
}

.highlight-card .card-label {
  color: rgba(255, 255, 255, 0.9);
}

.highlight-card .card-value {
  color: #ffffff;
  font-weight: 700;
}

/* ===========================
   TOOLS SECTION OVERHAUL
   =========================== */

/* Improved Section Background */
section.light {
  background-color: #F9FAFB;
  /* Clean light gray/blue tint */
  position: relative;
  z-index: 1;
}

/* Subtle pattern for section background */
section.light::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(#E5E7EB 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.5;
  z-index: -1;
}

/* New Calculator Card UI */
.calculator-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  height: 100%;
}

.calculator-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: var(--primary-light);
}

.calculator-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 15px 0 10px;
  color: var(--text-dark);
}

.calculator-card p {
  color: var(--text-medium);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 20px;
  flex-grow: 1;
}

.calculator-card .btn-outline {
  width: 100%;
  text-align: center;
  border-radius: 8px;
  padding: 10px;
  font-weight: 600;
  border: 1px solid var(--border-color);
  color: var(--primary-color);
  background: transparent;
  transition: all 0.2s ease;
}

.calculator-card:hover .btn-outline {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

/* Animated Icons */
.calculator-icon {
  font-size: 24px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
  color: var(--primary-color);
  border-radius: 12px;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.calculator-card:hover .calculator-icon {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: #ffffff;
  transform: scale(1.1) rotate(5deg);
}

.calculator-icon i {
  transition: transform 0.3s ease;
}

/* ===========================
   CALCULATOR INTERNAL LAYOUT
   =========================== */

/* Overriding the home page grid for internal use */
.calculator-container .calculator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 0;
  align-items: flex-start;
}

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

.input-section {
  background: #f9fafb;
  padding: 30px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.input-section h2 {
  margin-bottom: 25px;
  font-size: 1.5rem;
  color: var(--text-dark);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
}

.results-section {
  position: sticky;
  top: 20px;
}

.results-section h2 {
  margin-bottom: 25px;
  font-size: 1.5rem;
  color: var(--text-dark);
}

.result-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
  border-top: 5px solid var(--primary-color);
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #f3f4f6;
}

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

.result-item .label {
  color: var(--text-medium);
  font-weight: 500;
  font-size: 0.95rem;
}

.result-item .value {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-dark);
}

.result-highlight {
  font-size: 2rem !important;
  color: var(--primary-color) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.chart-container {
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  height: 350px;
  position: relative;
  box-shadow: var(--shadow-sm);
}

/* Input Specifics */
.calculate-btn {
  width: 100%;
  background-color: var(--primary-color);
  color: white;
  padding: 15px;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-top: 20px;
}

.calculate-btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Formula Box Styling */
.formula-box {
  background: #eff6ff;
  border-left: 4px solid var(--primary-color);
  padding: 20px;
  margin: 30px 0;
  border-radius: 0 8px 8px 0;
}

.formula {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-dark);
  margin-bottom: 10px;
  word-break: break-word;
}