/* ==========================================================================
   «Где проходят концерты» и страница площадки
   ========================================================================== */

.venues {
  --v-navy: #0e375e;
  --v-orange: #e59814;
  --v-peach: #f2c98a;
  --v-peach-light: #fdf3e3;
  --v-muted: #8a96a8;
  --v-border: #e3e8ef;
  --v-font-bold: var(--wp--preset--font-family--crc-65), sans-serif;
  --v-font-medium: var(--wp--preset--font-family--crc-55), sans-serif;
  --v-font-light: var(--wp--preset--font-family--crc-35), sans-serif;

  color: var(--v-navy);
  font-family: var(--v-font-light);
  padding: 40px 0 80px;
}

.venues *,
.venues *::before,
.venues *::after {
  box-sizing: border-box;
}

.venues__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.venues__title {
  margin: 0 0 32px;
  font-family: var(--v-font-bold);
  font-weight: 400;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--v-navy);
}

/* --- Две колонки городов --- */

.venues__cities {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.venues-city__cover {
  position: relative;
  aspect-ratio: 16 / 10;
  margin-bottom: 20px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--v-navy);
}

.venues-city__cover.is-placeholder {
  background:
    radial-gradient(circle at 80% 20%, rgba(242, 201, 138, 0.55), transparent 55%),
    linear-gradient(135deg, #0e375e 0%, #1d5a8f 100%);
}

.venues-city__photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.venues-city__cover:not(.is-placeholder)::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(14, 55, 94, 0.75), transparent 55%);
}

.venues-city__name {
  position: absolute;
  left: 24px;
  bottom: 20px;
  z-index: 1;
  margin: 0;
  font-family: var(--v-font-bold);
  font-weight: 400;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.1;
  text-transform: uppercase;
  color: #fff;
}

.venues-city__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.venues-city__empty {
  font-size: 18px;
}

.venue-link {
  display: grid;
  grid-template-columns: 64px 1fr 20px;
  align-items: center;
  gap: 16px;
  padding: 12px 16px 12px 12px;
  border: 1px solid var(--v-border);
  border-radius: 16px;
  background: #fff;
  color: var(--v-navy);
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.venue-link:hover {
  border-color: var(--v-peach);
  box-shadow: 0 6px 24px rgba(14, 55, 94, 0.08);
}

.venue-link__thumb {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--v-peach-light);
}

.venue-link__thumb.is-placeholder {
  background:
    radial-gradient(circle at 50% 42%, var(--v-orange) 0 7px, transparent 8px),
    var(--v-peach-light);
}

.venue-link__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.venue-link__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.venue-link__name {
  font-family: var(--v-font-bold);
  font-size: 19px;
  line-height: 1.2;
}

.venue-link__address {
  font-size: 15px;
  line-height: 1.3;
  color: var(--v-muted);
}

.venue-link__arrow {
  width: 12px;
  height: 12px;
  border-top: 2.5px solid var(--v-orange);
  border-right: 2.5px solid var(--v-orange);
  transform: rotate(45deg);
}

.venues-city__afisha {
  font-family: var(--v-font-medium);
  font-size: 17px;
  color: var(--v-orange);
  text-underline-offset: 3px;
}

/* --- Страница площадки --- */

.venue__back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-family: var(--v-font-medium);
  font-size: 16px;
  color: var(--v-navy);
  text-decoration: none;
}

.venue__back::before {
  content: "";
  width: 9px;
  height: 9px;
  border-left: 2.5px solid var(--v-orange);
  border-bottom: 2.5px solid var(--v-orange);
  transform: rotate(45deg);
}

.venue__head {
  margin-bottom: 24px;
}

.venue__city {
  margin: 0 0 8px;
  font-family: var(--v-font-medium);
  font-size: 16px;
  text-transform: uppercase;
  color: var(--v-orange);
}

.venue__title {
  margin-bottom: 8px;
  font-size: clamp(24px, 2.6vw, 34px);
}

.venue__address {
  margin: 0;
  font-size: 20px;
}

.venue__gallery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-auto-rows: 200px;
  gap: 12px;
  margin-bottom: 40px;
}

.venue__photo {
  display: block;
  border-radius: 16px;
  overflow: hidden;
}

.venue__photo:first-child {
  grid-row: span 2;
}

.venue__gallery.is-single {
  grid-template-columns: 1fr;
  grid-auto-rows: 420px;
}

.venue__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.venue__photo:hover img {
  transform: scale(1.03);
}

.venue__gallery-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 260px;
  margin-bottom: 40px;
  border: 2px dashed var(--v-peach);
  border-radius: 20px;
  background: var(--v-peach-light);
  font-family: var(--v-font-medium);
  font-size: 18px;
  color: var(--v-muted);
}

.venue__info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 48px;
}

.venue__subtitle {
  margin: 0 0 16px;
  font-family: var(--v-font-bold);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--v-navy);
}

.venue__text {
  margin: 0 0 24px;
  font-size: 18px;
  line-height: 1.55;
}

.venue__text p {
  margin: 0 0 1em;
}

.venue__text--placeholder {
  color: var(--v-muted);
}

.venue__route {
  padding: 10px 28px !important;
  font-size: 18px;
}

.venue__map {
  min-height: 360px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--v-peach-light);
}

.venue__map iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
}

.venue__concert-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.venue-concert {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid var(--v-border);
  border-radius: 16px;
  color: var(--v-navy);
  text-decoration: none;
  transition: border-color 0.2s;
}

.venue-concert:hover {
  border-color: var(--v-peach);
}

.venue-concert__date {
  font-family: var(--v-font-bold);
  font-size: 17px;
  color: var(--v-orange);
}

.venue-concert__name {
  font-family: var(--v-font-medium);
  font-size: 17px;
  line-height: 1.3;
}

/* --- Фото крупно поверх страницы --- */

.lightbox-open,
.lightbox-open body {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000000; /* выше липкой шапки сайта (9999999) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 72px;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 30, 50, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox__img {
  position: relative;
  display: block;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  will-change: transform, opacity;
  touch-action: pan-y;
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  object-fit: contain;
  user-select: none;
}

.lightbox button {
  position: absolute;
  z-index: 1;
  opacity: 0;
  transform: scale(0.8);
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: background-color 0.2s, opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s;
}

.lightbox.is-open button {
  opacity: 1;
  transform: none;
}

.lightbox button:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox.is-open .lightbox__arrow--prev:hover {
  transform: translateX(-3px);
}

.lightbox.is-open .lightbox__arrow--next:hover {
  transform: translateX(3px);
}

.lightbox button[hidden] {
  display: none;
}

.lightbox__close {
  top: 12px;
  right: 12px;
}

.lightbox__close::before,
.lightbox__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 2.5px;
  background: #fff;
  transform: translate(-50%, -50%) rotate(45deg);
}

.lightbox__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.lightbox__arrow {
  top: 50%;
  margin-top: -24px;
}

.lightbox__arrow--prev {
  left: 12px;
}

.lightbox__arrow--next {
  right: 12px;
}

.lightbox__arrow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border-left: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: translate(-30%, -50%) rotate(45deg);
}

.lightbox__arrow--next::before {
  transform: translate(-70%, -50%) rotate(-135deg);
}

.lightbox__counter {
  position: absolute;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease 0.15s;
  bottom: 16px;
  left: 0;
  right: 0;
  margin: 0;
  font-family: var(--wp--preset--font-family--crc-55), sans-serif;
  font-size: 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
}

.lightbox.is-open .lightbox__counter {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .lightbox button,
  .lightbox__counter {
    transition: none;
  }
}

@media (max-width: 720px) {
  .lightbox {
    padding: 64px 8px;
  }

  .lightbox__arrow {
    top: auto;
    bottom: 8px;
    margin-top: 0;
  }
}

/* --- Адаптив --- */

@media (max-width: 900px) {
  .venue__info {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .venues {
    padding-top: 24px;
  }

  .venues__container {
    padding: 0 16px;
  }

  .venues__title {
    margin-bottom: 24px;
  }

  /* На телефоне города идут друг под другом */
  .venues__cities {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .venues-city__name {
    left: 16px;
    bottom: 14px;
  }

  .venue-link {
    grid-template-columns: 52px 1fr 16px;
    gap: 12px;
  }

  .venue-link__thumb {
    width: 52px;
    height: 52px;
  }

  .venue-link__name {
    font-size: 17px;
  }

  .venue__gallery {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 140px;
  }

  .venue__photo:first-child {
    grid-column: span 2;
    grid-row: span 2;
  }

  .venue__gallery.is-single {
    grid-template-columns: 1fr;
    grid-auto-rows: 240px;
  }

  .venue__gallery.is-single .venue__photo:first-child {
    grid-column: auto;
    grid-row: auto;
  }

  .venue__map,
  .venue__map iframe {
    min-height: 300px;
  }

  .venue-concert {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
