/* ==========================================================================
   WebsiteCostCal.net - Website Cost Calculator & Editorial Blog Design System
   Modern, Ultra-responsive, AdSense-compliant, Dark/Light Mode Theme
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Color Palette - Modern Indigo & Emerald Tech Editorial */
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-light: #eff6ff;
  --primary-dark: #1d4ed8;
  --accent: #10b981;
  --accent-hover: #059669;
  --accent-light: #ecfdf5;
  --secondary: #8b5cf6;
  --warning: #f59e0b;
  --danger: #ef4444;

  /* Neutral Spectrum */
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --bg-nav: rgba(255, 255, 255, 0.94);
  --border-color: #e2e8f0;
  --border-focus: #93c5fd;
  
  /* Text Spectrum */
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #94a3b8;
  --text-inverse: #ffffff;

  /* Elevation / Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 25px rgba(59, 130, 246, 0.25);

  /* Layout & Geometry */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --max-width: 1200px;
  --header-height: 72px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Plus Jakarta Sans', var(--font-sans);
  --font-mono: 'JetBrains Mono', monospace;

  /* Transitions */
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-body: #090d16;
  --bg-card: #111827;
  --bg-card-subtle: #1e293b;
  --bg-nav: rgba(17, 24, 39, 0.94);
  --border-color: #273549;
  --border-focus: #3b82f6;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --primary-light: #1e293b;
  --accent-light: #064e3b;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.35);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.85rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }

p {
  margin-bottom: 1.25rem;
  color: var(--text-muted);
}

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

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

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
  color: var(--text-muted);
}

li {
  margin-bottom: 0.4rem;
}

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

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

.container-narrow {
  max-width: 860px;
}

.container-wide {
  max-width: 1320px;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: var(--bg-nav);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
}

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

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.brand-logo-img {
  height: 38px;
  width: auto;
  color: var(--text-main);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
  position: relative;
  padding: 0.5rem 0;
}

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

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--primary);
  border-radius: var(--radius-full);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.theme-toggle-btn {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  background: var(--border-color);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover), var(--primary-dark));
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
  color: #fff;
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #ffffff;
}

.btn-accent:hover {
  background: var(--accent-hover);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-main);
}

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

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.85rem 1.85rem;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-main);
  cursor: pointer;
}

/* Reading Progress Bar for Blog Posts */
.reading-progress-container {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 99;
}

.reading-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.1s ease-out;
}

/* Hero Section */
.hero {
  padding: 4.5rem 0 3.5rem;
  background: radial-gradient(circle at 50% -20%, rgba(59, 130, 246, 0.12) 0%, rgba(0,0,0,0) 60%);
  position: relative;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-light);
  color: var(--primary);
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.hero-title {
  font-size: 3.2rem;
  max-width: 880px;
  margin: 0 auto 1.25rem;
  font-weight: 800;
  line-height: 1.15;
}

.hero-title span {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  max-width: 680px;
  margin: 0 auto 2.25rem;
  color: var(--text-muted);
}

.hero-illustration-box {
  max-width: 920px;
  margin: 2.5rem auto 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

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

.hero-stat-number {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
}

.hero-stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Header Top Ad Banner Wrapper */
.header-ad-wrapper {
  width: 100%;
  background: var(--bg-card-subtle);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 0;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 90px;
  position: relative;
  z-index: 10;
}

.header-ad-wrapper #yandex_rtb_R-A-19809094-12 {
  margin: 0 auto;
  max-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* AdSense Unit Container - Standards Compliant */
.ad-slot-container {
  margin: 2.5rem auto;
  text-align: center;
  max-width: 100%;
}

.ad-box {
  background: var(--bg-card-subtle);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  position: relative;
  transition: var(--transition);
}

.ad-box.ad-leaderboard {
  min-height: 95px;
  max-width: 728px;
  margin: 0 auto;
}

.ad-box.ad-rectangle {
  min-height: 250px;
  max-width: 300px;
  margin: 0 auto;
}

.ad-box.ad-responsive {
  min-height: 130px;
  width: 100%;
}

.ad-disclaimer {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.ad-placeholder-inner {
  color: var(--text-light);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

/* Calculator Section & Card */
.calculator-section {
  padding: 2.5rem 0 4rem;
}

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

.calculator-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.calc-layout {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 0;
}

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

.calc-controls {
  padding: 2.5rem;
  border-right: 1px solid var(--border-color);
}

@media (max-width: 960px) {
  .calc-controls {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
}

.calc-step {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.calc-step:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.calc-step-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.calc-step-num {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calc-step-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}

.calc-step-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.25rem 0 0.85rem;
}

/* Option Grids & Cards */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.85rem;
}

.options-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.option-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-card);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.option-card:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
}

.option-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.option-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.option-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.option-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.option-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 0.5rem;
}

/* Checkbox Features */
.feature-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-card);
}

.checkbox-label:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.checkbox-label input[type="checkbox"] {
  margin-top: 0.2rem;
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

.checkbox-info {
  display: flex;
  flex-direction: column;
}

.checkbox-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

.checkbox-cost {
  font-size: 0.76rem;
  color: var(--accent);
  font-weight: 600;
}

/* Range Slider */
.slider-group {
  margin-top: 1rem;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.slider-val {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--primary);
  font-size: 1.15rem;
}

.range-slider {
  width: 100%;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--border-color);
  outline: none;
  -webkit-appearance: none;
  accent-color: var(--primary);
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
  border: 2px solid #ffffff;
}

/* Calculator Live Summary Sticky Sidebar */
.calc-summary {
  padding: 2.5rem;
  background: var(--bg-card-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: sticky;
  top: calc(var(--header-height) + 1rem);
}

.summary-header {
  margin-bottom: 1.5rem;
}

.summary-currency-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.currency-select {
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.85rem;
}

.price-display-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.price-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.price-main {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

.price-range {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.price-monthly-tag {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 0.65rem;
}

/* Cost Breakdown Itemized List */
.cost-breakdown-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.88rem;
}

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

.breakdown-item-name {
  color: var(--text-muted);
}

.breakdown-item-val {
  font-weight: 600;
  color: var(--text-main);
}

.timeline-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.timeline-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.timeline-val {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.95rem;
}

.summary-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Editorial Blog Styling */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2.25rem;
}

.section-title-wrap {
  max-width: 600px;
}

.section-tag {
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
  display: block;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.section-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Article Cards Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.75rem;
  margin-bottom: 3.5rem;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-focus);
}

.article-img-wrap {
  width: 100%;
  height: 200px;
  background: #0f172a;
  overflow: hidden;
  position: relative;
}

.article-cover-svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.article-card:hover .article-cover-svg {
  transform: scale(1.03);
}

.article-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.78rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.article-category-badge {
  background: var(--primary-light);
  color: var(--primary);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.72rem;
}

.article-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-main);
  transition: var(--transition);
}

.article-card:hover .article-title {
  color: var(--primary);
}

.article-excerpt {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.author-mini {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.author-avatar-mini {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
}

.read-more-link {
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Single Blog Post Layout */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3.5rem;
  padding: 3rem 0;
}

@media (max-width: 980px) {
  .post-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.post-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 3rem;
  box-shadow: var(--shadow-md);
}

@media (max-width: 640px) {
  .post-content {
    padding: 1.5rem;
  }
}

.post-featured-image-box {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 1.75rem 0 2.25rem;
  border: 1px solid var(--border-color);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--text-muted);
}

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

.post-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.post-meta-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.25rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  flex-wrap: wrap;
}

.author-chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

/* Post Typography & Content */
.post-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-main);
}

.post-body h2 {
  font-size: 1.7rem;
  margin-top: 2.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.post-body h3 {
  font-size: 1.35rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.post-body p {
  margin-bottom: 1.5rem;
  color: var(--text-main);
  opacity: 0.9;
}

.post-body ul, .post-body ol {
  margin-bottom: 1.75rem;
  padding-left: 2rem;
}

.post-body li {
  margin-bottom: 0.65rem;
}

/* Callouts & Info Boxes */
.callout {
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 2rem 0;
  border-left: 4px solid var(--primary);
  background: var(--bg-card-subtle);
}

.callout-info {
  border-left-color: var(--primary);
  background: var(--primary-light);
}

.callout-tip {
  border-left-color: var(--accent);
  background: var(--accent-light);
}

.callout-warning {
  border-left-color: var(--warning);
  background: #fffbeb;
}

[data-theme="dark"] .callout-warning {
  background: #451a03;
}

.callout-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.callout p:last-child {
  margin-bottom: 0;
}

/* Interactive Embedded Calculator Callout inside Articles */
.embed-calc-box {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(139, 92, 246, 0.08));
  border: 2px dashed var(--primary);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2.5rem 0;
  text-align: center;
}

.embed-calc-box h3 {
  margin-bottom: 0.5rem;
}

/* Tables */
.data-table-container {
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.data-table th {
  background: var(--bg-card-subtle);
  padding: 0.85rem 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  border-bottom: 2px solid var(--border-color);
}

.data-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-muted);
}

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

.data-table tr:hover td {
  background: var(--bg-card-subtle);
}

/* Sidebar Widgets */
.post-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-item {
  margin-bottom: 0.6rem;
  font-size: 0.88rem;
}

.toc-link {
  color: var(--text-muted);
  display: block;
  padding: 0.2rem 0;
}

.toc-link:hover, .toc-link.active {
  color: var(--primary);
  font-weight: 600;
  padding-left: 0.35rem;
}

/* Author Box */
.author-box {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-top: 3rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.author-box-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 800;
  flex-shrink: 0;
}

.author-box-info h4 {
  margin-bottom: 0.25rem;
  font-size: 1.1rem;
}

.author-role {
  font-size: 0.82rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.author-bio {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Share & Next/Prev Navigation */
.post-share-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0;
  margin-top: 2rem;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.share-buttons {
  display: flex;
  gap: 0.5rem;
}

/* FAQ Accordion */
.faq-section {
  padding: 4rem 0;
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  text-align: left;
  background: none;
  border: none;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-icon {
  font-size: 1.25rem;
  transition: transform 0.2s ease;
  color: var(--primary);
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  padding: 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.faq-item.active .faq-answer {
  padding-bottom: 1.25rem;
}

/* Form Styles for Contact & Newsletter */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

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

/* Search Bar */
.search-container {
  position: relative;
  margin-bottom: 2rem;
}

.search-input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 0.95rem;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 1.1rem;
}

/* Category Filter Pills */
.filter-pills {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
  scrollbar-width: thin;
}

.filter-pill {
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.filter-pill:hover, .filter-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Footer */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 4.5rem 0 2rem;
  margin-top: auto;
}

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

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

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

.footer-col-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text-main);
}

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

.footer-links li {
  margin-bottom: 0.65rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.88rem;
}

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

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-light);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-disclaimer-note {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 1rem;
  line-height: 1.5;
}

/* Toast Notification */
.toast-msg {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #1e293b;
  color: #ffffff;
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Responsive Menu Drawer */
@media (max-width: 820px) {
  .mobile-nav-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-card);
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem;
    gap: 1.5rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    border-top: 1px solid var(--border-color);
  }

  .nav-menu.open {
    transform: translateX(0);
  }

  .nav-link {
    font-size: 1.15rem;
  }
}

/* Print Stylesheet */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .site-header, .site-footer, .ad-slot-container, .theme-toggle-btn, .summary-actions, .mobile-nav-toggle, .reading-progress-container {
    display: none !important;
  }
  .calculator-card {
    border: none !important;
    box-shadow: none !important;
  }
  .calc-layout {
    display: block !important;
  }
  .calc-summary {
    position: static !important;
    border: 1px solid #ddd !important;
    margin-top: 2rem;
    page-break-inside: avoid;
  }
}
