/**
 * Баннеры на всю ширину окна: вне .container (block page_full_bleed) или breakout внутри контента.
 */

html,
body {
  overflow-x: clip;
}

main {
  overflow-x: visible;
}

.container.content-wrap {
  overflow-x: visible;
  max-width: 1360px;
}

/* Прямые потомки main — на всю ширину viewport */
main > .hero-banner,
main > .pub-hero,
main > .role-hero,
main > .adventure-cover-header,
main > .adventure-hero-placeholder,
main > .second-banner,
main > .second-banner-link,
main > .guide-banner,
main > .page-bleed-strip > .hero-banner,
main > .page-bleed-strip > .pub-hero,
main > .page-bleed-strip > .role-hero,
main > .page-bleed-strip > .adventure-cover-header,
main > .page-bleed-strip > .adventure-hero-placeholder,
main > .page-bleed-strip > .second-banner,
main > .page-bleed-strip > a.second-banner-link {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  border-radius: 0;
  box-sizing: border-box;
}

main > a.second-banner-link {
  display: block;
}

/* Внутри контейнера — выход на края окна */
.page-bleed-breakout {
  width: 100vw;
  max-width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 22px;
  box-sizing: border-box;
}

.page-bleed-breakout > .second-banner,
.page-bleed-breakout > a.second-banner-link,
.page-bleed-breakout > .hero-banner,
.page-bleed-breakout > .pub-hero,
.page-bleed-breakout > .role-hero {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  border-radius: 0;
}

.hero-banner,
.pub-hero,
.role-hero,
.adventure-cover-header,
.adventure-hero-placeholder,
.second-banner {
  min-height: var(--banner-min-height, 420px);
  height: var(--banner-height, min(80vh, calc(100svw * 9 / 16)));
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
}

.pub-hero--landscape,
.role-hero--landscape {
  min-height: var(--banner-min-height, 420px);
  height: var(--banner-height, min(80vh, calc(100svw * 9 / 16)));
}

.adventure-cover-header {
  margin-bottom: 22px;
  z-index: 1;
  background: #0f172a;
}

.adventure-cover-header img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.adventure-hero-placeholder {
  margin-bottom: 22px;
  z-index: 1;
  background: linear-gradient(120deg, #0f172a, #1f2937);
}

@media (max-width: 720px) {
  .hero-banner,
  .pub-hero,
  .role-hero,
  .adventure-cover-header,
  .adventure-hero-placeholder,
  .second-banner {
    min-height: var(--banner-min-height, 240px) !important;
    height: var(--banner-height, 34vh) !important;
  }

  .adventure-cover-overlay {
    padding: calc(var(--header-clearance, 118px) + env(safe-area-inset-top, 0px)) 12px 8px;
  }

  .adventure-cover-copy {
    max-width: 100%;
  }

  .adventure-cover-status {
    top: 10px;
    right: 12px;
    font-size: 14px;
    white-space: normal;
  }

  .cover-header-edit-btn {
    top: calc(var(--header-clearance, 118px) + env(safe-area-inset-top, 0px) - 42px);
    right: 12px;
    font-size: 12px;
  }

  .adventure-cover-overlay .pub-hero-cta-row {
    flex-direction: row;
    width: 100%;
    gap: 0;
    padding-top: 4px;
    margin-top: auto;
  }
}

.adventure-cover-overlay a.pub-hero-cta-link,
.adventure-cover-overlay a.pub-hero-cta-link:hover,
.adventure-cover-overlay a.pub-hero-cta-link:focus,
.adventure-cover-overlay a.pub-hero-cta-link:visited,
.adventure-cover-overlay button.pub-hero-cta-link,
.adventure-cover-overlay button.pub-hero-cta-link:hover,
.adventure-cover-overlay button.pub-hero-cta-link:focus {
  text-decoration: none;
}

/* Баннерные CTA: actions.css не должен превращать submit-кнопки в подчёркнутые inline-flex */
.pub-hero-copy button.pub-hero-cta-link,
.pub-hero-copy button.pub-hero-cta-submit,
.adventure-cover-overlay button.pub-hero-cta-link,
.adventure-cover-overlay button.pub-hero-cta-submit,
.pub-hero-cta-form button[type="submit"].pub-hero-cta-link {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 10px 4px 2px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: left !important;
  text-decoration: none !important;
  text-underline-offset: unset !important;
  color: #fff !important;
  font: inherit !important;
  font-weight: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
  letter-spacing: normal !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  white-space: normal !important;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.pub-hero-copy button.pub-hero-cta-link:hover,
.pub-hero-copy button.pub-hero-cta-link:focus,
.pub-hero-copy button.pub-hero-cta-submit:hover,
.pub-hero-copy button.pub-hero-cta-submit:focus,
.adventure-cover-overlay button.pub-hero-cta-link:hover,
.adventure-cover-overlay button.pub-hero-cta-link:focus,
.adventure-cover-overlay button.pub-hero-cta-submit:hover,
.adventure-cover-overlay button.pub-hero-cta-submit:focus,
.pub-hero-cta-form button[type="submit"].pub-hero-cta-link:hover,
.pub-hero-cta-form button[type="submit"].pub-hero-cta-link:focus {
  color: #fff !important;
  text-decoration: none !important;
  background: transparent !important;
}

.pub-hero-cta-link .pub-hero-cta-title,
.pub-hero-cta-link .pub-hero-cta-subtitle,
button.pub-hero-cta-link .pub-hero-cta-title,
button.pub-hero-cta-link .pub-hero-cta-subtitle {
  display: block !important;
  width: 100% !important;
  text-decoration: none !important;
  text-underline-offset: unset !important;
}

button.pub-hero-cta-link .pub-hero-cta-title,
.pub-hero-cta-form button .pub-hero-cta-title {
  font-size: 30px !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
  color: #fff !important;
}

button.pub-hero-cta-link .pub-hero-cta-subtitle,
.pub-hero-cta-form button .pub-hero-cta-subtitle {
  font-size: 18px !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  margin-top: 2px !important;
  color: rgba(255, 255, 255, 0.88) !important;
}

.pub-hero--event-page .pub-hero-cta-form button[type="submit"],
.pub-hero--event-page button.pub-hero-cta-link,
.pub-hero--event-page button.pub-hero-cta-submit {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  color: #fff !important;
  text-decoration: none !important;
}

/* Событие: button.cta-link в ряду — как ссылки на главной */
.pub-hero-copy button.cta-link,
.pub-hero--event-page button.cta-link {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 10px 4px 2px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: left !important;
  text-decoration: none !important;
  color: #fff !important;
  font: inherit !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  white-space: normal !important;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.pub-hero--event-page button.cta-link .cta-link-title {
  font-size: 30px !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
  color: #fff !important;
}

.pub-hero--event-page .pub-hero-cta-form button[type="submit"]:hover,
.pub-hero--event-page .pub-hero-cta-form button[type="submit"]:focus,
.pub-hero--event-page button.pub-hero-cta-link:hover,
.pub-hero--event-page button.pub-hero-cta-link:focus,
.pub-hero--event-page button.pub-hero-cta-submit:hover,
.pub-hero--event-page button.pub-hero-cta-submit:focus,
.pub-hero--event-page .pub-hero-cta-title:hover,
.pub-hero--event-page .pub-hero-cta-subtitle:hover {
  color: #fff !important;
  text-decoration: none !important;
}

@media (max-width: 720px) {
  .pub-hero-copy button.pub-hero-cta-link,
  .pub-hero-copy button.pub-hero-cta-submit,
  .adventure-cover-overlay button.pub-hero-cta-link,
  .adventure-cover-overlay button.pub-hero-cta-submit,
  .pub-hero-cta-form button[type="submit"].pub-hero-cta-link {
    padding: 1px 0 0 !important;
  }

  button.pub-hero-cta-link .pub-hero-cta-title,
  .pub-hero-cta-form button .pub-hero-cta-title {
    font-size: clamp(9px, 2.8vw, 11px) !important;
    letter-spacing: -0.02em !important;
  }

  button.pub-hero-cta-link .pub-hero-cta-subtitle,
  .pub-hero-cta-form button .pub-hero-cta-subtitle {
    font-size: clamp(8px, 2.4vw, 11px) !important;
  }

  .pub-hero-copy button.cta-link,
  .pub-hero--event-page button.cta-link {
    padding: 1px 0 0 !important;
  }

  .pub-hero--event-page .cta-link--static .cta-link-title,
  .pub-hero--event-page a.cta-link .cta-link-title,
  .pub-hero--event-page button.cta-link .cta-link-title {
    font-size: clamp(9px, 2.8vw, 11px) !important;
    font-weight: 900 !important;
    letter-spacing: -0.02em !important;
    line-height: 1.1 !important;
  }
}
