/*
 * Vista Single Post — hero sobre imagen con overlay y contenido centrado.
 * Breakpoints reutilizados: xs (<640px), sm (>=640px), lg (>=1024px), xl (>=1280px).
 */

body.single-post {
  --single-max-width: min(820px, 92vw);
  --single-wide-width: min(var(--wp--style--global--wide-size, 1200px), 96vw);
  color: var(--brand-text);
}

body.single-post main.site-main {
  margin: 0 auto;
  padding-bottom: clamp(48px, 12vw, 96px);
}

.single-entry {
  display: grid;
  gap: clamp(28px, 6vw, 52px);
}

/* ------------------------------ HERO CON FONDO ------------------------------ */

.single-hero {
  position: relative;
  width: min(var(--single-wide-width), 100%);
  margin: clamp(28px, 6vw, 60px) auto 0;
  border-radius: clamp(24px, 4vw, 40px);
  overflow: hidden;
  color: #fff;
  background: var(--hero-image, #0f172a) center/cover no-repeat;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.32);
  isolation: isolate;
}

.single-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.single-hero__media .isn-zoomfx {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.single-hero__media .isn-zoomfx img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.single-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* Overlay degradado para contrastar texto sobre la imagen. */
  background: linear-gradient(180deg, rgba(13, 20, 33, 0.25) 8%, rgba(13, 20, 33, 0.58) 58%, rgba(10, 16, 27, 0.82) 100%);
}

.single-hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: clamp(320px, 54vw, 520px);
  padding: clamp(48px, 11vw, 108px) clamp(24px, 8vw, 84px);
}

.single-hero__text {
  display: grid;
  gap: clamp(18px, 4vw, 30px);
  width: min(720px, 100%);
  justify-items: center;
}

.single-hero__category {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem clamp(1.2rem, 4vw, 1.6rem);
  font: 600 0.78rem/1 var(--font-base, 'Poppins', system-ui, sans-serif);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.96);
  background: rgba(15, 23, 42, 0.64);
  border-radius: 999px;
  box-shadow: 0 16px 36px rgba(2, 6, 14, 0.32);
}

.single-hero__title {
  margin: 0;
  font-family: var(--font-heading, 'Lora', serif);
  font-size: clamp(2.5rem, 6vw, 3.6rem);
  line-height: 1.05;
  color: rgba(255, 255, 255, 0.98);
  text-wrap: balance;
  text-shadow: 0 24px 48px rgba(4, 7, 14, 0.65);
}

.single-hero__meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(12px, 3vw, 22px);
  font-size: clamp(0.94rem, 2.6vw, 1.08rem);
  color: rgba(255, 255, 255, 0.88);
  font-weight: 400;
  padding-bottom: clamp(6px, 2.4vw, 12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 1px 0 rgba(8, 12, 24, 0.28);
}

.single-hero__meta-item {
  display: inline-flex;
  align-items: center;
  gap: clamp(10px, 2vw, 14px);
}

.single-hero__meta-divider {
  padding-right: clamp(16px, 4vw, 24px);
  border-right: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:1px 0 0 rgba(6, 12, 24, 0.28);
}

.single-hero__meta-count {
  font-variant-numeric: tabular-nums;
}

.single-hero__meta .fa-regular {
  font-size: 1em;
  color: inherit;
}

.single-hero__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(48px, 9vw, 60px);
  height: clamp(48px, 9vw, 60px);
  border-radius: 50%;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(15, 19, 32, 0.45);
  box-shadow: 0 14px 32px rgba(3, 8, 18, 0.34);
  flex-shrink: 0;
}

.single-hero__avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(8, 12, 24, 0.22);
}

.single-hero:hover::before,
.single-hero:focus-within::before {
  transform: scale(1.08);
}

.single-hero:hover .isn-zoomfx img,
.single-hero:focus-within .isn-zoomfx img {
  transform: scale(1.08);
}

@media (min-width: 640px) {
  .single-hero {
    border-radius: clamp(28px, 3.2vw, 44px);
  }

  .single-hero__content {
    min-height: clamp(360px, 46vw, 560px);
  }
}

@media (min-width: 1024px) {
  .single-hero__title {
    font-size: clamp(3rem, 4.2vw, 3.9rem);
  }
}

/* --------------------------- CABECERA FALLBACK --------------------------- */
.single-fallback {
  width: var(--single-max-width);
  margin: clamp(36px, 7vw, 56px) auto 0;
  padding: 0 clamp(18px, 4vw, 32px);
  display: grid;
  gap: 14px;
  text-align: center;
}

.single-fallback__category {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 1rem;
  font: 600 0.72rem/1 var(--font-base, 'Poppins', system-ui, sans-serif);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent, #348f7a);
  background: rgba(52, 143, 122, 0.12);
  border-radius: 999px;
}

.single-fallback__title {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 2.7rem);
  line-height: 1.15;
}

.single-fallback .single-hero__meta {
  color: var(--brand-text, #111827);
  justify-content: center;
  border-bottom-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.12);
}

.single-fallback .single-hero__meta-divider {
  border-right-color: rgba(30, 41, 59, 0.28);
  box-shadow: 1px 0 0 rgba(148, 163, 184, 0.2);
}

.single-fallback .single-hero__meta .fa-regular {
  color: rgba(30, 41, 59, 0.75);
}

.single-fallback .single-hero__avatar {
  border-color: rgba(15, 23, 42, 0.16);
  background: rgba(148, 163, 184, 0.1);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
}

.single-fallback .single-hero__avatar-img {
  background: rgba(15, 23, 42, 0.08);
}

/* ----------------------------- CONTENIDO BODY ----------------------------- */
.single-entry__content {
  max-width: var(--single-max-width);
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 32px) clamp(56px, 12vw, 96px);
}

.single-entry__content > *:first-child {
  margin-top: 0;
}

.single-entry__content :where(img, video) {
  max-width: 100%;
  height: auto;
}

.single-entry__content .alignwide {
  max-width: var(--wp--style--global--wide-size, 1200px);
  margin-inline: auto;
}

.single-entry__content .alignfull {
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
}
