/* ===== EL PULSO HOY — FINAL DESIGN ===== */

/* ---- FONTS ---- */

body, html {
  font-family: 'Source Sans 3', sans-serif !important;
  -webkit-font-smoothing: antialiased;
}

/* ---- KILL SIDEBAR ---- */
.sidebar, .widget-area, #secondary, aside {
  display: none !important;
}
body .content-area, body:not(.no-sidebar) .content-area {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  float: none !important;
}
.grid-container {
  max-width: 100% !important;
}

/* ---- HIDE GP DEFAULTS ---- */
.entry-header, .entry-meta, .posted-on, .byline, .comments-link,
.nav-previous, .nav-next, .post-navigation, .comment-respond,
.page-header, .archive-description, .term-description,
.author-box, .related-posts, .generate-back-to-top {
  display: none !important;
}

/* ---- HEADER: BLACK ---- */
.site-header {
  background: #0a0a0a !important;
  background-color: #0a0a0a !important;
  border-bottom: none !important;
  box-shadow: none !important;
  position: relative !important;
  z-index: 1000 !important;
}
.site-header .inside-header {
  max-width: 1400px !important;
  margin: 0 auto !important;
  padding: 0.6rem 2rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

/* LOGO with pulse */
.site-branding {
  order: 1 !important;
}
.site-branding .main-title, .site-branding .main-title a {
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 1.35rem !important;
  font-weight: 600 !important;
  letter-spacing: 3px !important;
  color: #ffffff !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  line-height: 1.2 !important;
}
/* Pulse line */
.site-branding {
  position: relative !important;
  padding-top: 10px !important;
}
.site-branding::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 8px !important;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 20' preserveAspectRatio='none'%3E%3Cpath d='M0,10 C20,2 40,18 60,10 C80,2 100,18 120,10 C140,2 160,18 180,10 C200,2 220,18 240,10 C260,2 280,18 300,10' fill='none' stroke='%23C41E3A' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat center !important;
  background-size: 100% 100% !important;
}

/* NAVIGATION */
#site-navigation, .main-navigation {
  order: 2 !important;
  background: transparent !important;
  background-color: transparent !important;
}
.main-navigation .main-nav ul {
  display: flex !important;
  gap: 0.3rem !important;
}
.main-navigation .main-nav ul li a {
  color: #ffffff !important;
  font-family: 'Source Sans 3', sans-serif !important;
  font-size: 0.75rem !important;
  text-transform: uppercase !important;
  letter-spacing: 1.5px !important;
  font-weight: 400 !important;
  padding: 0.5rem 0.8rem !important;
  text-decoration: none !important;
  border: none !important;
  background: none !important;
  transition: color 0.3s ease !important;
}
.main-navigation .main-nav ul li a:hover,
.main-navigation .main-nav ul li a:focus {
  color: #C41E3A !important;
  background: none !important;
}
.main-navigation .main-nav ul li[class*="current-menu-"] a {
  color: #C41E3A !important;
}

/* Search icon */
.menu-bar-items, .slideout-toggle, .navigation-search {
  display: none !important;
}
/* Custom search icon */
.header-search-icon {
  order: 3 !important;
  color: #fff !important;
  font-size: 1rem !important;
  padding: 0.5rem !important;
  cursor: pointer !important;
}

/* Mobile toggle */
.menu-toggle {
  color: #fff !important;
  background: transparent !important;
}
.menu-toggle .gp-icon svg {
  fill: #fff !important;
}

/* ---- HERO ---- */
.hero-main {
  position: relative;
  height: calc(100vh - 60px);
  min-height: 500px;
  max-height: 900px;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero-main::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(90deg, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.8) 30%, rgba(0,0,0,0.4) 55%, rgba(0,0,0,0.1) 70%, transparent 85%),
    linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.4) 100%);
  z-index: 2;
}
.hero-bg {
  position: absolute;
  inset: 0;
  /* Архивный фон без фото — CSS-генерация */
  background:
    /* Сепия градиент создаёт атмосферу старой фотографии */
    linear-gradient(135deg, #2a2520 0%, #3a322a 25%, #4a4038 50%, #3a322a 75%, #2a2520 100%),
    /* Subtle нойз текстура */
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.06'/%3E%3C/svg%3E");
  background-size: cover, 256px 256px;
  filter: sepia(0.3) contrast(1.1) brightness(0.85);
  z-index: 1;
}
.hero-inner {
  position: relative;
  z-index: 3;
  max-width: 650px;
  padding: 0 4rem;
}
.hero-label {
  font-size: 0.72rem;
  font-family: 'Source Sans 3', sans-serif;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: #C41E3A;
  margin-bottom: 1.5rem;
  display: block;
  font-weight: 600;
}
.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  font-weight: 400;
  line-height: 1.15;
  color: #ffffff;
  margin-bottom: 2rem;
}
.hero-line {
  width: 45px;
  height: 3px;
  background: #C41E3A;
  border: none;
}

/* ---- SECTIONS ---- */
.eph-section {
  padding: 4rem 2rem;
  max-width: 100%;
}
.eph-section.white {
  background: #fff;
}
.eph-section.grey {
  background: #F7F7F7;
}
.eph-section.dark {
  background: #111111;
  color: #e0e0e0;
}
.eph-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}
.eph-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.eph-section-header h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-style: italic;
  font-weight: 600;
  margin: 0;
  color: #1a1a1a;
}
.eph-section.dark .eph-section-header h2 {
  color: #e0e0e0;
}
.eph-accent-line {
  width: 40px;
  height: 2px;
  background: #C41E3A;
  margin-top: 0.6rem;
}
.eph-all-link {
  color: #666;
  font-size: 0.88rem;
  font-family: 'Source Sans 3', sans-serif;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.75rem;
}
.eph-all-link:hover {
  color: #C41E3A;
}
.eph-section.dark .eph-all-link {
  color: #C41E3A;
}
.eph-section-subtitle {
  font-size: 0.9rem;
  color: #888;
  margin-top: 0.3rem;
  font-family: 'Source Sans 3', sans-serif;
}

/* ---- CARDS ---- */
.eph-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.5rem;
}
.eph-card {
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  transition: box-shadow 0.3s;
}
.eph-card:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.eph-card-img {
  height: 200px;
  overflow: hidden;
  background: #2a2a2a;
  position: relative;
}
.eph-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.eph-card:hover .eph-card-img img {
  transform: scale(1.05);
}
.eph-card-body {
  padding: 1.3rem;
}
.eph-card-cat {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #C41E3A;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-family: 'Source Sans 3', sans-serif;
}
.eph-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.5rem;
}
.eph-card-title a {
  color: #1a1a1a;
  text-decoration: none;
}
.eph-card-title a:hover {
  color: #C41E3A;
}
.eph-card-excerpt {
  font-size: 0.88rem;
  color: #777;
  line-height: 1.5;
  margin: 0;
  font-family: 'Source Sans 3', sans-serif;
}
.eph-card-date {
  font-size: 0.78rem;
  color: #999;
  margin-top: 0.8rem;
}

/* ---- AGENDA CARDS ---- */
.eph-agenda-card {
  background: #fff;
  border-left: 3px solid transparent;
  padding: 1.3rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.eph-agenda-card:hover {
  border-left-color: #C41E3A;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
.eph-agenda-day {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  color: #C41E3A;
  font-weight: 600;
  line-height: 1;
}
.eph-agenda-month {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}
.eph-agenda-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0.5rem 0;
  font-family: 'Cormorant Garamond', serif;
}
.eph-agenda-loc {
  font-size: 0.78rem;
  color: #888;
}

/* ---- RETRATOS ---- */
.eph-retratos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 1rem;
}
.eph-retrato {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: #2a2a2a;
}
.eph-retrato-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(30%);
  transition: filter 0.3s, transform 0.5s;
}
.eph-retrato:hover .eph-retrato-img {
  filter: grayscale(0%);
  transform: scale(1.05);
}
.eph-retrato-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  padding: 3.5rem 0.8rem 0.8rem;
  color: #fff;
}
.eph-retrato-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
}
.eph-retrato-years {
  font-size: 0.72rem;
  opacity: 0.8;
  margin-top: 0.2rem;
}
.eph-retrato-prof {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #D4A97A;
  margin-top: 0.3rem;
}

/* ---- QUOTE BREAK ---- */
.eph-quote {
  background: #111111;
  color: #d0d0d0;
  padding: 5rem 2rem;
  text-align: center;
}
.eph-quote p {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.2rem, 3vw, 1.9rem);
  font-style: italic;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.35;
  color: #e0e0e0;
}
.eph-quote-attr {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: #C41E3A;
  margin-top: 2rem;
  font-weight: 600;
}

/* ---- DARK CARDS (Cronicas) ---- */
.eph-section.dark .eph-card {
  background: #1a1a1a;
}
.eph-section.dark .eph-card-title a {
  color: #e0e0e0;
}
.eph-section.dark .eph-card-title a:hover {
  color: #C41E3A;
}
.eph-section.dark .eph-card-excerpt {
  color: #999;
}
.eph-section.dark .eph-card-img {
  background: #2a2a2a;
}
.eph-detective-label {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: #C41E3A;
  color: #fff;
  padding: 4px 12px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ---- FOOTER ---- */
.site-info, .site-footer {
  background: #0a0a0a !important;
  background-color: #0a0a0a !important;
  color: rgba(255,255,255,0.5) !important;
  text-align: center;
  padding: 2rem !important;
  border-top: 1px solid rgba(255,255,255,0.06) !important;
}

/* ---- MOBILE ---- */
@media (max-width: 768px) {
  .site-header .inside-header {
    padding: 0.6rem 1rem !important;
  }
  .main-navigation .main-nav ul {
    flex-direction: column !important;
    gap: 0 !important;
  }
  .hero-main {
    height: 60vh;
    min-height: 400px;
  }
  .hero-inner {
    padding: 0 1.5rem;
  }
  .hero-title {
    font-size: 1.6rem !important;
  }
  .eph-cards {
    grid-template-columns: 1fr;
  }
  .eph-section {
    padding: 2.5rem 1rem;
  }
  .eph-retratos {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .hero-main {
    height: 50vh;
    min-height: 350px;
  }
  .hero-title {
    font-size: 1.3rem !important;
  }
  .hero-label {
    font-size: 0.65rem;
  }
  .site-branding .main-title, .site-branding .main-title a {
    font-size: 1.1rem !important;
    letter-spacing: 2px !important;
  }
  .main-navigation .main-nav ul li a {
    font-size: 0.7rem !important;
    padding: 0.4rem 0.5rem !important;
  }
  .eph-retratos {
    grid-template-columns: repeat(2, 1fr);
  }
  .eph-card-body {
    padding: 1rem;
  }
  .eph-card-title {
    font-size: 1.05rem;
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ---- HERO SLOW ZOOM (ТЗ v2.3 АНТИНАФТАЛИН, Решение 1) ---- */
@keyframes heroCinematicZoom {
  0%   { transform: scale(1.0); }
  100% { transform: scale(1.08); }
}
.hero-bg {
  animation: heroCinematicZoom 20s ease-in-out infinite alternate;
  transform-origin: center center;
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg { animation: none !important; }
}

/* ---- SINGLE-DETECTIVE (Crónicas dark mode) ---- */
.epd-main { background: #0F0F0F; color: #E8E0D5; }
.epd-container { max-width: 800px; margin: 0 auto; padding: 0 1.5rem; }

/* YouTube */
.epd-youtube-wrap { background: #000; }
.epd-youtube-embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 1200px; margin: 0 auto; }
.epd-youtube-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* Hero image */
.epd-hero-img { width: 100%; height: 56.25vw; min-height: 400px; max-height: 70vh; overflow: hidden; }

/* Title */
.epd-title-wrap { background: #0F0F0F; padding: 3rem 0 2rem; }
.epd-label { font-family: 'Source Sans 3', sans-serif; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.15em; color: #C4783A; display: block; margin-bottom: 1rem; }
.epd-title { font-family: 'Cormorant Garamond', serif; font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; color: #E8E0D5; line-height: 1.1; margin: 0; }
.epd-meta { font-family: 'Source Sans 3', sans-serif; font-size: 0.85rem; color: rgba(232,224,213,0.5); margin-top: 1rem; }

/* Body */
.epd-body { padding: 2rem 0 4rem; }
.epd-body p { font-family: 'Source Sans 3', sans-serif; font-size: 1.0625rem; line-height: 1.9; color: #C8C0B5; margin-bottom: 1.75rem; }
.epd-body h2 { font-family: 'Cormorant Garamond', serif; font-size: 1.75rem; color: #E8E0D5; margin: 3rem 0 1.5rem; line-height: 1.2; }
.epd-body .epd-chapter-num { font-family: 'Source Sans 3', sans-serif; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.15em; color: #C4783A; margin-bottom: 0.5rem; padding-top: 1rem; border-top: 1px solid #2A2A2A; }
.epd-body blockquote { border-left: 4px solid #C4783A; padding-left: 1.5rem; margin: 2rem 0; font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 1.3rem; color: #E8E0D5; }

/* Tension block */
.epd-tension { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 1.1rem; color: #C4783A; text-align: center; padding: 2rem 0; border-top: 1px solid #2A2A2A; border-bottom: 1px solid #2A2A2A; margin: 3rem 0; letter-spacing: 0.02em; }

/* Share */
.epd-share-wrap { padding: 1.5rem 0; border-top: 1px solid #2A2A2A; }
.epd-share-label { font-family: 'Source Sans 3', sans-serif; font-size: 0.75rem; color: rgba(232,224,213,0.5); text-transform: uppercase; letter-spacing: 0.1em; margin-right: 1rem; }
.epd-share-btn.dark { background: transparent; border: 1px solid #2A2A2A; color: #C4783A; padding: 0.5rem 1rem; font-family: 'Source Sans 3', sans-serif; font-size: 0.75rem; cursor: pointer; transition: all 0.3s; margin-right: 0.5rem; margin-bottom: 0.5rem; }
.epd-share-btn.dark:hover { background: #1A1A1A; border-color: #C4783A; }

/* YouTube CTA */
.epd-youtube-cta { background: #0F0F0F; padding: 2rem 0; border-top: 1px solid #2A2A2A; }
.epd-btn-yt { display: inline-block; padding: 0.6rem 1.5rem; border: 1px solid #C4783A; color: #C4783A; font-family: 'Source Sans 3', sans-serif; font-size: 0.875rem; text-decoration: none; transition: all 0.3s; margin-right: 1rem; }
.epd-btn-yt:hover { background: #C4783A; color: #0F0F0F; }
.epd-yt-note { font-family: 'Source Sans 3', sans-serif; font-size: 0.8rem; color: rgba(232,224,213,0.5); }

/* Images in body */
.epd-body img { width: 100%; height: auto; margin: 2rem 0; }
.epd-body figure { margin: 2rem 0; }
.epd-body figcaption { font-family: 'Source Sans 3', sans-serif; font-size: 0.75rem; color: rgba(232,224,213,0.5); font-style: italic; margin-top: 0.5rem; }

/* ---- SINGLE-RETRATO (Portrait Mode) ---- */
.epr-hero { position: relative; height: 70vh; min-height: 400px; overflow: hidden; }
.epr-hero-img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.epr-hero-overlay { position: absolute; bottom: 0; left: 0; right: 0; height: 50%; background: linear-gradient(to top, rgba(246,243,238,1), rgba(246,243,238,0)); }

.epr-identity { background: #F6F3EE; padding: 0 0 3rem; text-align: center; }
.epr-prof { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: #7A2E2E; font-weight: 600; display: block; margin-bottom: 0.5rem; }
.epr-name { font-family: 'Cormorant Garamond', serif; font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 700; color: #1E1E1E; margin: 0; line-height: 1.1; }
.epr-years { font-family: 'Source Sans 3', sans-serif; font-size: 1rem; color: #5A5A5A; margin-top: 0.5rem; }

.epr-quote { border-left: 4px solid #7A2E2E; padding-left: 1.5rem; margin: 3rem 0; font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 1.4rem; color: #1E1E1E; }
.epr-quote cite { display: block; font-family: 'Source Sans 3', sans-serif; font-size: 0.85rem; color: #5A5A5A; font-style: normal; margin-top: 0.5rem; }

.epr-body { padding: 2rem 0 4rem; background: #F6F3EE; }
.epr-body p { font-size: 1.0625rem; line-height: 1.85; color: #1E1E1E; margin-bottom: 1.75rem; }
.epr-body h2 { font-family: 'Cormorant Garamond', serif; font-size: 1.75rem; color: #1E1E1E; margin: 2.5rem 0 1rem; }
.epr-body img { width: 100%; height: auto; margin: 2rem 0; }

/* Light share buttons */
.eph-share { background: #F6F3EE; padding: 2rem 0; border-top: 1px solid #D4CCC0; }
.eph-share-label { font-family: 'Source Sans 3', sans-serif; font-size: 0.75rem; color: #5A5A5A; text-transform: uppercase; letter-spacing: 0.1em; margin-right: 1rem; }
.eph-share-btn { background: transparent; border: 1px solid #D4CCC0; color: #7A2E2E; padding: 0.5rem 1rem; font-family: 'Source Sans 3', sans-serif; font-size: 0.75rem; cursor: pointer; transition: all 0.3s; margin-right: 0.5rem; margin-bottom: 0.5rem; }
.eph-share-btn:hover { background: #EDE7DD; border-color: #7A2E2E; }

/* ---- GRAIN OVERLAY (ТЗ v2.3 АНТИНАФТАЛИН, Решение 2) ---- */
.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='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: 0.6;
  transition: opacity 0.4s ease;
  z-index: 2;
}
.grain-overlay:hover::after {
  opacity: 0.9;
}
