/* Kupetz v1.5 — shared header / homepage / footer, TEST only.
   Uses existing theme templates. No new data, search or checkout handlers. */
body.kcv15-sitewide {
  --kcv15-bordeaux: #520b19;
  --kcv15-bordeaux-dark: #35030e;
  --kcv15-gold: #d8aa72;
  --kcv15-ink: #4b222c;
  --kcv15-paper: #fbf8f3;
  --kcv15-rule: rgba(166, 116, 78, .33);
}
/* One header across homepage, catalog, History, excursions, contacts and posts. */
body.kcv15-sitewide .kupetz-site-header {
  border-bottom: 1px solid var(--kcv15-rule);
  box-shadow: 0 6px 24px rgba(45, 12, 20, .12);
}
body.kcv15-sitewide .kupetz-site-header__bar {
  margin-top: 0;
  background: var(--kcv15-bordeaux);
}
body.kcv15-sitewide .kupetz-menu-list > li.current-menu-item > a,
body.kcv15-sitewide .kupetz-menu-list > li.current-menu-ancestor > a {
  color: var(--kcv15-gold);
}
body.kcv15-sitewide .kupetz-top-logo img {
  object-fit: contain;
  max-height: 50px;
}
/* The homepage used to move its navigation 140px below the hero in JS.
   No `--home` class is emitted in the sitewide mode; no inline margin is set. */
body.kcv15-home { padding-top: 0; }
body.kcv15-home .kupetz-site-header {
  top: 0;
  z-index: 101;
}
body.kcv15-home .kupetz-hero--home {
  top: 68px;
  z-index: 50;
}
body.kcv15-home .kupetz-hero--home .kupetz-hero__slide::after {
  background: linear-gradient(90deg, rgba(37,7,15,.53), rgba(37,7,15,.19) 56%, rgba(37,7,15,.08));
  content: '';
  display: block;
}
body.kcv15-home .kupetz-hero--home .kupetz-hero__content-inner {
  position: relative;
  z-index: 2;
}
/* Keep the original content background and historic image treatment.
   No global background fills below the History or over the footer. */
body.kcv15-home .kupetz-content-shell--home {
  position: relative;
  z-index: 60;
}
/* Unified footer rhythm. Existing data-driven contacts and old ornaments stay. */
body.kcv15-sitewide .kupetz-site-footer {
  color: var(--kcv15-ink);
}
body.kcv15-sitewide .kupetz-site-footer__navigation {
  max-width: 800px;
  width: min(100%, 800px);
  margin-bottom: 3.25rem;
}
body.kcv15-sitewide .kupetz-site-footer__menu {
  gap: 8px;
  border-top: 1px solid var(--kcv15-rule);
}
body.kcv15-sitewide .kupetz-site-footer__menu a {
  color: var(--kcv15-ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 16px 10px;
  transition: color .18s ease;
}
body.kcv15-sitewide .kupetz-site-footer__menu a:hover,
body.kcv15-sitewide .kupetz-site-footer__menu a:focus-visible {
  color: #98632e;
}
body.kcv15-sitewide .kupetz-site-footer__contacts-group {
  box-sizing: border-box;
  max-width: 980px;
  width: 100%;
  gap: clamp(15px, 2.5vw, 34px);
}
body.kcv15-sitewide .kupetz-site-footer__contacts a {
  text-underline-offset: 3px;
}
body.kcv15-sitewide .kupetz-site-footer__contacts a:hover {
  color: #98632e;
}
body.kcv15-sitewide .kupetz-site-footer__social-group .socials-item {
  transition: transform .2s ease, box-shadow .2s ease;
}
body.kcv15-sitewide .kupetz-site-footer__social-group .socials-item:hover {
  transform: translateY(-3px);
}
body.kcv15-sitewide .kupetz-site-footer__background {
  pointer-events: none;
}
/* Footer is already shared; do not remove its overlap/curved background here.
   This is important for the home hero, standard pages and fixed panorama. */
@media (min-width: 992px) and (max-width: 1379px) {
  body.kcv15-sitewide .kupetz-site-header__bar > .container {
    max-width: 1320px;
    padding-inline: 16px;
  }
  body.kcv15-sitewide .kupetz-menu-list > li > a { font-size: 11px; }
}
@media (max-width: 991px) {
  body.kcv15-home .kupetz-hero--home { top: 50px; }
  body.kcv15-home .kupetz-hero--home .kupetz-hero__slide::after {
    background: linear-gradient(180deg, rgba(25,5,10,.3), rgba(25,5,10,.58));
  }
  body.kcv15-sitewide .kupetz-site-footer__contacts-group {
    padding-inline: 20px;
    max-width: 100%;
  }
}
@media (max-width: 575px) {
  body.kcv15-sitewide .kupetz-site-header__bar > .container { padding-inline: 7px; }
  body.kcv15-sitewide .kupetz-header-actions { gap: 0; }
  body.kcv15-sitewide .kupetz-site-footer__contacts {
    font-size: 14px;
    line-height: 1.65;
  }
  body.kcv15-sitewide .kupetz-site-footer__contacts-group { padding-inline: 16px; }
  body.kcv15-sitewide .kupetz-site-footer__contacts a { overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  body.kcv15-sitewide .kupetz-site-footer__menu a,
  body.kcv15-sitewide .kupetz-site-footer__social-group .socials-item {
    transition: none;
  }
}

/* v1.6: improve the readability of the SAME footer on all TEST pages.
   No solid background; maintain the existing decorative grid and curve. */
body.kcv15-sitewide .kupetz-site-footer__contacts {
  color: #4d3440;
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.7;
}
body.kcv15-sitewide .kupetz-site-footer__contacts-group {
  align-items: flex-start;
  max-width: 1030px;
  gap: clamp(18px, 3vw, 45px);
}
body.kcv15-sitewide .kupetz-site-footer__navigation {
  max-width: 850px;
  margin-bottom: 2.8rem;
}
body.kcv15-sitewide .kupetz-site-footer__menu a {
  font-size: clamp(12px, .96vw, 15px);
}
body.kcv15-sitewide .kupetz-site-footer__decor { opacity: .72; }
body.kcv15-sitewide .kupetz-site-footer__contacts a:focus-visible {
  outline: 2px solid #ae7c43;
  outline-offset: 3px;
}
@media (max-width: 991px) {
  body.kcv15-sitewide .kupetz-site-footer__contacts-group { align-items: center; }
}

@media (max-width: 575px) {
  body.kcv15-sitewide .kupetz-site-footer__menu { flex-wrap: wrap; gap: 8px; }
}


/* ======================================================================
   KUPETZ DESIGN v1.7 | COMMON CHROME | TEST ONLY
   One style layer for the existing WordPress header and footer templates.
   No solid fill behind History or footer; preserve the historic grid.
   Intentional cascade after the v1.5-v1.6 styles above.
   ====================================================================== */
body.kcv15-sitewide {
  --kcv17-wine: #520b19;
  --kcv17-wine-hover: #6b1b2c;
  --kcv17-brass: #be9259;
  --kcv17-text: #573742;
  --kcv17-muted: #8b6b64;
  --kcv17-line: rgba(160, 109, 67, .35);
}

/* 01 / Header. Retain the existing menu, WooCommerce controls and WSS form.
   Present the active route and keyboard interaction consistently. */
body.kcv15-sitewide .kupetz-site-header {
  box-shadow: 0 4px 16px rgba(30, 4, 10, .12);
}
body.kcv15-sitewide .kupetz-menu-list > li.current-menu-item > a,
body.kcv15-sitewide .kupetz-menu-list > li.current-menu-parent > a,
body.kcv15-sitewide .kupetz-menu-list > li.current-menu-ancestor > a {
  color: #ebc18c;
}
body.kcv15-sitewide .kupetz-header-action__link,
body.kcv15-sitewide .kcv10-favorites-open,
body.kcv15-sitewide .kupetz-language-switcher__link {
  transition: opacity .18s ease, filter .18s ease;
}
body.kcv15-sitewide .kupetz-header-action__link:hover,
body.kcv15-sitewide .kcv10-favorites-open:hover,
body.kcv15-sitewide .kupetz-language-switcher__link:hover {
  filter: brightness(1.15);
}
body.kcv15-sitewide .kupetz-primary-nav :is(a, button):focus-visible {
  outline: 2px solid #eac28a;
  outline-offset: 3px;
}
@media (max-width: 991px) {
  /* The established mobile menu keeps its JS and nested navigation. */
  body.kcv15-sitewide .kupetz-primary-menu.kupetz-menu-is-open {
    background: #fffaf5;
    border-right: 1px solid var(--kcv17-line);
    box-shadow: 14px 0 40px rgba(29, 4, 10, .24);
  }
  body.kcv15-sitewide .kupetz-mobile-menu-logo {
    background: #f9f1e9;
    border-bottom: 1px solid var(--kcv17-line);
  }
  body.kcv15-sitewide .kupetz-menu-list > li,
  body.kcv15-sitewide .kupetz-menu-list li {
    border-bottom-color: rgba(156, 98, 85, .16);
  }
  body.kcv15-sitewide .kupetz-primary-menu .kupetz-menu-list li > a:focus-visible {
    outline: 2px solid var(--kcv17-brass);
    outline-offset: -3px;
  }
}
@media (max-width: 359px) {
  /* Preserve all header actions instead of silently hiding phone/messengers. */
  body.kcv15-sitewide .kupetz-site-header__bar > .container { padding-inline: 4px; }
  body.kcv15-sitewide .kupetz-primary-nav { gap: 2px; }
  body.kcv15-sitewide .kupetz-header-actions { gap: 0; }
}

/* 02 / Footer. Remove the overwhelming legacy side-frame, replacing it with
   a thin editorial ornament. The grid/white backdrop below stays untouched. */
body.kcv15-sitewide .kupetz-site-footer {
  color: var(--kcv17-text);
  margin-bottom: 0;
  padding-bottom: clamp(28px, 4vw, 58px);
}
body.kcv15-sitewide .kupetz-site-footer__decor {
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 1;
}
body.kcv15-sitewide .kupetz-site-footer__decor::before {
  background: linear-gradient(90deg, transparent, var(--kcv17-line) 18%, var(--kcv17-line) 82%, transparent);
  border: 0;
  bottom: auto;
  content: '';
  height: 1px;
  left: 50%;
  margin: 0;
  max-width: calc(100% - 44px);
  position: absolute;
  right: auto;
  top: 12px;
  transform: translateX(-50%);
  width: 930px;
  z-index: 1;
}
body.kcv15-sitewide .kupetz-site-footer__decor::after {
  background: transparent;
  color: var(--kcv17-brass);
  content: '✦';
  display: block;
  font-family: Georgia, serif;
  font-size: 16px;
  height: 23px;
  left: 50%;
  line-height: 23px;
  position: absolute;
  right: auto;
  text-align: center;
  top: 0;
  transform: translateX(-50%);
  width: 34px;
  z-index: 2;
}
body.kcv15-sitewide .kupetz-site-footer__navigation-shell {
  max-width: 1100px;
  padding-top: clamp(32px, 4.2vw, 58px);
}
body.kcv15-sitewide .kupetz-site-footer__navigation {
  display: block;
  margin: 0 auto clamp(25px, 3vw, 42px);
  max-width: 840px;
  width: 100%;
}
body.kcv15-sitewide .kupetz-site-footer__menu {
  align-items: center;
  border-top: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px clamp(12px, 2.5vw, 37px);
  justify-content: center;
  list-style: none;
  width: 100%;
}
body.kcv15-sitewide .kupetz-site-footer__menu li {
  flex: 0 1 auto;
}
body.kcv15-sitewide .kupetz-site-footer__menu a {
  border-bottom: 1px solid transparent;
  color: var(--kcv17-text);
  display: inline-block;
  font-family: var(--kupetz-font-body, Arial, sans-serif);
  font-size: clamp(12px, .92vw, 14px);
  font-weight: 600;
  letter-spacing: .075em;
  line-height: 1.35;
  padding: 7px 4px;
  text-transform: uppercase;
  transition: color .2s ease, border-color .2s ease;
}
body.kcv15-sitewide .kupetz-site-footer__menu a:hover,
body.kcv15-sitewide .kupetz-site-footer__menu a:focus-visible {
  border-color: var(--kcv17-brass);
  color: var(--kcv17-wine);
  text-decoration: none;
}
body.kcv15-sitewide .kupetz-site-footer__navigation-decor {
  background: none;
  display: none;
}
body.kcv15-sitewide .kupetz-site-footer__contacts {
  color: var(--kcv17-text);
  font-size: clamp(13px, .92vw, 15px);
  line-height: 1.65;
  padding-top: 0;
}
body.kcv15-sitewide .kupetz-site-footer__contacts-group {
  align-items: flex-start;
  box-sizing: border-box;
  gap: clamp(16px, 3vw, 45px);
  justify-content: space-between;
  max-width: 990px;
  padding-inline: clamp(18px, 3.5vw, 44px);
}
body.kcv15-sitewide .kupetz-site-footer__contacts-group > * {
  min-width: 0;
}
body.kcv15-sitewide .kupetz-site-footer__contacts :is(p, li) {
  line-height: 1.65;
}
body.kcv15-sitewide .kupetz-site-footer__contacts p {
  margin-bottom: .55em;
}
body.kcv15-sitewide .kupetz-site-footer__contacts a:not(.socials-item) {
  color: #946b3c;
  text-decoration-color: rgba(148, 107, 60, .4);
  text-underline-offset: 3px;
}
body.kcv15-sitewide .kupetz-site-footer__contacts a:not(.socials-item):hover {
  color: var(--kcv17-wine-hover);
  text-decoration-color: currentColor;
}
body.kcv15-sitewide .kupetz-site-footer__contact-column {
  margin-bottom: 0;
}
body.kcv15-sitewide .kupetz-site-footer__social-group {
  align-items: center;
  margin: clamp(16px, 2vw, 26px) auto 0;
}
body.kcv15-sitewide .kupetz-site-footer__social-group .socials {
  line-height: 1.35;
}
body.kcv15-sitewide .kupetz-site-footer__social-group .socials-item {
  display: inline-block;
  margin-inline: 4px;
}
body.kcv15-sitewide .kupetz-site-footer__social-group .socials-item:focus-visible,
body.kcv15-sitewide .kupetz-site-footer__contacts a:focus-visible {
  outline: 2px solid var(--kcv17-brass);
  outline-offset: 3px;
}
body.kcv15-sitewide .kupetz-site-footer__yandex-rating {
  border: 0;
  max-width: 100%;
}
/* The decorative grid is part of the site identity: don't fill it with color. */
body.kcv15-sitewide .kupetz-site-footer__background,
body.kcv15-sitewide .kupetz-site-footer__background .kupetz-page-background__solid {
  pointer-events: none;
}
@media (max-width: 991px) {
  body.kcv15-sitewide .kupetz-site-footer__navigation-shell {
    display: none; /* WP's legacy footer nav is not emitted on mobile. */
  }
  body.kcv15-sitewide .kupetz-site-footer__contacts {
    padding-top: clamp(30px, 5vw, 48px);
  }
  body.kcv15-sitewide .kupetz-site-footer__contacts-group {
    align-items: center;
    gap: 18px;
    padding-inline: 20px;
    text-align: center;
  }
  body.kcv15-sitewide .kupetz-site-footer__social-group {
    margin-top: 14px;
  }
}
@media (max-width: 575px) {
  body.kcv15-sitewide .kupetz-site-footer__decor::before {
    max-width: calc(100% - 34px);
    top: 10px;
  }
  body.kcv15-sitewide .kupetz-site-footer__decor::after { top: -2px; }
  body.kcv15-sitewide .kupetz-site-footer__contacts {
    font-size: 14px;
    line-height: 1.55;
    padding-top: 28px;
  }
  body.kcv15-sitewide .kupetz-site-footer__contacts-group {
    gap: 12px;
    padding-inline: 15px;
  }
  body.kcv15-sitewide .kupetz-site-footer__contacts p { margin-bottom: .45em; }
  body.kcv15-sitewide .kupetz-site-footer__contact-column { margin-bottom: 4px; }
  body.kcv15-sitewide .kupetz-site-footer__social-group { margin-top: 12px; }
  body.kcv15-sitewide .kupetz-site-footer__social-group .socials-item {
    margin-inline: 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.kcv15-sitewide .kupetz-header-action__link,
  body.kcv15-sitewide .kcv10-favorites-open,
  body.kcv15-sitewide .kupetz-language-switcher__link,
  body.kcv15-sitewide .kupetz-site-footer__menu a { transition: none; }
}
