/* ─────────────────────────────────────────────────────────────
   SEO landing page — DB-driven keyword pages (/s/{slug})
   ───────────────────────────────────────────────────────────── */

.seo-page main.wrap,
main.wrap {
  padding-top: 28px;
}

/* Main content card */
.tool-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 40px;
  margin: 0 auto 28px;
  max-width: 960px;
  box-shadow: var(--shadow-sm, 0 2px 12px rgba(0, 0, 0, .25));
}

.tool-box h1 {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}

/* Byline — author + last-updated date, between H1 and intro.
   Reader-visible E-E-A-T signal matching schema.org/Person author. */
.seo-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.seo-byline__author a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dashed var(--border2);
}
.seo-byline__author a:hover { color: var(--accent); border-color: var(--accent); }
.seo-byline__sep { color: var(--muted2); }
.seo-byline__date time { color: var(--muted2); }

/* Intro block (HTML lead paragraph from DB) */
.seo-page-intro {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted2);
  margin-bottom: 24px;
}
.seo-page-intro p { margin: 0 0 14px; }
.seo-page-intro p:last-child { margin-bottom: 0; }
.seo-page-intro strong,
.seo-page-intro b { color: var(--text); font-weight: 600; }
.seo-page-intro a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed rgba(91, 138, 248, .35);
  transition: border-color .15s, color .15s;
}
.seo-page-intro a:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}
.seo-page-intro ul,
.seo-page-intro ol {
  margin: 14px 0;
  padding-left: 22px;
}
.seo-page-intro li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* CTA block (primary button after intro) */
.seo-page-cta {
  display: flex;
  justify-content: center;
  padding: 8px 0 28px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.seo-page-cta .btn-lg {
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  min-width: 260px;
  justify-content: center;
}

/* Content sections (DB sections_json → <section>) */
.seo-section {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}
.seo-section:last-child {
  border-bottom: none;
  padding-bottom: 4px;
}
.seo-section h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 16px;
  line-height: 1.3;
  letter-spacing: -0.005em;
}
.seo-section h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin: 20px 0 10px;
  line-height: 1.35;
}
.seo-section p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted2);
  margin: 0 0 14px;
}
.seo-section p:last-child { margin-bottom: 0; }
.seo-section strong,
.seo-section b { color: var(--text); font-weight: 600; }
.seo-section a:not(.btn):not(.btn-primary):not(.btn-secondary):not(.btn-outline):not(.seo-related__card) {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed rgba(91, 138, 248, .35);
  transition: border-color .15s, color .15s;
}
.seo-section a:not(.btn):not(.btn-primary):not(.btn-secondary):not(.btn-outline):not(.seo-related__card):hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

/* ── Related-guides block (cluster nav at bottom of pSEO) ─────────
   Loaded from helpers.php → rendered inside .seo-section wrapper.
   Must win over the generic seo-section link colouring above. */
.seo-related {
  margin: 40px 0 8px;
  padding: 20px 24px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.seo-related h2 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--text);
}
.seo-related__list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 6px;
}
.seo-related__list li {
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: none !important;
}
.seo-related__list li::before { content: none !important; }
.seo-section .seo-related__list a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  color: var(--text2);
  font-size: 14px;
  line-height: 1.45;
  text-decoration: none;
  border: none !important;
  border-bottom: none !important;
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.seo-section .seo-related__list a::before {
  content: '→';
  color: var(--accent);
  font-weight: 700;
  flex: 0 0 auto;
}
.seo-section .seo-related__list a:hover {
  color: var(--text);
  background: var(--surface2);
  border: none !important;
  border-bottom: none !important;
}
/* Buttons inside seo-section keep their own colour (white on gradient).
   Without this, the generic link-color rule above was bleeding the
   accent colour into button text and making CTAs unreadable. */
.seo-section a.btn,
.seo-section a.btn-primary,
.seo-section a.btn-secondary,
.seo-section a.btn-outline {
  border-bottom: none;
}
.seo-section a.btn-primary,
.seo-section a.btn-primary:hover,
.seo-section a.btn-primary:visited {
  color: var(--white) !important;
}
.seo-section ul,
.seo-section ol {
  margin: 10px 0 14px;
  padding-left: 22px;
}
.seo-section li {
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted2);
  margin-bottom: 8px;
}
.seo-section li > strong:first-child {
  color: var(--text);
  margin-right: 4px;
}
.seo-section code {
  font-family: var(--mono);
  font-size: .9em;
  background: var(--surface2);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--cyan);
}
.seo-section pre {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 12px 0 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
}
.seo-section table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 18px;
  font-size: 14px;
}
.seo-section th,
.seo-section td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  color: var(--muted2);
}
.seo-section th {
  color: var(--text);
  font-weight: 600;
  background: var(--surface2);
  border-bottom-color: var(--border2);
}
.seo-section blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 16px;
  margin: 14px 0;
  color: var(--muted2);
  font-style: italic;
  background: rgba(91, 138, 248, .04);
  border-radius: 0 6px 6px 0;
}

/* Responsive */
@media (max-width: 768px) {
  .tool-box {
    padding: 24px 20px;
    margin-bottom: 20px;
  }
  .tool-box h1 { font-size: 24px; margin-bottom: 16px; }
  .seo-page-intro { font-size: 15px; }
  .seo-section { padding: 20px 0; }
  .seo-section h2 { font-size: 19px; }
  .seo-section h3 { font-size: 16px; }
  .seo-page-cta .btn-lg {
    min-width: 100%;
    padding: 12px 24px;
    font-size: 15px;
  }
}
@media (max-width: 480px) {
  .tool-box {
    padding: 20px 16px;
    border-radius: 10px;
  }
  .seo-section p,
  .seo-section li { font-size: 14px; }
}

/* ── Cluster hub (research/glossary/how-to pillar) ──────────────── */
.cluster-hub__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin: 32px 0 40px;
}
.cluster-hub__card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.cluster-hub__card:hover {
  border-color: var(--accent-glow-30);
  transform: translateY(-3px);
  box-shadow: 0 6px 24px var(--accent-glow-15);
}
.cluster-hub__card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.35;
}
.cluster-hub__card-snippet {
  font-size: 13.5px;
  color: var(--muted2);
  margin: 0;
  line-height: 1.5;
  flex: 1;
}
.cluster-hub__card-cta {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  margin-top: auto;
}
.cluster-hub__foot {
  font-size: 13px;
  color: var(--muted);
  padding: 20px 0;
  border-top: 1px solid var(--border);
}
.cluster-hub__foot a { color: var(--accent); text-decoration: none; }
.cluster-hub__foot a:hover { text-decoration: underline; }

/* Group headers — "DNS & Domains / 8" style */
.cluster-hub__group-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 36px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 80px;
}
.cluster-hub__group-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 10px;
  line-height: 1.5;
}

/* A-Z horizontal nav */
.cluster-hub__az {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 20px 0 30px;
}
.cluster-hub__az-letter {
  min-width: 32px;
  padding: 6px 10px;
  text-align: center;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: background .15s, color .15s;
  font-size: 14px;
}
.cluster-hub__az-letter:hover {
  background: var(--accent-glow-15);
  color: var(--text);
}

/* A-Z list — compact columns at the bottom */
.cluster-hub__az-list {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.cluster-hub__az-list h2 {
  font-size: 22px;
  margin: 0 0 20px;
}
.cluster-hub__az-group {
  margin-bottom: 24px;
  scroll-margin-top: 80px;
}
.cluster-hub__az-group h3 {
  font-size: 18px;
  color: var(--accent);
  margin: 0 0 10px;
  font-weight: 700;
  letter-spacing: .02em;
}
.cluster-hub__az-group ul {
  columns: 3;
  column-gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.cluster-hub__az-group li {
  break-inside: avoid;
  margin-bottom: 6px;
}
.cluster-hub__az-group a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.5;
}
.cluster-hub__az-group a:hover {
  color: var(--accent);
  text-decoration: underline;
}
@media (max-width: 700px) {
  .cluster-hub__az-group ul { columns: 2; }
}
@media (max-width: 420px) {
  .cluster-hub__az-group ul { columns: 1; }
}

/* ── Cluster hub: outer layout + header spacing ─────────────────── */
.cluster-hub {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}
.cluster-hub .seo-page-header {
  padding: 12px 0 0;
  margin-bottom: 8px;
}
.cluster-hub .seo-page-header h1 {
  font-size: clamp(24px, 3.5vw, 34px);
  line-height: 1.2;
  margin: 0 0 12px;
  color: var(--text);
}
.cluster-hub .seo-page-intro {
  font-size: 15.5px;
  color: var(--muted2);
  margin-bottom: 0;
  max-width: 780px;
}
