/* Preserve the supplied layout while keeping CMS cards independently editable. */
html, body { overflow-x: clip; }
.journey, .excursion-card { position: relative; max-width: none; width: 100%; min-width: 0; }
.card-destination {
  position: absolute;
  inset: 0;
  z-index: 2;
  color: transparent;
  font-size: 0;
  border-radius: inherit;
}
.card-destination:focus-visible { outline: 3px solid #2586ba; outline-offset: -3px; }
.journeys .journey-grid > .journey:nth-child(3n of [data-item]) { grid-column: 1 / -1; }
.journeys .journey-grid > .journey:nth-child(3n of [data-item]) .image-frame { height: 375px; }
.ec-editing .card-destination {
  inset: 8px 8px auto auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #176c97;
  color: white;
  font-size: 22px;
}
.ec-editing .journey, .ec-editing .about-copy { animation: none; }
.ec-editing .partner-track { animation: none; transform: none; width: 100%; flex-wrap: wrap; }
.ec-editing .journey .image-frame::after { pointer-events: none; }
.ec-editing .journey-caption { z-index: 1; }
.form-consent { display: block; line-height: 1.5; }
.form-consent input[type="checkbox"] { display: inline-block; width: 18px; height: 18px; margin: 0 8px 0 0; vertical-align: middle; }
@media (max-width: 700px) {
  .journeys .journey-grid > .journey:nth-child(3n of [data-item]) { grid-column: 1 / -1; }
  .journeys .journey-grid > .journey:nth-child(3n of [data-item]) .image-frame { height: 340px !important; }
}

.photo-credit { margin: 8px auto 0; font-size: 11px; line-height: 1.5; color: #63747b; }
@media (max-width: 700px) {
  .journeys .journey-grid { grid-template-columns: 1.65fr 1fr !important; gap: 14px !important; }
  .journeys .journey .image-frame { height: 236px !important; }
  .journeys .journey-caption { left: 18px; right: 12px; bottom: 18px; }
}

@media (max-width: 700px) {
  .header > .menu {
    position: relative;
    z-index: 61;
    min-width: 44px;
    min-height: 44px;
    touch-action: manipulation;
  }
  .header nav { padding-top: 84px !important; }
}

.partner-item { position: relative; }
.ec-editing .partner-track { gap: 20px; }
.ec-editing .partner-item { padding-top: 56px; }

.review-avatar { position: relative; overflow: hidden; }
.review-avatar-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

.tour-catalog { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
.tour-catalog-card { overflow:hidden; border-radius:16px; padding-bottom:20px; }
.tour-catalog-card .image-frame { height:240px; overflow:hidden; }
.tour-catalog-card .image-frame img { width:100%; height:100%; object-fit:cover; }
.tour-catalog-card h2 { font-size:24px; line-height:1.2; margin:18px 16px 12px; }
.tour-catalog-card p { margin:0 16px; }
.tour-gallery { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin:32px 0; }
.tour-gallery figure { margin:0; min-width:0; }
.tour-gallery img { width:100%; height:240px; object-fit:cover; border-radius:12px; }
@media(max-width:1000px){.tour-catalog{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:700px){.tour-catalog{grid-template-columns:1fr;}.tour-gallery{grid-template-columns:1fr;}.journeys .journey h3{font-size:18px!important;line-height:1.15;overflow-wrap:anywhere;}}

/* Separate partner link editing from collection controls. */
.ec-editing .partner-item { padding-top:112px; }
.ec-editing .partner-item .card-destination { inset:56px 12px auto 12px; width:auto; height:44px; font-size:0; }
.ec-editing .partner-item .card-destination::after { content:"Изменить ссылку"; font-size:14px; }
.tour-catalog-card h2 { letter-spacing:-0.025em; }
/* Preserve initials for reviews that saved the previous placeholder URL. */
.review-avatar-photo[src="assets/avatar-empty.png"] { opacity: 0; }

/* A long route summary must never float over the article while scrolling. */
.article-layout > aside {
  position: static !important;
  top: auto !important;
  bottom: auto !important;
  transform: none !important;
  align-self: start;
  min-width: 0;
}
.article-layout > article { min-width: 0; }
.tour-facts p { margin: 0 0 18px; line-height: 1.55; overflow-wrap: anywhere; }
.tour-facts strong { color: var(--ink); font-weight: 600; }
.tour-photo { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 12px; }
.tour-photo:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.tour-photo img { display: block; }
.tour-lightbox { width: min(1100px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 16px; border: 0; border-radius: 16px; background: white; color: var(--ink); }
.tour-lightbox::backdrop { background: rgb(13 29 38 / 85%); }
.tour-lightbox-image { display: block; width: 100%; height: min(72dvh, 900px); object-fit: contain; }
.tour-lightbox-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; }
.tour-lightbox button { min-width: 44px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); cursor: pointer; font: inherit; }
.tour-lightbox-count { font-size: 13px; margin-right: auto; }
@media (max-width: 700px) {
  .article-layout > aside { border-radius: 0; }
  .tour-lightbox-controls { gap: 6px; flex-wrap: wrap; }
  .tour-lightbox button { padding: 8px 10px; }
}

/* The hero is a static composition in public, reduced-motion and edit modes. */
.journeys .journey h3 {
    line-height: 1.2;
    overflow-wrap: break-word;
    word-break: normal;
}

/* Desktop navigation and partner layout. */
@media (min-width: 1101px) {
    .header { gap: 24px; }
    .header .brand { flex-shrink: 0; }
    .header .brand img { width: clamp(126px, 11vw, 160px); height: auto; max-height: 90px; }
    .header nav {
        position: static;
        inset: auto;
        transform: none;
        display: flex;
        flex: 1 1 auto;
        justify-content: center;
        align-items: center;
        gap: clamp(14px, 1.8vw, 32px);
        width: auto;
        min-width: 0;
        margin: 0;
        padding: 0;
    }
    .header nav > a {
        display: inline-flex;
        align-items: center;
        flex: 0 0 auto;
        min-height: 44px;
        margin: 0;
        padding: 0;
        white-space: nowrap;
        font-size: clamp(13px, 1.05vw, 16px);
    }
    .header .header-link {
        flex: 0 0 auto;
        margin: 0;
        font-size: clamp(14px, 1.2vw, 18px);
    }
    .hero-description { max-width: 470px; margin-left: 28px; }
    .partners { display: block; }
    .partners > .eyebrow {
        width: auto;
        max-width: none;
        margin: 0 0 16px;
        text-align: left;
    }
    .partners > h2 { margin: 0 0 32px; }
    .partners .partner-carousel {
        width: 100%;
        max-width: none;
        min-width: 0;
        overflow: visible;
        mask-image: none;
        -webkit-mask-image: none;
    }
    .partners .partner-track {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 24px;
        width: 100%;
        animation: none !important;
        transform: none !important;
    }
    .partners .partner-track > [data-item] {
        width: auto;
        min-width: 0;
        max-width: none;
        min-height: 220px;
        margin: 0;
        flex: none;
    }
    .partners .partner-track > [data-partner-copy] { display: none !important; }
}


/* Tablet navigation. */
@media (min-width: 701px) and (max-width: 1100px) {
    .journeys .journey-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .journeys .journey h3 {
        font-size: clamp(23px, 2.6vw, 27px);
    }
    .header {
        width: calc(100% - 48px);
        height: 76px;
        gap: 16px;
        padding: 0;
    }
    .header .brand {
        flex-shrink: 0;
        margin-right: auto;
    }
    .header .brand img {
        width: 120px;
        height: 64px;
    }
    .header .header-link {
        margin: 0 8px 0 auto;
        font-size: 15px;
    }
    .header .header-link small {
        font-size: 7px;
        letter-spacing: .8px;
    }
    .header .menu {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 44px;
        height: 44px;
        padding: 10px;
        border: 0;
        background: none;
        position: relative;
        z-index: 70;
    }
    .header .menu .burger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        width: 24px;
        height: 16px;
    }
    .header .menu .burger span {
        display: block;
        position: static;
        width: 24px;
        height: 2px;
        flex-shrink: 0;
        background: var(--ink, #14212a);
        transform: none;
        opacity: 1;
    }
    .header .menu[aria-expanded="true"] .burger span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .header .menu[aria-expanded="true"] .burger span:nth-child(2) {
        opacity: 0;
    }
    .header .menu[aria-expanded="true"] .burger span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
    .header nav {
        display: none !important;
        position: fixed !important;
        inset: 0 0 0 auto !important;
        transform: none !important;
        width: min(360px, 86vw);
        height: 100dvh;
        max-height: 100dvh;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 6px;
        padding: 84px 28px 24px !important;
        background: var(--paper, #fff);
        box-shadow: -20px 0 40px rgba(20, 33, 42, .15);
        z-index: 60;
        overflow-y: auto;
    }
    .header nav.open {
        display: flex !important;
    }
    .header nav > a {
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 44px;
        padding: 8px 12px;
        margin: 0;
        font-size: 16px;
    }
    .header .drawer-footer {
        display: grid !important;
        width: 100%;
        margin-top: auto;
        padding-top: 24px;
        border-top: 1px solid var(--line, #d8e3e8);
        gap: 10px;
    }
    .nav-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 50;
        background: rgba(20, 33, 42, .35);
    }
    .nav-backdrop.show {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }
    body.nav-locked {
        overflow: hidden;
    }
    .hero-description {
        margin-left: 32px;
    }
}

@media (max-width: 700px) {
    .journeys .journey-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
    .journeys .journey .image-frame,
    .journeys .journey.south .image-frame {
        height: clamp(260px, 65vw, 340px) !important;
    }
    .journeys .journey h3 {
        font-size: clamp(22px, 5.8vw, 27px) !important;
    }
    .journeys .journey-caption {
        left: 20px;
        right: 20px;
        bottom: 20px;
    }
}


/* Designer homepage hero: one authoritative responsive component. */
/* Designer's full-width composition, with intrinsic portrait flow. */
.hero {
    --hero-scene-height: clamp(1000px, calc(100vw - 440px), 1200px);
    --hero-copy-left: clamp(32px, calc(26.02vw - 122.4px), 17.52vw);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(50px, 1fr) auto;
    gap: 0;
    align-items: start;
    position: relative;
    isolation: isolate;
    width: 100%;
    height: auto;
    min-height: calc(var(--hero-scene-height) + 62px);
    margin: 0;
    padding: 54px 0 0;
    overflow: visible;
    background: #fff;
}
.hero .hero-copy {
    grid-area: 1 / 1;
    align-self: start;
    position: relative;
    inset: auto;
    width: min(calc(100% - var(--hero-copy-left) - 24px), max(46.4vw, 560px));
    min-width: 0;
    max-width: none;
    margin: 0 0 0 var(--hero-copy-left);
    padding: clamp(35px, calc(6.25vw - 55px), 65px) 0 0;
    pointer-events: none;
    z-index: 2;
}
.hero .hero-copy a { pointer-events: auto; }
.hero .hero-copy .eyebrow {
    font-size: 9px;
    line-height: 1.7;
    letter-spacing: 2px;
    margin: 0 0 21px;
}
.hero h1 {
    font-size: clamp(61px, 6.5vw, 100px);
    font-weight: 400;
    line-height: .95;
    letter-spacing: -4.5px;
    margin: 0 0 24px;
    padding: 0;
}
.hero h1 > br { display: none; }
.hero h1 .indent-1,
.hero h1 .indent-2 {
    display: block;
    position: static;
    font-size: inherit !important;
    line-height: inherit !important;
    margin: 0 !important;
    transform: none;
}
.hero h1 .indent-1 { padding-left: 40px; }
.hero h1 .indent-2 {
    padding-left: 130px;
    margin-top: max(-.28em, calc(.95em - 115px)) !important;
}
.hero .hero-description {
    max-width: none;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    margin: 0 0 22px 53px;
}
.hero .primary-button {
    width: max-content;
    max-width: calc(100% - 53px);
    margin: 0 0 0 53px;
    padding: 18px 25px;
    font-size: 17px;
    line-height: normal;
    gap: 26px;
}
.hero .hero-photo {
    grid-area: auto;
    align-self: auto;
    justify-self: auto;
    aspect-ratio: auto;
    position: absolute !important;
    inset: 0 0 62px !important;
    width: 100% !important;
    height: auto !important;
    max-width: none;
    max-height: none;
    min-height: 0;
    display: block;
    margin: 0 !important;
    overflow: hidden;
    z-index: 0;
    mask-image: linear-gradient(to bottom, #000, #000 calc(100% - 180px), transparent);
    -webkit-mask-image: linear-gradient(to bottom, #000, #000 calc(100% - 180px), transparent);
}
.hero .hero-photo > img {
    display: block;
    position: absolute;
    left: -25%;
    top: -25%;
    right: auto;
    bottom: auto;
    width: 150% !important;
    height: 150% !important;
    min-width: 0;
    max-width: none !important;
    max-height: none;
    object-fit: cover;
    object-position: 50% 0% !important;
    transform: none !important;
    mask-image: none !important;
    -webkit-mask-image: none !important;
}
.hero .hero-photo::after { display: none; }
.hero .hero-guide {
    grid-area: 3 / 1;
    align-self: end;
    justify-self: start;
    display: block;
    position: relative !important;
    inset: auto !important;
    width: min(28vw, 370px) !important;
    max-width: 370px !important;
    height: auto;
    max-height: none !important;
    margin: 0 0 0 calc(62% - min(28vw, 370px)) !important;
    padding: 0;
    object-fit: contain;
    object-position: center bottom;
    opacity: 1;
    mix-blend-mode: normal;
    pointer-events: none;
    z-index: 1;
}
.hero .handwritten {
    position: absolute;
    top: 52px;
    right: 14%;
    bottom: auto !important;
    left: auto;
    width: max-content;
    max-width: 280px;
    height: auto !important;
    margin: 0;
    font-size: 32px;
    line-height: 1.2;
    color: #2987ca;
    transform: rotate(-8deg);
    transform-origin: top right;
    pointer-events: none;
    z-index: 2;
}
.hero .handwritten .word { pointer-events: auto; }
.hero .discover {
    grid-area: 2 / 1;
    align-self: start;
    justify-self: start;
    display: block !important;
    position: relative !important;
    inset: auto !important;
    margin: 8px 0 0 25%;
    max-width: calc(75% - 32px);
    font-size: 16px;
    line-height: 26px;
    letter-spacing: 1px;
    transform: none !important;
    z-index: 2;
}
.hero .discover span { margin-left: 30px; font-size: 22px; }
.hero + .journeys { margin-top: 0; padding-top: 32px; }
.ec-editing .hero .hero-copy,
.ec-editing .hero .hero-guide,
.ec-editing .hero .hero-photo > img { pointer-events: auto !important; }
@media (min-width: 1921px) {
    .hero { --hero-copy-left: calc((100vw - 1920px) / 2 + 336.4px); }
    .hero .hero-copy { width: 890.9px; }
    .hero .hero-photo > img {
        width: 2880px !important;
        left: calc(50% - 1440px);
        mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent) !important;
        -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent) !important;
    }
    .hero .hero-guide { margin-left: calc(50% - 140px) !important; }
    .hero .handwritten { right: calc((100vw - 1920px) / 2 + 268.8px); }
    .hero .discover { margin-left: calc((100vw - 1920px) / 2 + 480px); }
}
@media (min-width: 701px) and (max-width: 1100px) {
    .hero { --hero-scene-height: clamp(830px, calc(43vw + 530px), 1000px); }
    .hero .handwritten { font-size: clamp(22px, 2.4vw, 28px); right: 5%; top: 34px; }
}
@media (max-width: 700px) {
    .hero {
        min-height: 0;
        height: auto;
        padding: 24px 16px 0;
        grid-template-rows: auto 70px auto;
    }
    .hero .hero-copy {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 24px 16px 0;
    }
    .hero .hero-copy .eyebrow { font-size: 7px; letter-spacing: 1.2px; margin-bottom: 21px; }
    .hero h1 {
        font-size: clamp(40px, 12.3077vw, 61px) !important;
        line-height: 1;
        letter-spacing: -3px !important;
    }
    .hero h1 .indent-1,
    .hero h1 .indent-2 { font-size: clamp(28px, calc(26.667vw - 66px), 38px) !important; }
    .hero h1 .indent-2 {
        padding-left: clamp(76px, calc(100vw - 260px), 130px);
        margin-top: -.1em !important;
    }
    .hero .hero-description { font-size: 15px; line-height: 1.55; margin-left: 16px !important; }
    .hero .primary-button {
        width: calc(100% - 32px);
        max-width: none;
        margin-left: 16px !important;
        padding: 15px 19px;
        font-size: 14px;
        justify-content: center;
    }
    .hero .hero-photo {
        inset: 0 !important;
        mask-image: linear-gradient(to bottom, transparent, #000 26%, #000 80%, transparent);
        -webkit-mask-image: linear-gradient(to bottom, transparent, #000 26%, #000 80%, transparent);
    }
    .hero .hero-photo > img {
        inset: 0;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        object-position: 60% bottom !important;
    }
    .hero .hero-guide {
        width: 64% !important;
        max-width: none !important;
        margin: 0 0 0 max(0px, calc(10px - 2%)) !important;
    }
    .hero .handwritten, .hero .discover { display: none !important; }
}

/* Keep the portrait continuous across the phone/tablet boundary. */
@media (min-width: 701px) and (max-width: 1100px) {
  .hero .hero-guide { width: clamp(300px, 28vw, 370px) !important; margin-left: calc(62% - clamp(300px, 28vw, 370px)) !important; }
}
@media (max-width: 700px) {
  .hero .hero-guide { width: min(64%, 300px) !important; margin-left: max(0px, calc(10px - 2%), calc(62vw - 316px)) !important; }
}

/* The signature must stay visible when switching responsive layouts. */
.hero .handwritten .word { opacity: 1; animation: none; transform: none; }
