/* =============================================
   HOME.CSS — FindPPI.co.uk Homepage styles
   ============================================= */

/* ---- HERO QUICK LINKS ---- */
.hero-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.hero-quick-links .chip {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.85);
}
.hero-quick-links .chip:hover {
  border-color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.2);
  color: #FFFFFF;
}

/* ---- STATS BAR ---- */
.stats-bar {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-divider);
  padding: var(--space-5) 0;
}
.stats-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  flex-wrap: wrap;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
}
.stat-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.stat-number {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}
.stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 500;
  white-space: nowrap;
}
.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--color-divider);
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .stat-divider { display: none; }
  .stats-inner { gap: var(--space-8); }
  .stat-number { font-size: var(--text-lg); }
}


/* ---- TOPICS GRID ---- */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-5);
  align-items: start;
}
@media (max-width: 1200px) {
  .topics-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .topics-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .topics-grid { grid-template-columns: repeat(2, 1fr); }
}

.topic-card {
  padding: var(--space-5);
  transition:
    transform var(--transition-interactive),
    box-shadow var(--transition-interactive),
    border-color var(--transition-interactive);
}
.topic-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-highlight);
}

.topic-card-link {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  text-decoration: none;
  color: inherit;
}
.topic-card-link:hover { text-decoration: none; color: inherit; }

.topic-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-1);
}
.topic-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  line-height: 1.3;
}
.topic-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  flex: 1;
  margin: 0;
  max-width: none;
}
.topic-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: var(--space-3) 0 0;
  border-top: 1px solid var(--color-divider);
}
.topic-links span {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  background: var(--color-surface-2);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.topic-cta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  margin-top: auto;
}


/* ---- CALC CARDS ---- */
.calc-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.calc-icon {
  width: 56px;
  height: 56px;
  background: var(--color-primary-light);
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
}
.calc-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  color: var(--color-text);
  font-weight: 700;
  margin: 0;
}
.calc-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  flex: 1;
  margin: 0;
  max-width: none;
}
.calc-sample {
  background: var(--color-surface-2);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-divider);
}
.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-divider);
}
.calc-row:last-child { border-bottom: none; }
.calc-row--result {
  background: var(--color-surface);
  font-weight: 600;
  color: var(--color-text);
}
.calc-result-val {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-primary);
  font-weight: 700;
}


/* ---- HOW IT WORKS ---- */
.how-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: var(--space-6);
  max-width: 900px;
  margin-inline: auto;
}
.how-step {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}
.how-arrow {
  padding-top: 48px;
  flex-shrink: 0;
}
.step-number {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-primary-highlight);
  line-height: 1;
  margin-bottom: var(--space-2);
}
.how-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}
.how-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0;
  max-width: none;
}

@media (max-width: 768px) {
  .how-steps { flex-direction: column; align-items: stretch; }
  .how-arrow { display: none; }
  .how-step { text-align: left; flex-direction: row; gap: var(--space-4); }
  .step-number { font-size: var(--text-xl); min-width: 40px; }
}


/* ---- GUIDES GRID ---- */
.guides-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: var(--space-5);
}
.guide-card { display: flex; flex-direction: column; gap: var(--space-3); }
.guide-card--featured {
  grid-row: span 2;
  border-left: 4px solid var(--color-accent);
}
.guide-tag { align-self: flex-start; }
.guide-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}
.guide-card--featured .guide-title { font-size: var(--text-lg); }
.guide-title a {
  color: var(--color-text);
  text-decoration: none;
}
.guide-title a:hover { color: var(--color-primary); text-decoration: none; }
.guide-excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
  flex: 1;
  margin: 0;
  max-width: none;
}
.guide-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-divider);
}
.guide-author { font-weight: 600; color: var(--color-text-muted); }

@media (max-width: 900px) {
  .guides-grid { grid-template-columns: 1fr 1fr; }
  .guide-card--featured { grid-row: span 1; }
}
@media (max-width: 640px) {
  .guides-grid { grid-template-columns: 1fr; }
}


/* ---- REVIEWS ---- */
.review-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.review-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
  font-style: italic;
  flex: 1;
  margin: 0;
  max-width: none;
}
.review-author {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: auto;
}

@media (max-width: 768px) {
  .reviews-row { grid-template-columns: 1fr !important; }
}


/* ---- TRUST PILLARS ---- */
.trust-pillars { align-items: stretch; }
.trust-pillar {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}


/* ---- POPULAR CHIPS ---- */
.popular-chips .chip { font-size: var(--text-xs); }


/* ---- HERO SEARCH ---- */
.hero-search-wrap { max-width: 480px; }

/* ---- RESPONSIVE HERO ---- */
@media (max-width: 900px) {
  .hero::after { height: 50px; }
  .hero-float-badge { display: none; }
}

/* ========================================
   INTERACTIVE CALCULATOR PREVIEWS
   ======================================== */
.calc-interactive {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.ci-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ci-field label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ci-input-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface);
  transition: border-color 0.2s;
}
.ci-input-wrap:focus-within {
  border-color: var(--color-primary);
}
.ci-prefix, .ci-suffix {
  padding: var(--space-2) var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  background: rgba(26,58,107,0.05);
  flex-shrink: 0;
}
.ci-input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  padding: var(--space-2) var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  background: transparent;
  min-width: 0;
}
/* Remove number input arrows */
.ci-input-wrap input::-webkit-outer-spin-button,
.ci-input-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ci-input-wrap input[type=number] { -moz-appearance: textfield; }

.calc-row--result {
  background: linear-gradient(135deg, rgba(26,58,107,0.06), rgba(26,58,107,0.03));
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  margin-top: var(--space-1);
}
.calc-result-val {
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--color-primary);
  font-family: var(--font-display);
  transition: transform 0.15s;
}
