/* Premium Minimalist Light-Theme Design System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  /* Clean Light-Mode Colors */
  --bg-primary: #f8fafc; /* Soft slate gray */
  --bg-secondary: #ffffff; /* Pure white */
  --bg-tertiary: #f1f5f9;
  
  /* Category Accent Colors */
  --accent-financial: #1e40af; /* Deep Royal Blue */
  --accent-fitness: #15803d; /* Forest Green */
  --accent-math: #b45309; /* Warm Amber */
  --accent-other: #6d28d9; /* Deep Purple */
  
  /* Generic UI Colors */
  --text-primary: #0f172a; /* Slate 900 */
  --text-secondary: #475569; /* Slate 600 */
  --text-muted: #64748b; /* Slate 500 */
  --border-color: #e2e8f0; /* Slate 200 */
  --border-hover: #cbd5e1; /* Slate 300 */
  
  /* Typography */
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  /* Shadow */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

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

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  background-color: var(--text-primary);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: bold;
}

nav {
  display: flex;
  gap: 8px;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: var(--transition-fast);
  padding: 6px 12px;
  border-radius: 6px;
}

nav a:hover, nav a.active {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

/* Footer */
footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 40px 0 20px;
  margin-top: auto;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 30px;
}

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .header-inner {
    flex-direction: column;
    gap: 12px;
  }
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col p {
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.6;
}

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

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-financial);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* Page Layout for Directory Sitemap */
.directory-section {
  padding: 40px 0;
}

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

.directory-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.directory-card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Color Coding Categories */
.directory-card.financial h3 {
  color: var(--accent-financial);
  border-bottom: 2px solid var(--accent-financial);
}
.directory-card.fitness h3 {
  color: var(--accent-fitness);
  border-bottom: 2px solid var(--accent-fitness);
}
.directory-card.math h3 {
  color: var(--accent-math);
  border-bottom: 2px solid var(--accent-math);
}
.directory-card.other h3 {
  color: var(--accent-other);
  border-bottom: 2px solid var(--accent-other);
}

.link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.link-list li a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition-fast);
  display: inline-block;
}

.link-list li a:hover {
  text-decoration: underline;
}

.directory-card.financial .link-list li a:hover { color: var(--accent-financial); }
.directory-card.fitness .link-list li a:hover { color: var(--accent-fitness); }
.directory-card.math .link-list li a:hover { color: var(--accent-math); }
.directory-card.other .link-list li a:hover { color: var(--accent-other); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  border: none;
  gap: 6px;
}

.btn-primary {
  background-color: var(--accent-financial);
  color: white;
}
.btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-0.5px);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background: var(--border-color);
}

/* Forms & Inputs */
.calc-container {
  display: grid;
  grid-template-columns: 7fr 4fr;
  gap: 24px;
  padding: 24px 0 60px;
}

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

.calc-inputs {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 15px;
  font-family: var(--font-body);
  transition: var(--transition-fast);
  width: 100%;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-financial);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

/* Radio button style */
.radio-group {
  display: flex;
  gap: 10px;
}

.radio-btn {
  position: relative;
  flex-grow: 1;
}

.radio-btn input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-label {
  display: block;
  text-align: center;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 10px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.radio-btn input:checked + .radio-label {
  background-color: var(--accent-financial);
  border-color: var(--accent-financial);
  color: white;
}

/* Result Box Style */
.calc-results {
  background: #f1f5f9; /* Warm light slate */
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  height: fit-content;
  box-shadow: var(--shadow-sm);
}

.result-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
  text-align: center;
}

.result-main {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.result-main .value {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  color: var(--accent-fitness); /* Green color represents successfully calculated value */
  margin-bottom: 2px;
}

.result-main .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.result-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dotted var(--border-hover);
  font-size: 13.5px;
}

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

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

.result-row .val {
  font-weight: 600;
}

/* Sliders */
.form-control-range {
  margin: 6px 0;
  cursor: pointer;
  accent-color: var(--accent-financial);
  width: 100%;
}

.range-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.range-val {
  font-weight: bold;
  color: var(--accent-financial);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 40px 0 20px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.hero h1 span {
  color: var(--accent-financial);
}

.hero p {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Dynamic Article & Blog Elements */
.articles-section {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 60px 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
}

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

.article-card {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
}

.article-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  gap: 8px;
}

.article-card h4 {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
  color: var(--text-primary);
}

.article-card p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 14px;
  flex-grow: 1;
}

.article-link {
  color: var(--accent-financial);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.article-link:hover {
  text-decoration: underline;
}

/* AdSense Placeholders */
.adsense-placeholder {
  background: #f1f5f9;
  border: 1px dashed var(--border-hover);
  border-radius: 4px;
  padding: 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 20px 0;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ads-sidebar {
  min-height: 600px;
  width: 100%;
}

.ads-horizontal {
  max-width: 728px;
  margin: 20px auto;
}

/* Article Reader styling */
.article-page {
  max-width: 780px;
  margin: 30px auto;
}

.article-header {
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}

.article-header h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
}

.article-body {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text-primary);
}

.article-body p {
  margin-bottom: 18px;
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin: 28px 0 12px;
}

.article-body h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  margin: 24px 0 10px;
}

.article-body ul, .article-body ol {
  margin-bottom: 18px;
  padding-left: 20px;
}

.article-body li {
  margin-bottom: 6px;
}

.article-body blockquote {
  border-left: 3px solid var(--accent-financial);
  background: var(--bg-primary);
  padding: 12px 16px;
  margin-bottom: 18px;
  font-style: italic;
  color: var(--text-secondary);
}

/* Dynamic color styles for tools headers */
.calc-header-financial { color: var(--accent-financial) !important; }
.calc-header-fitness { color: var(--accent-fitness) !important; }
.calc-header-math { color: var(--accent-math) !important; }
.calc-header-other { color: var(--accent-other) !important; }

/* Cookie Consent Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
  padding: 16px 0;
  z-index: 1000;
  animation: slideUp 0.3s ease-out;
}

.cookie-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.cookie-inner p {
  font-size: 13.0px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.cookie-inner p a {
  color: var(--accent-financial);
  text-decoration: none;
  font-weight: 600;
}

.cookie-inner p a:hover {
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .cookie-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .cookie-buttons {
    width: 100%;
    justify-content: flex-end;
  }
}

