/*
Theme Name: ENTUMENTV Editorial
Theme URI: https://entumentv.com
Description: Tema editorial premium para ENTUMENTV, inspirado en revistas digitales como Empire y Byte TI. Imagenes full-bleed con overlay de texto, tipografia bold condensada, diseno limpio de magazine.
Author: ENTUMENTV
Version: 4.0.0
License: GPL v2 or later
Text Domain: entumentv-editorial
*/

:root {
  --primary: #E6002E;
  --ink: #0B0B0C;
  --ink-soft: #1A1A1D;
  --paper: #FFFFFF;
  --gray-50: #F7F7F8;
  --gray-200: #E4E4E7;
  --gray-500: #71717A;
  --overlay-dark: rgba(0,0,0,0.75);
  --font-display: Georgia, 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ============ TOP BAR ============ */
.top-bar {
  background: var(--ink);
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.top-bar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  opacity: 0.85;
}

/* ============ HEADER ============ */
.site-header {
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--gray-200);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-logo a {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -0.02em;
  font-style: italic;
}

.site-logo a span {
  color: var(--primary);
}

.site-nav { flex: 1; display: flex; justify-content: center; }

.site-nav ul {
  display: flex;
  gap: 2.25rem;
  list-style: none;
}

.site-nav a {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  border-bottom-color: var(--primary);
}

.header-search button {
  background: var(--ink);
  color: #fff;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
}

.header-search input {
  display: none;
}

/* ============ SECTION LABEL ============ */
.section-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 3rem 0 1.5rem;
}

.section-label .bar {
  width: 5px;
  height: 1.4rem;
  background: var(--primary);
}

.section-label h2 {
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ============ HERO FEATURE ============ */
.hero-feature {
  position: relative;
  margin-top: 1px;
}

.hero-feature .hero-item {
  position: relative;
  height: 70vh;
  min-height: 460px;
  max-height: 680px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  cursor: pointer;
}

.hero-feature .hero-item::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.15) 40%, rgba(0,0,0,0.92) 100%);
}

/* Stretched link: a plain, content-free <a> that covers its
   positioned ancestor completely. Used instead of wrapping real
   markup (headings, paragraphs) inside an <a> — some hosting-level
   HTML minifiers "fix" a block element nested in an inline <a> by
   moving it outside the link entirely, which silently destroys the
   overlay layout. An empty stretched link can't be touched that way. */
.stretched-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-text {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  padding: 0 2rem 3.5rem;
  color: #fff;
  pointer-events: none;
}

.hero-text a { pointer-events: auto; position: relative; z-index: 2; }

.hero-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 0.9rem;
  margin-bottom: 1.1rem;
}

.hero-text h1 {
  font-family: var(--font-display);
  font-size: 3.6rem;
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.01em;
  max-width: 850px;
  margin-bottom: 1rem;
}

.hero-dek {
  font-size: 1.15rem;
  max-width: 640px;
  opacity: 0.9;
  margin-bottom: 1rem;
  font-weight: 300;
}

.hero-byline {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.75;
}

/* ============ EDITORIAL GRID — asymmetric / broken grid ============ */
/* 4-column grid, auto rows, dense packing so varied spans interlock
   like a print-magazine layout instead of a uniform card grid. */
.editorial-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 15vw;
  grid-auto-flow: dense;
  gap: 1.5rem;
}

.ov-card {
  position: relative;
  overflow: hidden;
  background: var(--gray-50);
  display: block;
  grid-column: span 2;
  grid-row: span 1;
  cursor: pointer;
}

.ov-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  z-index: 0;
  transition: transform 0.6s cubic-bezier(.2,.7,.2,1);
}

.ov-card:hover img {
  transform: scale(1.06);
}

.ov-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,0.88) 100%);
}

.ov-card-body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 1.5rem;
  color: #fff;
  pointer-events: none;
}

.ov-cat {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.ov-card-body h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
}

/* Span variants — assigned in rotation from index.php to break the grid */
.ov-card.xl { grid-column: span 2; grid-row: span 2; }
.ov-card.xl .ov-card-body h3 { font-size: 1.9rem; }
.ov-card.xl .ov-cat { font-size: 0.74rem; }

.ov-card.tall { grid-column: span 1; grid-row: span 2; }
.ov-card.tall .ov-card-body h3 { font-size: 1.05rem; }

.ov-card.wide { grid-column: span 2; grid-row: span 1; }

.ov-card.small { grid-column: span 1; grid-row: span 1; }
.ov-card.small .ov-card-body h3 { font-size: 0.95rem; }
.ov-card.small .ov-card-body { padding: 1.1rem; }

/* Split card — image left, text on paper right. No overlay.
   This is the second "magazine" texture: alternates with overlay
   cards so the grid doesn't read as one repeated pattern. */
.ov-card.split {
  grid-column: span 2;
  grid-row: span 1;
  display: grid;
  grid-template-columns: 42% 1fr;
  background: var(--paper);
  border: 1px solid var(--gray-200);
}

.ov-card.split::after { display: none; }

.ov-card.split .split-img {
  position: relative;
  overflow: hidden;
}

.ov-card.split .split-img img {
  position: absolute;
  inset: 0;
  transition: transform 0.6s cubic-bezier(.2,.7,.2,1);
}

.ov-card.split:hover .split-img img { transform: scale(1.06); }

.ov-card.split .ov-card-body {
  position: static;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem 1.75rem;
  pointer-events: none;
}

.ov-card.split .ov-cat { color: var(--primary); }

.ov-card.split .ov-card-body h3 {
  color: var(--ink);
  font-size: 1.2rem;
}

.ov-card.split .split-dek {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-top: 0.5rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============ ARTICLE LIST ROW (editorial, no card chrome) ============ */
.row-list {
  display: flex;
  flex-direction: column;
}

.row-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.75rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--gray-200);
  align-items: center;
}

.row-item .row-thumb {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--gray-50);
}

.row-item .row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.row-item .ov-cat { color: var(--primary); }

.row-item h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0.4rem 0 0.5rem;
}

.row-item p {
  color: var(--gray-500);
  font-size: 0.95rem;
}

.row-meta {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-500);
  margin-top: 0.6rem;
}

/* ============ MAIN LAYOUT ============ */
.main-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3.5rem;
}

/* ============ SIDEBAR ============ */
.sidebar-block {
  margin-bottom: 2.5rem;
}

.sidebar-title {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-bottom: 0.9rem;
  margin-bottom: 1.25rem;
  border-bottom: 3px solid var(--ink);
}

.rank-item {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.9rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--gray-200);
}

.rank-item:first-child { padding-top: 0; }
.rank-item:last-child { border-bottom: none; }

.rank-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--gray-200);
  line-height: 1;
}

.rank-item h4 {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}

.rank-item h4:hover { color: var(--primary); }

.newsletter-block {
  background: var(--ink);
  color: #fff;
  padding: 2rem;
}

.newsletter-block .sidebar-title {
  border-bottom-color: rgba(255,255,255,0.2);
  color: #fff;
}

.newsletter-block p {
  font-size: 0.88rem;
  opacity: 0.8;
  margin-bottom: 1.1rem;
}

.newsletter-block form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.newsletter-block input {
  padding: 0.75rem;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-size: 0.9rem;
}

.newsletter-block input::placeholder { color: rgba(255,255,255,0.5); }

.newsletter-block button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.78rem;
  cursor: pointer;
}

.tag-list { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.tag-list a {
  border: 1px solid var(--gray-200);
  padding: 0.45rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.tag-list a:hover { border-color: var(--ink); }

/* ============ SINGLE POST ============ */
.single-hero {
  position: relative;
  height: 56vh;
  min-height: 380px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}

.single-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.9) 100%);
}

.single-hero-text {
  position: relative;
  z-index: 2;
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
  padding: 0 2rem 3rem;
  color: #fff;
}

.single-hero-text h1 {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1.08;
}

.single-body {
  max-width: 740px;
  margin: 3rem auto 0;
  padding: 0 2rem;
  font-size: 1.15rem;
  line-height: 1.8;
}

.single-body p { margin-bottom: 1.4rem; }

.single-meta-bar {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
}

/* ============ PAGE TITLE (archive/search) ============ */
.page-title-bar {
  border-bottom: 3px solid var(--ink);
  margin: 2.5rem 0 2rem;
  padding-bottom: 1rem;
}

.page-title-bar h1 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
}

/* ============ PAGINATION ============ */
.pagination {
  display: flex;
  gap: 0.5rem;
  margin: 3rem 0;
  flex-wrap: wrap;
}

.pagination a, .pagination span {
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--gray-200);
  font-weight: 700;
  font-size: 0.85rem;
}

.pagination .current {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.pagination a:hover {
  border-color: var(--ink);
}

/* ============ FOOTER ============ */
.site-footer {
  background: var(--ink);
  color: #fff;
  margin-top: 4rem;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3.5rem 2rem;
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 2.5rem;
}

.footer-grid .site-logo a { color: #fff; }

.footer-grid p { color: rgba(255,255,255,0.6); font-size: 0.9rem; margin-top: 1rem; }

.footer-col h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.1rem;
  color: rgba(255,255,255,0.5);
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.7rem; }
.footer-col a { color: rgba(255,255,255,0.85); font-size: 0.9rem; }
.footer-col a:hover { color: var(--primary); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .main-wrap { grid-template-columns: 1fr; }
  .editorial-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 26vw; }
  .ov-card, .ov-card.wide, .ov-card.split { grid-column: span 2; }
  .ov-card.xl { grid-column: span 2; grid-row: span 2; }
  .ov-card.tall { grid-column: span 1; grid-row: span 2; }
  .ov-card.small { grid-column: span 1; }
  .ov-card.split { grid-template-columns: 38% 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-text h1 { font-size: 2.6rem; }
}

@media (max-width: 768px) {
  .header-container { flex-wrap: wrap; gap: 1rem; padding: 1rem; }
  .site-nav { order: 3; width: 100%; }
  .site-nav ul { flex-wrap: wrap; gap: 1rem; justify-content: flex-start; }

  /* Broken grid collapses to a single column; every card gets a
     fixed height instead of the vw-based auto-rows so nothing
     stretches oddly at small sizes. */
  .editorial-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .ov-card, .ov-card.xl, .ov-card.tall, .ov-card.wide, .ov-card.small {
    grid-column: span 1; grid-row: span 1; aspect-ratio: 4/3;
  }
  .ov-card.split { aspect-ratio: auto; grid-template-columns: 1fr; }
  .ov-card.split .split-img { aspect-ratio: 16/9; }
  .ov-card.xl .ov-card-body h3 { font-size: 1.4rem; }

  .row-item { grid-template-columns: 110px 1fr; gap: 1rem; padding: 1.25rem 0; }
  .row-item h3 { font-size: 1.1rem; }
  .hero-feature .hero-item { height: 50vh; min-height: 340px; }
  .hero-text h1 { font-size: 1.9rem; }
  .hero-dek { display: none; }
  .single-hero-text h1 { font-size: 1.9rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; padding: 2.5rem 1.5rem; }
  .container, .main-wrap { padding-left: 1rem; padding-right: 1rem; }
}

@media (max-width: 480px) {
  .hero-text h1 { font-size: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; }
}
