/* Radio Rebelión — polish profesional (tipografía, fondos, imágenes, motion) */

:root {
  --rr-fs-xs: 0.75rem;
  --rr-fs-sm: 0.9375rem; /* 15px — UI secundaria */
  --rr-fs-base: 1.0625rem; /* 17px — lectura */
  --rr-fs-md: 1.125rem;
  --rr-fs-lg: clamp(1.2rem, 2.4vw, 1.45rem);
  --rr-fs-xl: clamp(1.45rem, 3.2vw, 1.85rem);
  --rr-fs-2xl: clamp(1.75rem, 4.2vw, 2.35rem);
  --rr-fs-display: clamp(1.9rem, 5vw, 2.75rem);
  --rr-lh-tight: 1.28;
  --rr-lh-body: 1.7;
  --rr-surface: #f7f5f3;
  --rr-surface-2: #efece8;
  --rr-ink-soft: #3a3a3a;
  --rr-glow-red: rgba(198, 40, 40, 0.18);
}

/* ---------- Base tipográfica ---------- */

body {
  font-size: var(--rr-fs-base);
  line-height: var(--rr-lh-body);
  color: var(--rr-ink);
  background:
    radial-gradient(1200px 480px at 12% -8%, rgba(198, 40, 40, 0.07), transparent 55%),
    radial-gradient(900px 420px at 100% 8%, rgba(18, 18, 18, 0.04), transparent 50%),
    linear-gradient(180deg, #faf9f7 0%, var(--rr-surface) 42%, #f4f2ef 100%);
  background-attachment: fixed;
}

h1, h2, h3, .rr-news__head h2, .rr-page-hero h1, .rr-card--featured h3 {
  letter-spacing: 0.015em;
  text-wrap: balance;
}

.rr-hero__slogan {
  font-size: clamp(1rem, 2.6vw, 1.15rem);
  line-height: 1.4;
  font-weight: 600;
  max-width: 28ch;
}

.rr-btn-live {
  font-size: clamp(0.95rem, 2.2vw, 1.08rem);
}

.rr-news__head h2 {
  font-size: var(--rr-fs-2xl);
}

.rr-news__all {
  font-size: var(--rr-fs-sm);
  letter-spacing: 0.02em;
}

.rr-card__body h3 {
  font-size: clamp(1rem, 2.1vw, 1.08rem);
  line-height: var(--rr-lh-tight);
  font-weight: 600;
  color: var(--rr-ink);
}

.rr-card--featured h3 {
  font-size: var(--rr-fs-xl);
  line-height: var(--rr-lh-tight);
}

.rr-card__excerpt {
  font-size: 1rem; /* ≥16px en móvil */
  font-weight: 400;
  line-height: 1.55;
  color: var(--rr-ink-soft);
}

.rr-card__meta {
  font-size: var(--rr-fs-xs);
  letter-spacing: 0.02em;
}

.rr-badge {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}

.rr-page-hero h1 {
  font-size: var(--rr-fs-display);
  line-height: 1.1;
}

.entry-content,
.rr-prose {
  font-size: max(1rem, var(--rr-fs-base)); /* mínimo 16px */
  font-weight: 400;
  line-height: var(--rr-lh-body);
}

.entry-content p,
.rr-prose p {
  margin-block: 0 1.05em;
  font-weight: 400;
}

.entry-content h2 {
  font-family: var(--rr-font-display);
  font-size: var(--rr-fs-lg);
  margin-top: 1.6em;
}

/* ---------- Header glass al scroll ---------- */

.rr-header {
  transition: box-shadow 0.35s var(--rr-ease), background 0.35s, border-color 0.35s;
}

/* Cabecera siempre oscura (móvil y desktop), también al scroll. */
.rr-header.is-scrolled {
  background: rgba(18, 18, 18, 0.96);
  border-bottom-color: transparent;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}

.rr-header.is-scrolled .rr-logo img,
.rr-header.is-scrolled .custom-logo-link img {
  height: 52px;
  transition: height 0.3s var(--rr-ease);
}

@media (min-width: 960px) {
  .rr-header.is-scrolled {
    background: var(--rr-charcoal);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  }

  .rr-header.is-scrolled .rr-logo img,
  .rr-header.is-scrolled .custom-logo-link img {
    height: 46px;
  }
}

/* ---------- Hero: imagen + atmósfera ---------- */

.rr-hero {
  min-height: min(78vh, 640px);
}

.rr-hero__media img {
  filter: saturate(1.05) contrast(1.04);
}

.rr-hero__shade {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.22) 38%, rgba(6, 6, 6, 0.82) 100%),
    linear-gradient(105deg, rgba(140, 16, 16, 0.42) 0%, rgba(140, 16, 16, 0.12) 38%, transparent 68%),
    radial-gradient(ellipse at 70% 30%, transparent 40%, rgba(0, 0, 0, 0.35) 100%);
}

.rr-hero__content {
  padding-bottom: 2.6rem;
}

/* Evitar fade claro que pelea con la línea roja del hero */
.rr-hero::after {
  display: none;
}

.rr-btn-live {
  box-shadow:
    0 10px 28px rgba(198, 40, 40, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

/* ---------- Home / news surface ---------- */

.rr-home {
  gap: 1.75rem;
  padding-top: 0.35rem;
}

.rr-home__news {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.rr-news__list {
  gap: 1rem;
}

/* ---------- Cards + imágenes ---------- */

.rr-card {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  transition:
    transform 0.35s var(--rr-ease),
    box-shadow 0.35s var(--rr-ease),
    border-color 0.35s;
}

.rr-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.1);
  border-color: rgba(198, 40, 40, 0.14);
}

.rr-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background:
    linear-gradient(145deg, #d8d4cf, #bdb8b2);
}

.rr-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.18));
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}

.rr-card:hover .rr-card__media::after {
  opacity: 1;
}

.rr-card__media img {
  object-fit: cover;
  object-position: center 30%;
  filter: saturate(1.02) contrast(1.03);
  transition: transform 0.7s var(--rr-ease), filter 0.4s;
}

.rr-card:hover .rr-card__media img {
  transform: scale(1.06);
  filter: saturate(1.08) contrast(1.05);
}

.rr-card--tile {
  background: #fff;
}

.rr-card--tile .rr-card__media {
  position: relative;
}

.rr-card--tile .rr-card__media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.22));
  pointer-events: none;
  opacity: 0.85;
}

.rr-card.is-reveal {
  opacity: 0;
  transform: translateY(18px);
}

.rr-card.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.55s var(--rr-ease), transform 0.55s var(--rr-ease);
}

.rr-card--row.is-reveal,
.rr-card--row.is-visible {
  transform: none;
}

.rr-card.is-visible:nth-child(2) { transition-delay: 0.05s; }
.rr-card.is-visible:nth-child(3) { transition-delay: 0.1s; }
.rr-card.is-visible:nth-child(4) { transition-delay: 0.15s; }
.rr-card.is-visible:nth-child(5) { transition-delay: 0.2s; }

/* ---------- Single / page media ---------- */

.rr-page-hero--rich {
  min-height: clamp(240px, 42vw, 400px);
}

.rr-page-hero--article {
  min-height: clamp(280px, 52vw, 460px);
}

.rr-page-hero__media img,
.post-thumbnail img,
.rr-single-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  filter: saturate(1.04) contrast(1.03);
}

/* Shade genérico solo si la página no trae variante propia */
.rr-page-hero--inner:not(.rr-page-hero--noticias):not(.rr-page-hero--contact) .rr-page-hero__shade {
  background:
    linear-gradient(105deg, rgba(120, 12, 12, 0.88) 0%, rgba(40, 8, 8, 0.55) 38%, rgba(0, 0, 0, 0.35) 62%, transparent 80%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.72));
}

.rr-page-hero__content {
  position: relative;
  z-index: 1;
  padding: 2.5rem 0 1.75rem;
}

.rr-page-hero--article .rr-page-hero__content {
  padding: 3.25rem 0 2rem;
  max-width: 46rem;
}

.rr-page-hero__meta {
  color: rgba(255, 255, 255, 0.78) !important;
  margin: 0 0 0.65rem !important;
  font-size: var(--rr-fs-sm);
}

.rr-page-hero--article h1 {
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  font-size: clamp(1.55rem, 4.5vw, 2.45rem);
  line-height: 1.12;
}

.post-thumbnail,
.rr-single-thumb,
.rr-article__media {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  aspect-ratio: 16 / 9;
  background: #1a1a1a;
  margin-bottom: 1.35rem;
}

.rr-article__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

/* ---------- Player depth ---------- */

.rr-player {
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.rr-player::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--rr-glow-red), transparent 68%);
  pointer-events: none;
}

/* ---------- Footer polish ---------- */

.rr-footer__curve-line {
  filter: drop-shadow(0 2px 6px rgba(198, 40, 40, 0.45));
}

.entry-content,
.rr-prose,
.rr-card__excerpt {
  line-height: 1.75;
}

.rr-card__body h3 {
  line-height: 1.35;
}

/* ---------- Reveal utility ---------- */

[data-rr-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s var(--rr-ease), transform 0.65s var(--rr-ease);
}

[data-rr-reveal].is-visible {
  opacity: 1;
  transform: none;
}

[data-rr-reveal="fade"] {
  transform: none;
}

[data-rr-reveal="left"] {
  transform: translateX(-24px);
}

[data-rr-reveal="scale"] {
  transform: scale(0.97);
}

/* ---------- Desktop refinements ---------- */

@media (min-width: 720px) {
  .rr-card:not(.rr-card--tile):not(.rr-card--row) {
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 1rem;
    padding: 0.8rem;
  }

  .rr-card:not(.rr-card--tile):not(.rr-card--row) .rr-card__media {
    aspect-ratio: 4 / 3;
  }
}

@media (min-width: 960px) {
  body {
    font-size: 1.075rem;
  }

  .rr-hero__media img {
    object-position: 68% 20%;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .rr-hero__media img,
  .rr-card__media img,
  .rr-card,
  [data-rr-reveal] {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }

  [data-rr-reveal],
  .rr-card.is-reveal {
    opacity: 1;
  }
}
