*,
*::before,
*::after {
  box-sizing: border-box;
}

@font-face {
  font-family: "Spooky Whisper";
  src: url("../fonts/Spooky%20Whisper.woff") format("woff");
  font-display: swap;
}

:root {
  --bg: #17161b;
  --text: #000000;
  --brand: #9c1216;
  --buy: #9c1216;
  --buy-hv: #ff6a80;
  --buyText: #ffffff;
  --maxw: 1200px;
  --teleticket-roboto:
    "Roboto", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell,
    Noto Sans, "Helvetica Neue", Arial, sans-serif;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--teleticket-roboto);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.tlk-teleticket-wrap {
  position: relative;
  isolation: isolate;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(16px, 3vw, 28px);
}

.tlk-teleticket-filter-row::before,
.tlk-teleticket-filter-row::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  width: 100vw;
  height: clamp(28px, 4vw, 38px);
  background-position: left center;
  background-repeat: no-repeat;
  background-size: clamp(40px, 6vw, 56px) auto;
  opacity: 0.9;
  pointer-events: none;
  transform: translateX(-50%);
}

.tlk-teleticket-filter-row::before {
  top: 4px;
  background-image: url("../images/murcielago-1.png");
  animation: tlk-bat-cross-forward 18s linear infinite;
}

.tlk-teleticket-filter-row::after {
  top: calc(100% - 40px);
  background-position: right center;
  background-image: url("../images/murcielago-2.png");
  animation: tlk-bat-cross-back 22s linear -8s infinite;
}

.tlk-teleticket-filters,
.tlk-teleticket-grid {
  position: relative;
  z-index: 1;
}

@keyframes tlk-bat-cross-forward {
  from {
    background-position: left center;
  }

  to {
    background-position: right center;
  }
}

@keyframes tlk-bat-cross-back {
  from {
    background-position: right center;
  }

  to {
    background-position: left center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tlk-teleticket-filter-row::before,
  .tlk-teleticket-filter-row::after {
    animation: none;
  }

  .tlk-teleticket-filter-row::before {
    background-position: 20% center;
  }

  .tlk-teleticket-filter-row::after {
    background-position: 80% center;
  }
}

/* ===== FILTROS (bg real en ::before, overlay en ::after) ===== */
.tlk-teleticket-filters {
  position: relative;
  border-radius: 18px;
  overflow: visible;
  margin-bottom: 26px;
  isolation: isolate;
}

.tlk-teleticket-filters::before {
  content: "";
  position: absolute;
  inset: 0;
  /* background: var(--bg-url, #2a2a2a) center/cover no-repeat; */
  z-index: -2;
}

.tlk-teleticket-filters::after {
  content: "";
  position: absolute;
  inset: 0;
  /* background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, .55) 100%); */
  z-index: -1;
}

.tlk-teleticket-filter-row {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 18px 20px;
}

.tlk-teleticket-btn {
  appearance: none;
  border: 0;
  border-radius: 0;
  padding: 30px 8px 18px;
  min-width: 125px;
  width: 155px;
  aspect-ratio: 9 / 10;
  height: auto;
  background: url("../images/filtro-tumba.png") center / 100% 100% no-repeat;
  color: #ffffff;
  font-family: var(--teleticket-roboto);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.15;
  white-space: normal;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: transform 0.22s ease, filter 0.22s ease;
  filter: none;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.7);
}

.tlk-teleticket-btn span {
  display: inline-block;
  max-width: 165px;
  font-family: "Spooky Whisper", var(--teleticket-roboto);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.95;
  overflow-wrap: anywhere;
  transform: rotate(-24deg);
}

.tlk-teleticket-btn:focus {
  outline: none;
}

.tlk-teleticket-btn[aria-pressed="true"],
.tlk-teleticket-btn:focus-visible {
  z-index: 1;
  transform: scale(1.06);
  filter: drop-shadow(8px 8px 0 rgba(0, 0, 0, 0.9));
}

@media (hover: hover) and (pointer: fine) {
  .tlk-teleticket-btn:hover {
    z-index: 2;
    transform: scale(1.06);
  }
}

.tlk-teleticket-btn[data-filter="conciertos"],
.tlk-teleticket-btn[data-filter="teatro"],
.tlk-teleticket-btn[data-filter="entretenimiento"],
.tlk-teleticket-btn[data-filter="todos"] {
  color: #ffffff;
}

/* ===== GRID ===== */
.tlk-teleticket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  align-items: stretch;
}

.tlk-teleticket-col {
  display: flex;
  min-width: 0;
}

/* ===== EVENT CARD ===== */
.tlk-teleticket-card {
  position: relative;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  background: #101014;
  border: 0;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  width: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tlk-teleticket-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.36);
}

.tlk-teleticket-image-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  overflow: hidden;
  background: #17151c;
}

.tlk-teleticket-image-link {
  position: absolute;
  inset: 0;
  display: block;
}

.tlk-teleticket-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

.tlk-teleticket-card:hover .tlk-teleticket-img {
  transform: scale(1.035);
}

.tlk-teleticket-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  color: #fff;
  background: linear-gradient(180deg, rgba(5, 4, 10, 0.5) 0%, transparent 38%, rgba(5, 4, 10, 0.24) 52%, rgba(5, 4, 10, 0.9) 100%);
  pointer-events: none;
}

.tlk-teleticket-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.tlk-teleticket-title {
  margin: 0;
  max-width: 72%;
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.08;
  min-width: 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
}

.tlk-teleticket-title span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tlk-teleticket-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
}

.tlk-teleticket-date {
  flex: 0 0 auto;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.05;
  white-space: nowrap;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.tlk-teleticket-venue {
  flex: 1 1 auto;
  max-width: 52%;
  min-width: 0;
  text-align: right;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.18;
  overflow: hidden;
  white-space: nowrap;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.tlk-teleticket-venue .tlk-teleticket-track {
  width: max-content;
  flex: 0 0 auto;
  white-space: nowrap;
}

.tlk-teleticket-venue .tlk-teleticket-track span {
  flex: 0 0 auto;
}

.tlk-teleticket-discount-row {
  display: flex;
  flex: 0 0 auto;
  margin: -24px -24px 0 0;
}

.tlk-teleticket-badge {
  background: #54219a;
  color: #fff;
  padding: 10px 14px;
  border-radius: 0;
  font-weight: 800;
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
}

.tlk-teleticket-buy {
  width: 100%;
  min-height: 54px;
  background: #ff1744;
  color: #fff;
  letter-spacing: 0;
  padding: 12px 18px;
  border-radius: 12px;
  border: 0;
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.tlk-teleticket-buy:hover {
  transform: translateY(-2px);
  background: #ff3b61;
}

/* ===== Fondos por tipo con CSS var ===== */
.bg-todos {
  /* --bg-url: url("../images/barra-todos.jpg"); */
  /* From https://css.glass */
  /* From https://css.glass */
border-radius: 16px;
backdrop-filter: blur(14.1px);
-webkit-backdrop-filter: blur(14.1px);
}

.bg-conciertos {
  /* --bg-url: url("../images/barra-conciertos.jpg"); */
  /* From https://css.glass */
  /* From https://css.glass */
border-radius: 16px;
backdrop-filter: blur(14.1px);
-webkit-backdrop-filter: blur(14.1px);
}

.bg-navidad {
  /* --bg-url: url("../images/barra-navidad.jpg"); */
}

.bg-entretenimiento {
  /* --bg-url: url("../images/barra-entretenimiento.jpg"); */
}

/* ===== Marquee estilo Spotify (loop infinito, sin "...") ===== */
.tlk-teleticket-scroll {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(
    90deg,
    transparent 0 6px,
    #000 24px calc(100% - 24px),
    transparent calc(100% - 6px)
  );
}

.tlk-teleticket-track {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  will-change: transform;
  animation: tlk-teleticket-loop var(--d, 12s) linear infinite;
}

@keyframes tlk-teleticket-loop {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tlk-teleticket-venue .tlk-teleticket-track {
    animation: none;
  }

  .tlk-teleticket-venue .tlk-teleticket-track span:not(:first-child) {
    display: none;
  }
}

/* === MOBILE: el botón mantiene tamaño, el texto se adapta === */
@media (max-width: 768px) {
  .tlk-teleticket-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .tlk-teleticket-card-overlay {
    padding: 16px;
  }

  .tlk-teleticket-card-heading {
    gap: 10px;
  }

  .tlk-teleticket-title {
    font-size: 23px;
  }

  .tlk-teleticket-date {
    font-size: 20px;
  }

  .tlk-teleticket-venue {
    font-size: 14px;
  }

  .tlk-teleticket-discount-row {
    margin: -16px -16px 0 0;
  }

  .tlk-teleticket-badge {
    min-width: 72px;
    padding: 9px 10px;
    font-size: 18px;
  }

  .tlk-teleticket-buy {
    min-height: 48px;
    font-size: 18px;
  }

  /* 2 botones por fila */
  .tlk-teleticket-filter-row {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    width: 100%;
  }

  /* Botones con tamaño fijo y texto que se ajusta */
  .tlk-teleticket-btn {
    min-width: 0 !important; /* evita que el texto fuerce el tamaño */
    width: min(100%, 145px) !important;
    max-width: 145px;
    justify-self: center;
    height: auto;
    aspect-ratio: 9 / 10;

    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 6px 18px;

    white-space: normal;
    font-size: 16px;
    overflow: visible;
    text-overflow: clip;
  }
}
