/**
 * page-style.css — Estilos de tipografía y bloques Gutenberg para páginas Khenta.
 *
 * Usa las CSS custom properties definidas en inc/brand.php (via khenta_brand_css_vars).
 * Se carga en el frontend únicamente para page.php y single.php.
 */

/* ── Reset de bloques ──────────────────────────────────────────────────────── */
.entry-content,
.prose-khenta {
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 100%;
}

/* ── Headings ─────────────────────────────────────────────────────────────── */
.prose-khenta h1,
.prose-khenta h2,
.prose-khenta h3,
.prose-khenta h4,
.prose-khenta h5,
.prose-khenta h6 {
  color: var(--color-text);
  font-weight: 700;
  line-height: 1.2;
  margin-top: 1.75em;
  margin-bottom: 0.5em;
}
.prose-khenta h1 {
  font-size: 2.25rem;
}
.prose-khenta h2 {
  font-size: 1.75rem;
}
.prose-khenta h3 {
  font-size: 1.375rem;
}
.prose-khenta h4 {
  font-size: 1.125rem;
}
.prose-khenta h5,
.prose-khenta h6 {
  font-size: 1rem;
}

/* ── Párrafos ─────────────────────────────────────────────────────────────── */
.prose-khenta p {
  margin-top: 0;
  margin-bottom: 1.25em;
}

/* ── Links ────────────────────────────────────────────────────────────────── */
.prose-khenta a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}
.prose-khenta a:hover {
  color: var(--color-accent-hover);
}

/* ── Listas ───────────────────────────────────────────────────────────────── */
.prose-khenta ul,
.prose-khenta ol {
  padding-left: 1.5em;
  margin-bottom: 1.25em;
}
.prose-khenta ul {
  list-style: disc;
}
.prose-khenta ol {
  list-style: decimal;
}
.prose-khenta li {
  margin-bottom: 0.375em;
}

/* ── Blockquote ───────────────────────────────────────────────────────────── */
.prose-khenta blockquote {
  border-left: 4px solid var(--color-accent);
  padding: 0.75em 1.25em;
  margin: 1.5em 0;
  background: var(--color-bg);
  border-radius: 0 0.375rem 0.375rem 0;
  font-style: italic;
  color: var(--color-text-muted);
}
.prose-khenta blockquote p {
  margin-bottom: 0;
}

/* ── Imágenes ─────────────────────────────────────────────────────────────── */
.prose-khenta img,
.prose-khenta figure img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  display: block;
}
.prose-khenta figure {
  margin: 1.5em 0;
}
.prose-khenta figcaption {
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 0.5em;
}

/* ── Tabla ────────────────────────────────────────────────────────────────── */
.prose-khenta table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5em;
  font-size: 0.9rem;
}
.prose-khenta th,
.prose-khenta td {
  border: 1px solid var(--color-border);
  padding: 0.625em 0.875em;
  text-align: left;
}
.prose-khenta th {
  background: var(--color-bg);
  font-weight: 600;
  color: var(--color-text);
}
.prose-khenta tr:nth-child(even) td {
  background: #fafafa;
}

/* ── Código ───────────────────────────────────────────────────────────────── */
.prose-khenta code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 0.875em;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 0.25rem;
  padding: 0.15em 0.4em;
  color: var(--color-secondary);
}
.prose-khenta pre {
  background: var(--color-secondary);
  color: var(--color-silver);
  border-radius: 0.5rem;
  padding: 1.25em 1.5em;
  overflow-x: auto;
  margin-bottom: 1.5em;
}
.prose-khenta pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: 0.9rem;
}

/* ── HR ───────────────────────────────────────────────────────────────────── */
.prose-khenta hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2em 0;
}

/* ════════════════════════════════════════════════════════════════════════════
   BLOQUES GUTENBERG ESPECÍFICOS
   ════════════════════════════════════════════════════════════════════════════ */

/* ── wp:button ────────────────────────────────────────────────────────────── */
.wp-block-button__link {
  background-color: var(--color-primary) !important;
  color: #fff !important;
  border-radius: 0.375rem !important;
  padding: 0.625rem 1.5rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition: background-color 0.15s !important;
  display: inline-block;
}
.wp-block-button__link:hover {
  background-color: var(--color-primary-dark) !important;
}
.wp-block-button.is-style-outline .wp-block-button__link {
  background-color: transparent !important;
  border: 2px solid var(--color-primary) !important;
  color: var(--color-primary) !important;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background-color: var(--color-primary) !important;
  color: #fff !important;
}

/* ── wp:separator ─────────────────────────────────────────────────────────── */
.wp-block-separator {
  border-color: var(--color-border) !important;
}
.wp-block-separator.is-style-wide {
  width: 100%;
}

/* ── wp:quote ─────────────────────────────────────────────────────────────── */
.wp-block-quote {
  border-left: 4px solid var(--color-accent);
  padding: 0.75em 1.25em;
  background: var(--color-bg);
  border-radius: 0 0.375rem 0.375rem 0;
}
.wp-block-quote cite,
.wp-block-quote .wp-block-quote__citation {
  font-size: 0.875em;
  color: var(--color-text-muted);
}

/* ── wp:pullquote ─────────────────────────────────────────────────────────── */
.wp-block-pullquote {
  border-top: 4px solid var(--color-accent);
  border-bottom: 4px solid var(--color-accent);
  padding: 1.5em;
  text-align: center;
}

/* ── wp:table ─────────────────────────────────────────────────────────────── */
.wp-block-table table {
  width: 100%;
  border-collapse: collapse;
}
.wp-block-table td,
.wp-block-table th {
  border: 1px solid var(--color-border);
  padding: 0.625em 0.875em;
}
.wp-block-table.is-style-stripes tr:nth-child(odd) {
  background: var(--color-bg);
}

/* ── wp:cover ─────────────────────────────────────────────────────────────── */
.wp-block-cover {
  border-radius: 0.5rem;
  overflow: hidden;
}

/* ── wp:columns ───────────────────────────────────────────────────────────── */
.wp-block-columns {
  gap: 1.5rem;
}

/* ── wp:callout / notice (clase personalizada) ────────────────────────────── */
.wp-block-group.is-style-notice {
  border-left: 4px solid var(--color-info);
  background: #ebf4ff;
  padding: 1em 1.25em;
  border-radius: 0 0.375rem 0.375rem 0;
}

/* ── Alineaciones wide / full ─────────────────────────────────────────────── */
.alignwide {
  margin-left: calc(-2rem);
  margin-right: calc(-2rem);
  max-width: calc(100% + 4rem);
}
@media (max-width: 640px) {
  .alignwide {
    margin-left: -1rem;
    margin-right: -1rem;
    max-width: calc(100% + 2rem);
  }
}
.alignfull {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  max-width: 100vw;
  width: 100vw;
}
.alignleft {
  float: left;
  margin-right: 1.5em;
  margin-bottom: 0.5em;
}
.alignright {
  float: right;
  margin-left: 1.5em;
  margin-bottom: 0.5em;
}
.aligncenter {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
