/*
Theme Name: El Pulso Hoy
Version: 1.0
Description: Historico-cultural digital magazine
Author: Agent Umbra
*/

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Source+Sans+3:wght@300;400;600&display=swap');

:root {
  --color-bg:          #F6F3EE;
  --color-bg-secondary:#EDE7DD;
  --color-text:        #1E1E1E;
  --color-text-muted:  #5A5A5A;
  --color-accent:      #7A2E2E;
  --color-accent-hover:#9B3A3A;
  --color-border:      #D4CCC0;
  --detective-bg:      #0F0F0F;
  --detective-bg-card: #1A1A1A;
  --detective-text:    #E8E0D5;
  --detective-accent:  #C4783A;
  --detective-border:  #2A2A2A;
  --detective-body:    #C8C0B5;
  --font-display:      'Cormorant Garamond', Georgia, serif;
  --font-body:         'Source Sans 3', 'Helvetica Neue', sans-serif;
  --font-ui:           'Source Sans 3', sans-serif;
  --text-xs:           0.875rem;    /* 14px — never below */
  --text-sm:           1rem;        /* 16px */
  --text-base:         1.125rem;    /* 18px body */
  --text-lg:           1.25rem;
  --text-xl:           1.75rem;
  --text-2xl:          2.5rem;
  --text-3xl:          3.25rem;
  --text-hero:         clamp(2rem, 6vw, 5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; padding: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  word-wrap: break-word;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); margin: 0; }
a { color: inherit; text-decoration: none; transition: color 0.3s ease; }
img { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.grain-overlay { position: relative; }
.grain-overlay::after {
  content: ''; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  background-size: 256px 256px; pointer-events: none;
  mix-blend-mode: overlay; opacity: 0.55; transition: opacity 0.4s ease; z-index: 1;
}
.grain-overlay:hover::after { opacity: 0.9; }

.cinematic-break {
  background: var(--detective-bg); color: var(--detective-text);
  padding: 6rem 2rem; text-align: center; position: relative; overflow: hidden;
}
.cinematic-break::before {
  content: ''; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 0;
}
.cinematic-break .quote-text {
  position: relative; z-index: 2;
  font-family: var(--font-display); font-size: clamp(1.5rem, 4vw, 3rem);
  font-style: italic; line-height: 1.3; max-width: 800px; margin: 0 auto;
  color: var(--detective-text); padding: 0 1rem;
}
.cinematic-break .quote-attr {
  position: relative; z-index: 2;
  font-family: var(--font-ui); font-size: var(--text-xs);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--detective-accent); margin-top: 2rem;
}

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246,243,238,0.96);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 1rem 2rem; display: flex;
  justify-content: space-between; align-items: center;
  border-bottom: 1px solid rgba(212,204,192,0.3);
}
.logo {
  font-family: var(--font-display); font-weight: 600; font-style: italic;
  font-size: clamp(1.25rem, 3vw, 1.6rem); color: var(--color-text); letter-spacing: -0.01em;
}
.nav-menu { display: flex; gap: clamp(1rem, 2vw, 2.5rem); }
.nav-menu .nav-link {
  font-family: var(--font-ui); font-size: var(--text-sm);
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--color-text-muted); padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
  white-space: nowrap;
}
.nav-menu .nav-link:hover, .nav-menu .nav-link.active { color: var(--color-accent); border-bottom-color: var(--color-accent); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 0.5rem; min-width: 44px; min-height: 44px; justify-content: center; align-items: center; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--color-text); transition: transform 0.3s ease, opacity 0.3s ease; }
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.hero-section {
  position: relative; height: 85vh; min-height: 500px;
  overflow: hidden; display: flex; align-items: flex-end;
  background: var(--detective-bg);  /* fallback if image fails */
}
.hero-image-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
  animation: heroCinematicZoom 20s ease-in-out infinite alternate;
  transform-origin: center center;
}
@keyframes heroCinematicZoom {
  0% { transform: scale(1); } 100% { transform: scale(1.08); }
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(15,15,15,0.2) 0%, rgba(15,15,15,0.75) 100%);
  z-index: 1;
}
.hero-content {
  position: relative; z-index: 2;
  padding: clamp(2rem, 4vw, 4rem); max-width: 750px; color: #fff;
}
.category-meta {
  font-family: var(--font-ui); font-size: var(--text-xs);
  text-transform: uppercase; letter-spacing: 0.06em;
  color: rgba(246,243,238,0.85); display: block; margin-bottom: 1rem;
}
.hero-content h1 {
  font-family: var(--font-display); font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 600; line-height: 1.05; margin: 0 0 1rem; color: #fff; max-width: 700px;
}
.hero-content .subtitle {
  font-family: var(--font-body); font-size: clamp(1rem, 2vw, 1.15rem);
  color: rgba(255,255,255,0.88); max-width: 500px; line-height: 1.5;
}
.cta-btn {
  display: inline-block; margin-top: 2rem;
  padding: 0.75rem 2.2rem; border: 1px solid rgba(255,255,255,0.5);
  color: #fff; font-family: var(--font-ui); font-size: var(--text-sm);
  letter-spacing: 0.05em; transition: all 0.3s ease; text-align: center;
}
.cta-btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.8); }

.page-section { padding: clamp(2.5rem, 5vw, 4rem) clamp(1rem, 3vw, 2rem); }
.section-light { background: var(--color-bg); }
.section-warm { background: var(--color-bg-secondary); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 clamp(1rem, 3vw, 1.5rem); }
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 2.5rem; flex-wrap: wrap; gap: 1rem;
}
.section-header h2 {
  font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, var(--text-2xl));
  font-style: italic; font-weight: 600; margin: 0;
}
.accent-line {
  width: 40px; height: 2px; background: var(--color-accent); margin-top: 0.75rem;
}
.all-link {
  font-family: var(--font-ui); font-size: var(--text-sm);
  color: var(--color-accent); transition: color 0.3s ease;
}
.all-link:hover { color: var(--color-accent-hover); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 350px), 1fr)); gap: 1.5rem; }
.card-grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.card-grid-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 450px), 1fr)); }

.card {
  background: var(--color-bg-secondary); border-radius: 3px;
  overflow: hidden; transition: box-shadow 0.3s ease; min-width: 0;
}
.card:hover { box-shadow: 0 12px 40px rgba(0,0,0,0.1); }
.card-thumb { overflow: hidden; position: relative; }
.card-thumb img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  transition: transform 0.6s ease;
}
.card:hover .card-thumb img { transform: scale(1.04); }
.card-content { padding: clamp(1rem, 3vw, 1.4rem); }
.cat-label {
  font-family: var(--font-ui); font-size: var(--text-xs);
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--color-accent); display: block; margin-bottom: 0.5rem;
}
.card-content h3 {
  font-family: var(--font-display); font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  font-weight: 600; margin: 0.3rem 0 0.8rem; line-height: 1.2;
}
.card-content h3 a { color: var(--color-text); }
.card-content h3 a:hover { color: var(--color-accent); }
.card-excerpt {
  font-size: var(--text-sm); color: var(--color-text-muted);
  line-height: 1.5; margin-bottom: 0.8rem;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.date-meta { font-size: var(--text-xs); color: var(--color-text-muted); }

.card-agenda {
  background: var(--color-bg); border-left: 3px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s; padding: clamp(1rem, 3vw, 1.4rem);
}
.card-agenda:hover {
  border-left-color: var(--color-accent);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.event-day {
  font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.2rem);
  color: var(--color-accent); font-weight: 600; line-height: 1;
}
.event-month {
  font-size: var(--text-xs); text-transform: uppercase;
  color: var(--color-text-muted); margin-bottom: 0.5rem;
}
.card-agenda h3 {
  font-family: var(--font-body); font-size: 1rem;
  font-weight: 600; margin: 0.5rem 0;
}
.event-location { font-size: var(--text-xs); color: var(--color-text-muted); }

.card-detective { background: var(--detective-bg-card); }
.detective-thumb { position: relative; overflow: hidden; }
.detective-thumb img {
  width: 100%; filter: brightness(0.55);
  transition: filter 0.4s, transform 0.6s;
}
.card-detective:hover .detective-thumb img {
  filter: brightness(0.75); transform: scale(1.04);
}
.detective-label {
  position: absolute; top: 1rem; left: 1rem; z-index: 2;
  background: var(--detective-accent); color: var(--detective-bg);
  padding: 4px 12px; font-size: var(--text-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.card-detective .card-content { padding: clamp(1rem, 3vw, 1.5rem); }
.card-detective .card-content h3 {
  font-family: var(--font-display); font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 600; color: var(--detective-text); margin: 0 0 0.7rem;
}
.card-detective .card-content h3 a { color: var(--detective-text); }
.card-detective .card-content h3 a:hover { color: var(--detective-accent); }
.card-detective .card-excerpt { color: rgba(232,224,213,0.65); }

.retratos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 1.2rem;
}
.card-retrato {
  position: relative; border-radius: 3px;
  overflow: hidden; aspect-ratio: 3/4; min-width: 0;
}
.card-retrato img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s; }
.card-retrato:hover img { transform: scale(1.04); }
.retrato-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(15,15,15,0.85) 0%, transparent 70%);
  padding: clamp(2rem, 5vw, 4rem) clamp(0.6rem, 2vw, 1rem) clamp(0.8rem, 2vw, 1.2rem);
  color: #fff; transition: background 0.4s;
}
.card-retrato:hover .retrato-overlay {
  background: linear-gradient(to top, rgba(15,15,15,0.9) 0%, transparent 60%);
}
.retrato-name {
  font-family: var(--font-display); font-size: clamp(1rem, 2.5vw, 1.15rem);
  font-weight: 600; color: #fff; margin-bottom: 0.2rem;
}
.retrato-years { font-size: var(--text-xs); opacity: 0.75; margin-bottom: 0.3rem; }
.retrato-prof {
  font-size: var(--text-xs); text-transform: uppercase;
  letter-spacing: 0.08em; color: #D4A97A;
}

.detective-main { background: var(--detective-bg); color: var(--detective-text); }
.detective-section { padding: clamp(2.5rem, 5vw, 4rem) clamp(1rem, 3vw, 2rem); }
.detective-section .section-header h2 { color: var(--detective-text); }
.detective-section .accent-line { background: var(--detective-accent); }
.detective-section .all-link { color: var(--detective-accent); }

.article-main { max-width: 740px; margin: 0 auto; padding: 2rem clamp(1rem, 3vw, 2rem); }
.article-hero-img {
  width: 100vw; position: relative; left: 50%; right: 50%;
  margin-left: -50vw; margin-right: -50vw;
  height: clamp(200px, 40vh, 55vh); object-fit: cover;
}
.article-header { padding: clamp(1.5rem, 4vw, 3rem) 0 2rem; }
.cat-meta {
  font-size: var(--text-xs); text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--color-accent);
  font-weight: 600; display: block; margin-bottom: 1rem;
}
.article-header h1 {
  font-family: var(--font-display); font-size: clamp(1.8rem, 5vw, 3.5rem);
  font-weight: 700; line-height: 1.12; margin: 0.5rem 0;
}
.article-meta { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: 1rem; }
.article-body { font-size: var(--text-base); line-height: 1.85; }
.article-body > p:first-of-type {
  font-size: var(--text-lg); font-weight: 300;
  color: #2A2A2A; line-height: 1.6; margin-bottom: 2rem;
}
.article-body p { margin-bottom: 1.5rem; }
.article-body blockquote {
  border-left: 4px solid var(--color-accent); padding-left: 1.5rem;
  margin: 2rem 0; font-family: var(--font-display);
  font-style: italic; font-size: clamp(1.1rem, 3vw, 1.25rem); color: #3A3A3A;
}
.article-body img { width: 100%; border-radius: 3px; margin: 2rem 0; }
.article-body figcaption {
  font-size: var(--text-sm); font-style: italic;
  color: var(--color-text-muted); text-align: center;
  margin-top: -1.5rem; margin-bottom: 2rem;
}

.detective-hero { position: relative; background: #000; }
.detective-hero .youtube-wrapper {
  position: relative; padding-bottom: 56.25%; height: 0;
  overflow: hidden; max-width: 1200px; margin: 0 auto;
}
.detective-hero .youtube-wrapper iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.detective-hero img { width: 100%; max-height: 80vh; object-fit: cover; filter: brightness(0.6); }
.detective-article { max-width: 800px; margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2rem) 4rem; }
.detective-header { padding: clamp(1.5rem, 4vw, 3rem) 0 1.5rem; }
.invest-label {
  font-size: var(--text-xs); text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--detective-accent);
  font-weight: 600; display: block; margin-bottom: 1rem;
}
.detective-header h1 {
  font-family: var(--font-display); font-size: clamp(2rem, 6vw, 4rem);
  color: var(--detective-text); line-height: 1.08; margin: 0.5rem 0;
}
.date-detective { font-size: var(--text-sm); color: rgba(232,224,213,0.45); }
.detective-body { color: var(--detective-body); font-size: var(--text-base); line-height: 1.9; }
.detective-body p { margin-bottom: 1.6rem; }
.detective-body img { width: 100%; border-radius: 3px; margin: 2rem 0; filter: brightness(0.85); }
.tension-block {
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(1rem, 3vw, 1.15rem); color: var(--detective-accent);
  text-align: center; padding: 2.5rem clamp(1rem, 3vw, 1.5rem);
  border-top: 1px solid var(--detective-border);
  border-bottom: 1px solid var(--detective-border);
  margin: 3rem 0; letter-spacing: 0.02em;
  background: rgba(196,120,58,0.04);
}
.btn-youtube {
  display: inline-block; padding: 0.7rem 1.8rem;
  border: 1px solid var(--detective-accent); color: var(--detective-accent);
  font-family: var(--font-ui); font-size: var(--text-sm);
  letter-spacing: 0.05em; transition: all 0.3s; margin-top: 1rem;
  min-height: 44px;
}
.btn-youtube:hover { background: var(--detective-accent); color: var(--detective-bg); }

.retrato-page { background: var(--color-bg); }
.retrato-hero { position: relative; height: clamp(300px, 50vh, 70vh); overflow: hidden; }
.retrato-hero img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.retrato-hero::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 60%; background: linear-gradient(to top, rgba(30,30,30,0.85), transparent);
}
.retrato-hero-title {
  position: absolute; bottom: 2.5rem; left: clamp(1rem, 3vw, 2rem); z-index: 2;
  font-family: var(--font-display); font-size: clamp(1.6rem, 6vw, 4.5rem);
  font-weight: 700; color: #fff; line-height: 1.05; max-width: 700px;
  padding-right: 1rem;
}
.retrato-id-block {
  max-width: 600px; margin: 3rem auto 2rem; text-align: center;
  padding: 0 1rem;
}
.person-name-h1 {
  font-size: clamp(1.8rem, 4vw, 3.5rem); font-weight: 700; margin-bottom: 0.5rem;
}
.person-years { font-family: var(--font-body); font-size: 1rem; color: var(--color-text-muted); margin-bottom: 0.3rem; }
.person-profession { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-accent); font-weight: 600; margin-bottom: 0.3rem; }
.person-place { font-size: var(--text-sm); color: var(--color-text-muted); }
.retrato-quote { max-width: 600px; margin: 2.5rem auto; padding-left: 1.5rem; border-left: 4px solid var(--color-accent); padding-right: 1rem; }
.retrato-quote p { font-family: var(--font-display); font-style: italic; font-size: clamp(1.1rem, 3vw, 1.3rem); color: #3A3A3A; line-height: 1.4; margin: 0; }
.retrato-quote .quote-attr { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: 0.8rem; }

.share-block {
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  padding: 1.5rem 0; border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border); margin: 2rem 0;
}
.share-label {
  font-size: var(--text-xs); text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--color-text-muted); margin-right: 0.5rem;
}
.btn-share {
  padding: 0.5rem 1rem; border: 1px solid var(--color-border); background: none;
  font-family: var(--font-ui); font-size: var(--text-xs); color: var(--color-text-muted);
  cursor: pointer; transition: all 0.3s; border-radius: 2px;
  min-height: 40px; min-width: 60px;
}
.btn-share:hover { background: var(--color-bg-secondary); border-color: var(--color-accent); color: var(--color-accent); }
.detective-main .share-block { border-color: var(--detective-border); }
.detective-main .btn-share { border-color: var(--detective-border); color: var(--detective-text); }
.detective-main .btn-share:hover { background: var(--detective-bg-card); border-color: var(--detective-accent); color: var(--detective-accent); }

.youtube-block { margin: 2.5rem 0; }
.youtube-embed-wrapper {
  position: relative; padding-bottom: 56.25%; height: 0;
  overflow: hidden; background: #000; border-radius: 3px;
}
.youtube-embed-wrapper iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.youtube-cta { display: flex; align-items: center; gap: 2rem; margin-top: 1rem; flex-wrap: wrap; }
.youtube-note { font-size: var(--text-sm); color: var(--color-text-muted); }

.page-hero {
  position: relative; display: flex; align-items: center;
  justify-content: center; text-align: center; overflow: hidden;
}
.page-hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: brightness(0.5);
}
.page-hero-content { position: relative; z-index: 2; padding: 6rem 2rem; }
.page-hero h1 {
  font-family: var(--font-display); font-size: clamp(2rem, 6vw, 4.5rem);
  font-style: italic; font-weight: 600; color: #fff; margin: 0;
}
.page-hero p {
  font-family: var(--font-ui); font-size: var(--text-base);
  color: rgba(255,255,255,0.7); max-width: 500px; margin: 1rem auto 0;
  padding: 0 1rem;
}
.detective-page-hero { height: 50vh; background: var(--detective-bg); }
.detective-page-hero .page-hero-content h1 { color: var(--detective-text); }
.detective-page-hero .page-hero-content p { color: rgba(232,224,213,0.6); }

.site-footer {
  background: #1E1E1E; color: rgba(246,243,238,0.7);
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1rem, 3vw, 2rem) 2rem;
}
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; }
.footer-logo { font-family: var(--font-display); font-style: italic; font-size: clamp(1.3rem, 3vw, 1.6rem); color: rgba(246,243,238,0.9); margin-bottom: 0.75rem; }
.footer-tagline { font-size: var(--text-sm); opacity: 0.7; }
.footer-nav { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-nav a { color: rgba(246,243,238,0.65); font-size: var(--text-sm); transition: color 0.3s; }
.footer-nav a:hover { color: var(--detective-accent); }
.footer-bottom { max-width: 1200px; margin: 3rem auto 0; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.08); text-align: center; font-size: var(--text-xs); opacity: 0.45; }

.pagination {
  display: flex; justify-content: center; gap: 0.5rem; margin: 3rem 0;
}
.pagination a, .pagination span {
  padding: 0.5rem 1rem; font-size: var(--text-sm);
  border: 1px solid var(--color-border); color: var(--color-text-muted); transition: all 0.3s;
}
.pagination a:hover { border-color: var(--color-accent); color: var(--color-accent); }
.pagination .current { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.detective-main .pagination a, .detective-main .pagination span { border-color: var(--detective-border); color: var(--detective-text); }
.detective-main .pagination a:hover { border-color: var(--detective-accent); color: var(--detective-accent); }
.detective-main .pagination .current { background: var(--detective-accent); color: var(--detective-bg); }

/* ===== MOBILE ===== */
@media (max-width: 1024px) {
  .retratos-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(246,243,238,0.98);
    flex-direction: column; padding: 2rem; gap: 1.5rem;
    text-align: center; border-bottom: 1px solid var(--color-border);
  }
  .nav-menu.active { display: flex; }
  .nav-toggle { display: flex; }
  .hero-section { height: 60vh; min-height: 350px; }
  .hero-content h1 { font-size: clamp(1.5rem, 7vw, 2.5rem); }
  .retratos-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
  .cinematic-break { padding: 4rem 1rem; }
  .retrato-hero-title { bottom: 1.5rem; left: 1rem; font-size: clamp(1.4rem, 5vw, 2.5rem); }
  .page-hero h1 { font-size: clamp(1.8rem, 5vw, 3rem); }
  .article-main { padding: 1rem; }
  .article-hero-img { height: 30vh; }
  .detective-article { padding: 0 1rem 3rem; }
  .article-header h1, .detective-header h1 { hyphens: auto; word-break: break-word; }
}

@media (max-width: 480px) {
  .card-grid, .card-grid-4, .card-grid-2 { grid-template-columns: 1fr; gap: 1.2rem; }
  .retratos-grid { grid-template-columns: repeat(2, 1fr); }
  .card-content h3 { font-size: 1.15rem; }
  .section-header h2 { font-size: 1.6rem; }
  .hero-content { padding: 1.5rem 1rem; }
  .cta-btn { width: 100%; margin-top: 1.5rem; }
  .share-block { gap: 0.4rem; }
  .btn-share { padding: 0.5rem 0.75rem; font-size: 0.75rem; }
  .article-body > p:first-of-type { font-size: 1.1rem; }
  .card-excerpt { -webkit-line-clamp: 3; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-image-bg { animation: none !important; }
}

:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* IMAGE FALLBACK */
img { background: var(--color-bg-secondary); min-height: 120px; }
img[src=""] { display: none; }

/* BETTER CONTRAST */
.retrato-years, .retrato-prof,
.date-meta, .event-month, .event-location,
.eph-date, .eph-agenda-month, .eph-agenda-loc {
  opacity: 1 !important;
  color: var(--color-text-muted);
}
.card-retrato .retrato-years { color: rgba(255,255,255,0.9); }
.card-retrato .retrato-prof { color: #E8C9A0; }
