/*** Drupal-обёртки. Исходный reference.css выше остаётся байт-в-байт. ***/
.vesta-landing { min-height: 100vh; display: flex; flex-direction: column; }
.vesta-landing > main { flex: 1 0 auto; min-width: 0; }
.vesta-landing .landing-region,
.vesta-landing .landing-menu-block { display: contents; }
.vesta-landing .front-system-content:empty { display: none; }
.vesta-landing .front-system-content > .region:empty { display: none; }
.vesta-landing .block-views { min-width: 0; }
/* The managed hero image is emitted by its editable custom block. Its containing
   block must be the section, not the Drupal region or the 7:5 content grid. */
.vesta-landing #imq6f.hero-container { position: static; }
.vesta-landing #imq6f .hero-content { position: static; }
.vesta-landing .hero-copy,
.vesta-landing .hero-widget { position: relative; z-index: 1; min-width: 0; }
.vesta-landing .service-img-wrap > .field,
.vesta-landing .service-img-wrap > .field > .field__item { width: 100%; height: 100%; }
.vesta-landing .service-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.vesta-landing .gallery-card-link { display: block; width: 100%; height: 100%; color: inherit; }
.vesta-landing .gallery-card-link:focus-visible { outline: 3px solid var(--color-accent); outline-offset: -4px; }
/* The reference's magnifier is shared by the front View and the index View. */
.vesta-landing .gallery-item .gallery-zoom-icon {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  padding: .45rem; border-radius: 50%; color: #fff;
  background-color: rgba(15,23,42,.65);
  transition: background-color .3s ease, transform .3s ease;
}
.vesta-landing .gallery-item:is(:hover, :focus-within) .gallery-zoom-icon {
  background-color: var(--color-accent); transform: scale(1.1);
}
.vesta-landing #gallery .gallery-grid > .gallery-item:first-child { grid-column: span 8; }
.vesta-landing .album-index-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.25rem; }
.vesta-landing .album-index-grid > .gallery-item { grid-column: auto; }
@media (min-width: 641px) and (max-width: 991px) {
  .vesta-landing #gallery .gallery-grid > .gallery-item:first-child { grid-column: span 3; }
  .vesta-landing .album-index-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .vesta-landing #gallery .gallery-grid > .gallery-item:first-child { grid-column: span 1; }
  .vesta-landing .album-index-grid { grid-template-columns: minmax(0,1fr); }
}
.vesta-landing .photo-album-full h1,
.vesta-landing .inner-content .page-title { margin-bottom: 1rem; font-size: 2.35rem; }
.vesta-landing .photo-album-full .album-photos { margin-top: 2rem; }
/* Keep native Photoswipe links, data attributes, grouping and attached library. */
.vesta-landing .album-photos .field--name-field-album-images { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.25rem; }
.vesta-landing .album-photos .field__item { min-width: 0; }
.vesta-landing .album-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg); }
.vesta-landing .contacts-map-card .map-iframe-holder > .field,
.vesta-landing .contacts-map-card .map-iframe-holder > .field > .field__item { height: 100%; }
.vesta-landing .map-iframe-holder iframe { width: 100%; max-width: 100%; height: 100%; display: block; }

/*** Штатные Webform. Не меняем ID, name, POST, ошибки или обработчики. ***/
.vesta-landing .hero-widget .form-item,
.vesta-landing .banner-form-wrap .form-item { margin: 0; min-width: 0; }
.vesta-landing .hero-widget .form-actions,
.vesta-landing .banner-form-wrap .form-actions { margin: 0; }
.vesta-landing .hero-widget .form-item > label:not(.option),
.vesta-landing .banner-form-wrap .form-item > label:not(.option) {
  display: block; font-family: var(--font-mono); font-size: .7rem; font-weight: 700;
  letter-spacing: .05em; color: var(--color-text-muted); margin-bottom: .35rem;
}
.vesta-landing .banner-form-wrap .form-item > label:not(.option) { color: #fff; }
.vesta-landing .hero-widget .webform-flexbox,
.vesta-landing .banner-form-wrap .webform-flexbox { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; margin: 0; }
.vesta-landing .webform-flexbox > .webform-flex { margin: 0; min-width: 0; }
.vesta-landing .webform-flexbox .webform-flex--container { margin: 0; }
.vesta-landing .hero-widget .form-type-checkbox,
.vesta-landing .banner-form-wrap .form-type-checkbox { display: grid; grid-template-columns: 16px minmax(0,1fr); gap: .6rem; align-items: start; }
.vesta-landing .form-type-checkbox > input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--color-accent); }
.vesta-landing .form-type-checkbox > label.option { font-family: var(--font-body); font-size: .75rem; line-height: 1.45; color: var(--color-text-muted); cursor: pointer; }
.vesta-landing .banner-form-wrap .form-type-checkbox > label.option { color: #cbd5e1; }
.vesta-landing .form-type-checkbox .description { grid-column: 2; font-size: .75rem; }
.vesta-landing .form-type-checkbox a { text-decoration: underline; }
.vesta-landing .form-item--error-message { color: #b91c1c; font-size: .85rem; }
.vesta-landing .banner-form-wrap .form-item--error-message { color: #fecaca; }
.vesta-landing .webform-confirmation { padding: 1rem; border-left: 3px solid var(--color-accent); }
.vesta-landing .widget-form .form-actions .button,
.vesta-landing .banner-form .form-actions .button { width: 100%; white-space: normal; }
.vesta-landing .widget-form .form-privacy { font-size: .65rem; text-align: center; color: var(--color-text-light); }

/*** Единственное нативное уведомление Vesta Privacy Access. ***/
.vesta-landing #vpa-short-wrapper {
  width: min(800px,calc(100% - 40px)); max-width: 800px; padding: 1.25rem 1.5rem;
  border: 1px solid var(--color-border-light); border-radius: var(--radius-lg);
  background: #fff; box-shadow: var(--shadow-xl); gap: 1.5rem; z-index: 9999;
}
.vesta-landing #vpa-short-wrapper.vpa-hidden { display: none; }
.vesta-landing #vpa-short-wrapper .vpa-content { font-size: .75rem; line-height: 1.5; color: var(--color-text-muted); }
.vesta-landing #vpa-short-wrapper .vpa-content a { color: var(--color-accent); text-decoration: underline; }
.vesta-landing #vpa-short-wrapper .vpa-actions { flex-shrink: 0; }
.vesta-landing #vpa-short-wrapper #vpa-btn-ok { background: var(--color-accent); color: #fff; border-color: transparent; font-size: .8rem; padding: .5rem 1rem; }
.vesta-landing #vpa-short-wrapper #vpa-btn-ok:hover { background: var(--color-accent-hover); }

/*** Нативные вкладки, contextual edit и pager остаются доступны. ***/
.vesta-landing .contextual { z-index: 20; }
.vesta-landing .tabs { margin: 1rem 0; max-width: 100%; overflow-x: auto; }
.vesta-landing .tabs ul { display: flex; gap: .5rem; list-style: none; min-width: max-content; padding: 0; }
.vesta-landing .tabs a { display: block; padding: .5rem .75rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); color: var(--color-primary); }
.vesta-landing .tabs a.is-active { border-color: var(--color-accent); }
.vesta-landing .view nav.pager { margin-top: 2rem; }
.vesta-landing .view nav.pager ul.pagination,
.vesta-landing .view nav.pager ul.pager__items { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem; padding: 0; margin: 0; list-style: none; }
.vesta-landing .view nav.pager li.page-item,
.vesta-landing .view nav.pager li.pager__item { margin: 0; padding: 0; list-style: none; }
.vesta-landing .view nav.pager a.page-link,
.vesta-landing .view nav.pager .pager__item a { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; padding: .5rem .8rem; border: 1px solid var(--color-border-light); border-radius: var(--radius-md); background: #fff; color: var(--color-primary); font-weight: 700; text-decoration: none; transition: background-color .2s ease,border-color .2s ease,color .2s ease; }
.vesta-landing .view nav.pager a.page-link:hover,
.vesta-landing .view nav.pager .pager__item a:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.vesta-landing .view nav.pager .page-item.is-active a.page-link,
.vesta-landing .view nav.pager .pager__item.is-active a { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.vesta-landing a:focus-visible,
.vesta-landing button:focus-visible,
.vesta-landing input:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; }
.vesta-landing .site-header { position: static; top: auto; }
.vesta-landing section[id] { scroll-margin-top: 0; }
/* The reference's full desktop header overflows between 992 and 1199px.
   Compact only the CTA in that interval; preserve the 1440px and mobile design. */
@media (min-width: 992px) and (max-width: 1199px) {
  .vesta-landing #iauw #main-nav { gap: 1rem; }
  .vesta-landing #iauw .header-calc-btn { width: 38px; height: 38px; padding: 0; }
  .vesta-landing #iauw .header-calc-btn .calc-btn-text { display: none; }
}
@media (max-width: 991px) {
  .vesta-landing .mobile-menu:not(.is-active) { visibility: hidden; pointer-events: none; }
  .vesta-landing .mobile-menu.is-active { visibility: visible; pointer-events: auto; }
}
@media (max-width: 767px) {
  .vesta-landing #gallery .gallery-grid > .gallery-item:first-child,
  .vesta-landing .gallery-grid > .gallery-item:first-child { grid-column: span 1; }
  .vesta-landing .album-photos .field--name-field-album-images { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .vesta-landing #vpa-short-wrapper { width: calc(100% - 24px); gap: .75rem; padding: 1rem; flex-direction: column; align-items: stretch; }
  .vesta-landing #vpa-short-wrapper.vpa-visible { bottom: 82px; }
  .vesta-landing #vpa-short-wrapper .vpa-close-zone { display: none; }
  .vesta-landing #vpa-short-wrapper .vpa-actions { justify-content: flex-end; }
  .vesta-landing.privacy-visible .btn-scroll-top { bottom: 245px; }
}
@media (max-width: 480px) {
  .vesta-landing .album-photos .field--name-field-album-images { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .vesta-landing *, .vesta-landing *::before, .vesta-landing *::after { scroll-behavior: auto; transition-duration: .01ms; animation-duration: .01ms; }
}

/* Live-model adapters: native fields and sibling blocks retain their render arrays. */
.vesta-landing .advantages-layout > .region-advantages > .block-views { min-width: 0; }
.vesta-landing .service-cta { margin-top: 0; }
.vesta-landing .service-cta a { display: flex; align-items: center; justify-content: center; width: 100%; padding: .75rem 1.5rem; border: 1px solid var(--color-primary); border-radius: var(--radius-md); color: var(--color-primary); font-weight: 700; }
.vesta-landing .service-cta-primary a { background: var(--color-primary); color: white; }
.vesta-landing #imq6f .widget-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .85rem; }
.vesta-landing .widget-form > .form-item-cargo-type,
.vesta-landing .widget-form > .form-item-phone,
.vesta-landing .widget-form > .form-item-agreement,
.vesta-landing .widget-form > .form-actions,
.vesta-landing .widget-form > .messages { grid-column: 1 / -1; }
.vesta-landing #i4q25s .banner-form,
.vesta-landing #quote-calculator .banner-form { display: grid; grid-template-columns: 1fr; gap: .85rem; }
@media (min-width: 768px) {
  .vesta-landing #i4q25s .banner-form,
  .vesta-landing #quote-calculator .banner-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
.vesta-landing .banner-form-wrap .form-item > label:not(.option) { margin-bottom: 0; }
.vesta-landing .banner-form-wrap .form-item-agreement { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem .5rem; }
.vesta-landing .banner-form-wrap .form-item-agreement > input { flex: 0 0 16px; }
.vesta-landing .banner-form-wrap .form-item-agreement > label { flex: 0 1 auto; }
.vesta-landing .banner-form-wrap .form-item-agreement > .description { flex: 0 1 auto; }
.vesta-landing .banner-form-wrap .form-item-agreement .webform-element-description { display: inline; }
.vesta-landing .banner-form > .form-item-agreement,
.vesta-landing .banner-form > .form-actions,
.vesta-landing .banner-form > .messages { grid-column: 1 / -1; }
.vesta-landing .banner-form > input[type=hidden],
.vesta-landing .widget-form > input[type=hidden] { display: none; }

/*** Compact spacing and readable type on narrow devices. ***/
@media screen and (max-width: 576px) {
  .vesta-landing .section { padding-top: 3rem; padding-bottom: 3rem; }
  .vesta-landing .section-header-left,
  .vesta-landing .section-header-center,
  .vesta-landing .section-header-flex { margin-bottom: 2rem; }
  .vesta-landing .section-title { font-size: clamp(1.5rem, 5vw, 1.8rem); line-height: 1.2; overflow-wrap: anywhere; }
  .vesta-landing .photo-album-full h1,
  .vesta-landing .inner-content h1,
  .vesta-landing .inner-content .page-title { font-size: 1.6rem; line-height: 1.2; overflow-wrap: anywhere; }
  .vesta-landing .mobile-bottom-bar { gap: .4rem; padding: .5rem; }
  .vesta-landing .mobile-bottom-bar > a { min-width: 0; padding: .55rem .35rem; font-size: .875rem; }
}
@media screen and (max-width: 360px) {
  .vesta-landing .mobile-bottom-bar > a { gap: .25rem; padding: .55rem .25rem; font-size: .78rem; white-space: nowrap; }
}
