/* Reference design CSS; only generic navigation selectors are scoped to .site-header. */
/* The header stays in normal document flow, including under Drupal's toolbar.
   A low stacking layer still lets its dropdown overlap the following section. */
.site-header { position: relative; top: auto; z-index: 20; }
/* Keep real boxes on blocks/entities so contextual editing remains reachable. */
.vesta-front .contextual-region, .vesta-inner .contextual-region { position: relative; }
.vesta-front .service-card > .contextual,
.vesta-front .catalog-tile > .contextual,
.vesta-front .portfolio-card > .contextual,
.vesta-inner .vesta-product-card > .contextual { z-index: 600; }
.vesta-front-content:empty { display: none; }
.site-header .region-navigation { width: 100%; }
.site-header .nav-list { margin: 0; padding: 0; }
.site-header .has-dropdown { padding-right: 18px; }
.site-header .submenu-toggle { position: absolute; right: 0; top: 0; height: 52px; width: 28px; border: 0; background: transparent; color: white; cursor: pointer; }
.site-header .has-dropdown:focus-within > .dropdown-menu,
.site-header .has-dropdown.open > .dropdown-menu { opacity: 1; visibility: visible; transform: none; }
.site-header .dropdown-menu .submenu-toggle { color: var(--text-dark); height: 42px; }
.site-header .search-form input[type="search"] { min-width: 0; }
.site-header .logo-link, .site-header .mobile-toggle { flex-shrink: 0; }
.site-header .header-contacts { min-width: 0; }
:where(.site-header, .site-footer, .vesta-front, .vesta-inner, #callback-modal) :focus-visible { outline: 3px solid var(--nav-blue); outline-offset: 3px; }
.site-header .nav-link:focus-visible, .site-header .submenu-toggle:focus-visible { outline-color: #fff; outline-offset: -4px; }
/* Drupal marks the current link with aria-current rather than the source's
   .nav-item.active; exclude same-page anchors so only the real page is lit. */
.site-header .main-nav .nav-link[aria-current="page"]:not([href*="#"]) { background-color: rgba(255, 255, 255, .15); }
.vesta-front section[id] { scroll-margin-top: 150px; }
/* The reference reset hides bullets and removes indentation from editor HTML.
   Restore list semantics only inside Drupal formatted content, not menus/UI. */
.text-formatted ul { list-style-type: disc; }
.text-formatted ol { list-style-type: decimal; }
/* Inside markers start at the same left edge as prose, even while the
   product gallery is floated. Drupal/CKEditor may wrap each item in a block
   <p>; keep its first paragraph inline so the marker and text share a line. */
.text-formatted :is(ul, ol) { list-style-position: inside; padding-inline-start: 0; margin-block: .5em 1em; }
.text-formatted :is(ul, ol) > li > p:first-child { display: inline; }
.text-formatted :is(ul, ol) > li:has(> p:first-child) { margin-block: .6em; }
.text-formatted ul ul { list-style-type: circle; }
.text-formatted ul ul ul { list-style-type: square; }
.text-formatted :is(ul, ol) :is(ul, ol) { padding-inline-start: 1.5em; margin-block: .35em; }
/* Field wrappers: preserve formatter/access/cache handling without layout drift. */
.services-grid .service-summary { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; }
.services-grid .service-summary p { margin: 0; }
.services-grid .service-features { margin-bottom: 24px; }
.services-grid .service-features .field__item { display: inline; }
.vesta-front .catalog-grid > .catalog-tile:last-child:nth-child(3n + 1) { grid-column: 1 / -1; }
/* Only the landing's seventh tile spans the row; catalogue pages keep the
   standard three-column grid and use the View's nine-item pager. */
.vesta-inner .view-id-catalog.view-display-id-page .catalog-grid > .catalog-tile { grid-column: auto; }
.vesta-inner .view-id-catalog.view-display-id-page .pager { margin-top: 32px; }
/* Vesta renders Drupal's pager with Bootstrap-style pagination/page-item/page-link,
   while core pager templates use pager__items/pager__item. Scope both to this View. */
.vesta-inner .view-id-catalog.view-display-id-page .pager :is(.pagination, .pager__items) { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.vesta-inner .view-id-catalog.view-display-id-page .pager :is(.page-item, .pager__item) { margin: 0; padding: 0; }
.vesta-inner .view-id-catalog.view-display-id-page .pager :is(.page-link, .pager__item a) {
  display: inline-flex; min-width: 42px; min-height: 42px; padding: 8px 14px;
  justify-content: center; align-items: center; border: 1px solid var(--border-color);
  border-radius: var(--radius-sm); background: #fff; color: var(--nav-blue);
  font-size: 14px; font-weight: 700; text-decoration: none;
}
.vesta-inner .view-id-catalog.view-display-id-page .pager :is(.page-link, .pager__item a):hover,
.vesta-inner .view-id-catalog.view-display-id-page .pager :is(.page-item, .pager__item).is-active a,
.vesta-inner .view-id-catalog.view-display-id-page .pager .page-item.active a {
  background: var(--nav-blue); color: #fff; border-color: var(--nav-blue);
}
.vesta-inner .view-id-catalog.view-display-id-page .pager :is(.page-link, .pager__item a):focus-visible { outline: 3px solid var(--accent-green); outline-offset: 2px; }
.catalog-grid .catalog-description { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.catalog-grid .catalog-description p { margin: 0; }
.catalog-grid .tile-content { height: 100%; }
.catalog-grid .tile-link { margin-top: auto; }
.portfolio-img-wrapper > .field, .portfolio-img-wrapper > .field > .field__item { height: 100%; }
.portfolio-meta .field, .portfolio-meta .field__item, .portfolio-tag .field, .portfolio-tag .field__item { display: inline; }
.portfolio-details p { margin: 0; }
/* Full portfolio pages: editorial fields first, native PhotoSwipe field last. */
.p12-portfolio { min-width: 0; }
.p12-portfolio-description > .field { margin-bottom: 16px; }
.p12-portfolio-gallery { clear: both; margin-top: 32px; }
.p12-portfolio-gallery h2 { margin: 0 0 20px; font-size: 24px; line-height: 1.3; }
.p12-portfolio-gallery .field--name-field-portfolio-photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.p12-portfolio-gallery .field__item { min-width: 0; }
.p12-portfolio-gallery a.photoswipe { display: block; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-md); background: var(--bg-light); }
.p12-portfolio-gallery a.photoswipe img { display: block; width: 100%; height: 100%; object-fit: cover; }
.p12-portfolio-gallery a.photoswipe:focus-visible { outline: 3px solid var(--nav-blue); outline-offset: 3px; }
@media (max-width: 991px) {
  .p12-portfolio-gallery .field--name-field-portfolio-photos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 768px) {
  .p12-portfolio-gallery .field--name-field-portfolio-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 370px) {
  .p12-portfolio-gallery .field--name-field-portfolio-photos { grid-template-columns: minmax(0, 1fr); }
}
.site-footer .region-footer-brand { font-size: 13px; line-height: 1.6; }
.site-footer .region-footer-bottom, .site-footer .region-footer-bottom > .block, .site-footer .region-footer-bottom .field--name-body { width: 100%; }
.site-footer .region-footer-bottom .field--name-body { display: flex; justify-content: space-between; gap: 20px; }
/* Core's clearfix pseudo-element is otherwise a third flex item and pulls
   the policy link to the center instead of the footer's right edge. */
.site-footer .region-footer-bottom .field--name-body::after { display: none; }
.site-footer .footer-socials .social-unconfigured { display: inline-flex; vertical-align: middle; }
/* Webform keeps its real forms, validation, CSRF tokens, AJAX, and confirmation. */
:is(#lead-form, #callback-modal) .webform-submission-form .form-item { margin: 0 0 20px; }
:is(#lead-form, #callback-modal) .webform-submission-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
:is(#lead-form, #callback-modal) .webform-submission-form :is(input[type="text"], input[type="tel"], input[type="email"], input[type="number"], select, textarea) { width: 100%; min-width: 0; padding: 12px 16px; border: 1px solid var(--border-color); border-radius: var(--radius-sm); font: 14px var(--font-family); background: #fff; color: var(--text-dark); }
:is(#lead-form, #callback-modal) .webform-submission-form :is(input, textarea, select):focus { border-color: var(--nav-blue); box-shadow: 0 0 0 3px rgba(23, 101, 179, .1); }
:is(#lead-form, #callback-modal) .webform-submission-form .form-type-checkbox { display: flex; align-items: flex-start; gap: 10px; }
:is(#lead-form, #callback-modal) .webform-submission-form .form-type-checkbox input { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent-green); }
:is(#lead-form, #callback-modal) .webform-submission-form .form-type-checkbox label { font-size: 12px; line-height: 1.4; color: var(--text-muted); font-weight: 400; }
:is(#lead-form, #callback-modal) .webform-submission-form .form-type-checkbox a { text-decoration: underline; color: var(--nav-blue); }
:is(#lead-form, #callback-modal) .webform-submission-form .form-actions { margin: 0; }
:is(#lead-form, #callback-modal) .webform-submission-form :is(button[type="submit"], input[type="submit"]) { width: 100%; padding: 12px 24px; border: 0; border-radius: var(--radius-md); font: 500 15px var(--font-family); color: #fff; background: var(--btn-red); cursor: pointer; transition: var(--transition); }
:is(#lead-form, #callback-modal) .webform-submission-form :is(button[type="submit"], input[type="submit"]):hover { background: var(--btn-red-hover); }
:is(#lead-form, #callback-modal) .webform-submission-form .description { font-size: 12px; color: var(--text-muted); }
:is(#lead-form, #callback-modal) .messages--error { border-left: 4px solid var(--btn-red); padding: 12px; margin-bottom: 20px; }
#callback-modal[hidden] { display: none; }
#callback-modal { padding: 20px; }
#callback-modal .modal-container { max-height: calc(100dvh - 40px); overflow-y: auto; }
body.vesta-modal-open { overflow: hidden; }
/* Native Search API Page form in the header: keep Drupal's CSRF/form handling.
   No selectors here target the results-page form or administrative forms. */
.site-header .header-search .region-header-search,
.site-header .header-search .region-header-search > .block { min-width: 0; width: 100%; }
.site-header .header-search .search-api-page-block-form > form { display: flex; align-items: center; width: 100%; min-width: 0; }
.site-header .header-search .search-api-page-block-form .form-item-keys { flex: 1 1 auto; min-width: 0; margin: 0; }
.site-header .header-search .search-api-page-block-form .form-item-keys input[type="search"] { min-width: 0; padding: 0; box-shadow: none; }
.site-header .header-search .search-api-page-block-form .form-actions { margin: 0; flex: none; }
.site-header .header-search .search-api-page-block-form button[type="submit"] { position: relative; flex: none; min-width: 36px; padding: 0; font-size: 0; }
.site-header .header-search .search-api-page-block-form button[type="submit"]::before { content: ''; width: 14px; height: 14px; border: 2px solid #fff; border-radius: 50%; transform: translate(-2px, -2px); }
.site-header .header-search .search-api-page-block-form button[type="submit"]::after { content: ''; position: absolute; width: 9px; height: 2px; background: #fff; transform: translate(8px, 8px) rotate(45deg); }
/* Drupal local tasks / Tabs: only correct the row layout; no site-navigation colors or chrome. */
.vesta-inner nav.tabs .tabs-primary > ul.primary { display: flex; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 12px; margin: 0 0 24px; padding: 0; list-style: none; }
.vesta-inner nav.tabs .tabs-primary > ul.primary > li { display: block; flex: 0 0 auto; margin: 0; padding: 0; list-style: none; }
.vesta-inner nav.tabs .tabs-primary > ul.primary > li > a { white-space: nowrap; }
/* Search API Page's own render variables and indexed results, not custom Views. */
.vesta-inner .vesta-search-results { max-width: 100%; padding-bottom: 48px; }
.vesta-inner .vesta-search-results .search-api-page-block-form { display: flex; align-items: center; gap: 12px; max-width: 680px; margin: 0 0 28px; }
.vesta-inner .vesta-search-results .search-api-page-block-form .form-item-keys { flex: 1; min-width: 0; margin: 0; }
.vesta-inner .vesta-search-results .search-api-page-block-form input[type="search"] { display: block; width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--border-color); border-radius: var(--radius-sm); background: #fff; font: 15px var(--font-family); }
.vesta-inner .vesta-search-results .search-api-page-block-form .form-actions { margin: 0; }
.vesta-inner .vesta-search-results .search-api-page-block-form button[type="submit"] { min-height: 46px; padding: 10px 22px; border: 0; border-radius: var(--radius-sm); background: var(--nav-blue); color: #fff; cursor: pointer; }
.vesta-inner .vesta-search-results__heading { margin: 0 0 8px; font-size: 24px; }
.vesta-inner .vesta-search-results__count { margin: 0 0 18px; color: var(--text-muted); }
.vesta-inner .vesta-search-result { margin: 0 0 12px; padding: 20px 24px; border: 1px solid var(--border-color); border-radius: var(--radius-lg); background: #fff; }
.vesta-inner .vesta-search-result__title { margin: 0 0 8px; font-size: 19px; line-height: 1.35; }
.vesta-inner .vesta-search-result__title a { color: var(--nav-blue); text-decoration: none; }
.vesta-inner .vesta-search-result__title a:hover { text-decoration: underline; }
.vesta-inner .vesta-search-result__snippet, .vesta-inner .vesta-search-result__info { margin: 0; color: var(--text-muted); line-height: 1.6; }
.vesta-inner .vesta-search-results .pager :is(.pagination, .pager__items) { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.vesta-inner .vesta-search-results .pager a { color: var(--nav-blue); padding: 8px 12px; border: 1px solid var(--border-color); border-radius: var(--radius-sm); text-decoration: none; }
@media (max-width: 576px) {
  .vesta-inner .vesta-search-results .search-api-page-block-form { gap: 8px; }
  .vesta-inner .vesta-search-results .search-api-page-block-form button[type="submit"] { padding-inline: 12px; }
}
/* The Vesta Privacy Access module appends its notice to <body>, outside the
   privacy region. Style the real module markup; retain its native consent cookie. */
.vpa-container.vpa-short #vpa-short-wrapper {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2000;
  width: 100%; max-width: none; padding: 16px max(15px, calc((100vw - 1200px) / 2));
  border: 0; border-radius: 0; box-shadow: 0 -4px 20px rgba(0,0,0,.2);
  background: #122B3A; color: #fff; font-family: inherit; font-size: 13px;
}
.vpa-container.vpa-short #vpa-short-wrapper .vpa-content { flex: 1; }
.vpa-container.vpa-short #vpa-short-wrapper .vpa-content p { margin: 0; color: #fff; font-size: 13px; }
.vpa-container.vpa-short #vpa-short-wrapper .vpa-content a { color: #64B5F6; text-decoration: underline; }
.vpa-container.vpa-short #vpa-short-wrapper .vpa-close-zone { display: none; }
.vpa-container.vpa-short #vpa-short-wrapper .vpa-actions { margin: 0; flex: none; }
.vpa-container.vpa-short #vpa-short-wrapper #vpa-btn-ok {
  background: var(--accent-green); border: 0; border-radius: 4px;
  color: #fff; padding: 8px 20px; font-size: 13px;
}
@media (max-width: 767px) {
  .vpa-container.vpa-short #vpa-short-wrapper { flex-direction: column; align-items: flex-start; gap: 12px; }
}
/* Internal catalogue/detail pages have no variations/add-to-cart rendering. */
.vesta-inner h1 { font-size: 36px; line-height: 1.2; margin-bottom: 24px; }
.vesta-inner .vesta-entity-full > .field { margin-bottom: 20px; }
.vesta-inner .vesta-entity-full img { border-radius: var(--radius-lg); }
.vesta-inner .vesta-products-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.vesta-product-card { display: flex; flex-direction: column; gap: 16px; border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 24px; min-width: 0; }
.vesta-product-card .vesta-product-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.vesta-product-card .link-btn { margin-top: auto; }
.vesta-product-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
.vesta-product-copy > .field { margin-bottom: 20px; }
.vesta-product .field--name-field-specifications table { width: 100%; border-collapse: collapse; }
.vesta-product .field--name-field-specifications :is(td, th) { border: 1px solid var(--border-color); padding: 10px; }
/* Source breakpoint geometry is retained; only Drupal/header overflow differs. */
@media (max-width: 1199px) and (min-width: 769px) {
  .site-header .header-top { gap: 12px; }
  .site-header .header-search { max-width: 320px; }
  .site-header .header-contacts { gap: 10px; }
  .site-header .phone-link { font-size: 16px; white-space: nowrap; }
}
@media (max-width: 991px) and (min-width: 769px) {
  .site-header .header-search { max-width: 180px; }
  .site-header .header-logo { max-width: 170px; }
  .site-header .open-modal-btn { padding: 10px 12px; }
  .site-header .nav-link { padding-inline: 12px; font-size: 14px; }
}
@media (max-width: 768px) {
  .site-header .main-nav.active { max-height: calc(100dvh - 80px); overflow-y: auto; }
  .site-header .has-dropdown { padding-right: 0; }
  .site-header .has-dropdown > .nav-link { padding-right: 48px; }
  .site-header .submenu-toggle { width: 44px; }
  .site-header .dropdown-menu .submenu-toggle { color: #fff; }
  .site-header .dropdown-menu .nav-item { padding-right: 0; }
  .vesta-inner .vesta-products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vesta-product-layout { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 576px) {
  /* Keep the logo legible by giving messenger icons and the callback CTA a
     smaller, predictable footprint instead of forcing the logo to collapse. */
  .site-header .header-top { gap: 10px; padding-inline: 16px; }
  .site-header .logo-link { flex: 0 1 132px; min-width: 0; }
  .site-header .header-logo { display: block; width: 100%; height: auto; max-height: 48px; }
  .site-header .header-contacts { flex: 0 0 auto; gap: 8px; }
  .site-header #ibxm .telegram-link, .site-header #ibxm .max-link,
  .site-header #ibxm .social-unconfigured { display: inline-flex; flex: 0 0 24px; width: 24px; height: 24px; }
  .site-header #ibxm .icon-tg, .site-header #ibxm .icon-max { width: 24px; height: 24px; object-fit: contain; }
  .site-header .open-modal-btn { white-space: nowrap; flex: 0 0 auto; padding: 8px 10px; font-size: 12px; line-height: 1.2; }
  .site-header .mobile-toggle { flex: 0 0 28px; width: 28px; }
  .hero-stats { gap: 15px; }
  #lead-form .lead-wrapper { grid-template-columns: minmax(0, 1fr); }
  #lead-form .lead-form-box { min-width: 0; padding: 24px; }
  #lead-form .contact-info-item > div { min-width: 0; }
  #lead-form .ci-link { overflow-wrap: anywhere; }
  .hero-content, .hero-media { min-width: 0; }
  .hero-actions .btn { white-space: normal; text-align: center; }
  #callback-modal .modal-container { padding: 28px 20px; }
  .site-footer .region-footer-bottom .field--name-body { flex-direction: column; text-align: center; gap: 10px; }
  .vesta-inner h1 { font-size: 28px; overflow-wrap: anywhere; }
  .vesta-inner .vesta-products-grid { grid-template-columns: 1fr; }
}
@media (max-width: 370px) {
  /* Extra-narrow phones need two header rows rather than an illegible logo. */
  .site-header .header-top { flex-wrap: wrap; row-gap: 8px; }
  .site-header .logo-link { flex: 0 0 132px; }
  .site-header .header-contacts { flex: 1 1 100%; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .site-header *, .vesta-front *, .vesta-inner *, #callback-modal * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
