/*
Theme Name:  Cinexpace
Theme URI:   https://cinexpace.com
Description: Tema para Cinexpace — Blog de cine, noticias y reseñas.
Author:      Cinexpace
Author URI:  https://cinexpace.com
Version:     1.0.0
License:     GNU General Public License v2 or later
Text Domain: cinexpace
Tags:        film, blog, dark, editorial
*/

/* ============================================================
   CINEXPACE DESIGN TOKENS
   ============================================================ */

:root {
  --cx-red:         #E8252A;
  --cx-red-hover:   #C8181D;
  --cx-red-dark:    #B81519;
  --cx-red-light:   #FDEAEA;
  --cx-black:       #0F0F12;
  --cx-surface:     #1E1E26;
  --cx-surface-2:   #2C2C3A;
  --cx-gold:        #F5A623;
  --cx-gold-dark:   #CF8212;
  --cx-cream:       #F8F6F1;
  --cx-cream-dark:  #EDE9E1;
  --cx-gray:        #6B6B8A;
  --cx-gray-light:  #A0A0B8;
  --cx-text:        #0F0F12;
  --cx-text-muted:  #3D3D52;
  --cx-font-display: 'DM Serif Display', Georgia, serif;
  --cx-font-body:    'Inter', system-ui, sans-serif;
  --cx-radius-sm:   4px;
  --cx-radius-md:   8px;
  --cx-radius-lg:   12px;
  --cx-transition:  all 0.2s ease;
  --cx-max-width:   1200px;
  --cx-gutter:      clamp(16px, 4vw, 40px);
}

/* ============================================================
   RESET
   ============================================================ */

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--cx-cream);
  color: var(--cx-text);
  font-family: var(--cx-font-body);
  font-size: 15px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--cx-red); text-decoration: none; transition: var(--cx-transition); }
a:hover { color: var(--cx-red-dark); }

a:focus-visible,
button:focus-visible { outline: 2px solid var(--cx-red); outline-offset: 2px; }

/* ============================================================
   TIPOGRAFÍA
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--cx-font-display);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--cx-text);
  margin-bottom: 0.75em;
}

h1 { font-size: clamp(24px, 3.5vw, 36px); }
h2 { font-size: clamp(20px, 2.5vw, 28px); }
h3 { font-size: clamp(17px, 2vw, 22px); }
h4 { font-size: 17px; font-family: var(--cx-font-body); font-weight: 600; }

p { margin-bottom: 1.25em; color: var(--cx-text-muted); }

blockquote {
  border-left: 3px solid var(--cx-red);
  padding-left: 1rem;
  margin: 1.5rem 0;
  font-family: var(--cx-font-display);
  font-style: italic;
  font-size: 1.1em;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--cx-red);
  color: #fff;
  padding: 8px 16px;
  border-radius: 0 0 var(--cx-radius-md) var(--cx-radius-md);
  font-weight: 600;
  font-size: 13px;
  z-index: 9999;
}
.skip-link:focus { top: 0; }

/* ============================================================
   LAYOUT
   ============================================================ */

.cx-container {
  width: 100%;
  max-width: var(--cx-max-width);
  margin: 0 auto;
  padding: 0 var(--cx-gutter);
}

.cx-site-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.cx-main { flex: 1; }

/* ============================================================
   HEADER / NAV
   ============================================================ */

.cx-header {
  background: var(--cx-black);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--cx-surface-2);
}

.cx-header__inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 60px;
}

.cx-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.cx-logo__icon {
  width: 28px;
  height: 28px;
  background: var(--cx-red);
  border-radius: var(--cx-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cx-logo__text {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.cx-nav { display: flex; align-items: center; gap: 2px; margin-left: 0.5rem; }

.cx-nav a {
  font-size: 13px;
  font-weight: 500;
  color: var(--cx-gray-light);
  padding: 5px 10px;
  border-radius: var(--cx-radius-sm);
  transition: var(--cx-transition);
}

.cx-nav a:hover,
.cx-nav .current-menu-item > a { color: #fff; background: var(--cx-surface); }

.cx-header__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.cx-btn-nav {
  background: var(--cx-red);
  color: #fff !important;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: var(--cx-radius-sm);
}

.cx-btn-nav:hover { background: var(--cx-red-hover) !important; color: #fff !important; }

/* Mobile menu toggle */
.cx-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--cx-gray-light);
}

@media (max-width: 768px) {
  .cx-nav { display: none; }
  .cx-nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--cx-black);
    padding: 1rem var(--cx-gutter);
    border-bottom: 1px solid var(--cx-surface-2);
    gap: 4px;
  }
  .cx-menu-toggle { display: flex; }
}

/* ============================================================
   HERO
   ============================================================ */

.cx-hero {
  background: var(--cx-black);
  padding: 64px 0 48px;
  color: var(--cx-cream);
}

.cx-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--cx-red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--cx-radius-sm);
  margin-bottom: 1rem;
}

.cx-hero__title {
  font-size: clamp(28px, 5vw, 48px);
  font-family: var(--cx-font-display);
  color: var(--cx-cream);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  max-width: 700px;
}

.cx-hero__excerpt {
  font-size: 16px;
  color: var(--cx-gray-light);
  line-height: 1.65;
  max-width: 580px;
  margin-bottom: 1.5rem;
}

.cx-score-display {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.cx-score__num {
  font-family: var(--cx-font-display);
  font-size: 48px;
  color: var(--cx-gold);
  line-height: 1;
  letter-spacing: -0.03em;
}

.cx-score__stars { color: var(--cx-gold); font-size: 18px; letter-spacing: 2px; }

/* ============================================================
   TRENDING STRIP
   ============================================================ */

.cx-trending {
  background: var(--cx-surface);
  padding: 10px var(--cx-gutter);
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cx-trending::-webkit-scrollbar { display: none; }

.cx-trending__label { font-size: 11px; font-weight: 600; color: var(--cx-gray); white-space: nowrap; flex-shrink: 0; }

.cx-tag {
  display: inline-block;
  background: var(--cx-surface-2);
  color: var(--cx-gray-light);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: var(--cx-radius-sm);
  white-space: nowrap;
  cursor: pointer;
  transition: var(--cx-transition);
  text-decoration: none;
}
.cx-tag:hover { background: var(--cx-surface); color: #fff; }
.cx-tag--hot { background: var(--cx-red); color: #fff; }

/* ============================================================
   CARDS
   ============================================================ */

.cx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.cx-grid--4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }

.cx-card {
  background: #fff;
  border-radius: var(--cx-radius-lg);
  border: 0.5px solid var(--cx-cream-dark);
  overflow: hidden;
  transition: var(--cx-transition);
  text-decoration: none;
  display: block;
  color: inherit;
}
.cx-card:hover { border-color: var(--cx-red); transform: translateY(-2px); color: inherit; }

.cx-card__thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--cx-black);
  overflow: hidden;
}
.cx-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.cx-card:hover .cx-card__thumb img { transform: scale(1.04); }

.cx-card__genre {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--cx-red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--cx-radius-sm);
}

.cx-card__body { padding: 1rem; }

.cx-card__cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--cx-red);
  margin-bottom: 4px;
}

.cx-card__title {
  font-size: 16px;
  font-family: var(--cx-font-display);
  color: var(--cx-text);
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.cx-card__meta { font-size: 11px; color: var(--cx-gray); margin-bottom: 0.5rem; }

.cx-card__score { display: flex; align-items: center; gap: 6px; }
.cx-card__score-num { font-family: var(--cx-font-display); font-size: 22px; color: var(--cx-gold); line-height: 1; }
.cx-card__score-stars { color: var(--cx-gold); font-size: 11px; letter-spacing: 1px; }

/* ============================================================
   SECTION
   ============================================================ */

.cx-section { padding: 3rem 0; }
.cx-section--dark { background: var(--cx-black); color: var(--cx-cream); }
.cx-section--surface { background: var(--cx-cream-dark); }

.cx-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.cx-section__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cx-gray);
}

.cx-section__link { font-size: 12px; font-weight: 500; color: var(--cx-red); }

/* ============================================================
   BOTONES
   ============================================================ */

.cx-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--cx-font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--cx-radius-md);
  border: none;
  cursor: pointer;
  transition: var(--cx-transition);
  text-decoration: none;
  line-height: 1;
}
.cx-btn--primary { background: var(--cx-red); color: #fff; }
.cx-btn--primary:hover { background: var(--cx-red-hover); color: #fff; transform: translateY(-1px); }
.cx-btn--outline { background: transparent; color: var(--cx-red); border: 1.5px solid var(--cx-red); }
.cx-btn--outline:hover { background: var(--cx-red-light); color: var(--cx-red-dark); }

/* ============================================================
   SINGLE POST / ARTICLE
   ============================================================ */

.cx-article-header {
  background: var(--cx-black);
  color: var(--cx-cream);
  padding: 3rem 0 2rem;
}

.cx-article-body {
  max-width: 780px;
  margin: 3rem auto;
  padding: 0 var(--cx-gutter);
}

.cx-article-body p { font-size: 15px; line-height: 1.72; color: var(--cx-text-muted); margin-bottom: 1.5rem; }
.cx-article-body h2 { margin-top: 2.5rem; }
.cx-article-body h3 { margin-top: 2rem; }

.cx-ficha {
  background: var(--cx-cream-dark);
  border-radius: var(--cx-radius-lg);
  padding: 1.5rem;
  margin: 2rem 0;
  border-left: 4px solid var(--cx-red);
}

.cx-ficha__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cx-red);
  margin-bottom: 1rem;
}

.cx-ficha table { width: 100%; border-collapse: collapse; }
.cx-ficha table td { padding: 6px 0; font-size: 13px; border-bottom: 0.5px solid var(--cx-cream); vertical-align: top; }
.cx-ficha table td:first-child { color: var(--cx-gray); width: 130px; font-weight: 500; }
.cx-ficha table tr:last-child td { border-bottom: none; }

/* ============================================================
   FOOTER
   ============================================================ */

.cx-footer {
  background: var(--cx-black);
  color: var(--cx-gray-light);
  padding: 2rem 0;
  border-top: 1px solid var(--cx-surface-2);
}

.cx-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.cx-footer__brand { font-size: 14px; font-weight: 700; color: var(--cx-cream); }
.cx-footer__copy { font-size: 12px; color: var(--cx-gray); }
.cx-footer a { color: var(--cx-gray-light); font-size: 12px; }
.cx-footer a:hover { color: var(--cx-cream); }

/* ============================================================
   WORDPRESS CLASSES
   ============================================================ */

.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { margin: 0 auto 1rem; display: block; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 12px; color: var(--cx-gray); margin-top: 4px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .cx-hero { padding: 40px 0 32px; }
  .cx-grid { grid-template-columns: 1fr; }
  .cx-footer__inner { flex-direction: column; text-align: center; }
}

/* ============================================================
   HERO LAYOUT — dos columnas
   ============================================================ */

.cx-hero__inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 3rem;
  align-items: center;
}

.cx-hero__image {
  height: 420px;
  border-radius: 12px;
  overflow: hidden;
}

@media (max-width: 900px) {
  .cx-hero__inner { grid-template-columns: 1fr; }
  .cx-hero__image { height: 260px; }
}

/* ============================================================
   ARCHIVE HEADER
   ============================================================ */

.cx-archive-header {
  background: var(--cx-black);
  padding: 3rem 0 2.5rem;
  color: var(--cx-cream);
}

/* ============================================================
   ARTICLE HEADER — dos columnas
   ============================================================ */

.cx-article-header__inner {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start;
}

.cx-article-header__poster {
  height: 420px;
  border-radius: 12px;
  overflow: hidden;
}

@media (max-width: 768px) {
  .cx-article-header__inner { grid-template-columns: 1fr; }
  .cx-article-header__poster { height: 300px; }
}

/* ============================================================
   NEWS LIST
   ============================================================ */

.cx-news-list { display: flex; flex-direction: column; gap: 0; }

.cx-news-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 0.5px solid var(--cx-cream-dark);
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  transition: var(--cx-transition);
}
.cx-news-item:hover { color: inherit; }
.cx-news-item:hover .cx-news-item__title { color: var(--cx-red); }
.cx-news-item:last-child { border-bottom: none; }

.cx-news-item__content { flex: 1; }
.cx-news-item__cat { font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--cx-red); margin-bottom: 4px; }
.cx-news-item__title { font-size: 14px; font-weight: 600; color: var(--cx-text); line-height: 1.35; margin-bottom: 4px; transition: var(--cx-transition); }
.cx-news-item__time { font-size: 11px; color: var(--cx-gray); }
.cx-news-item__thumb { width: 64px; height: 64px; border-radius: var(--cx-radius-md); object-fit: cover; flex-shrink: 0; background: var(--cx-cream-dark); overflow: hidden; }
.cx-news-item__thumb img { width: 64px; height: 64px; object-fit: cover; }

/* ============================================================
   ARTICLE PROSE
   ============================================================ */

.cx-prose { font-size: 15px; line-height: 1.8; }
.cx-prose p { color: var(--cx-text-muted); margin-bottom: 1.5rem; }
.cx-prose h2 { margin-top: 2.5rem; margin-bottom: 1rem; }
.cx-prose h3 { margin-top: 2rem; margin-bottom: 0.75rem; }
.cx-prose img { border-radius: var(--cx-radius-md); margin: 1.5rem 0; }
.cx-prose a { color: var(--cx-red); }
.cx-prose blockquote { border-left: 3px solid var(--cx-red); padding-left: 1rem; margin: 2rem 0; font-family: var(--cx-font-display); font-style: italic; font-size: 1.1em; }
.cx-prose ul, .cx-prose ol { padding-left: 1.5rem; margin-bottom: 1.5rem; color: var(--cx-text-muted); }
.cx-prose li { margin-bottom: 0.5rem; }

/* ============================================================
   PAGINATION
   ============================================================ */

.nav-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--cx-radius-md);
  font-size: 13px; font-weight: 500;
  background: var(--cx-cream-dark); color: var(--cx-text);
  text-decoration: none; transition: var(--cx-transition);
}
.page-numbers:hover, .page-numbers.current { background: var(--cx-red); color: #fff; }

/* ============================================================
   SEARCH INPUT FOCUS
   ============================================================ */

input[type="search"]:focus { outline: 2px solid var(--cx-red); border-color: var(--cx-red) !important; }

/* Logo personalizado */
.cx-logo .custom-logo-link { display: flex; align-items: center; }
.cx-logo .custom-logo { max-height: 40px; width: auto; display: block; }
