/* Category long-form SEO content — editorial layout, zero CLS, EEAT 2026.
   Loaded once per category page; renders the $category->content HTML block. */

.cat-content {
  max-width: 880px;
  margin: 0 auto;
  padding: 56px 24px 32px;
  color: #1a1a2e;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  font-size: 16.5px;
  contain: layout style;
}

@media (max-width: 720px) {
  .cat-content { padding: 36px 18px 16px; font-size: 15.5px; line-height: 1.65; }
}

/* ---------- TOC (Table of Contents) ---------- */
.cat-toc {
  background: #fafafa;
  border: 1px solid #ececf2;
  border-radius: 12px;
  padding: 18px 22px;
  margin: 0 0 36px;
}
.cat-toc summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 14.5px;
  color: #0f0f1e;
  letter-spacing: -.005em;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}
.cat-toc summary::-webkit-details-marker { display: none; }
.cat-toc summary::before {
  content: "";
  width: 10px; height: 10px;
  border-right: 2px solid #e91e63;
  border-bottom: 2px solid #e91e63;
  transform: rotate(-45deg);
  transition: transform .2s ease;
  margin-left: 2px;
}
.cat-toc[open] summary::before { transform: rotate(45deg); margin-top: -3px; }
.cat-toc ol {
  margin: 14px 0 0;
  padding-left: 22px;
  font-size: 14.5px;
  line-height: 1.85;
}
.cat-toc ol li { margin: 0; }
.cat-toc a {
  color: #4a4a6a;
  text-decoration: none;
  transition: color .15s ease;
}
.cat-toc a:hover { color: #e91e63; text-decoration: underline; }

/* ---------- Headings ---------- */
.cat-content h2 {
  font-size: clamp(22px, 3.2vw, 28px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.02em;
  color: #0f0f1e;
  margin: 48px 0 16px;
  scroll-margin-top: 80px;
}
.cat-content h2:first-child { margin-top: 0; }
.cat-content h3 {
  font-size: clamp(18px, 2.4vw, 21px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.01em;
  color: #1a1a2e;
  margin: 32px 0 12px;
  scroll-margin-top: 80px;
}
.cat-content h4 {
  font-size: 17px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 22px 0 8px;
}

/* ---------- Paragraphs & lists ---------- */
.cat-content p {
  margin: 0 0 16px;
  color: #2a2a3e;
}
.cat-content strong { color: #0f0f1e; font-weight: 700; }
.cat-content em { color: #4a4a6a; font-style: italic; }

.cat-content ul,
.cat-content ol {
  margin: 0 0 20px;
  padding-left: 22px;
}
.cat-content ul li,
.cat-content ol li {
  margin: 0 0 8px;
  color: #2a2a3e;
}
.cat-content ul li::marker { color: #e91e63; }
.cat-content ol li::marker { color: #e91e63; font-weight: 600; }

/* ---------- Links ---------- */
.cat-content a:not(.cat-cta) {
  color: #a91258;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color .15s ease;
}
.cat-content a:not(.cat-cta):hover { color: #e91e63; }

/* ---------- Blockquotes ---------- */
.cat-content blockquote {
  margin: 24px 0;
  padding: 16px 22px;
  background: #fff5fa;
  border-left: 3px solid #e91e63;
  border-radius: 0 8px 8px 0;
  color: #1a1a2e;
  font-style: italic;
}
.cat-content blockquote p:last-child { margin-bottom: 0; }

/* ---------- Tables (comparativas, precios) ---------- */
.cat-content .table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: 10px;
  border: 1px solid #ececf2;
  -webkit-overflow-scrolling: touch;
}
.cat-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  background: #fff;
  min-width: 480px;
}
.cat-content table th,
.cat-content table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #ececf2;
  vertical-align: top;
}
.cat-content table thead th {
  background: #0f0f1e;
  color: #fff;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.cat-content table tbody tr:last-child td { border-bottom: 0; }
.cat-content table tbody tr:nth-child(even) { background: #fafafa; }
.cat-content table td strong { color: #a91258; }

/* ---------- Callout boxes (info/warning/check) ---------- */
.cat-content .cat-callout {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  margin: 22px 0;
  border-radius: 10px;
  border: 1px solid;
  align-items: flex-start;
  font-size: 15px;
  line-height: 1.6;
}
.cat-content .cat-callout p { margin: 0; }
.cat-content .cat-callout p + p { margin-top: 6px; }
.cat-content .cat-callout--info { background: #f5f9ff; border-color: #d6e6ff; color: #0a3870; }
.cat-content .cat-callout--check { background: #f3fbf6; border-color: #c9ead6; color: #0f5132; }
.cat-content .cat-callout--warn { background: #fff8ed; border-color: #f5dcb0; color: #7a4d00; }
.cat-content .cat-callout::before {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
}
.cat-content .cat-callout--info::before { content: "i"; background: #1f6feb; color: #fff; font-style: italic; }
.cat-content .cat-callout--check::before { content: "✓"; background: #16a34a; color: #fff; }
.cat-content .cat-callout--warn::before { content: "!"; background: #d97706; color: #fff; }

/* ---------- Author bio (EEAT) ---------- */
.cat-content .cat-author {
  margin: 48px 0 8px;
  padding: 22px;
  background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
  border: 1px solid #ececf2;
  border-radius: 12px;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  align-items: start;
}
.cat-content .cat-author__avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e91e63, #ff4d94);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -.02em;
  flex-shrink: 0;
}
.cat-content .cat-author__name {
  font-weight: 700;
  font-size: 16px;
  color: #0f0f1e;
  margin: 0 0 4px;
}
.cat-content .cat-author__role {
  font-size: 13.5px;
  color: #7a7a9a;
  margin: 0 0 10px;
  font-weight: 500;
}
.cat-content .cat-author__bio {
  font-size: 14.5px;
  line-height: 1.6;
  color: #2a2a3e;
  margin: 0;
}
.cat-content .cat-author__bio a { color: #a91258; }

@media (max-width: 520px) {
  .cat-content .cat-author { grid-template-columns: 56px 1fr; gap: 14px; padding: 18px; }
  .cat-content .cat-author__avatar { width: 56px; height: 56px; font-size: 22px; }
}

/* ---------- Updated date line ---------- */
.cat-content .cat-meta {
  font-size: 13px;
  color: #7a7a9a;
  margin: 0 0 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid #f0f0f4;
}
.cat-content .cat-meta strong { color: #4a4a6a; font-weight: 600; }

/* ---------- Reduce paint cost on long pages ---------- */
@media (prefers-reduced-motion: reduce) {
  .cat-toc summary::before { transition: none; }
}
