/* =====================================================
   CREA Media Suite — Frontend Styles
   Self-contained. No theme or builder dependency.
   Compatible: cualquier constructor y el editor de WordPress.
   ===================================================== */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ── Variables (scoped, no collision) ────────────────── */
.crea-series,
.crea-single-video,
.crea-catalog {
  --c-bg:       #0b0b0f;
  --c-s1:       #131318;
  --c-s2:       #1c1c24;
  --c-border:   #262632;
  --c-accent:   #C8FF00;
  --c-glow:     rgba(200,255,0,.25);
  --c-text:     #f0f0f4;
  --c-sub:      #a0a0b0;
  --c-muted:    #60607a;
  --c-white:    #ffffff;
  --r:          12px;
  font-family: 'Outfit', -apple-system, sans-serif;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}
.crea-series *, .crea-single-video *, .crea-catalog * {
  box-sizing: border-box;
}

/* =====================================================
   HERO
   ===================================================== */
.crea-hero {
  position: relative;
  min-height: 440px;
  background: var(--c-s1) center/cover no-repeat;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.crea-hero-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(11,11,15,.95) 0%, rgba(11,11,15,.5) 55%, transparent 100%),
    linear-gradient(to top, rgba(11,11,15,1) 0%, transparent 50%);
}
.crea-hero-content {
  position: relative;
  z-index: 2;
  padding: 44px 44px 50px;
  max-width: 620px;
}
.crea-badge-type {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--c-accent);
  border: 1px solid var(--c-glow);
  padding: 3px 10px;
  border-radius: 3px;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.crea-hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(36px, 6vw, 62px);
  line-height: .95;
  letter-spacing: 1px;
  color: var(--c-white);
  margin: 0 0 16px;
  text-shadow: 0 2px 24px rgba(0,0,0,.5);
}
.crea-hero-desc {
  font-size: 15px;
  line-height: 1.65;
  color: rgba(240,240,244,.75);
  margin: 0 0 26px;
  font-weight: 300;
}
.crea-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--c-accent);
  color: #ffffff;
  border: none;
  padding: 13px 28px;
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .2px;
  transition: all .2s;
  box-shadow: 0 4px 24px var(--c-glow-btn, var(--c-glow));
}
.crea-hero-btn svg {
  width: 16px;
  height: 16px;
}
.crea-hero-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--c-glow-btn, var(--c-glow));
}

/* =====================================================
   EPISODIOS
   ===================================================== */
.crea-episodes        { padding: 36px 32px 52px; }
.crea-episodes-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.crea-episodes-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: var(--c-text);
}
.crea-episodes-badge {
  background: var(--c-s2);
  border: 1px solid var(--c-border);
  color: var(--c-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
}

/* Grid */
.crea-episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 16px;
}

/* Card episodio */
.crea-episode {
  background: var(--c-s1);
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  overflow: hidden;
  cursor: pointer;
  transition: transform .22s, border-color .22s, box-shadow .22s;
  outline: none;
}
.crea-episode:hover,
.crea-episode:focus {
  transform: translateY(-5px) scale(1.015);
  border-color: var(--c-accent);
  box-shadow: 0 12px 44px rgba(0,0,0,.7), 0 0 0 1px var(--c-glow);
}

.crea-ep-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--c-s2);
}
.crea-ep-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}
.crea-episode:hover .crea-ep-thumb img,
.crea-episode:focus .crea-ep-thumb img { transform: scale(1.08); }

.crea-ep-hover {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.52);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s;
}
.crea-episode:hover .crea-ep-hover,
.crea-episode:focus .crea-ep-hover { opacity: 1; }

.crea-ep-play-ring {
  width: 52px;
  height: 52px;
  background: var(--c-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px var(--c-glow);
}
.crea-ep-play-ring svg {
  width: 20px;
  height: 20px;
  fill: #0b0b0f;
  margin-left: 3px;
}

.crea-ep-num {
  position: absolute;
  bottom: 8px;
  left: 10px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,.5);
  letter-spacing: .3px;
}

.crea-ep-meta     { padding: 12px 14px 14px; }
.crea-ep-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--c-text);
}
.crea-ep-desc {
  font-size: 11px;
  color: var(--c-muted);
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =====================================================
   MODAL PLAYER
   ===================================================== */
.crea-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999999;
  align-items: center;
  justify-content: center;
}
.crea-modal.is-open { display: flex; }

.crea-modal-bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.9);
  backdrop-filter: blur(8px);
  animation: crea-fade .2s ease;
}

@keyframes crea-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.crea-modal-box {
  position: relative;
  z-index: 1;
  width: min(92vw, 1000px);
  animation: crea-pop .28s cubic-bezier(.34,1.56,.64,1);
}
@keyframes crea-pop {
  from { opacity: 0; transform: scale(.9) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.crea-modal-close {
  position: absolute;
  top: -44px;
  right: 0;
  background: rgba(255,255,255,.1);
  border: none;
  color: rgba(255,255,255,.8);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.crea-modal-close:hover { background: var(--c-glow); color: var(--c-accent); }
.crea-modal-close svg   { width: 18px; height: 18px; }

.crea-player-wrap {
  position: relative;
  padding-top: 56.25%;
  background: #000;
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,.9), 0 0 0 1px var(--c-glow);
}
.crea-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* =====================================================
   VIDEO INDIVIDUAL
   ===================================================== */
.crea-single-video     { background: transparent; }
.crea-video-responsive {
  position: relative;
  padding-top: 56.25%;
  background: #000;
  border-radius: var(--r);
  overflow: hidden;
}
.crea-video-responsive iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.crea-video-info  { padding: 14px 4px 0; }
.crea-video-title { font-size: 18px; font-weight: 700; margin: 0 0 8px; color: var(--c-text); }
.crea-video-desc  { font-size: 13px; color: var(--c-sub); line-height: 1.65; margin: 0; }

/* =====================================================
   CATÁLOGO
   ===================================================== */
.crea-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.crea-catalog-card {
  background: var(--c-s1);
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  overflow: hidden;
  transition: transform .2s, border-color .2s;
  cursor: pointer;
}
.crea-catalog-card:hover {
  transform: scale(1.04);
  border-color: var(--c-accent);
}
.crea-catalog-thumb {
  aspect-ratio: 16/9;
  background: var(--c-s2) center/cover no-repeat;
  position: relative;
  overflow: hidden;
}
.crea-catalog-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s;
}
.crea-catalog-card:hover .crea-catalog-overlay { opacity: 1; }
.crea-catalog-play {
  width: 44px;
  height: 44px;
  background: var(--c-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.crea-catalog-play svg { width: 18px; fill: #0b0b0f; margin-left: 2px; }
.crea-catalog-type {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 2px 8px;
  border-radius: 3px;
  background: var(--c-glow);
  color: var(--c-accent);
  border: 1px solid var(--c-glow);
}
.crea-catalog-info  { padding: 12px; }
.crea-catalog-title { font-size: 13px; font-weight: 600; margin: 0 0 5px; line-height: 1.4; color: var(--c-text); }
.crea-catalog-desc  { font-size: 11px; color: var(--c-muted); line-height: 1.5; margin: 0; }
.crea-catalog-empty { color: var(--c-muted); padding: 32px; text-align: center; }

/* =====================================================
   UTILS
   ===================================================== */
.crea-error { color: #f87171; font-size: 13px; padding: 8px 0; }

/* Responsive */

/* Tablet */
@media (max-width: 768px) {
  .crea-hero {
    min-height: 0;
    aspect-ratio: 16/7;     /* la imagen ocupa proporción fija, no se corta */
    background-position: center top;
    align-items: flex-end;
  }
  .crea-hero-gradient {
    background:
      linear-gradient(to top, rgba(11,11,15,1) 0%, rgba(11,11,15,.6) 45%, transparent 100%);
  }
  .crea-hero-content {
    padding: 20px 24px 28px;
    max-width: 100%;
  }
  .crea-hero-title { font-size: clamp(28px, 7vw, 44px); }
  .crea-hero-desc  { display: none; } /* evita superposición en tablet */
}

/* Mobile */
@media (max-width: 640px) {
  .crea-hero {
    aspect-ratio: 16/9;     /* proporción estándar — imagen completa siempre */
    background-position: center center;
  }
  .crea-hero-content   {
    padding: 16px 16px 22px;
    max-width: 100%;
  }
  .crea-hero-title     { font-size: clamp(22px, 8vw, 34px); margin-bottom: 10px; }
  .crea-hero-btn       { padding: 10px 18px; font-size: 13px; }
  .crea-badge-type     { font-size: 9px; letter-spacing: 2px; margin-bottom: 10px; }
  .crea-episodes       { padding: 20px 14px 32px; }
  .crea-episodes-grid  { grid-template-columns: 1fr 1fr; gap: 10px; }
  .crea-catalog-grid   { grid-template-columns: 1fr 1fr; gap: 10px; }
  .crea-modal-box      { width: 97vw; }
  .crea-modal-close    { top: -38px; }
}

/* Mobile chico */
@media (max-width: 400px) {
  .crea-hero           { aspect-ratio: 4/3; }  /* un poco más alto para que no quede muy chico */
  .crea-episodes-grid  { grid-template-columns: 1fr; }
}
