/* Teatro Cerca — drawer editorial reutilizable */

:root {
  --tc-drawer-width: 470px;
  --tc-drawer-bg: #1d141d;
  --tc-drawer-bg-soft: #281b27;
  --tc-drawer-text: #fffaf4;
  --tc-drawer-muted: rgba(255, 250, 244, .64);
  --tc-drawer-border: rgba(255, 255, 255, .12);
  --tc-drawer-accent: #b63d68;
  --tc-drawer-accent-strong: #d55380;
  --tc-drawer-footer-logo-width: 156px;
  --tc-drawer-footer-logo-height: 40px;
  --tc-drawer-footer-logo-crop-y: -64px;
}

body.tc-drawer-open {
  overflow: hidden;
  overscroll-behavior: none;
}

body.tc-drawer-open .sumar-obra-float {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(14px) !important;
}

.tc-drawer,
.tc-drawer *,
.tc-drawer *::before,
.tc-drawer *::after {
  box-sizing: border-box;
}

button.tc-drawer__toggle,
button.tc-drawer__close,
.tc-drawer__carousel-controls button {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
}

/*
|--------------------------------------------------------------------------
| BOTÓN DE APERTURA
|--------------------------------------------------------------------------
*/

button.tc-drawer__toggle {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  left: max(18px, env(safe-area-inset-left));
  z-index: 4202;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;

  width: 50px;
  height: 50px;
  min-width: 50px;
  min-height: 50px;
  max-width: 50px;
  max-height: 50px;

  margin: 0;
  padding: 0;

  border: 1px solid rgba(255, 255, 255, .66);
  border-radius: 50%;

  background: rgba(29, 20, 29, .82);
  color: #fff;

  box-shadow: 0 10px 30px rgba(16, 9, 16, .18);

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  cursor: pointer;

  transition:
    opacity .2s ease,
    transform .2s ease,
    background .2s ease;
}

button.tc-drawer__toggle:hover,
button.tc-drawer__toggle:focus-visible {
  background: rgba(29, 20, 29, .96);
  transform: translateY(-1px);
}

button.tc-drawer__toggle span {
  display: block;
  flex: 0 0 auto;

  width: 22px;
  height: 2px;

  margin: 0;
  padding: 0;

  border: 0;
  border-radius: 999px;

  background: currentColor;
}

.tc-drawer.is-open button.tc-drawer__toggle {
  opacity: 0;
  pointer-events: none;
}

/*
|--------------------------------------------------------------------------
| FONDO
|--------------------------------------------------------------------------
*/

.tc-drawer__backdrop {
  position: fixed;
  inset: 0;
  z-index: 4198;

  background: rgba(11, 7, 11, .64);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 420ms ease,
    visibility 0s linear 420ms;
}

.tc-drawer.is-open .tc-drawer__backdrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;

  transition:
    opacity 420ms ease,
    visibility 0s;
}

/*
|--------------------------------------------------------------------------
| PANEL
|--------------------------------------------------------------------------
*/

.tc-drawer__panel {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 4200;

  width: min(var(--tc-drawer-width), 94vw);
  height: 100dvh;

  overflow-x: hidden;
  overflow-y: auto;

  overscroll-behavior: contain;
  touch-action: pan-y;

  color: var(--tc-drawer-text);

  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(182, 61, 104, .18),
      transparent 31%
    ),
    linear-gradient(
      180deg,
      var(--tc-drawer-bg-soft) 0%,
      var(--tc-drawer-bg) 36%,
      #140e15 100%
    );

  border-right: 1px solid var(--tc-drawer-border);
  box-shadow: 26px 0 70px rgba(8, 5, 8, .34);

  transform: translateX(-100%);
  visibility: hidden;

  transition:
    transform 560ms cubic-bezier(.22, 1, .36, 1),
    visibility 0s linear 560ms;

  will-change: transform;

  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .24) transparent;
}

.tc-drawer.is-open .tc-drawer__panel {
  transform: translateX(0);
  visibility: visible;

  transition:
    transform 560ms cubic-bezier(.22, 1, .36, 1),
    visibility 0s;
}

/*
|--------------------------------------------------------------------------
| CONTENIDO INTERIOR
|--------------------------------------------------------------------------
*/

.tc-drawer__inner {
  display: flex;
  flex-direction: column;

  min-height: 100%;

  padding:
    max(24px, env(safe-area-inset-top))
    clamp(20px, 5vw, 32px)
    max(26px, env(safe-area-inset-bottom));

  opacity: 0;
  transform: translateX(-10px);

  transition:
    opacity 340ms ease,
    transform 500ms cubic-bezier(.22, 1, .36, 1);
}

.tc-drawer.is-open .tc-drawer__inner {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 90ms;
}

/*
|--------------------------------------------------------------------------
| CABECERA
|--------------------------------------------------------------------------
*/

.tc-drawer__topbar {
  position: relative;

  display: flex;
  align-items: flex-start;
  justify-content: center;

  width: 100%;
  min-height: 42px;
}

.tc-drawer__brand {
  display: block;

  width: min(240px, calc(100% - 70px));
  margin: 0 auto;

  color: inherit;
  text-decoration: none;
}

.tc-drawer__brand img {
  display: block;

  width: 100%;
  height: auto;
  max-width: none;

  margin: 0 auto;
}

/*
|--------------------------------------------------------------------------
| BOTÓN DE CIERRE
|--------------------------------------------------------------------------
*/

button.tc-drawer__close {
  position: absolute;
  top: 0;
  right: 0;

  display: block;

  width: 42px;
  height: 42px;
  min-height: 0;

  margin: 0;
  padding: 0;

  border: 1px solid var(--tc-drawer-border);
  border-radius: 50%;

  background: rgba(255, 255, 255, .04);
  color: #fff;

  cursor: pointer;

  transition:
    background .2s ease,
    transform .2s ease;
}

button.tc-drawer__close:hover,
button.tc-drawer__close:focus-visible {
  background: rgba(255, 255, 255, .10);
  transform: rotate(4deg);
}

button.tc-drawer__close span {
  position: absolute;
  top: 50%;
  left: 50%;

  width: 18px;
  height: 1.5px;

  border-radius: 999px;
  background: currentColor;
}

button.tc-drawer__close span:first-child {
  transform:
    translate(-50%, -50%)
    rotate(45deg);
}

button.tc-drawer__close span:last-child {
  transform:
    translate(-50%, -50%)
    rotate(-45deg);
}

/*
|--------------------------------------------------------------------------
| NAVEGACIÓN
|--------------------------------------------------------------------------
*/

.tc-drawer__nav {
  display: grid;
  gap: 2px;

  margin-top: 26px;
}

.tc-drawer__nav-link,
.tc-drawer__submit-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  min-height: 48px;

  padding: 10px 2px;

  color: var(--tc-drawer-text);

  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .085);
  border-radius: 0;

  background: transparent;

  font-size: 1rem;
  font-weight: 720;
  line-height: 1.2;

  text-decoration: none;

  transition:
    color .18s ease,
    padding .18s ease,
    opacity .18s ease;
}

.tc-drawer__nav-link i,
.tc-drawer__submit-link i {
  flex: 0 0 auto;

  color: var(--tc-drawer-muted);

  font-style: normal;
  font-weight: 400;
}

.tc-drawer__nav-link:hover,
.tc-drawer__nav-link:focus-visible {
  padding-left: 8px;
  color: #fff;
}

.tc-drawer__nav-link.is-active {
  color: #fff;
}

.tc-drawer__nav-link.is-active span::before {
  content: "";

  display: inline-block;

  width: 7px;
  height: 7px;

  margin-right: 10px;

  border-radius: 50%;

  background: var(--tc-drawer-accent-strong);

  vertical-align: .08em;
}

/*
|--------------------------------------------------------------------------
| BOTÓN SUMAR OBRA
|--------------------------------------------------------------------------
*/

.tc-drawer__submit-link {
  min-height: 54px;

  margin-top: 14px;
  padding: 13px 16px;

  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 16px;

  background:
    linear-gradient(
      135deg,
      var(--tc-drawer-accent) 0%,
      #8e294d 100%
    );

  box-shadow:
    0 14px 30px
    rgba(103, 28, 60, .24);
}

.tc-drawer__submit-link i {
  color: #fff;
  font-size: 1.25rem;
}

.tc-drawer__submit-link:hover,
.tc-drawer__submit-link:focus-visible {
  background:
    linear-gradient(
      135deg,
      var(--tc-drawer-accent-strong) 0%,
      var(--tc-drawer-accent) 100%
    );

  transform: translateY(-1px);
}

/*
|--------------------------------------------------------------------------
| SECCIONES
|--------------------------------------------------------------------------
*/

.tc-drawer__featured,
.tc-drawer__recent {
  margin-top: 30px;
}

.tc-drawer__recent {
  position: relative;
  isolation: isolate;
}

/*
 * Degradados laterales del carrusel.
 * JS activa cada lado solo cuando todavía queda contenido
 * disponible en esa dirección.
 */

.tc-drawer__recent::before,
.tc-drawer__recent::after {
  content: "";

  position: absolute;
  top: 43px;
  bottom: 10px;

  z-index: 3;

  width: 34px;

  opacity: 0;

  pointer-events: none;

  transition: opacity .2s ease;
}

.tc-drawer__recent::before {
  left: 0;

  background:
    linear-gradient(
      to right,
      rgba(20, 14, 21, .98),
      rgba(20, 14, 21, 0)
    );
}

.tc-drawer__recent::after {
  right: 0;

  background:
    linear-gradient(
      to left,
      rgba(20, 14, 21, .98),
      rgba(20, 14, 21, 0)
    );
}

.tc-drawer__recent.has-more-left::before,
.tc-drawer__recent.has-more-right::after {
  opacity: 1;
}

.tc-drawer__section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  margin-bottom: 12px;

  color: var(--tc-drawer-muted);

  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .13em;

  text-transform: uppercase;
}

/*
|--------------------------------------------------------------------------
| NOTA DESTACADA
|--------------------------------------------------------------------------
*/

.tc-drawer__featured-card {
  display: block;

  overflow: hidden;

  color: var(--tc-drawer-text);

  border: 1px solid var(--tc-drawer-border);
  border-radius: 20px;

  background: rgba(255, 255, 255, .055);

  text-decoration: none;

  transition:
    transform .2s ease,
    border-color .2s ease,
    background .2s ease;
}

.tc-drawer__featured-card:hover,
.tc-drawer__featured-card:focus-visible {
  border-color: rgba(255, 255, 255, .24);
  background: rgba(255, 255, 255, .075);
  transform: translateY(-2px);
}

.tc-drawer__featured-card > img {
  display: block;

  width: 100%;

  aspect-ratio: 16 / 8.8;

  object-fit: cover;
  object-position: center;
}

.tc-drawer__featured-copy {
  padding: 16px;
}

.tc-drawer__kicker {
  display: block;

  margin-bottom: 7px;

  color: #e895b2;

  font-size: .69rem;
  font-weight: 850;
  letter-spacing: .10em;
  line-height: 1.25;

  text-transform: uppercase;
}

.tc-drawer__featured-copy strong {
  display: block;

  color: #fff;

  font-size: clamp(1.1rem, 3.2vw, 1.38rem);
  line-height: 1.08;
}

.tc-drawer__featured-copy p {
  display: -webkit-box;

  overflow: hidden;

  margin: 10px 0 0;

  color: var(--tc-drawer-muted);

  font-size: .91rem;
  line-height: 1.42;

  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tc-drawer__featured-copy small,
.tc-drawer__blog-card-copy small {
  display: block;

  margin-top: 10px;

  color: rgba(255, 250, 244, .48);

  font-size: .72rem;
}

/*
|--------------------------------------------------------------------------
| CONTROLES DEL CARRUSEL
|--------------------------------------------------------------------------
*/

.tc-drawer__carousel-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tc-drawer__carousel-controls button {
  display: grid;
  place-content: center;

  width: 31px;
  height: 31px;
  min-height: 0;

  margin: 0;
  padding: 0;

  border: 1px solid var(--tc-drawer-border);
  border-radius: 50%;

  background: rgba(255, 255, 255, .04);
  color: #fff;

  cursor: pointer;
}

.tc-drawer__carousel-controls button:hover,
.tc-drawer__carousel-controls button:focus-visible {
  background: rgba(255, 255, 255, .11);
}

.tc-drawer__carousel-controls button:disabled {
  opacity: .32;

  cursor: default;
  pointer-events: none;
}

/*
|--------------------------------------------------------------------------
| CARRUSEL
|--------------------------------------------------------------------------
*/

.tc-drawer__blog-track {
  display: grid;
  grid-auto-flow: column;

  /*
   * La tarjeta ocupa menos que el ancho del track.
   * Así queda visible una franja de la siguiente nota.
   */
  grid-auto-columns: minmax(210px, 82%);

  gap: 12px;

  overflow-x: auto;
  overflow-y: hidden;

  padding: 2px 2px 12px;

  overscroll-behavior-inline: contain;

  scroll-snap-type: inline mandatory;
  scroll-behavior: smooth;

  -webkit-overflow-scrolling: touch;

  /*
   * Permite deslizar con el dedo. El JS agrega
   * arrastre con mouse para escritorio.
   */
  touch-action: pan-x;
  cursor: grab;

  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tc-drawer__blog-track::-webkit-scrollbar {
  display: none;
}

.tc-drawer__blog-track.is-dragging {
  cursor: grabbing;

  scroll-snap-type: none;

  user-select: none;
}

/*
|--------------------------------------------------------------------------
| TARJETAS DEL CARRUSEL
|--------------------------------------------------------------------------
*/

.tc-drawer__blog-card {
  min-width: 0;
  scroll-snap-align: start;
}

.tc-drawer__blog-card > a {
  display: flex;
  flex-direction: column;

  height: 100%;

  overflow: hidden;

  color: var(--tc-drawer-text);

  border: 1px solid var(--tc-drawer-border);
  border-radius: 17px;

  background: rgba(255, 255, 255, .045);

  text-decoration: none;

  transition:
    transform .2s ease,
    border-color .2s ease,
    background .2s ease;
}

.tc-drawer__blog-card > a:hover,
.tc-drawer__blog-card > a:focus-visible {
  border-color: rgba(255, 255, 255, .23);
  background: rgba(255, 255, 255, .07);
  transform: translateY(-2px);
}

.tc-drawer__blog-card img {
  display: block;

  width: 100%;

  aspect-ratio: 16 / 9;

  object-fit: cover;
  object-position: center;
}

.tc-drawer__blog-card-copy {
  display: flex;
  flex: 1;
  flex-direction: column;

  padding: 13px;
}

.tc-drawer__blog-card-copy strong {
  display: -webkit-box;

  overflow: hidden;

  color: #fff;

  font-size: .98rem;
  line-height: 1.18;

  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.tc-drawer__blog-card-copy small {
  margin-top: auto;
  padding-top: 10px;
}

/*
|--------------------------------------------------------------------------
| PIE
|--------------------------------------------------------------------------
*/

.tc-drawer__footer {
  margin-top: 34px;
  padding-top: 24px;

  border-top: 1px solid var(--tc-drawer-border);
}

.tc-drawer__footer-logo-link {
  position: relative;

  display: block;

  width: var(--tc-drawer-footer-logo-width);
  height: var(--tc-drawer-footer-logo-height);

  margin-inline: auto;

  overflow: hidden;

  color: inherit;
  text-decoration: none;
}

.tc-drawer__footer-logo {
  position: absolute;
  top: 0;
  left: 50%;

  display: block;

  width: var(--tc-drawer-footer-logo-width);
  height: auto;
  max-width: none;

  filter: brightness(0) invert(1);

  transform:
    translate(
      -50%,
      var(--tc-drawer-footer-logo-crop-y)
    );
}

.tc-drawer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;

  gap: 7px 16px;

  margin-top: 13px;

  color: rgba(255, 250, 244, .48);

  font-size: .72rem;
  line-height: 1.35;
}

.tc-drawer__legal strong {
  color: rgba(255, 250, 244, .72);
  font-weight: 750;
}

/*
|--------------------------------------------------------------------------
| MÓVIL
|--------------------------------------------------------------------------
*/

@media (max-width: 620px) {
  :root {
    --tc-drawer-footer-logo-width: 142px;
    --tc-drawer-footer-logo-height: 36px;
    --tc-drawer-footer-logo-crop-y: -58px;
  }

  button.tc-drawer__toggle {
    top: max(12px, env(safe-area-inset-top));
    left: max(12px, env(safe-area-inset-left));

    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
    max-width: 46px;
    max-height: 46px;
  }

  button.tc-drawer__toggle span {
    width: 21px;
    height: 2px;
  }

  .tc-drawer__panel {
    width: min(430px, 96vw);
  }

  .tc-drawer__inner {
    padding-inline: 20px;
  }

  .tc-drawer__brand {
    width: min(218px, calc(100% - 64px));
  }

  .tc-drawer__blog-track {
    grid-auto-columns: minmax(205px, 86%);
  }

  .tc-drawer__recent::before,
  .tc-drawer__recent::after {
    width: 28px;
  }
}

/*
|--------------------------------------------------------------------------
| MOVIMIENTO REDUCIDO
|--------------------------------------------------------------------------
*/

@media (prefers-reduced-motion: reduce) {
  .tc-drawer__panel,
  .tc-drawer__backdrop,
  .tc-drawer__inner,
  .tc-drawer__nav-link,
  .tc-drawer__submit-link,
  .tc-drawer__featured-card,
  .tc-drawer__blog-card > a,
  button.tc-drawer__toggle,
  button.tc-drawer__close {
    transition: none !important;
  }

  .tc-drawer__blog-track {
    scroll-behavior: auto !important;
  }
}