/* =====================================================
   PUMPS CATEGORY PAGE – PREMIUM REDESIGN
   Palette: Blue #2563eb  |  Font: Inter
   ===================================================== */

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #f8fafc;
  color: #1e293b;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

/* ---- CSS Tokens ---- */
:root {
  --p:      #2563eb;
  --p-d:    #1d4ed8;
  --p-l:    #eff6ff;
  --p-b:    #bfdbfe;
  --text:   #1e293b;
  --muted:  #64748b;
  --border: #e2e8f0;
  --white:  #ffffff;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(37,99,235,.07);
  --max:    1100px;
}

/* =====================================================
   HERO
   ===================================================== */
.p-hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%);
  padding: 80px 24px 70px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.p-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 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.04'%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");
}

.p-hero-inner { max-width: 780px; margin: 0 auto; position: relative; }

.p-hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25);
  color: #fff; font-size: 13px; font-weight: 600;
  padding: 6px 16px; border-radius: 40px; margin-bottom: 24px;
  backdrop-filter: blur(4px);
}

.p-hero h1 {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800; color: #fff;
  line-height: 1.15; margin-bottom: 18px;
  letter-spacing: -.5px;
}

.p-hero p {
  font-size: 17px; color: rgba(255,255,255,.82);
  max-width: 620px; margin: 0 auto 32px; line-height: 1.65;
}

/* Search */
.p-search-wrap {
  max-width: 580px; margin: 0 auto 28px;
  position: relative;
}
.p-search-wrap svg {
  position: absolute; left: 18px; top: 50%;
  transform: translateY(-50%); pointer-events: none; color: #94a3b8;
}
.p-search-wrap input {
  width: 100%; padding: 15px 20px 15px 50px;
  border: 2px solid rgba(255,255,255,.3);
  border-radius: 50px; background: rgba(255,255,255,.95);
  font-size: 15px; font-family: inherit; color: #1e293b;
  outline: none; transition: all .25s;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
}
.p-search-wrap input:focus { border-color: #93c5fd; box-shadow: 0 0 0 4px rgba(147,197,253,.3); }
.p-search-wrap input::placeholder { color: #94a3b8; }

/* CTA Buttons */
.p-hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 32px; }
.p-btn-white {
  padding: 12px 24px; border-radius: 50px; font-size: 14px; font-weight: 700;
  background: #fff; color: var(--p); border: 2px solid #fff;
  cursor: pointer; transition: all .2s; font-family: inherit;
}
.p-btn-white:hover { background: #eff6ff; }
.p-btn-outline {
  padding: 12px 24px; border-radius: 50px; font-size: 14px; font-weight: 700;
  background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.5);
  cursor: pointer; transition: all .2s; font-family: inherit;
  display: inline-block;
}
.p-btn-outline:hover { background: rgba(255,255,255,.1); border-color: #fff; }

/* Count badge */
.p-count-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.9); font-size: 13px; font-weight: 500;
  padding: 5px 14px; border-radius: 40px; margin-bottom: 20px;
}

/* Filter pills */
.p-filters {
  margin-top: 20px;
}
#quick-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 860px;
  margin: 0 auto;
}
.p-filters .filter-pill {
  padding: 8px 20px; border-radius: 50px; font-size: 13px; font-weight: 600;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3);
  color: rgba(255,255,255,.9); cursor: pointer; transition: all .2s;
  letter-spacing: .2px; white-space: nowrap;
}
.p-filters .filter-pill:hover,
.p-filters .filter-pill.active {
  background: #fff; color: var(--p); border-color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
}


/* =====================================================
   SHARED SECTION WRAPPER
   ===================================================== */
.p-section { padding: 72px 24px; }
.p-section.p-bg-alt { background: #fff; }
.p-section-inner { max-width: var(--max); margin: 0 auto; }

.p-section-label {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--p-l); color: var(--p);
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  padding: 5px 14px; border-radius: 40px; margin-bottom: 14px;
}

.p-section-title {
  font-size: clamp(22px, 3vw, 32px); font-weight: 800;
  color: var(--text); letter-spacing: -.3px; margin-bottom: 12px;
}

.p-section-desc { font-size: 16px; color: var(--muted); line-height: 1.65; max-width: 640px; }
.p-section-head { margin-bottom: 40px; }
.p-section-head.centered { text-align: center; }
.p-section-head.centered .p-section-desc { margin: 0 auto; }

/* =====================================================
   CALCULATOR CARDS (dynamic sections)
   ===================================================== */
#dynamic-sections-container { max-width: var(--max); margin: 0 auto; padding: 0 32px; }

.p-loading {
  text-align: center; padding: 60px 20px;
  color: var(--muted); font-size: 16px;
}

.p-empty {
  display: none; text-align: center; padding: 60px 20px;
  background: #fff; border-radius: var(--radius);
  border: 1px dashed var(--border); margin: 24px auto; max-width: 500px;
}
.p-empty h3 { color: var(--text); font-size: 20px; margin-bottom: 8px; }
.p-empty p { color: var(--muted); font-size: 15px; }

/* Category group */
.category-section { padding: 48px 0 8px; }

.p-group-header {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 28px; padding-bottom: 14px;
  border-bottom: 2px solid var(--p-b);
}
.p-group-header h2 {
  font-size: 20px; font-weight: 700; color: var(--text); margin: 0;
}
.p-group-count {
  background: var(--p-l); color: var(--p);
  font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
}

/* Card grid */
.p-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}

.card {
  background: #fff; border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 28px 24px 22px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  transition: transform .25s, box-shadow .25s, border-color .25s;
  display: flex; flex-direction: column; position: relative;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--p-b); }

.card-badge {
  position: absolute; top: -11px; right: 18px;
  background: var(--p); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 12px;
  border-radius: 20px; letter-spacing: .3px;
}

.card h3 { font-size: 17px; font-weight: 700; color: var(--text); margin: 8px 0 10px; }
.card p { font-size: 14px; color: var(--muted); line-height: 1.55; flex-grow: 1; }

.card .btn {
  display: block; width: 100%; margin-top: 18px;
  padding: 11px; border-radius: 10px; text-align: center;
  font-size: 13px; font-weight: 700; color: var(--p);
  background: var(--p-l); border: 1px solid var(--p-b);
  transition: all .2s;
}
.card:hover .btn { background: var(--p); color: #fff; border-color: var(--p); }

/* =====================================================
   RECENT CALCULATORS
   ===================================================== */
.p-recent-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 28px;
}
.p-recent-head h2 { font-size: 20px; font-weight: 700; color: var(--text); margin: 0; }
.p-new-badge {
  background: #dcfce7; color: #15803d;
  font-size: 11px; font-weight: 700; padding: 3px 10px;
  border-radius: 20px; text-transform: uppercase; letter-spacing: .5px;
}

/* =====================================================
   PUMP TYPES (premium-card grid)
   ===================================================== */
.p-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px,1fr));
  gap: 20px;
}

.p-type-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.03);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.p-type-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--p-b); }

.p-type-icon {
  width: 60px; height: 60px; border-radius: 16px;
  background: var(--p-l); font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
}
.p-type-card h3 { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.p-type-card p { font-size: 14px; color: var(--muted); line-height: 1.55; }

/* =====================================================
   SIZING GUIDE TIMELINE
   ===================================================== */
.p-timeline { max-width: 720px; margin: 0 auto; counter-reset: step; }
.p-timeline-item {
  display: flex; gap: 22px; margin-bottom: 28px; align-items: flex-start;
}
.p-timeline-item:last-child { margin-bottom: 0; }
.p-step-num {
  counter-increment: step;
  flex-shrink: 0; width: 48px; height: 48px;
  background: var(--p); color: #fff;
  border-radius: 50%; font-size: 18px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(37,99,235,.3);
}
.p-step-num::before { content: counter(step); }
.p-step-body {
  background: #fff; border: 1px solid var(--border);
  border-radius: 12px; padding: 20px 22px; flex: 1;
  box-shadow: 0 2px 6px rgba(0,0,0,.03);
}
.p-step-body h3 { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.p-step-body p { font-size: 14px; color: var(--muted); line-height: 1.55; }

/* =====================================================
   FORMULAS
   ===================================================== */
.p-formula-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
  gap: 18px;
}
.p-formula-card {
  background: #fff; border: 1px solid var(--p-b);
  border-radius: var(--radius); padding: 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(37,99,235,.05);
}
.p-formula-label {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--muted); margin-bottom: 14px;
  display: block;
}
.p-formula-math {
  background: var(--p-l); color: var(--p);
  border: 1px solid var(--p-b); border-radius: 8px;
  padding: 14px; font-family: 'Courier New', monospace;
  font-size: 20px; font-weight: 800; margin-bottom: 12px;
}
.p-formula-card p { font-size: 13px; color: var(--muted); }

/* =====================================================
   BUYING GUIDE (two-column)
   ===================================================== */
.p-guide-wrap {
  background: #fff; border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 40px rgba(0,0,0,.04);
  max-width: 1100px; margin: 0 auto;
  padding: 52px; overflow: hidden;
}
.p-guide-layout { display: flex; gap: 52px; align-items: flex-start; }
.p-guide-left { flex: 1; }
.p-guide-left h2 { font-size: 28px; font-weight: 800; color: var(--text); margin-bottom: 14px; }
.p-guide-left > p { font-size: 15px; color: var(--muted); line-height: 1.7; margin-bottom: 26px; }

.p-checklist { list-style: none; }
.p-checklist li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 15px; color: #334155;
}
.p-checklist li:last-child { border-bottom: none; }
.p-checklist li::before {
  content: '✓'; flex-shrink: 0;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--p-l); color: var(--p);
  font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

.p-guide-cta { margin-top: 28px; }
.p-btn-solid {
  padding: 13px 28px; border-radius: 50px;
  background: var(--p); color: #fff;
  font-size: 14px; font-weight: 700; border: none;
  cursor: pointer; font-family: inherit; transition: all .2s;
}
.p-btn-solid:hover { background: var(--p-d); transform: translateY(-1px); }

.p-guide-right { flex: 1; display: flex; flex-direction: column; gap: 16px; }
.p-factor-card {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--p-l); border: 1px solid var(--p-b);
  border-radius: 14px; padding: 20px 22px;
  transition: transform .2s;
}
.p-factor-card:hover { transform: translateX(4px); }
.p-factor-icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: #fff; border: 1px solid var(--p-b);
  font-size: 22px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.p-factor-card h3 { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 5px; }
.p-factor-card p { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* =====================================================
   MISTAKES
   ===================================================== */
.p-mistakes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
  gap: 20px;
}
.p-mistake-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #fee2e2;
  padding: 28px 24px;
  box-shadow: 0 4px 20px rgba(239,68,68,.06);
  transition: transform .25s, box-shadow .25s;
  display: flex; flex-direction: column; gap: 14px;
}
.p-mistake-card:hover { transform: translateY(-4px); box-shadow: 0 10px 32px rgba(239,68,68,.1); }
.p-mistake-top { display: flex; align-items: center; gap: 12px; }
.p-mistake-icon {
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 10px; background: #fee2e2; color: #ef4444;
  font-size: 18px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.p-mistake-card h4 { font-size: 16px; font-weight: 700; color: #1e293b; margin: 0; }
.p-mistake-card p { font-size: 14px; color: #64748b; line-height: 1.6; margin: 0; }
.p-mistake-tag {
  display: inline-block; font-size: 11px; font-weight: 700;
  color: #ef4444; background: #fee2e2; padding: 3px 10px;
  border-radius: 20px; text-transform: uppercase; letter-spacing: .5px;
}

/* =====================================================
   COMPARISONS
   ===================================================== */
.p-compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px,1fr));
  gap: 22px;
}
.p-compare-card {
  background: #fff; border-radius: 18px;
  border: 1px solid #e2e8f0;
  padding: 30px 26px;
  box-shadow: 0 4px 20px rgba(37,99,235,.05);
  transition: transform .25s, box-shadow .25s, border-color .25s;
  display: flex; flex-direction: column; gap: 16px;
}
.p-compare-card:hover { transform: translateY(-5px); box-shadow: 0 12px 36px rgba(37,99,235,.1); border-color: #bfdbfe; }
.p-compare-icon-row { display: flex; align-items: center; gap: 14px; }
.p-compare-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: #eff6ff; font-size: 24px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.p-compare-card h3 { font-size: 18px; font-weight: 700; color: #1e293b; margin: 0; }
.p-compare-card p { font-size: 14px; color: #64748b; line-height: 1.6; margin: 0; }
.p-compare-tag {
  display: inline-block; font-size: 11px; font-weight: 700;
  color: #2563eb; background: #eff6ff; padding: 3px 10px;
  border-radius: 20px; text-transform: uppercase; letter-spacing: .5px;
}

/* =====================================================
   GLOSSARY
   ===================================================== */
.p-glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
  gap: 18px;
}
.p-gloss-card {
  background: #fff; border: 1px solid #e2e8f0;
  border-radius: 16px; padding: 24px 22px;
  border-top: 3px solid #2563eb;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 2px 8px rgba(0,0,0,.03);
}
.p-gloss-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(37,99,235,.08); }
.p-gloss-abbr {
  display: inline-block; font-size: 10px; font-weight: 800;
  color: #2563eb; background: #eff6ff; padding: 2px 8px;
  border-radius: 12px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 10px;
}
.p-gloss-card dt { font-size: 16px; font-weight: 700; color: #1e293b; margin-bottom: 8px; }
.p-gloss-card dd { font-size: 14px; color: #64748b; line-height: 1.6; margin: 0; }

/* =====================================================
   WHY KWCALC
   ===================================================== */
.p-why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 18px;
  margin-top: 36px;
}
.p-why-card {
  background: #fff; border: 1px solid #e2e8f0;
  border-radius: 16px; padding: 26px 22px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
  transition: transform .25s, box-shadow .25s;
}
.p-why-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(37,99,235,.08); }
.p-why-icon { font-size: 30px; margin-bottom: 14px; display: block; }
.p-why-card h4 { font-size: 15px; font-weight: 700; color: #1e293b; margin-bottom: 6px; }
.p-why-card p { font-size: 13px; color: #64748b; line-height: 1.5; }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 900px) {
  .p-guide-layout { flex-direction: column; gap: 30px; }
  .p-guide-wrap { padding: 32px 28px; }
}

@media (max-width: 768px) {
  .p-hero { padding: 56px 20px 50px; }
  .p-section { padding: 52px 20px; }
  .p-guide-wrap { margin: 0; padding: 28px 20px; border-radius: 14px; }
}

@media (max-width: 560px) {
  .p-hero { padding: 44px 16px 40px; }
  .p-section { padding: 44px 16px; }
  .p-hero-actions { flex-direction: column; align-items: stretch; }
  .p-btn-white, .p-btn-outline { text-align: center; }
  .p-grid { grid-template-columns: 1fr; }
  .p-type-grid { grid-template-columns: 1fr 1fr; }
  .p-formula-grid { grid-template-columns: 1fr; }
  .p-mistakes-grid { grid-template-columns: 1fr; }
  .p-compare-grid  { grid-template-columns: 1fr; }
  .p-glossary-grid { grid-template-columns: 1fr; }
  .p-guide-wrap { padding: 24px 16px; }
  .p-timeline-item { flex-direction: column; }
  .p-why-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 400px) {
  .p-type-grid { grid-template-columns: 1fr; }
  .p-why-grid { grid-template-columns: 1fr; }
}

/* =====================================================
   FAQ
   ===================================================== */
.p-faq-wrap { max-width: 800px; margin: 0 auto; }
.p-faq-list { display: flex; flex-direction: column; gap: 12px; }

.p-faq-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  transition: box-shadow .2s, border-color .2s;
}
.p-faq-item:hover { border-color: #bfdbfe; box-shadow: 0 6px 20px rgba(37,99,235,.07); }

.p-faq-item summary {
  padding: 20px 24px;
  font-size: 16px; font-weight: 600;
  color: #1e293b; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  outline: none; gap: 16px;
}
.p-faq-item summary::-webkit-details-marker { display: none; }
.p-faq-item summary::after {
  content: '+';
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #eff6ff; color: #2563eb;
  font-size: 20px; font-weight: 400; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: transform .3s, background .2s;
}
.p-faq-item[open] summary { border-bottom: 1px solid #e2e8f0; }
.p-faq-item[open] summary::after { transform: rotate(45deg); background: #2563eb; color: #fff; }

.p-faq-body {
  padding: 20px 24px;
  font-size: 15px; color: #64748b;
  line-height: 1.75;
}
.p-faq-body p { margin: 0 0 10px; }
.p-faq-body p:last-child { margin-bottom: 0; }
.p-faq-body ul {
  margin: 10px 0 0 0; padding-left: 20px;
  display: flex; flex-direction: column; gap: 6px;
}
.p-faq-body ul li { color: #475569; }

/* =====================================================
   EXPLORE MORE
   ===================================================== */
.p-explore-pills {
  display: flex; flex-wrap: wrap;
  justify-content: center; gap: 10px; margin-top: 24px;
}
.p-pill-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: 50px;
  font-size: 14px; font-weight: 600;
  background: #fff; border: 1px solid #e2e8f0;
  color: #1e293b; transition: all .2s;
  box-shadow: 0 2px 6px rgba(0,0,0,.04);
}
.p-pill-link:hover {
  border-color: #2563eb; color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37,99,235,.1);
}

/* =====================================================
   WIKI LINK STYLING
   ===================================================== */
.wiki-link {
  color: var(--p) !important;
  text-decoration: underline !important;
  text-decoration-color: rgba(37, 99, 235, 0.4) !important;
  text-underline-offset: 3px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.wiki-link:hover {
  color: var(--p-d) !important;
  text-decoration-color: var(--p-d) !important;
  background: rgba(37, 99, 235, 0.05);
  border-radius: 4px;
}

/* Light links for dark backgrounds (Hero) */
.p-hero .wiki-link {
  color: #fff !important;
  text-decoration-color: rgba(255, 255, 255, 0.5) !important;
}
.p-hero .wiki-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

