/* =============================================================
   eHelper.in — Calculator Design System (RED THEME)
   ============================================================= */

/* Color Utilities */
.bg-blue-50    { background-color: #eff6ff !important; }
.bg-blue-100   { background-color: #dbeafe !important; }
.text-blue-600 { color: #2563eb !important; }
.bg-purple-100 { background-color: #f3e8ff !important; }
.text-purple-600{ color: #9333ea !important; }
.bg-red-50     { background-color: #fef2f2 !important; }
.bg-red-100    { background-color: #fee2e2 !important; }
.text-red-600  { color: #dc2626 !important; }
.text-red-800  { color: #991b1b !important; }
.bg-green-50   { background-color: #f0fdf4 !important; }
.bg-green-100  { background-color: #dcfce7 !important; }
.text-green-600{ color: #16a34a !important; }
.bg-amber-50   { background-color: #fffbeb !important; }
.bg-amber-100  { background-color: #fef3c7 !important; }
.text-amber-600{ color: #d97706 !important; }
.bg-teal-50    { background-color: #f0fdfa !important; }
.bg-teal-100   { background-color: #ccfbf1 !important; }
.text-teal-600 { color: #0d9488 !important; }
.bg-indigo-50  { background-color: #eef2ff !important; }
.bg-indigo-100 { background-color: #e0e7ff !important; }
.text-indigo-600{ color: #4f46e5 !important; }
.bg-orange-50  { background-color: #fff7ed !important; }
.bg-orange-100 { background-color: #ffedd5 !important; }
.text-orange-600{ color: #ea580c !important; }
.bg-cyan-50    { background-color: #ecfeff !important; }
.bg-cyan-100   { background-color: #cffafe !important; }
.text-cyan-600 { color: #0891b2 !important; }
.bg-pink-50    { background-color: #fdf2f8 !important; }
.bg-pink-100   { background-color: #fce7f3 !important; }
.text-pink-600 { color: #db2777 !important; }
.bg-violet-50  { background-color: #f5f3ff !important; }
.bg-violet-100 { background-color: #ede9fe !important; }
.text-violet-600{ color: #7c3aed !important; }
.border-blue-100{ border-color: #dbeafe !important; }
.border-amber-100{ border-color: #fde68a !important; }
.text-yellow-800{ color: #92400e !important; }
.bg-yellow-100 { background-color: #fef9c3 !important; }

/* =============================================================
   INDIVIDUAL CALCULATOR PAGES — RED THEME
   ============================================================= */

.calc-page {
  background: #fafafa;
  min-height: 100vh;
}

/* ── Hero Banner ────────────────────────────────────────────── */
.calc-hero {
  background: linear-gradient(135deg, #7f1d1d 0%, #b91c1c 50%, #dc2626 100%);
  padding: 2.5rem 0 2rem;
  position: relative;
  overflow: hidden;
}
.calc-hero::before {
  content: '';
  position: absolute;
  width: 360px; height: 360px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  top: -130px; right: -80px;
  pointer-events: none;
}
.calc-hero::after {
  content: '';
  position: absolute;
  width: 260px; height: 260px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
  bottom: -90px; left: -50px;
  pointer-events: none;
}
.calc-hero .container { position: relative; z-index: 1; }

/* Breadcrumb */
.calc-hero-crumb {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  font-size: 0.82rem;
  flex-wrap: wrap;
}
.calc-hero-crumb a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.2s;
}
.calc-hero-crumb a:hover { color: #fff; }
.calc-hero-crumb .chev { color: rgba(255,255,255,0.3); font-size: 0.65rem; }
.calc-hero-crumb .cur  { color: rgba(255,255,255,0.9); font-weight: 600; }

/* Icon */
.calc-hero-icon {
  width: 66px; height: 66px;
  background: rgba(255,255,255,0.14);
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 18px;
  display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 1.85rem;
  color: #fff;
  margin-bottom: 0.9rem;
  backdrop-filter: blur(6px);
}
.calc-hero h1 {
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  line-height: 1.2;
}
.calc-hero-sub {
  color: rgba(255,255,255,0.78);
  font-size: 0.95rem;
  margin: 0;
}

/* ── Layout ─────────────────────────────────────────────────── */
.calc-layout { padding: 2rem 0 4rem; background: #fafafa; }

/* ── Calculator Card ─────────────────────────────────────────── */
.calc-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(220,38,38,0.08), 0 2px 10px rgba(0,0,0,0.04);
  border: 1px solid rgba(220,38,38,0.08);
  overflow: hidden;
  position: sticky;
  top: 88px;
}

.calc-card-head {
  background: linear-gradient(135deg, #fff5f5 0%, #fee2e2 100%);
  padding: 1.5rem 1.75rem 1.2rem;
  border-bottom: 1px solid #fecaca;
  text-align: center;
}
.calc-card-head .ch-icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  background: #fff;
  box-shadow: 0 2px 8px rgba(220,38,38,0.15);
}
.calc-card-head h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1a1a1a;
  margin: 0;
}
.calc-card-head p {
  font-size: 0.83rem;
  color: #6b7280;
  margin: 0.2rem 0 0;
}

.calc-card-body { padding: 1.5rem 1.75rem; }

/* ── Labels ─────────────────────────────────────────────────── */
.calc-label {
  display: block;
  font-weight: 700;
  font-size: 0.77rem;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}

/* ── Inputs ─────────────────────────────────────────────────── */
.calc-input {
  display: block;
  width: 100%;
  padding: 0.78rem 1rem;
  font-size: 0.97rem;
  font-weight: 500;
  color: #111827;
  background: #fafafa;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
  font-family: inherit;
  appearance: auto;
  -webkit-appearance: auto;
}
.calc-input:focus {
  border-color: #dc2626;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}
.calc-input::placeholder { color: #9ca3af; font-weight: 400; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-calc {
  flex: 1;
  padding: 0.85rem 1.4rem;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: all 0.22s ease;
  box-shadow: 0 4px 14px rgba(220,38,38,0.3);
  font-family: inherit;
}
.btn-calc:hover {
  background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(220,38,38,0.36);
}
.btn-calc:active { transform: translateY(0); }

.btn-calc-reset {
  padding: 0.85rem 1.1rem;
  background: #f3f4f6;
  color: #4b5563;
  font-weight: 700;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.18s ease;
  font-family: inherit;
  flex-shrink: 0;
}
.btn-calc-reset:hover { background: #e5e7eb; border-color: #d1d5db; }

/* ── Error ───────────────────────────────────────────────────── */
.calc-error {
  color: #dc2626;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.4rem;
  display: none;
  align-items: center;
  gap: 0.3rem;
}
.calc-error.show { display: flex; }

/* ── Result Panel ────────────────────────────────────────────── */
.calc-result {
  margin-top: 1.25rem;
  display: none;
}
.calc-result.show {
  display: block;
  animation: fadeSlideUp 0.35s ease forwards;
}
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.calc-divider {
  border: none;
  border-top: 1px solid #f3f4f6;
  margin: 1.1rem 0;
}

/* Primary result box — RED accent */
.calc-res-primary {
  background: linear-gradient(135deg, #fff5f5, #fee2e2);
  border: 1px solid #fecaca;
  border-radius: 14px;
  padding: 1.2rem;
  text-align: center;
  margin-bottom: 0.8rem;
}
.calc-res-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #dc2626;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.3rem;
}
.calc-res-value {
  font-size: 2.1rem;
  font-weight: 900;
  color: #7f1d1d;
  line-height: 1.15;
  display: block;
}
.calc-res-sub {
  font-size: 0.8rem;
  color: #ef4444;
  font-weight: 500;
  margin-top: 0.15rem;
  display: block;
}

/* Stats grid */
.calc-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-bottom: 0.8rem;
}
.calc-stat {
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.7rem 0.6rem;
  text-align: center;
}
.calc-stat-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  display: block;
  margin-bottom: 0.2rem;
}
.calc-stat-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: #111827;
  display: block;
}

/* Action bar */
.calc-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  padding-top: 0.8rem;
  border-top: 1px solid #f3f4f6;
}
.btn-calc-action {
  padding: 0.42rem 0.85rem;
  background: #f9fafb;
  color: #4b5563;
  font-weight: 600;
  font-size: 0.8rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.18s ease;
  font-family: inherit;
}
.btn-calc-action:hover { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }

/* ── SEO Content Card ────────────────────────────────────────── */
.calc-content {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.05);
  padding: 2rem 2.25rem;
  margin-bottom: 1.5rem;
}
.calc-content h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: #111827;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid #fee2e2;
}
.calc-content > h2:first-child { margin-top: 0; }
.calc-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1f2937;
  margin-top: 1.4rem;
  margin-bottom: 0.55rem;
}
.calc-content p  { color: #4b5563; line-height: 1.8; margin-bottom: 0.85rem; }
.calc-content ul,
.calc-content ol { padding-left: 1.4rem; color: #4b5563; line-height: 1.8; margin-bottom: 1rem; }
.calc-content li { margin-bottom: 0.4rem; }

/* Callout box — RED */
.calc-callout {
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  border-left: 4px solid #dc2626;
  background: #fff5f5;
}
.calc-callout h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: #b91c1c;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.calc-callout p { color: #7f1d1d; font-size: 0.87rem; margin: 0; line-height: 1.6; }
.calc-callout.warning { border-color: #92400e; background: #fffbeb; }
.calc-callout.warning h4 { color: #92400e; }
.calc-callout.warning p  { color: #78350f; }

/* Formula block */
.calc-formula {
  background: #111827;
  color: #fca5a5;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  font-family: 'Courier New', monospace;
  font-size: 0.88rem;
  margin: 1rem 0;
  border-left: 3px solid #dc2626;
  overflow-x: auto;
  line-height: 1.7;
}

/* Table */
.calc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin: 1rem 0;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}
.calc-table thead tr { background: #fff5f5; }
.calc-table th { padding: 0.7rem 1rem; text-align: left; font-weight: 700; color: #374151; border-bottom: 1px solid #fecaca; }
.calc-table td { padding: 0.65rem 1rem; border-top: 1px solid #f9fafb; color: #4b5563; }
.calc-table tbody tr:hover { background: #fff5f5; }

/* FAQ — RED */
.calc-faq { margin-top: 0.75rem; }
.calc-faq .accordion-item {
  border-radius: 12px !important;
  margin-bottom: 0.55rem;
  border: 1px solid #e5e7eb !important;
  overflow: hidden;
  box-shadow: none;
}
.calc-faq .accordion-button {
  font-weight: 700;
  font-size: 0.88rem;
  color: #1f2937;
  background: #fafafa;
  padding: 0.85rem 1.1rem;
  border-radius: 12px !important;
}
.calc-faq .accordion-button:not(.collapsed) {
  background: #fff5f5;
  color: #b91c1c;
  box-shadow: none;
}
.calc-faq .accordion-button::after {
  filter: none;
}
.calc-faq .accordion-button:not(.collapsed)::after {
  filter: invert(28%) sepia(90%) saturate(1500%) hue-rotate(340deg);
}
.calc-faq .accordion-button:focus { box-shadow: none; }
.calc-faq .accordion-body {
  font-size: 0.87rem;
  color: #4b5563;
  padding: 0.7rem 1.1rem 1rem;
  line-height: 1.7;
}

/* Related calculators */
.calc-related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 1rem;
}
.calc-related-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.9rem;
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.calc-related-link:hover {
  background: #fff5f5;
  border-color: #fca5a5;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220,38,38,0.1);
}
.calc-related-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.calc-related-name {
  font-weight: 700;
  font-size: 0.83rem;
  color: #1f2937;
  display: block;
}
.calc-related-desc {
  font-size: 0.72rem;
  color: #6b7280;
  display: block;
}

/* Range slider — RED */
.calc-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 7px;
  border-radius: 4px;
  background: #e5e7eb;
  outline: none;
  cursor: pointer;
}
.calc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #dc2626;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(220,38,38,0.35);
}
.calc-range::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #dc2626;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(220,38,38,0.35);
}

/* =============================================================
   HUB PAGE (calculators.php) — RED THEME
   ============================================================= */
.calc-hub-hero {
  background: linear-gradient(135deg, #450a0a 0%, #7f1d1d 40%, #dc2626 100%);
  padding: 3.5rem 0 3rem;
  position: relative;
  overflow: hidden;
}
.calc-hub-hero::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
  top: -220px; right: -100px;
  pointer-events: none;
}
.calc-hub-hero::after {
  content: '';
  position: absolute;
  width: 380px; height: 380px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
  bottom: -150px; left: -80px;
  pointer-events: none;
}
.calc-hub-hero .container { position: relative; z-index: 1; }
.calc-hub-hero h1 {
  font-size: 2.8rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 0.6rem;
}
.calc-hub-hero .lead {
  color: rgba(255,255,255,0.78);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto 1.75rem;
}
.calc-hub-search {
  max-width: 520px;
  margin: 0 auto;
  position: relative;
}
.calc-hub-search input {
  width: 100%;
  padding: 0.9rem 1rem 0.9rem 3rem;
  font-size: 0.97rem;
  border: none;
  border-radius: 50px;
  background: rgba(255,255,255,0.97);
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  outline: none;
  color: #111827;
  font-family: inherit;
}
.calc-hub-search input:focus {
  box-shadow: 0 8px 30px rgba(0,0,0,0.2), 0 0 0 3px rgba(220,38,38,0.3);
}
.calc-hub-search .hub-search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}

/* Section heading */
.calc-section-head {
  font-size: 1.1rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.65rem;
  border-bottom: 3px solid #fee2e2;
}

/* Hub card — RED accent on hover */
.calc-hub-card {
  background: #fff;
  border-radius: 18px;
  padding: 1.4rem;
  border: 1px solid #f3f4f6;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all 0.28s cubic-bezier(0.4,0,0.2,1);
  position: relative;
  overflow: hidden;
}
.calc-hub-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #dc2626, #f87171);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.calc-hub-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 35px rgba(220,38,38,0.1);
  border-color: #fca5a5;
}
.calc-hub-card:hover::after { transform: scaleX(1); }
.calc-hub-card .hub-icon {
  width: 50px; height: 50px;
  border-radius: 13px;
  display: flex;
  align-items: center; justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 0.85rem;
}
.calc-hub-card h3 {
  font-size: 1rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 0.3rem;
  transition: color 0.2s;
}
.calc-hub-card:hover h3 { color: #dc2626; }
.calc-hub-card p {
  font-size: 0.82rem;
  color: #6b7280;
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
}
.calc-hub-card .hub-cta {
  font-size: 0.78rem;
  font-weight: 700;
  color: #dc2626;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 991px) {
  .calc-card { position: static; }
}
@media (max-width: 768px) {
  .calc-hero h1       { font-size: 1.6rem; }
  .calc-content       { padding: 1.4rem 1.5rem; }
  .calc-related-grid  { grid-template-columns: 1fr; }
  .calc-hub-hero h1   { font-size: 2rem; }
}
@media (max-width: 576px) {
  .calc-hero          { padding: 1.75rem 0 1.5rem; }
  .calc-hero h1       { font-size: 1.4rem; }
  .calc-card-body     { padding: 1.1rem 1.2rem; }
  .calc-card-head     { padding: 1.1rem 1.2rem 0.9rem; }
  .calc-content       { padding: 1.2rem; }
  .calc-hub-hero h1   { font-size: 1.75rem; }
  .calc-hub-hero .lead{ font-size: 0.92rem; }
}
