/* Show detail — overrides legacy template (fixed hero + 600px margin) */

:root {
  --cc-show-hero-peek: 72px;
}

/* Cancel Nobel template fixed hero */
body.page-show .back-frame-wrap {
  position: relative !important;
  height: auto !important;
  min-height: 0 !important;
  width: 100% !important;
  z-index: 1 !important;
  overflow: hidden;
}

body.page-show section.mastwrap {
  margin-top: 0 !important;
  position: relative;
  z-index: 2;
}

/* Hero cinematográfico — imagen completa + título superpuesto */
body.page-show .cc-show-hero.intro {
  --cc-show-hero-height: calc(100svh - var(--cc-site-header-h, var(--cc-header-h, 72px)) - var(--cc-show-hero-peek));
  position: relative;
  height: var(--cc-show-hero-height) !important;
  min-height: clamp(420px, var(--cc-show-hero-height), 920px) !important;
  max-height: none;
  overflow: hidden;
  background: #050505;
  isolation: isolate;
}

body.page-show:not(.cc-modern-nav) .cc-show-hero.intro {
  --cc-show-hero-height: calc(100svh - var(--cc-header-h, 72px) - var(--cc-show-hero-peek));
  margin-top: var(--cc-header-h) !important;
}

body.page-show .cc-show-hero__track {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

body.page-show .cc-show-hero__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.75s ease, visibility 0.75s ease;
  z-index: 0;
  background: #050505;
}

body.page-show .cc-show-hero__slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

body.page-show .cc-show-hero__img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
}

body.page-show .cc-show-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.45) 0%, rgba(5, 5, 5, 0) 28%),
    linear-gradient(0deg, rgba(5, 5, 5, 0.97) 0%, rgba(5, 5, 5, 0.72) 32%, rgba(5, 5, 5, 0.2) 68%, rgba(5, 5, 5, 0) 82%);
}

body.page-show .cc-show-hero__content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(88px, 14vh, 128px);
  z-index: 4;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
  pointer-events: none;
}

body.page-show .cc-show-hero__content::before {
  content: "";
  position: absolute;
  left: clamp(12px, 2vw, 24px);
  right: 0;
  top: -20px;
  bottom: -24px;
  max-width: min(100%, 780px);
  background: linear-gradient(105deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.42) 62%, transparent 100%);
  border-left: 4px solid var(--cc-accent);
  border-radius: 0 14px 14px 0;
  z-index: -1;
  pointer-events: none;
}

body.page-show .cc-show-hero__title,
body.page-show .cc-show-hero__content h1 {
  position: relative;
  margin: 0;
  padding: 4px 0 4px clamp(16px, 2.5vw, 24px);
  max-width: min(100%, 720px);
  font-size: clamp(2.35rem, 7.5vw, 4.25rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.02;
  color: #fff;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 4px 20px rgba(0, 0, 0, 0.75),
    0 12px 48px rgba(0, 0, 0, 0.55);
}

body.page-show .cc-show-hero__content .cc-show-ticket-cta,
body.page-show .cc-show-hero__content .masinfo {
  pointer-events: auto;
  margin-top: 18px;
}

body.page-show .cc-show-hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

body.page-show .cc-show-hero__scroll-text {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

body.page-show .cc-show-hero__scroll-icon {
  width: 28px;
  height: 28px;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  position: relative;
  animation: cc-show-hero-scroll-pulse 2.4s ease-in-out infinite;
}

body.page-show .cc-show-hero__scroll-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 7px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: translateX(-50%) rotate(45deg);
  animation: cc-show-hero-scroll-arrow 2.4s ease-in-out infinite;
}

body.page-show .cc-show-hero.is-scrolled .cc-show-hero__scroll {
  opacity: 0;
  transform: translateX(-50%) translateY(8px);
  pointer-events: none;
}

@keyframes cc-show-hero-scroll-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 249, 207, 0.18); }
  50% { box-shadow: 0 0 0 8px rgba(0, 249, 207, 0); }
}

@keyframes cc-show-hero-scroll-arrow {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(45deg); opacity: 1; }
  50% { transform: translateX(-50%) translateY(5px) rotate(45deg); opacity: 0.45; }
}

body.page-show .cc-show-hero--single .cc-show-hero__arrow,
body.page-show .cc-show-hero--single .cc-show-hero__dots {
  display: none;
}

body.page-show .cc-show-hero--single .cc-show-hero__content {
  bottom: clamp(72px, 11vh, 108px);
}

body.page-show .cc-show-hero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background var(--cc-transition), opacity var(--cc-transition);
}

body.page-show .cc-show-hero__arrow:hover {
  background: rgba(255, 255, 255, 0.26);
}

body.page-show .cc-show-hero__arrow--prev { left: 16px; }
body.page-show .cc-show-hero__arrow--next { right: 16px; }

body.page-show .cc-show-hero__dots {
  position: absolute;
  bottom: clamp(56px, 9vh, 72px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 8px;
}

body.page-show .cc-show-hero__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background var(--cc-transition), border-color var(--cc-transition), transform var(--cc-transition);
}

body.page-show .cc-show-hero__dot.is-active,
body.page-show .cc-show-hero__dot:hover {
  background: var(--cc-accent);
  border-color: var(--cc-accent);
  transform: scale(1.08);
}

/* Transición visual hacia el contenido */
body.page-show .cc-show-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  z-index: 7;
  background: linear-gradient(90deg, transparent, var(--cc-accent), transparent);
  opacity: 0.75;
}

body.page-show #cc-show-main {
  scroll-margin-top: calc(var(--cc-site-header-h, var(--cc-header-h, 72px)) + 16px);
}

body.page-show .cc-show-hero.intro:hover {
  cursor: default;
}

@media (prefers-reduced-motion: reduce) {
  body.page-show .cc-show-hero__scroll-icon,
  body.page-show .cc-show-hero__scroll-icon::after {
    animation: none;
  }

  body.page-show .cc-show-hero__slide {
    transition: none;
  }
}

/* Compatibilidad: título en tarjeta externa (legacy) */
.cc-show-hero-meta {
  max-width: 1140px;
  margin: -48px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 5;
}

.cc-show-hero-meta__card {
  background: var(--cc-bg);
  border-radius: var(--cc-radius-lg);
  box-shadow: var(--cc-shadow-hover);
  padding: clamp(20px, 3vw, 32px) clamp(24px, 4vw, 40px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--cc-border);
}

.cc-show-hero-meta h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--cc-black);
  margin: 0;
  line-height: 1.2;
}

.cc-show-ticket-cta,
.cc-show-hero-meta .masinfo {
  padding: 12px 22px;
  background: var(--cc-accent);
  color: var(--cc-black);
  font-family: var(--cc-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 8px;
  position: static;
  transition: all var(--cc-transition);
  white-space: nowrap;
}

.cc-show-ticket-cta:hover,
.cc-show-hero-meta .masinfo:hover {
  background: var(--cc-black);
  color: #fff;
  text-decoration: none;
}

/* Main content — asoma desde el primer pantallazo */
body.page-show .services {
  margin-top: 0 !important;
  padding: clamp(28px, 4vw, 48px) 0 clamp(48px, 8vw, 80px) !important;
}

body.page-show .cc-show-content.container {
  max-width: 1140px;
  width: 100%;
  padding-left: 24px;
  padding-right: 24px;
}

/* Two-column info */
.cc-show-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 56px);
  margin-bottom: 56px;
}

.cc-show-info__col p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--cc-text);
  margin-bottom: 1.25em;
}

.cc-show-section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cc-text-muted);
  margin: 32px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--cc-border);
}

.cc-show-section-title:first-child {
  margin-top: 0;
}

/* Ficha técnica — contenedor sutil */
.cc-show-ficha {
  background: rgba(10, 10, 10, 0.035);
  border: 1px solid rgba(10, 10, 10, 0.06);
  border-radius: var(--cc-radius-lg);
  padding: clamp(20px, 3vw, 28px) clamp(20px, 3vw, 32px);
  margin-bottom: 32px;
}

.cc-show-ficha .cc-show-section-title {
  margin-top: 0;
  border-bottom-color: rgba(10, 10, 10, 0.08);
}

.cc-show-ficha .post-side-link {
  margin-bottom: 0;
}

body.page-show .post-side-link {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

body.page-show .post-side-link li {
  padding: 10px 0;
  border-bottom: 1px solid var(--cc-border);
  font-size: 14px;
  line-height: 1.6;
  color: var(--cc-text);
}

body.page-show .post-side-link li:last-child {
  border-bottom: none;
}

body.page-show .post-side-link li strong {
  color: var(--cc-black);
  font-weight: 600;
}

/* Media sections */
.cc-show-media {
  margin-bottom: 56px;
}

.cc-show-media__title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cc-text-muted);
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--cc-border);
}

.cc-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.cc-gallery--photos {
  grid-template-columns: repeat(4, 1fr);
}

.cc-gallery--photos .fancybox:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.cc-gallery--photos .fancybox:first-child .matimg {
  aspect-ratio: auto;
  min-height: 100%;
}

.cc-gallery .fancybox {
  display: block;
  border-radius: var(--cc-radius);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--cc-bg-subtle);
  line-height: 0;
  box-shadow: var(--cc-shadow);
  transition: transform var(--cc-transition), box-shadow var(--cc-transition);
}

.cc-gallery .fancybox:hover {
  transform: translateY(-2px);
  box-shadow: var(--cc-shadow-hover);
}

.cc-gallery .matimg {
  width: 100% !important;
  max-width: none !important;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.cc-gallery .fancybox:hover .matimg {
  transform: scale(1.05);
}

.cc-gallery--press {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.cc-gallery--press .fancybox {
  aspect-ratio: 4 / 3;
}

/* Videos */
.cc-videos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.cc-videos .works-item {
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: var(--cc-radius);
  overflow: hidden;
  box-shadow: var(--cc-shadow);
  background: #000;
}

.cc-videos iframe {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
  display: block;
  vertical-align: top;
  border: none;
}

/* Partners */
.cc-partners {
  max-width: 1140px;
  margin: 0 auto 48px;
  padding: 48px 32px;
  background: var(--cc-bg-subtle);
  border-radius: var(--cc-radius-lg);
  text-align: center;
}

.cc-partners .cc-show-media__title {
  border: none;
  padding: 0;
  margin-bottom: 28px;
}

.cc-partners__logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.cc-partners__logos img {
  max-height: 56px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

/* Responsive */
@media (max-width: 768px) {
  :root {
    --cc-show-hero-peek: 48px;
  }

  body.page-show .cc-show-hero.intro {
    height: min(
      calc(100svh - var(--cc-site-header-h, 64px) - var(--cc-show-hero-peek)),
      78svh
    ) !important;
    min-height: clamp(340px, 62svh, 620px) !important;
  }

  /* Mobile: llenar el hero recortando bandas vacías (banners panorámicos) */
  body.page-show .cc-show-hero__img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    object-position: center 42%;
  }

  body.page-show .cc-show-hero--panorama .cc-show-hero__img {
    object-position: center 38%;
  }

  body.page-show .cc-show-hero__slide {
    align-items: stretch;
    justify-content: stretch;
  }

  body.page-show .cc-show-hero__overlay {
    background:
      linear-gradient(180deg, rgba(5, 5, 5, 0.55) 0%, rgba(5, 5, 5, 0) 18%),
      linear-gradient(0deg, rgba(5, 5, 5, 0.98) 0%, rgba(5, 5, 5, 0.82) 36%, rgba(5, 5, 5, 0.35) 58%, rgba(5, 5, 5, 0) 76%);
  }

  body.page-show .cc-show-hero__content {
    bottom: clamp(68px, 11vh, 96px);
    padding: 0 16px;
  }

  body.page-show .cc-show-hero__title,
  body.page-show .cc-show-hero__content h1 {
    max-width: none;
    font-size: clamp(1.85rem, 9vw, 2.65rem);
    padding-left: 14px;
  }

  body.page-show .cc-show-hero__content::before {
    left: 4px;
    top: -14px;
    bottom: -18px;
    border-left-width: 3px;
    border-radius: 0 10px 10px 0;
  }

  body.page-show .cc-show-hero__scroll-text {
    font-size: 9px;
    letter-spacing: 0.12em;
  }

  body.page-show .cc-show-hero__dots {
    bottom: 50px;
  }

  .cc-show-hero-meta {
    margin-top: -32px;
    padding: 0 16px;
  }

  .cc-show-info {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .cc-gallery--photos {
    grid-template-columns: repeat(2, 1fr);
  }

  .cc-gallery--photos .fancybox:first-child {
    grid-column: span 2;
    grid-row: span 1;
  }

  .cc-gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  body.page-show .cc-show-hero__arrow {
    width: 36px;
    height: 36px;
    font-size: 22px;
  }

  body.page-show .cc-show-hero__arrow--prev { left: 8px; }
  body.page-show .cc-show-hero__arrow--next { right: 8px; }

  .cc-videos {
    grid-template-columns: 1fr;
  }

  body.page-show .cc-show-content.container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 390px) {
  .cc-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}
