/*
Theme Name: Crónicas de una Creativa
Theme URI: https://example.com/
Author: Outroute Digital
Description: Tema a la medida para Crónicas de una Creativa: header con pestañas de folder, carrusel, banda rosa, blog con buscador y chips, y footer con newsletter de Substack.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cronicas
*/

/* ==========================================================
   Crónicas de una Creativa — header con pestañas, banda rosa y footer
   Parte del tema Crónicas de una Creativa
   ========================================================== */

/* Layout: header crema fijo arriba, pestañas de folder colgando sobre el contenido;
   al hacer scroll el logo se encoge y solo quedan logo + pestañas. */
:root {
  --cdc-crema: #f4e8d5;
  --cdc-rosa: #d82a63;
  --cdc-gris-tab: #bfc8c7;
  --cdc-naranja: #ff4a00;
  --cdc-tinta: #1b1a19;
  --cdc-crema-texto: #fbf1e4;

  --cdc-font: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --cdc-font-display: "Young Serif", "Cooper", Georgia, serif;

  /* Medidas del header: grande (inicio) y compacto (al hacer scroll) */
  --cdc-logo-h: clamp(84px, 13.6vw, 186px);
  --cdc-pad: clamp(22px, 3.4vw, 46px);
  --cdc-logo-h-compact: clamp(38px, 4.2vw, 54px);
  --cdc-pad-compact: 10px;
  --cdc-tab-h: clamp(38px, 3.8vw, 52px);

  /* Alto total del header grande (sin pestañas) — se usa para el espaciador */
  --cdc-header-h: calc(var(--cdc-logo-h) + (var(--cdc-pad) * 2));
  /* Desfase de la barra de admin de WordPress (cuando estás logueada) */
  --cdc-admin-bar: 0px;
}
.admin-bar { --cdc-admin-bar: 32px; }
@media (max-width: 782px) { .admin-bar { --cdc-admin-bar: 46px; } }

/* ---------- HEADER ---------- */
.cdc-header {
  position: fixed;
  top: calc(var(--cdc-admin-bar) + env(safe-area-inset-top, 0px));
  left: 0;
  right: 0;
  z-index: 999;
  background: var(--cdc-crema);
  font-family: var(--cdc-font);
}
.cdc-header__bar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-block: var(--cdc-pad);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  transition: padding-block .4s cubic-bezier(.2,.7,.2,1);
}
.cdc-logo { display: block; line-height: 0; }
.cdc-logo img {
  display: block;
  height: var(--cdc-logo-h);
  width: auto;
  max-width: 100%;
  transition: height .4s cubic-bezier(.2,.7,.2,1);
}
.cdc-logo:focus-visible { outline: 3px solid var(--cdc-rosa); outline-offset: 6px; border-radius: 4px; }

/* Estado compacto (la clase la pone el JS al bajar) */
.cdc-header.is-compact .cdc-header__bar { padding-block: var(--cdc-pad-compact); }
.cdc-header.is-compact .cdc-logo img { height: var(--cdc-logo-h-compact); }

/* ---------- PESTAÑAS DE FOLDER ---------- */
.cdc-tabs {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin: 0;
  padding: 0 max(4px, env(safe-area-inset-right, 0px)) 0 max(4px, env(safe-area-inset-left, 0px));
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(4px, 1.1vw, 16px);
  max-width: 1090px;
  pointer-events: none; /* deja pasar clics entre pestañas */
}
.cdc-tabs li { pointer-events: auto; }
.cdc-tab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--cdc-tab-h);
  color: var(--cdc-tinta);
  text-decoration: none;
  font-size: clamp(13px, 1.95vw, 27px);
  font-weight: 400;
  letter-spacing: -0.01em;
  white-space: nowrap;
  isolation: isolate;
}
/* La forma trapezoidal del folder: un fondo inclinado en perspectiva */
.cdc-tab::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--cdc-crema);
  opacity: .6;                /* pestañas inactivas al 60% */
  border-radius: 0 0 12px 12px;
  transform: perspective(70px) rotateX(-9deg);
  transform-origin: top center;
  transition: opacity .2s ease, box-shadow .3s ease;
}
.cdc-tab:hover::before { opacity: .85; }
.cdc-tab:focus-visible { outline: none; }
.cdc-tab:focus-visible::before { box-shadow: 0 0 0 3px var(--cdc-rosa); }
.cdc-tab.is-current::before,
.cdc-tab[aria-current="page"]::before { opacity: 1; }
.cdc-header.is-compact .cdc-tab::before { box-shadow: 0 6px 14px -8px rgba(27, 26, 25, .35); }

/* Espaciador: reserva el alto del header grande para que el contenido no quede debajo */
.cdc-spacer { height: var(--cdc-header-h); }

/* ---------- HERO (foto) ---------- */
/* Slider de 3 imágenes con fundido cruzado */
.cdc-hero {
  position: relative; isolation: isolate; overflow: hidden;
  margin: 0; line-height: 0;
  height: clamp(320px, 63vw, 860px);
  background: var(--cdc-crema);
}
.cdc-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; }
.cdc-slide.is-active { opacity: 1; }
.cdc-slide img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }

/* Flechas: dos zonas laterales a todo lo alto; la flecha solo se ve con el cursor encima */
.cdc-arrow {
  position: absolute; top: 0; bottom: 0; z-index: 2; width: clamp(72px, 14%, 200px);
  display: flex; align-items: center; padding: 0 clamp(14px, 2.4vw, 36px);
  border: 0; background: none; color: #fff; cursor: pointer; line-height: 0;
  -webkit-tap-highlight-color: transparent;
}
.cdc-arrow--prev { left: 0; justify-content: flex-start; padding-left: max(clamp(14px, 2.4vw, 36px), env(safe-area-inset-left, 0px)); }
.cdc-arrow--next { right: 0; justify-content: flex-end; padding-right: max(clamp(14px, 2.4vw, 36px), env(safe-area-inset-right, 0px)); }
.cdc-arrow svg {
  width: clamp(16px, 1.6vw, 24px); height: auto; opacity: 0;
  filter: drop-shadow(0 1px 6px rgba(27, 26, 25, .45));
  transition: opacity .25s ease, transform .25s var(--cdc-ease);
}
.cdc-arrow--prev svg { transform: translateX(6px); }
.cdc-arrow--next svg { transform: translateX(-6px); }
.cdc-arrow:hover svg, .cdc-arrow:focus-visible svg { opacity: 1; transform: none; }
.cdc-arrow:focus-visible { outline: none; }
@media (prefers-reduced-motion: reduce) { .cdc-slide, .cdc-arrow svg { transition: none; } }

/* ---------- BANDA ROSA ---------- */
.cdc-band {
  position: relative;
  background: var(--cdc-rosa);
  color: var(--cdc-crema-texto);
  font-family: var(--cdc-font);
}
.cdc-band__inner {
  max-width: 1366px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  align-items: center;
  gap: 32px;
  padding-block: clamp(48px, 5.5vw, 80px) clamp(64px, 9vw, 130px);
  padding-left: max(16px, 5.6vw, env(safe-area-inset-left, 0px));
  padding-right: max(16px, 5.6vw, env(safe-area-inset-right, 0px));
}
.cdc-band__questions {
  margin: 0;
  font-size: clamp(26px, 3.3vw, 46px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.02em;
}
.cdc-band__questions span { display: block; }
.cdc-whatsapp {
  justify-self: end;
  display: block;
  line-height: 0;
  max-width: 700px;
  width: 100%;
  border-radius: 6px;
  transition: transform .25s ease;
}
.cdc-whatsapp img { width: 100%; height: auto; display: block; }
.cdc-whatsapp:hover { transform: rotate(-1.2deg) scale(1.02); }
.cdc-whatsapp:focus-visible { outline: 3px solid var(--cdc-crema-texto); outline-offset: 8px; }

/* Estrella naranja que cruza foto y banda */
.cdc-star {
  position: absolute;
  top: 0;
  right: clamp(60px, 8.5vw, 116px);
  width: clamp(110px, 16vw, 225px);
  height: auto;
  transform: translateY(-58%);
  pointer-events: none;
  animation: cdc-spin 40s linear infinite;
}
@keyframes cdc-spin { to { transform: translateY(-58%) rotate(360deg); } }

/* ---------- FOOTER (color del header) ---------- */
/* Frase grande arriba, columnas de enlaces + newsletter, línea ondulada y fila legal */
.cdc-footer {
  --cdc-tinta-rosa: #b0174c;          /* rosa más profundo para texto chico (mejor lectura) */
  position: relative;
  background: var(--cdc-crema);
  color: var(--cdc-tinta-rosa);
  font-family: var(--cdc-font);
  overflow: hidden;
}
.cdc-footer a { color: inherit; text-decoration: none; }
.cdc-footer a:hover { color: var(--cdc-rosa); text-decoration: underline; text-underline-offset: 3px; }
.cdc-footer a:focus-visible { outline: 2px solid var(--cdc-rosa); outline-offset: 3px; border-radius: 2px; }

.cdc-footer__wrap {
  max-width: 1366px;
  margin-inline: auto;
  padding-left: max(16px, 4vw, env(safe-area-inset-left, 0px));
  padding-right: max(16px, 4vw, env(safe-area-inset-right, 0px));
}

.cdc-footer__headline {
  margin: 0;
  padding-block: clamp(40px, 5vw, 72px) clamp(28px, 3.4vw, 48px);
  font-family: var(--cdc-font-display);
  font-weight: 400;
  font-size: clamp(38px, 6.6vw, 96px);
  line-height: .95;
  letter-spacing: -0.035em;
  color: var(--cdc-rosa);
  text-align: center;
  text-wrap: balance;
}

.cdc-footer__grid {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: clamp(28px, 3vw, 44px) clamp(48px, 7vw, 110px);
  align-items: start;
  padding-bottom: clamp(36px, 4vw, 56px);
}
.cdc-footer__col h3 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--cdc-rosa);
}
.cdc-footer__col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.cdc-footer__col p { margin: 0 0 10px; line-height: 1.4; }
.cdc-footer__col,
.cdc-footer__news { font-size: 16px; line-height: 1.35; min-width: 0; overflow-wrap: anywhere; }

.cdc-footer__news { justify-self: end; width: 100%; max-width: 380px; }
.cdc-footer__news p { margin: 0 0 16px; max-width: 34ch; line-height: 1.4; }
.cdc-news {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--cdc-tinta-rosa);
  max-width: 340px;
  background: transparent;
}
.cdc-news label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cdc-news input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 13px 14px;
  font: inherit;
  font-size: 16px;
  color: var(--cdc-tinta);
}
.cdc-news input::placeholder { color: var(--cdc-tinta-rosa); opacity: .8; }
.cdc-news input:focus { outline: none; }
.cdc-news:focus-within { box-shadow: 0 0 0 3px rgba(216, 42, 99, .25); }
.cdc-news button {
  border: 0;
  background: transparent;
  color: var(--cdc-tinta-rosa);
  padding: 10px 14px;
  cursor: pointer;
  line-height: 0;
  transition: transform .2s ease;
}
.cdc-news button:hover { transform: translateX(4px); }
.cdc-news button:focus-visible { outline: 2px solid var(--cdc-rosa); outline-offset: -4px; }
.cdc-news__msg { margin: 10px 0 0; font-size: 14px; }
.cdc-news__msg:empty { display: none; }
.cdc-footer__news .cdc-footer__copy { margin: 22px 0 0; font-size: 12.5px; letter-spacing: .05em; text-transform: uppercase; }

/* Línea ondulada */
.cdc-footer__wave {
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12' viewBox='0 0 24 12'%3E%3Cpath d='M0 6 Q6 0 12 6 T24 6' fill='none' stroke='%23d82a63' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: left center;
}

.cdc-footer__legal {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding-block: 18px 26px;
  font-size: 12.5px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.cdc-footer__legal ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.cdc-footer__social { justify-content: center; gap: 14px !important; }
.cdc-footer__social a { display: block; line-height: 0; }
.cdc-footer__social svg { width: 22px; height: 22px; }
.cdc-footer__made { margin: 0; justify-self: end; padding-right: clamp(110px, 11vw, 160px); }

/* Estrella que se asoma sobre la línea ondulada, como el personaje del ejemplo */
.cdc-footer__star {
  position: absolute;
  right: max(16px, 3vw);
  bottom: 18px;
  width: clamp(84px, 9vw, 128px);
  height: auto;
  animation: cdc-wobble 6s ease-in-out infinite;
  transform-origin: 50% 60%;
}
@keyframes cdc-wobble { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(10deg) scale(1.05); } }

@media (max-width: 860px) {
  .cdc-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cdc-footer__news { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 640px) {
  .cdc-footer__legal { grid-template-columns: 1fr; justify-items: start; padding-bottom: 32px; }
  .cdc-footer__social { justify-content: flex-start; }
  .cdc-footer__made { justify-self: start; padding-right: 96px; }
  .cdc-footer__star { bottom: 24px; }
}
@media (prefers-reduced-motion: reduce) { .cdc-footer__star { animation: none; } }

/* ---------- MÓVIL ---------- */
@media (max-width: 760px) {
  .cdc-band__inner { grid-template-columns: 1fr; gap: 28px; }
  .cdc-whatsapp { justify-self: start; }
  .cdc-star { right: 16px; }
  .cdc-tab::before { border-radius: 0 0 8px 8px; transform: perspective(50px) rotateX(-7deg); }
}

@media (prefers-reduced-motion: reduce) {
  .cdc-header__bar, .cdc-logo img, .cdc-whatsapp { transition: none; }
  .cdc-star { animation: none; }
}

html, body { background: var(--cdc-crema); color: var(--cdc-tinta); }
body { margin: 0; overflow-x: hidden; font-family: var(--cdc-font); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 1000; background: var(--cdc-crema); }

/* ==========================================================
   BLOG — buscador, chips de etiquetas y tarjetas
   Layout: buscador centrado arriba, chips debajo, cuadrícula de tarjetas
   de 3 columnas (2 en tableta, 1 en móvil). Cada tarjeta: título arriba,
   ícono de Substack abajo a la izquierda, "Leer →" abajo a la derecha.
   ========================================================== */
:root {
  --cdc-rosa-hondo: #b0174c;
  --cdc-rosa-claro: #f4b6c6;
  --cdc-rosa-tinto: #8f1239;
  --cdc-blanco: #ffffff;
  --cdc-ease: cubic-bezier(.2,.7,.2,1);
}

.cdc-blog {
  max-width: 1366px;
  margin-inline: auto;
  padding-left: max(16px, 4vw, env(safe-area-inset-left, 0px));
  padding-right: max(16px, 4vw, env(safe-area-inset-right, 0px));
  padding-top: calc(var(--cdc-tab-h) + clamp(28px, 4vw, 56px));
  padding-bottom: clamp(48px, 6vw, 96px);
  font-family: var(--cdc-font);
  color: var(--cdc-tinta);
}
.cdc-sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Buscador */
.cdc-search { position: relative; max-width: 720px; margin-inline: auto; }
.cdc-search__icon {
  position: absolute; left: 22px; top: 50%; width: 22px; height: 22px;
  transform: translateY(-50%); color: var(--cdc-tinta); pointer-events: none;
}
.cdc-search input {
  -webkit-appearance: none; appearance: none;
  display: block; width: 100%; box-sizing: border-box; height: 62px;
  padding: 0 60px 0 56px;
  border: 1.5px solid var(--cdc-tinta); border-radius: 999px;
  background: var(--cdc-crema-texto); color: var(--cdc-tinta);
  font: inherit; font-size: 18px; letter-spacing: -0.01em;
  transition: box-shadow .2s ease;
}
.cdc-search input::placeholder { color: var(--cdc-tinta); opacity: .55; }
.cdc-search input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.cdc-search input:focus { outline: none; box-shadow: 0 0 0 4px rgba(216, 42, 99, .28); border-color: var(--cdc-rosa); }
.cdc-search__clear {
  position: absolute; right: 10px; top: 50%; width: 42px; height: 42px;
  transform: translateY(-50%); display: grid; place-items: center;
  border: 0; border-radius: 50%; background: transparent; color: var(--cdc-tinta);
  cursor: pointer; transition: background .2s ease;
}
.cdc-search__clear:hover { background: var(--cdc-crema); }
.cdc-search__clear:focus-visible { outline: 2px solid var(--cdc-rosa); outline-offset: 1px; }

/* Chips */
.cdc-tags {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  max-width: 900px; margin: 22px auto 0; padding: 0; list-style: none;
}
.cdc-chip {
  appearance: none; cursor: pointer;
  padding: 9px 19px; border-radius: 999px;
  border: 1.5px solid var(--cdc-tinta); background: transparent; color: var(--cdc-tinta);
  font: inherit; font-size: 16px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.2;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s var(--cdc-ease);
}
.cdc-chip:hover { background: var(--cdc-crema-texto); }
.cdc-chip:focus-visible { outline: 3px solid var(--cdc-rosa); outline-offset: 2px; }
.cdc-chip[aria-pressed="true"] { background: var(--cdc-rosa); border-color: var(--cdc-rosa); color: var(--cdc-crema-texto); }

/* Conteo */
.cdc-count {
  margin: clamp(28px, 3.4vw, 44px) 0 16px; text-align: center;
  font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--cdc-rosa-hondo);
}

/* Cuadrícula */
.cdc-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.8vw, 24px); margin: 0; padding: 0; list-style: none;
}
.cdc-grid > li { min-width: 0; display: flex; }

/* Tarjeta. El editor elige un color (clase is-*) o una imagen destacada. */
.cdc-card {
  --c-bg: var(--cdc-rosa); --c-fg: var(--cdc-crema-texto); --c-deco: var(--cdc-naranja);
  position: relative; isolation: isolate; overflow: hidden; width: 100%;
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  aspect-ratio: 4 / 5; box-sizing: border-box;
  padding: clamp(18px, 2vw, 28px);
  border-radius: 16px; background: var(--c-bg); color: var(--c-fg);
  transition: transform .35s var(--cdc-ease);
}
.cdc-card:hover { transform: translateY(-4px) rotate(-.5deg); }
.cdc-card:has(.cdc-card__read:focus-visible) { outline: 3px solid var(--cdc-tinta); outline-offset: 3px; }

.is-rosa      { --c-bg: var(--cdc-rosa);       --c-fg: var(--cdc-crema-texto); --c-deco: var(--cdc-naranja); }
.is-naranja   { --c-bg: var(--cdc-naranja);    --c-fg: var(--cdc-tinta);       --c-deco: var(--cdc-crema); }
.is-gris      { --c-bg: var(--cdc-gris-tab);   --c-fg: var(--cdc-tinta);       --c-deco: var(--cdc-rosa); }
.is-rosaclaro { --c-bg: var(--cdc-rosa-claro); --c-fg: var(--cdc-rosa-tinto);  --c-deco: var(--cdc-rosa); }
.is-tinta     { --c-bg: var(--cdc-tinta);      --c-fg: var(--cdc-crema-texto); --c-deco: var(--cdc-rosa); }
.is-crema     { --c-bg: var(--cdc-crema-texto);--c-fg: var(--cdc-rosa);        --c-deco: var(--cdc-naranja); }

/* Con imagen destacada: foto de fondo, velo para que el título se lea */
.cdc-card.has-img {
  --c-bg: var(--cdc-tinta); --c-fg: var(--cdc-blanco);
  background-image: var(--img); background-size: cover; background-position: center;
}
.cdc-card.has-img::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, rgba(27,26,25,.62) 0%, rgba(27,26,25,0) 55%, rgba(27,26,25,.4) 100%);
}

.cdc-card__title {
  position: relative; z-index: 1; margin: 0;
  font-family: var(--cdc-font-display); font-weight: 400;
  font-size: clamp(26px, 2.5vw, 36px); line-height: 1.05; letter-spacing: -0.02em;
  text-wrap: balance; overflow-wrap: anywhere;
}
.cdc-card__deco {
  position: absolute; z-index: 0; right: -16%; top: 46%; width: 58%; height: auto;
  color: var(--c-deco); pointer-events: none; transform: rotate(14deg);
  transition: transform .6s var(--cdc-ease);
}
.cdc-card:hover .cdc-card__deco { transform: rotate(34deg); }

.cdc-card__actions {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto;
}
.cdc-card__sub {
  position: relative; z-index: 3;
  display: grid; place-items: center; flex: none; width: 44px; height: 44px;
  border-radius: 50%; background: var(--c-fg); color: var(--c-bg);
  transition: transform .25s var(--cdc-ease);
}
.cdc-card__sub svg { width: 20px; height: 20px; }
.cdc-card__sub:hover { transform: scale(1.08); }
.cdc-card__sub:focus-visible { outline: 3px solid var(--c-fg); outline-offset: 3px; }
/* "Leer" estira su enlace sobre toda la tarjeta */
.cdc-card__read {
  display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 20px;
  border-radius: 999px; background: var(--c-fg); color: var(--c-bg);
  font-size: 17px; font-weight: 500; letter-spacing: -0.01em; text-decoration: none;
}
.cdc-card__read::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.cdc-card__read svg { width: 22px; height: 12px; transition: transform .25s var(--cdc-ease); }
.cdc-card:hover .cdc-card__read svg { transform: translateX(4px); }
.cdc-card__read:focus-visible { outline: 3px solid var(--c-fg); outline-offset: 3px; }

/* Sin resultados */
.cdc-empty { text-align: center; padding: clamp(40px, 7vw, 96px) 0; }
.cdc-empty p { margin: 0 auto 18px; max-width: 34ch; font-family: var(--cdc-font-display); font-size: clamp(24px, 3vw, 38px); line-height: 1.1; color: var(--cdc-rosa); text-wrap: balance; }
.cdc-empty button { appearance: none; cursor: pointer; padding: 10px 22px; border-radius: 999px; border: 1.5px solid var(--cdc-tinta); background: transparent; color: var(--cdc-tinta); font: inherit; font-size: 16px; font-weight: 500; }
.cdc-empty button:hover { background: var(--cdc-crema-texto); }
.cdc-empty button:focus-visible { outline: 3px solid var(--cdc-rosa); outline-offset: 2px; }

@media (max-width: 900px) { .cdc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .cdc-grid { grid-template-columns: minmax(0, 1fr); }
  .cdc-card { aspect-ratio: 1 / 1; }
  .cdc-card__title { font-size: 30px; }
  .cdc-search input { height: 56px; font-size: 17px; }
  .cdc-chip { font-size: 15px; padding: 8px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .cdc-card, .cdc-card__deco, .cdc-card__read svg, .cdc-card__sub { transition: none; }
  .cdc-card:hover { transform: none; }
}

/* ==========================================================
   AJUSTES PARA WORDPRESS
   ========================================================== */

/* Enlace "saltar al contenido" (accesibilidad) */
.cdc-skip {
  position: absolute; left: 8px; top: -60px; z-index: 2000;
  padding: 10px 18px; border-radius: 999px;
  background: var(--cdc-tinta); color: var(--cdc-crema-texto);
  font-family: var(--cdc-font); font-size: 15px; text-decoration: none;
}
.cdc-skip:focus { top: calc(var(--cdc-admin-bar) + 8px); }

/* El <ul> de las pestañas y el menú del pie vienen de wp_nav_menu */
.cdc-footer .cdc-footer__col ul li,
.cdc-footer__legal ul li { margin: 0; }

/* Barra de admin en móvil chico: deja de ser fija, así que no hay desfase */
@media (max-width: 600px) { .admin-bar .cdc-header { top: 0; } }

/* Si una tarjeta no tiene ícono de Substack, "Leer" se queda a la derecha */
.cdc-card__read { margin-left: auto; }

/* Con un solo carrusel (sin flechas) no hay nada que ocultar */
.cdc-hero .cdc-slide img { width: 100%; height: 100%; object-fit: cover; }

/* Imagen del WhatsApp cuando no es enlace */
span.cdc-whatsapp:hover { transform: none; }

/* ---------- Botones ---------- */
.cdc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 24px; border-radius: 999px;
  border: 1.5px solid var(--cdc-rosa); background: var(--cdc-rosa); color: var(--cdc-crema-texto);
  font: inherit; font-size: 16px; font-weight: 500; letter-spacing: -0.01em; text-decoration: none;
  cursor: pointer; transition: transform .25s var(--cdc-ease), background .2s ease;
}
.cdc-btn:hover { transform: translateY(-2px); background: var(--cdc-rosa-hondo); border-color: var(--cdc-rosa-hondo); }
.cdc-btn:focus-visible { outline: 3px solid var(--cdc-tinta); outline-offset: 3px; }
.cdc-btn--ghost { background: transparent; color: var(--cdc-tinta); border-color: var(--cdc-tinta); }
.cdc-btn--ghost:hover { background: var(--cdc-crema-texto); border-color: var(--cdc-tinta); }

/* ---------- Entrada / página ---------- */
.cdc-entry { max-width: 760px; margin-inline: auto; }
.cdc-entry--page { max-width: 900px; }
.cdc-entry__head { text-align: center; margin-bottom: clamp(24px, 3vw, 40px); }
.cdc-entry__title {
  margin: 0 0 14px; font-family: var(--cdc-font-display); font-weight: 400;
  font-size: clamp(36px, 5.4vw, 68px); line-height: 1; letter-spacing: -0.03em;
  color: var(--cdc-rosa); text-wrap: balance; overflow-wrap: anywhere;
}
.cdc-archive__title { text-align: center; margin-bottom: clamp(24px, 3vw, 44px); }
.cdc-entry__tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.cdc-entry__tags a {
  display: block; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--cdc-tinta);
  color: var(--cdc-tinta); font-size: 14px; font-weight: 500; text-decoration: none;
}
.cdc-entry__tags a:hover { background: var(--cdc-crema-texto); }
.cdc-entry__meta { margin: 0; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--cdc-rosa-hondo); }
.cdc-entry__thumb { margin: 0 0 clamp(24px, 3vw, 40px); }
.cdc-entry__thumb img { display: block; width: 100%; height: auto; border-radius: 16px; }
.cdc-entry__content { font-size: clamp(17px, 1.5vw, 19px); line-height: 1.7; }
.cdc-entry__content > * { max-width: 100%; }
.cdc-entry__content p { margin: 0 0 1.3em; }
.cdc-entry__content h2, .cdc-entry__content h3, .cdc-entry__content h4 {
  font-family: var(--cdc-font-display); font-weight: 400; line-height: 1.1; letter-spacing: -0.02em;
  color: var(--cdc-rosa); margin: 1.8em 0 .6em;
}
.cdc-entry__content h2 { font-size: clamp(28px, 3.2vw, 40px); }
.cdc-entry__content h3 { font-size: clamp(24px, 2.4vw, 30px); }
.cdc-entry__content a { color: var(--cdc-rosa-hondo); text-underline-offset: 3px; }
.cdc-entry__content a:hover { color: var(--cdc-rosa); }
.cdc-entry__content img, .cdc-entry__content video, .cdc-entry__content iframe { max-width: 100%; height: auto; border-radius: 12px; }
.cdc-entry__content figure { margin: 1.6em 0; }
.cdc-entry__content figcaption { margin-top: 8px; font-size: 14px; opacity: .75; text-align: center; }
.cdc-entry__content blockquote {
  margin: 1.8em 0; padding: .2em 0 .2em 1.2em; border-left: 4px solid var(--cdc-rosa);
  font-family: var(--cdc-font-display); font-size: 1.3em; line-height: 1.25; color: var(--cdc-rosa-hondo);
}
.cdc-entry__content ul, .cdc-entry__content ol { margin: 0 0 1.3em; padding-left: 1.3em; }
.cdc-entry__content hr { border: 0; height: 12px; margin: 2.4em 0; background: var(--cdc-wave) repeat-x left center; }
.cdc-entry__content .alignwide { max-width: min(1100px, 100vw - 32px); margin-inline: auto; }
.cdc-entry__content .alignleft { float: left; margin: .3em 1.4em 1em 0; }
.cdc-entry__content .alignright { float: right; margin: .3em 0 1em 1.4em; }
.cdc-entry__content .aligncenter { margin-inline: auto; display: block; }
.cdc-entry__content input[type="text"], .cdc-entry__content input[type="email"], .cdc-entry__content input[type="tel"],
.cdc-entry__content input[type="url"], .cdc-entry__content textarea, .cdc-entry__content select {
  width: 100%; box-sizing: border-box; padding: 14px 18px; font: inherit; font-size: 17px; color: var(--cdc-tinta);
  background: var(--cdc-crema-texto); border: 1.5px solid var(--cdc-tinta); border-radius: 14px;
}
.cdc-entry__content textarea { min-height: 160px; }
.cdc-entry__content input:focus, .cdc-entry__content textarea:focus, .cdc-entry__content select:focus {
  outline: none; border-color: var(--cdc-rosa); box-shadow: 0 0 0 4px rgba(216, 42, 99, .25);
}
.cdc-entry__content button[type="submit"], .cdc-entry__content input[type="submit"], .cdc-entry__content .wp-block-button__link {
  display: inline-flex; align-items: center; height: 46px; padding: 0 26px; border: 0; border-radius: 999px;
  background: var(--cdc-rosa); color: var(--cdc-crema-texto); font: inherit; font-size: 16px; font-weight: 500; cursor: pointer; text-decoration: none;
}
.cdc-entry__content button[type="submit"]:hover, .cdc-entry__content input[type="submit"]:hover { background: var(--cdc-rosa-hondo); }
.cdc-entry__content .wp-block-gallery { gap: clamp(8px, 1.4vw, 16px); }
.cdc-entry__content .wp-block-gallery img { border-radius: 12px; }
.cdc-entry__foot { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-top: clamp(32px, 4vw, 56px); }

/* Paginación de archivos */
.navigation.pagination { margin-top: clamp(28px, 3vw, 44px); }
.navigation.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.navigation.pagination .page-numbers {
  display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid var(--cdc-tinta); color: var(--cdc-tinta); text-decoration: none; font-weight: 500;
}
.navigation.pagination .page-numbers.current, .navigation.pagination .page-numbers:hover { background: var(--cdc-rosa); border-color: var(--cdc-rosa); color: var(--cdc-crema-texto); }

/* Comentarios */
.cdc-comments { margin-top: clamp(40px, 5vw, 72px); font-size: 16px; }
.cdc-comments__title { font-family: var(--cdc-font-display); font-weight: 400; font-size: 32px; color: var(--cdc-rosa); }
.cdc-comments__list { padding-left: 1.2em; }
.cdc-comments a { color: var(--cdc-rosa-hondo); }

/* Mensaje de ayuda para quien administra (solo se ve si estás logueada) */
.cdc-news__msg a { color: inherit; }

:root { --cdc-wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12' viewBox='0 0 24 12'%3E%3Cpath d='M0 6 Q6 0 12 6 T24 6' fill='none' stroke='%23d82a63' stroke-width='1.6'/%3E%3C/svg%3E"); }
