/* ==========================================================================
   El Blog — design tokens
   ========================================================================== */
:root {
  --eb-yellow: #fac800;
  --eb-paper: #fbfaf7;
  --eb-surface: #ffffff;
  --eb-ink: #111113;
  --eb-muted: #5c5b57;
  --eb-line: rgba(17, 17, 19, 0.1);
  --eb-header-h: 4.25rem;
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --eb-radius: 14px;
  --eb-ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

.dark {
  --eb-paper: #0e0e10;
  --eb-surface: #18181b;
  --eb-ink: #f2f0ea;
  --eb-muted: #a19f98;
  --eb-line: rgba(242, 240, 234, 0.12);
  color-scheme: dark;
}

/* Native cross-page transitions (Chromium/Safari; others just navigate). */
@view-transition {
  navigation: auto;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--eb-header-h) + 1rem);
}

body {
  background: var(--eb-paper);
  color: var(--eb-ink);
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  text-wrap: balance;
}

::selection {
  background: var(--eb-yellow);
  color: #111;
}

:focus-visible {
  outline: 3px solid var(--eb-yellow);
  outline-offset: 3px;
  border-radius: 4px;
}

.eb-container {
  width: min(100% - 2rem, 1280px);
  margin-inline: auto;
}

/* Wide screens fit two 300px ad columns plus a ~760px article. */
@media (min-width: 1536px) {
  .eb-container {
    width: min(100% - 2rem, 1440px);
  }
}

/* Both sidebar ads start level with the article. */
.side .bigsidebar {
  margin-top: 0;
}

.eb-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
}

.eb-tag {
  display: inline-block;
  padding: 0.35em 0.55em 0.3em;
  border-radius: 4px;
  background: var(--eb-yellow);
  color: #111;
}

.eb-meta {
  font-size: 0.8rem;
  color: var(--eb-muted);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Header
   ========================================================================== */
.eb-header {
  position: relative;
  z-index: 40;
  background: color-mix(in srgb, var(--eb-paper) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--eb-line);
}

@media (min-width: 768px) {
  .eb-header {
    position: sticky;
    top: 0;
  }
}

.eb-nav a {
  position: relative;
  display: block;
  padding: 0.5rem 0.7rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: 999px;
  transition: background-color 0.2s var(--eb-ease);
}

.eb-nav a:hover {
  background: var(--eb-line);
}

.eb-nav a[aria-current="page"],
.eb-nav a[aria-current="page"]:hover,
.eb-catlist a[aria-current="page"] {
  background: var(--eb-yellow);
  color: #111;
}

.eb-icon-btn {
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  font-size: 1.05rem;
  transition: background-color 0.2s var(--eb-ease);
}

/* :where() keeps specificity at zero so Tailwind's hidden / lg:hidden still win. */
:where(.eb-icon-btn) {
  display: inline-grid;
}

.eb-icon-btn:hover {
  background: var(--eb-line);
}

/* Sticky ads must sit below the sticky header on desktop. */
@media (min-width: 768px) {
  #ads_superior_container_sticky {
    top: var(--eb-header-h) !important;
  }
}

/* ==========================================================================
   Theme toggle
   ========================================================================== */
.cc85-theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 56px;
  height: 30px;
  border-radius: 9999px;
  border: 1px solid var(--eb-line);
  cursor: pointer;
  padding: 0;
  background-color: #ece9e1;
  transition: background-color 0.25s ease;
  flex-shrink: 0;
}

.dark .cc85-theme-toggle {
  background-color: #26262b;
}

.cc85-toggle-circle {
  position: absolute;
  top: 2px;
  left: 3px;
  width: 24px;
  height: 24px;
  background-color: #fff;
  border-radius: 50%;
  transition: transform 0.3s var(--eb-ease), background-color 0.3s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  z-index: 2;
}

.dark .cc85-toggle-circle {
  transform: translateX(25px);
  background-color: var(--eb-yellow);
}

.cc85-toggle-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  z-index: 1;
  line-height: 1;
}

.cc85-toggle-sun {
  right: 7px;
  color: #e0a800;
}

.cc85-toggle-moon {
  left: 7px;
  color: #c7c9e8;
}

/* ==========================================================================
   Hero (titular / trending / recomendada)
   ========================================================================== */
.eb-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  padding-block: 1.5rem 0.5rem;
}

@media (min-width: 1024px) {
  .eb-hero {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1.25rem;
    min-height: clamp(30rem, 62vh, 40rem);
  }
  .eb-hero > :first-child {
    grid-row: span 2;
  }
}

.eb-story {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 16rem;
  overflow: hidden;
  border-radius: calc(var(--eb-radius) + 4px);
  color: #fff;
  isolation: isolate;
  background: #1c1c1f;
}

.eb-story img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 0.9s var(--eb-ease);
}

.eb-story::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.45) 45%, rgba(0, 0, 0, 0) 75%);
}

.eb-story:hover img {
  transform: scale(1.04);
}

.eb-story__body {
  padding: clamp(1rem, 0.6rem + 1.5vw, 2rem);
  display: grid;
  gap: 0.75rem;
}

.eb-story__title {
  font-size: clamp(1.15rem, 0.95rem + 0.8vw, 1.5rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.eb-story--lead {
  min-height: 19rem;
}

@media (min-width: 1024px) {
  .eb-story--lead {
    min-height: 24rem;
  }
}

.eb-story--lead .eb-story__title {
  font-size: clamp(1.75rem, 1rem + 2.6vw, 3.25rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
  max-width: 22ch;
}

.eb-story .eb-kicker {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  color: var(--eb-yellow);
}

/* ==========================================================================
   News card
   ========================================================================== */
.eb-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--eb-ink);
}

.eb-section-head h2 {
  font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.eb-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem 1.5rem;
}

/* Ad carousels (slick) size themselves from their container; without
   min-width: 0 a grid item grows with the slick track in an endless loop. */
.eb-grid > *,
.eb-hero > * {
  min-width: 0;
}

@media (min-width: 640px) {
  .eb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1280px) {
  .eb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.eb-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.eb-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--eb-radius);
  background: var(--eb-line);
  margin-bottom: 0.35rem;
}

.eb-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--eb-ease);
}

.eb-card:hover .eb-card__media img {
  transform: scale(1.05);
}

.eb-card__meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.eb-card__title {
  font-size: clamp(1.08rem, 1rem + 0.3vw, 1.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.eb-card__title a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.2s ease;
}

.eb-card:hover .eb-card__title a {
  text-decoration-color: var(--eb-yellow);
}

/* Whole card is clickable through the single title link. */
.eb-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.eb-card__excerpt {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--eb-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   Mobile: compact rows (thumbnail + headline) so a screen shows several stories
   ========================================================================== */
@media (max-width: 1023px) {
  .eb-hero {
    gap: 0;
  }
  .eb-hero > .eb-story--lead {
    margin-bottom: 0.5rem;
  }
  .eb-story:not(.eb-story--lead) {
    display: grid;
    grid-template-columns: 6.5rem minmax(0, 1fr);
    gap: 0.9rem;
    align-items: center;
    min-height: 0;
    padding-block: 0.9rem;
    border-radius: 0;
    border-bottom: 1px solid var(--eb-line);
    background: none;
    color: var(--eb-ink);
    overflow: visible;
  }
  .eb-story:not(.eb-story--lead)::before {
    display: none;
  }
  .eb-story:not(.eb-story--lead) img {
    position: static;
    aspect-ratio: 1;
    border-radius: 10px;
    transform: none !important;
  }
  .eb-story:not(.eb-story--lead) .eb-story__body {
    padding: 0;
    gap: 0.4rem;
  }
  .eb-story:not(.eb-story--lead) .eb-story__title {
    font-size: 1.05rem;
    line-height: 1.22;
  }
  .eb-story:not(.eb-story--lead) .eb-kicker {
    color: var(--eb-muted);
  }
}

@media (max-width: 639px) {
  .eb-grid {
    gap: 0;
  }
  .eb-grid > .eb-card:first-child {
    padding-bottom: 1.5rem;
  }
  .eb-grid > .eb-card:not(:first-child) {
    display: grid;
    grid-template-columns: 6.5rem minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    column-gap: 0.9rem;
    row-gap: 0.35rem;
    padding-block: 1rem;
    border-top: 1px solid var(--eb-line);
  }
  .eb-grid > .eb-card:not(:first-child) .eb-card__media {
    grid-row: 1 / span 2;
    aspect-ratio: 1;
    margin: 0;
    border-radius: 10px;
  }
  .eb-grid > .eb-card:not(:first-child) .eb-card__title {
    font-size: 1.02rem;
    line-height: 1.22;
  }
  .eb-grid > .eb-card:not(:first-child) .eb-card__excerpt {
    display: none;
  }
  .eb-grid > :not(.eb-card) {
    padding-block: 1rem;
  }
}

/* ==========================================================================
   Category banner
   ========================================================================== */
.eb-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background: #111 center / cover no-repeat;
}

.eb-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.55) 55%, rgba(0, 0, 0, 0.2) 100%);
}

.eb-banner h1 {
  font-size: clamp(2.5rem, 1.5rem + 4vw, 5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.eb-banner p:not(.eb-kicker) {
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.5;
  max-width: 56ch;
  color: rgba(255, 255, 255, 0.85);
}

/* ==========================================================================
   Sidebar
   ========================================================================== */
.eb-catlist a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--eb-line);
  transition: padding 0.25s var(--eb-ease), background-color 0.25s ease;
}

.eb-catlist a::after {
  content: "→";
  opacity: 0.35;
  transition: transform 0.25s var(--eb-ease), opacity 0.25s ease;
}

.eb-catlist a:hover {
  padding-left: 0.75rem;
  background: color-mix(in srgb, var(--eb-yellow) 22%, transparent);
}

.eb-catlist a:hover::after {
  opacity: 1;
  transform: translateX(-0.25rem);
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.eb-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-block: 3rem;
  font-weight: 700;
}

.eb-pager a,
.eb-pager span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--eb-line);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.eb-pager a:hover {
  background: var(--eb-yellow);
  border-color: var(--eb-yellow);
  color: #111;
}

.eb-pager .is-current {
  background: var(--eb-ink);
  border-color: var(--eb-ink);
  color: var(--eb-paper);
  min-width: 2.75rem;
  justify-content: center;
  padding: 0;
}

.eb-pager .is-disabled {
  opacity: 0.4;
}

/* ==========================================================================
   Article
   ========================================================================== */
.eb-article__title {
  font-size: clamp(2rem, 1.2rem + 3vw, 3.6rem);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -0.035em;
}

.eb-article__dek {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);
  line-height: 1.4;
  color: var(--eb-muted);
}

.eb-article__figure img {
  width: 100%;
  height: auto;
  border-radius: calc(var(--eb-radius) + 4px);
}

.eb-prose {
  font-family: var(--font-serif);
  font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);
  line-height: 1.72;
  max-width: 68ch;
  margin-inline: auto;
  overflow-wrap: break-word;
}

.eb-prose p,
.eb-prose ul,
.eb-prose ol {
  margin-block: 1.15em;
}

.eb-prose ul { list-style: disc; padding-left: 1.4em; }
.eb-prose ol { list-style: decimal; padding-left: 1.4em; }

.eb-prose h2,
.eb-prose h3 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 2em 0 0.6em;
}

.eb-prose h2 { font-size: 1.6em; }
.eb-prose h3 { font-size: 1.3em; }

.eb-prose a {
  text-decoration: underline;
  text-decoration-color: var(--eb-yellow);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: background-color 0.2s ease;
}

.eb-prose a:hover {
  background: color-mix(in srgb, var(--eb-yellow) 30%, transparent);
}

.eb-prose blockquote {
  margin: 2em 0;
  padding-left: 1.25em;
  border-left: 4px solid var(--eb-yellow);
  font-style: italic;
  font-size: 1.15em;
}

.eb-prose figure {
  margin: 2em 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eb-prose img {
  border-radius: var(--eb-radius);
  height: auto;
}

.eb-prose figcaption {
  margin-top: 0.6em;
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--eb-muted);
}

.eb-prose iframe {
  max-width: 100%;
}

/* Reading progress bar, driven by scroll — no JS. */
.eb-progress {
  display: none;
}

@supports (animation-timeline: scroll()) {
  .eb-progress {
    display: block;
    position: fixed;
    inset: 0 0 auto 0;
    height: 3px;
    z-index: 60;
    background: var(--eb-yellow);
    transform-origin: 0 50%;
    animation: eb-progress linear both;
    animation-timeline: scroll(root);
  }
}

@keyframes eb-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .eb-story img,
  .eb-card__media img {
    transition: none;
    transform: none !important;
  }
  @view-transition { navigation: none; }
}
