/* ==========================================================================
   Hablemos de Cine — hoja de estilos base
   ========================================================================== */
:root {
  --rojo: #e2401f;
  --rojo-oscuro: #c62f12;
  --navy: #1b2340;
  --negro: #0e0e0e;
  --gris-fondo: #f2f2ef;
  --gris-texto: #5a5a5a;
  --texto: #191919;
  --blanco: #ffffff;
  --radius: 3px;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Poppins', 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--texto);
  background: var(--blanco);
  line-height: 1.5;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--negro);
  padding: 22px 0;
}

.site-header .container {
  max-width: 1400px;
  position: relative;
  text-align: center;
}

.site-header .logo-link {
  display: inline-block;
}

.site-header .logo-link img {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}

/* Íconos de redes: ahora viven dentro de la barra del menú (.main-nav) */
.main-nav .header-social {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  flex-shrink: 0;
}

/* Alta especificidad a propósito: tiene que ganarle a ".main-nav a" */
.main-nav .header-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--blanco);
  color: var(--rojo);
  line-height: 0;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}

.main-nav .header-social a svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.main-nav .header-social a:hover {
  background: var(--navy);
  color: var(--blanco);
  transform: translateY(-2px);
}

/* ---------- Nav ---------- */
.main-nav {
  background: var(--rojo);
}

/* Menú fijo al hacer scroll (desde 1024px; más angosto ocupa demasiado alto) */
@media (min-width: 1024px) {
  .main-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,.35);
  }
}

.main-nav .container {
  max-width: 1600px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

.main-nav li { position: relative; }

.main-nav a {
  display: block;
  padding: 14px 14px;
  color: var(--blanco);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,.15);
  transition: background .15s ease;
}

.main-nav li:first-child a { border-left: 1px solid rgba(255,255,255,.15); }

.main-nav a:hover,
.main-nav a.active { background: var(--rojo-oscuro); }

.main-nav .caret { font-size: 10px; margin-left: 4px; opacity: .8; }

.main-nav .nav-panel { margin-left: 0; }
.main-nav .nav-panel a { border-right: none; background: var(--navy); }
.main-nav .nav-panel a:hover { background: #10162b; }

.main-nav .container { position: relative; }

.nav-collapse {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: var(--blanco);
  padding: 13px 16px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 24px; height: 24px; display: block; }
.nav-toggle .icon-close { display: none; }
.nav-toggle.is-open .icon-open { display: none; }
.nav-toggle.is-open .icon-close { display: block; }

@media (max-width: 1480px) {
  .main-nav a { padding: 14px 10px; font-size: 13.5px; }
}

@media (max-width: 900px) {
  .main-nav .container { justify-content: space-between; }
  .nav-toggle { display: flex; }
  .nav-collapse {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .nav-collapse.is-open { display: flex; }
  .main-nav ul { flex-direction: column; width: 100%; justify-content: center; }
  .main-nav a { border-right: none; border-bottom: 1px solid rgba(255,255,255,.15); text-align: center; }
  .main-nav li:first-child a { border-left: none; }
  .main-nav .header-social { width: 100%; justify-content: center; padding: 14px 0; }
  .main-nav .nav-panel { margin-left: 0; width: 100%; }
  .main-nav .nav-panel ul { flex-direction: column; justify-content: center; width: 100%; }
}

/* ---------- Hero / carrusel ---------- */
.hero {
  position: relative;
  background: var(--negro);
  overflow: hidden;
}

.hero-track {
  position: relative;
  height: 68vh;
  min-height: 420px;
  max-height: 640px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.35) 45%, rgba(0,0,0,.75) 100%);
}

.hero-slide.is-active { opacity: 1; visibility: visible; }

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--blanco);
  max-width: 780px;
  padding: 0 30px;
}

.hero-badge {
  display: inline-block;
  background: var(--navy);
  color: var(--blanco);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: var(--radius);
  margin-bottom: 14px;
}

.hero-meta {
  font-size: 13px;
  opacity: .85;
  margin-bottom: 10px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1.2;
  margin: 0;
  text-shadow: 0 2px 14px rgba(0,0,0,.5);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: rgba(0,0,0,.35);
  border: none;
  color: var(--blanco);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease;
}

.hero-arrow:hover { background: var(--rojo); }
.hero-arrow.prev { left: 20px; }
.hero-arrow.next { right: 20px; }

.hero-dots {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.hero-dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.45);
  cursor: pointer;
  padding: 0;
}

.hero-dots button.is-active { background: var(--rojo); }

/* ---------- Secciones ---------- */
.section { padding: 48px 0; }
.section.alt { background: var(--gris-fondo); }

.section-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-rule {
  width: 64px;
  height: 4px;
  background: var(--rojo);
  margin-bottom: 30px;
}

.meta {
  font-size: 12.5px;
  color: var(--gris-texto);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

/* ---------- Novedades: destacado + lista ---------- */
.novedades-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 30px;
}

.featured-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 430px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}

.featured-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.88) 100%);
}

.featured-card .card-body {
  position: relative;
  z-index: 2;
  padding: 26px 28px;
  color: var(--blanco);
}

.featured-card .hero-badge { margin-bottom: 12px; }

.featured-card h3 {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.25;
  margin: 0 0 10px;
}

.featured-card .meta { color: rgba(255,255,255,.8); }

.news-list { display: flex; flex-direction: column; gap: 22px; }

.news-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
}

.news-row .thumb {
  width: 110px;
  height: 78px;
  object-fit: cover;
  border-radius: var(--radius);
}

.news-row h4 {
  font-size: 15.5px;
  line-height: 1.35;
  margin: 4px 0 0;
  font-weight: 700;
}

.news-row h4 a:hover { color: var(--rojo); }

.news-list-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 26px;
}

/* ---------- Artículos ---------- */
.articulo-row {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 26px;
  padding: 24px 0;
  border-bottom: 1px solid #e4e4e1;
}

.articulo-row:first-of-type { padding-top: 0; }

.articulo-row img { border-radius: var(--radius); object-fit: cover; height: 190px; width: 100%; }

.articulo-row h3 {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 6px 0 10px;
}

.articulo-row h3 a:hover { color: var(--rojo); }

.articulo-row p {
  color: var(--gris-texto);
  font-size: 14.5px;
  margin: 0 0 16px;
}

.btn {
  display: inline-block;
  background: var(--navy);
  color: var(--blanco);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
}

.btn:hover { background: var(--rojo); }

/* ---------- Colaboración escrita ---------- */
.colab-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px 34px;
}

.colab-card h4 {
  font-family: var(--font-display);
  font-size: 18px;
  margin: 0 0 8px;
  line-height: 1.3;
}

.colab-card h4 a:hover { color: var(--rojo); }

.colab-card .meta-italic {
  font-size: 12.5px;
  color: var(--gris-texto);
  font-style: italic;
  margin: 0 0 10px;
}

.colab-card p {
  font-size: 14px;
  color: var(--gris-texto);
  margin: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--negro);
  padding: 22px 0;
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo { max-height: 42px; }

/* Crédito de desarrollo y hosting: fila propia, centrada */
.footer-credit {
  flex: 0 0 100%;
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.footer-credit a { display: inline-block; }
.aligncenter { display: block; margin: 0 auto; }
.footer-credit img { max-width: 100%; height: auto; opacity: .9; transition: opacity .15s ease; }
.footer-credit a:hover img { opacity: 1; }

.social-links { display: flex; gap: 14px; }

.social-links a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blanco);
  font-size: 14px;
  transition: background .15s ease;
}

.social-links a:hover { background: var(--rojo); }
.social-links a svg { width: 15px; height: 15px; fill: currentColor; }

/* ---------- Breadcrumb / página interna ---------- */
.breadcrumb {
  background: var(--gris-fondo);
  padding: 14px 0;
  font-size: 13px;
  color: var(--gris-texto);
}

.breadcrumb a:hover { color: var(--rojo); }

/* ---------- Página de noticia ---------- */
.article-header { padding: 40px 0 10px; }

.article-header .hero-badge { margin-bottom: 14px; }

.article-header h1 {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.25;
  margin: 0 0 14px;
}

.article-cover {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius);
  margin: 20px 0 30px;
}

.article-layout {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 40px;
}

.article-body p { margin: 0 0 18px; font-size: 16px; color: #333; }
.article-body h2 { font-family: var(--font-display); font-size: 22px; margin: 30px 0 14px; }
.article-body blockquote {
  margin: 24px 0;
  padding: 4px 22px;
  border-left: 4px solid var(--rojo);
  font-style: italic;
  color: #444;
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tags a {
  background: var(--gris-fondo);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  color: var(--gris-texto);
}
.tags a:hover { background: var(--rojo); color: var(--blanco); }

/* ---------- Acciones de la nota: escuchar + compartir ---------- */
.article-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e6e6e2;
  border-bottom: 1px solid #e6e6e2;
  padding-bottom: 18px;
}

.btn-escuchar {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--navy);
  color: var(--blanco);
  border: 0;
  border-radius: 30px;
  padding: 11px 20px;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease;
}
.btn-escuchar:hover { background: #10162b; }
.btn-escuchar svg { width: 18px; height: 18px; stroke: currentColor; fill: none; flex-shrink: 0; }
.btn-escuchar.is-hablando { background: var(--rojo); }
.btn-escuchar.is-hablando:hover { background: var(--rojo-oscuro); }

.article-share { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.article-share .share-label { font-size: 12.5px; color: var(--gris-texto); font-weight: 600; margin-right: 2px; }
.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gris-fondo);
  color: var(--navy);
  border: 0;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.share-btn svg { width: 16px; height: 16px; fill: currentColor; }
.share-btn:hover { background: var(--rojo); color: var(--blanco); transform: translateY(-2px); }
.share-btn.is-copiado { background: #2f9e5c; color: var(--blanco); }

@media (max-width: 600px) {
  .article-actions { gap: 12px; }
  .article-share { margin-left: 0; width: 100%; justify-content: flex-start; }
}

.sidebar-block { margin-bottom: 34px; }
.sidebar-block h5 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--navy);
  border-bottom: 3px solid var(--rojo);
  display: inline-block;
  padding-bottom: 6px;
  margin: 0 0 18px;
}
.sidebar-item {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.sidebar-item img { width: 74px; height: 54px; object-fit: cover; border-radius: var(--radius); }
.sidebar-item h6 { font-size: 13.5px; margin: 0; line-height: 1.3; }
.sidebar-item h6 a:hover { color: var(--rojo); }

/* ---------- Página de categoría ---------- */
.category-header {
  background: var(--navy);
  padding: 40px 0;
  color: var(--blanco);
  text-align: center;
}
.category-header .hero-badge { background: var(--rojo); margin-bottom: 10px; }
.category-header h1 { font-family: var(--font-display); font-size: 32px; margin: 0; }
.category-header p { opacity: .8; margin: 10px 0 0; font-size: 14px; }

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.category-card { border-radius: var(--radius); overflow: hidden; background: var(--blanco); box-shadow: 0 1px 0 #e4e4e1; }
.category-card img { height: 190px; width: 100%; object-fit: cover; }
.category-card .card-pad { padding: 18px 4px; }
.category-card h3 { font-family: var(--font-display); font-size: 18px; margin: 4px 0 8px; line-height: 1.3; }
.category-card h3 a:hover { color: var(--rojo); }
.category-card p { font-size: 13.5px; color: var(--gris-texto); margin: 0; }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 44px; }
.pagination a, .pagination span {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  background: var(--gris-fondo);
  font-size: 13.5px;
  font-weight: 600;
}
.pagination a:hover { background: var(--rojo); color: var(--blanco); }
.pagination .is-active { background: var(--navy); color: var(--blanco); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .novedades-grid { grid-template-columns: 1fr; }
  .news-list-cols { grid-template-columns: 1fr; gap: 22px; }
  .articulo-row { grid-template-columns: 1fr; }
  .articulo-row img { height: 220px; }
  .colab-grid { grid-template-columns: 1fr 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .colab-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr; }
  .site-header .logo-link img { max-width: 300px; }
  .main-nav a { padding: 12px 13px; font-size: 13px; }
}

/* ---------- Versión PHP: elementos que arma el panel ---------- */
.empty-msg { padding: 40px 0; color: var(--gris-texto); text-align: center; }
.empty-msg a { color: var(--rojo); font-weight: 600; }

.article-bajada { margin: 12px 0 0; font-size: 18px; line-height: 1.5; color: var(--gris-texto); max-width: 820px; }

.article-figure { margin: 26px 0; }
.article-figure img { width: 100%; height: auto; border-radius: var(--radius); }

.video-embed { position: relative; width: 100%; padding-top: 56.25%; margin: 26px 0; background: #000; border-radius: var(--radius); overflow: hidden; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }