/* 
 * CFTCalculator.org - Modern CSS stylesheet
 * Primary Theme: Blue-Emerald (SaaS Style)
 */

:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #eff6ff;
  --secondary: #1e293b;
  --accent: #10b981;
  --accent-dark: #059669;
  --accent-light: #ecfdf5;
  --background: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #475569;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --border-focus: #3b82f6;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

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

html {
  font-family: var(--font-sans);
  color: var(--text);
  background-color: var(--background);
  scroll-behavior: smooth;
  line-height: 1.6;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

/* Focus styles */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.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;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.025em;
}

.logo span {
  color: var(--secondary);
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
  padding: 0.5rem 0.25rem;
  border-bottom: 2px solid transparent;
}

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

.nav-link.active {
  border-bottom-color: var(--primary);
}

.btn-cta-nav {
  background-color: var(--primary);
  color: white !important;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.btn-cta-nav:hover {
  background-color: var(--primary-dark);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Mobile Nav Drawer */
.nav-mobile {
  display: none;
  flex-direction: column;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem 1.5rem 1.5rem;
  position: absolute;
  top: 4.5rem;
  left: 0;
  right: 0;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: var(--transition);
  z-index: 99;
}

.nav-mobile.open {
  display: flex;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-mobile a {
  padding: 0.75rem 0;
  font-weight: 500;
  font-size: 1.1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

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

.nav-mobile a.active, .nav-mobile a:hover {
  color: var(--primary);
}

/* Main Content Wrapper */
main {
  flex-grow: 1;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  padding: 4.5rem 0;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  max-width: 800px;
  margin: 0 auto 1.25rem auto;
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem auto;
  font-weight: 400;
}

.hero-ctas {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

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

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

.btn-secondary {
  background-color: white;
  color: var(--text);
  border-color: var(--border);
}

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

/* Page Section Layout */
.section {
  padding: 4rem 0;
}

.section-alt {
  background-color: white;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  text-align: center;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 2.5rem auto;
  text-align: center;
}

/* Two-column Layout for main page with sidebar */
.layout-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .layout-split {
    grid-template-columns: 8fr 4fr;
  }
}

/* Calculator Section (Visible without scrolling, directly below hero/top) */
.calculator-section {
  margin-top: -2.5rem;
  position: relative;
  z-index: 10;
  margin-bottom: 3rem;
}

.calculator-card {
  background-color: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

/* Calculator Section Main Tabs - Segmented Pill Control */
.calculator-card > .calculator-tabs {
  display: flex;
  background-color: #e2e8f0; /* slate-200 */
  padding: 6px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  gap: 6px;
  border-bottom: 1px solid var(--border);
}

.outer-tab-btn {
  flex: 1;
  background: none;
  border: none;
  padding: 0.85rem 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.outer-tab-btn:hover {
  color: var(--text);
  background-color: rgba(255, 255, 255, 0.4);
}

.outer-tab-btn.active {
  color: var(--primary);
  background-color: var(--surface);
  box-shadow: var(--shadow-md);
}

/* Inner Tabs (Basic vs Advanced) - Underline Control */
.outer-tab-content > .calculator-tabs, .calculator-card > .calculator-tabs:not(:first-child) {
  display: flex;
  border-bottom: 2px solid var(--border);
  gap: 1.5rem;
  background: none;
  margin-bottom: 1.5rem;
  padding: 0 0.5rem;
}

.tab-btn {
  background: none;
  border: none;
  padding: 0.75rem 0.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px; /* overlaps parent border */
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

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

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

.calculator-body {
  padding: 2rem;
}

.tab-content, .outer-tab-content {
  display: none;
}

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

/* Grid for calculator inputs */
.input-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .input-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .input-grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

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

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  background-color: var(--background);
  transition: var(--transition);
  color: var(--text);
}

.form-input:focus {
  outline: none;
  border-color: var(--border-focus);
  background-color: white;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.input-addon {
  position: absolute;
  right: 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  pointer-events: none;
}

.form-select {
  width: 100%;
  padding: 0.75rem 2.25rem 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  background-color: var(--background);
  color: var(--text);
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-size: 1.25rem auto;
  background-repeat: no-repeat;
  transition: var(--transition);
  cursor: pointer;
}

.form-select:focus {
  outline: none;
  border-color: var(--border-focus);
  background-color: white;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

/* Calculator Actions */
.calc-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.calc-actions .btn {
  flex: 1;
}

/* Results Display Box */
.results-container {
  margin-top: 2rem;
  background-color: var(--primary-light);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: var(--transition);
}

.results-title {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-dark);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .results-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .results-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.result-box {
  background-color: white;
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.result-box.highlight {
  border-color: var(--primary);
  background-color: var(--surface);
  box-shadow: var(--shadow-md);
}

.result-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.result-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}

.result-box.highlight .result-value {
  color: var(--primary);
  font-size: 2rem;
}

.result-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(37, 99, 235, 0.1);
}

.btn-icon {
  background: white;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
  transition: var(--transition);
}

.btn-icon:hover {
  background-color: var(--background);
  color: var(--primary);
  border-color: var(--primary);
}

/* Alert Notification Popups */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--secondary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* AdSense Placeholders - styled nicely */
.adsense-placeholder {
  margin: 2rem auto;
  padding: 1rem;
  background-color: #f1f5f9;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  max-width: 100%;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.adsense-placeholder::before {
  content: "Advertisement";
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
}

.ads-sidebar {
  min-height: 600px;
  position: sticky;
  top: 6rem;
}

.ads-horizontal {
  width: 100%;
  max-width: 728px;
  min-height: 90px;
}

/* Introduction & Guidelines Text styling */
.prose {
  font-size: 1.05rem;
  color: var(--text-muted);
}

.prose p {
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.prose h2 {
  font-size: 1.75rem;
  color: var(--text);
  font-weight: 700;
  margin: 2rem 0 1rem 0;
  letter-spacing: -0.02em;
}

.prose h3 {
  font-size: 1.35rem;
  color: var(--text);
  font-weight: 600;
  margin: 1.5rem 0 0.75rem 0;
}

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

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

/* Steps - Guide style */
.steps-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (min-width: 768px) {
  .steps-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step-card {
  background-color: white;
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.step-num {
  font-size: 2.25rem;
  font-weight: 800;
  color: rgba(37, 99, 235, 0.15);
  position: absolute;
  top: 0.5rem;
  right: 1rem;
}

.step-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

/* Formula Block styling */
.formula-box {
  background: linear-gradient(135deg, var(--secondary) 0%, #0f172a 100%);
  color: white;
  padding: 2rem;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
  box-shadow: var(--shadow-md);
}

.formula-math {
  font-family: monospace;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  padding: 1rem 0;
  color: var(--accent);
  letter-spacing: 0.05em;
}

/* Practical Use Cases Grid */
.use-cases-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (min-width: 640px) {
  .use-cases-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .use-cases-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.use-case-card {
  background-color: var(--background);
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.use-case-card:hover {
  background-color: white;
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.use-case-icon {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: var(--primary);
  display: inline-block;
  background-color: var(--primary-light);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  line-height: 1;
}

.use-case-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.use-case-text {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* FAQs Accordion styling */
.faq-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.faq-item {
  background-color: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.faq-summary {
  list-style: none; /* Hide default arrow */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
}

.faq-summary::-webkit-details-marker {
  display: none; /* Safari default arrow hide */
}

.faq-summary:hover {
  background-color: var(--primary-light);
  color: var(--primary);
}

.faq-summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.faq-item[open] .faq-summary::after {
  content: "−";
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-content {
  padding: 0 1.5rem 1.25rem 1.5rem;
  color: var(--text-muted);
  border-top: 1px solid transparent;
  font-size: 0.95rem;
}

.faq-item[open] .faq-content {
  border-top-color: var(--border);
}

/* Related Calculators (Links section) */
.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin: 1.5rem 0;
}

@media (min-width: 640px) {
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.related-card {
  background-color: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
}

.related-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  transform: translateX(4px);
}

.related-info h4 {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

.related-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.related-arrow {
  color: var(--primary);
  font-size: 1.25rem;
  font-weight: bold;
}

/* Call To Action Block */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 4rem 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  margin: 3rem 0;
  box-shadow: var(--shadow-lg);
}

.cta-banner h2 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.cta-banner p {
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 2rem auto;
  opacity: 0.9;
}

.cta-banner .btn-secondary {
  border-color: transparent;
}

.cta-banner .btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.9);
}

/* Contact Form Specific Styling */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: 5fr 7fr;
  }
}

.contact-info-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  height: fit-content;
}

.contact-info-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.contact-method {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 1.5rem;
}

.contact-method-icon {
  font-size: 1.25rem;
  color: var(--primary);
  background-color: var(--primary-light);
  padding: 0.5rem;
  border-radius: 50%;
  line-height: 1;
}

.contact-method-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.contact-method-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.contact-form-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.form-textarea {
  min-height: 150px;
  resize: vertical;
}

/* Honeypot field (anti-spam hidden field) */
.hp-field {
  display: none !important;
  visibility: hidden !important;
}

.captcha-box {
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.captcha-question {
  font-weight: 600;
  color: var(--text-muted);
}

.captcha-input {
  width: 80px;
  text-align: center;
}

.form-alert {
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  display: none;
  font-weight: 500;
}

.form-alert-success {
  background-color: var(--accent-light);
  color: var(--accent-dark);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.form-alert-error {
  background-color: #fef2f2;
  color: #b91c1c;
  border: 1px solid rgba(185, 28, 28, 0.2);
}

/* Footer Section */
.site-footer {
  background-color: var(--secondary);
  color: #94a3b8;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 4rem 0 2rem 0;
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 4fr 3fr 3fr 2fr;
  }
}

.footer-col h3 {
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.footer-col p {
  line-height: 1.6;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: #94a3b8;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
  }
}

.footer-legal-links {
  display: flex;
  gap: 1.5rem;
}

.footer-legal-links a {
  font-size: 0.85rem;
  color: #94a3b8;
}

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

.copyright {
  font-size: 0.85rem;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

/* Responsive Table styling inside content (formulas and conversions) */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

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

th {
  background-color: var(--background);
  color: var(--text);
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--border);
  font-size: 0.9rem;
}

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--text-muted);
}

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

tr:nth-child(even) {
  background-color: var(--background);
}
