:root {
  /* Do not redefine palette here: keep tokens in `static/css/base.css` */
  --header-height: 96px;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='40'%3E%3Cg fill='none' stroke='%232f6d4f' stroke-width='1.1' opacity='0.14'%3E%3Cpolyline points='0,30 15,14 30,26 45,10 60,24 75,8 90,22 105,12 120,28'/%3E%3Cpolyline points='0,38 20,26 40,36 60,22 80,34 100,24 120,36' opacity='0.6'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 120px 40px;
  animation: bg-ridge-drift 70s ease-in-out infinite alternate;
  color: var(--color-text);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  padding-top: var(--header-height);
  overflow-x: hidden;
  scroll-behavior: smooth;
}
@keyframes bg-ridge-drift {
  0%   { background-position: 0 0; }
  100% { background-position: -60px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
}
a { text-decoration: none; color: inherit; }
a.logo { text-decoration: none; color: inherit; display: inline-block; }
a.logo:hover { color: var(--gold); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.9s ease, transform 0.9s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
body > header {
  position: fixed; top: 0; left: 0; width: 100%; height: var(--header-height);
  background: rgba(15,31,27,0.95); backdrop-filter: blur(12px); z-index: 1000;
  box-shadow: 0 2px 15px rgba(0,0,0,0.15);
}
.nav { display:flex; align-items:center; justify-content:space-between; padding:18px 20px; color:#fff; }
.logo { font-weight:900; font-size:26px; letter-spacing:1px; color:var(--gold); margin-left:0; }
.menu { display:flex; align-items:center; gap:30px; }
.menu a { font-weight:500; font-size:16px; transition:color .3s; padding:8px 0; }
.menu a:hover { color:var(--gold); }
.hamburger { display:none; font-size:32px; cursor:pointer; padding:8px; color:#fff; }
.mobile-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.5); opacity:0; visibility:hidden; transition:all .3s ease; z-index:999; }
.mobile-overlay.active { opacity:1; visibility:visible; }

/* Header menu extras */
.menu .menu-link { background:none; border:none; color:inherit; font:inherit; cursor:pointer; font-weight:500; font-size:16px; padding:8px 0; display:flex; align-items:center; gap:8px; }
.menu .menu-link:hover { color:var(--gold); }
.menu .menu-order { background:var(--gold); color:#000; padding:10px 18px; border-radius:999px; font-weight:700; }
.menu .menu-order:hover { color:var(--white); background:var(--color-accent-hover); }
.menu .chev { font-size:14px; opacity:0.9; }

/* Language dropdown */
.lang-dropdown {
  position: relative;
  margin: 0;
}

.lang-dropdown > summary {
  list-style: none;
}

.lang-dropdown > summary::-webkit-details-marker {
  display: none;
}

.lang-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 170px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.08);
  color: #fff;
  cursor: pointer;
  user-select: none;
}

.lang-dropdown-current {
  font-size: 14px;
  font-weight: 600;
}

.lang-dropdown-caret {
  font-size: 13px;
  opacity: 0.9;
  transition: transform .2s ease;
}

.lang-dropdown[open] .lang-dropdown-caret {
  transform: rotate(180deg);
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 230px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(0,0,0,0.16);
  padding: 6px;
  z-index: 1010;
}

.lang-dropdown-menu .lang-dropdown-item {
  color: var(--color-text);
}

.lang-dropdown-menu .lang-dropdown-item:hover {
  background: var(--color-bg-soft);
  color: var(--color-accent-hover);
}

.lang-dropdown-menu .lang-dropdown-item.is-active {
  color: var(--color-accent-hover);
}

.lang-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--color-text);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.lang-dropdown-item:hover {
  background: var(--color-bg-soft);
  color: var(--color-accent-hover);
}

.lang-dropdown-item.is-active {
  color: var(--color-accent-hover);
}

.lang-dropdown-check {
  color: var(--color-accent-hover);
  font-weight: 700;
}

/* Tours dropdown (slides down) */
.tours-dropdown {
  position: fixed;
  top: var(--header-height);
  left: 50%;
  right: auto;
  width: 280px;
  max-width: calc(100vw - 40px);
  background: rgba(15,31,27,0.98);
  backdrop-filter: blur(12px);
  z-index: 1002;
  border-top: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 18px 40px rgba(0,0,0,0.28);
  overflow: hidden;
  transform: translateX(-50%) translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: all .25s ease;
  border-radius: 16px 16px 0 0;
}
.tours-dropdown.active { transform: translateX(-50%) translateY(0); opacity:1; pointer-events:auto; }
.tours-dropdown-inner {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0;
  padding: 10px 0 8px;
  justify-content: flex-start;
  align-items: stretch;
}

/* Dropdown has its own fixed width; don't apply global container padding. */
.tours-dropdown .container {
  max-width: none;
  padding: 0;
}
.tours-chip { display:inline-flex; align-items:center; justify-content:center; padding:10px 14px; border-radius:999px; background:rgba(255,255,255,0.08); color:#fff; font-weight:600; transition: all .2s ease; }
.tours-chip:hover { background:rgba(255,255,255,0.14); color: var(--gold); }
.tours-chip.active { background: var(--gold); color:#000; }

/* Dropdown items: vertical list (override base "pills") */
.tours-dropdown-inner .tours-chip {
  width: 100%;
  justify-content: flex-start;
  padding: 12px 16px;
  border-radius: 0;
  background: transparent;
}
.tours-dropdown-inner .tours-chip:hover { background: rgba(255,255,255,0.12); }
.tours-dropdown-inner .tours-chip.active {
  color: #fff;
  background: transparent;
  font-weight: 600;
}
.tours-dropdown-inner .tours-chip:first-child { border-top-left-radius: 16px; border-top-right-radius: 16px; }
.tours-dropdown-inner .tours-chip:last-child { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }

/* cache-bust: v3 */

/* Mobile-only accordion container (hidden on desktop to avoid duplicates) */
.menu-categories { display:none; }

/* Mobile: menu drops down (not a side drawer) */
@media (max-width:768px) {
  .hamburger { display:block; }
  .menu {
    position: fixed;
    top: var(--header-height);
    right: 0;
    left: auto;
    width: 70vw;
    max-width: 420px;
    min-width: 280px;
    background: rgba(15,31,27,0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px 16px 16px;
    z-index: 1001;
    transform: translateX(12px);
    opacity: 0;
    pointer-events: none;
    transition: transform .25s ease, opacity .25s ease;
    border-left: 1px solid rgba(255,255,255,0.08);
    border-bottom-left-radius: 18px;
    box-shadow: -18px 0 40px rgba(0,0,0,0.28);
    max-height: calc(100dvh - var(--header-height) - 8px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .menu.active {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }
  .menu a, .menu .menu-link {
    font-size: 17px;
    width: 100%;
    text-align: left;
    justify-content: space-between;
    padding: 10px 6px;
    margin: 0;
  }
  .menu > a,
  .menu > .menu-link,
  .menu > .menu-order,
  .menu > .lang-dropdown {
    margin-bottom: 8px;
  }
  /* Mobile drawer: hide CTA and move language switcher to top */
  .menu .menu-order {
    display: none;
  }
  .menu .lang-dropdown {
    order: -10;
  }
  .lang-dropdown {
    width: 100%;
  }
  .lang-dropdown-trigger {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 10px;
  }
  .lang-dropdown-current {
    font-size: 16px;
  }
  .lang-dropdown-menu {
    position: static;
    width: 100%;
    margin-top: 6px;
    border-radius: 10px;
    box-shadow: none;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.06);
    padding: 4px;
  }
  .lang-dropdown-item {
    color: #fff;
    border-radius: 8px;
  }
  .lang-dropdown-item:hover {
    background: rgba(255,255,255,0.14);
    color: #fff;
  }
  .lang-dropdown-item.is-active,
  .lang-dropdown-check {
    color: var(--gold);
  }
  .logo { margin-left:0; font-size:24px; }

  /* Accordion under "Туры" */
  .menu-categories {
    display:none;
    width:100%;
    overflow:hidden;
    max-height:0;
    opacity:0;
    transform: translateY(-6px);
    transition: max-height .25s ease, opacity .2s ease, transform .2s ease;
    padding: 0;
    margin: 0;
  }
  .menu-categories.active {
    display:flex;
    max-height: none;
    overflow: visible;
    opacity:1;
    transform: translateY(0);
    padding: 0 0 3px;
    margin-top: -3px;
    margin-bottom: 6px;
  }
  .menu-categories {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 4px;
  }

  .menu-categories .tours-chip {
    width: 100%;
    justify-content: flex-start;
    padding: 8px 10px;
    border-radius: 10px;
    margin-top: 0;
    min-height: 38px;
    white-space: normal;
  }
  /* На мобилке не используем отдельный desktop dropdown */
  .tours-dropdown { display:none; }
}

@media (max-width:480px) {
  .logo { font-size:22px; margin-left:0; }
}

/* 2026 public header refresh */
body > header {
  background:
    linear-gradient(135deg, rgba(11,36,26,0.96), rgba(18,59,42,0.98)),
    var(--color-primary-dark);
  border-bottom: 1px solid rgba(255,252,245,0.1);
  box-shadow: 0 10px 34px rgba(11,36,26,0.16);
}

.nav {
  height: var(--header-height);
  padding: 0 20px;
  color: var(--color-on-media);
}

a.logo,
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-on-media);
  font-family: var(--font-serif);
  font-size: 31px;
  letter-spacing: 0;
  line-height: 1;
}

.logo-mark {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  object-fit: contain;
  display: block;
}

a.logo:hover {
  color: var(--color-on-media);
}

.menu {
  gap: 24px;
}

.menu a,
.menu .menu-link {
  color: rgba(255,252,245,0.9);
  font-weight: 800;
}

.menu a:hover,
.menu .menu-link:hover {
  color: var(--color-accent);
}

.menu .menu-order {
  padding: 14px 20px;
  border-radius: 8px;
  background: linear-gradient(180deg, #d98238, var(--color-accent));
  color: #fff;
  box-shadow: 0 12px 28px rgba(201,107,36,0.18);
}

.menu .menu-order:hover {
  background: var(--color-accent-hover);
  color: #fff;
}

.lang-dropdown-trigger {
  border-color: rgba(255,252,245,0.18);
  background: rgba(255,252,245,0.08);
  color: var(--color-on-media);
}

.hamburger {
  color: var(--color-on-media);
}

.mobile-header-actions {
  display: none;
  align-items: center;
  gap: 10px;
}

.mobile-call-button {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(201,107,36,0.38);
  border-radius: 999px;
  color: var(--color-on-media);
  background: rgba(255,252,245,0.08);
  font: inherit;
  cursor: pointer;
}

.mobile-menu-footer {
  display: none;
}

.tours-dropdown {
  background: rgba(11,36,26,0.98);
  border: 1px solid rgba(255,252,245,0.12);
  box-shadow: 0 18px 40px rgba(11,36,26,0.14);
}

.tours-dropdown-inner .tours-chip {
  color: rgba(255,252,245,0.9);
}

.tours-dropdown-inner .tours-chip:hover {
  background: rgba(255,252,245,0.1);
}

.tours-dropdown-inner .tours-chip.active {
  color: var(--color-accent);
}

@media (max-width: 768px) {
  :root {
    --header-height: 76px;
  }

  body > header {
    background:
      linear-gradient(135deg, rgba(11,36,26,0.96), rgba(18,59,42,0.98)),
      var(--color-primary-dark);
  }

  .nav {
    height: var(--header-height);
  }

  .logo {
    font-size: 20px;
  }

  .logo-mark {
    width: 42px;
    height: 42px;
  }

  .mobile-header-actions {
    display: inline-flex;
  }

  .mobile-call-button {
    display: inline-flex;
    color: #fff;
    background: linear-gradient(180deg, rgba(201,107,36,0.9), var(--color-accent-hover));
    box-shadow: 0 10px 22px rgba(201,107,36,0.2);
  }

  .hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(201,107,36,0.34);
    border-radius: 999px;
    color: var(--color-on-media);
    font-size: 22px;
    background: rgba(255,252,245,0.08);
  }

  .menu {
    background: rgba(11,36,26,0.98);
    border-left: 1px solid rgba(255,252,245,0.12);
    box-shadow: -18px 0 40px rgba(11,36,26,0.16);
    align-items: stretch;
    gap: 0;
    min-height: calc(100dvh - var(--header-height));
    padding: 14px 16px 16px;
  }

  .menu a,
  .menu .menu-link,
  .lang-dropdown-item {
    color: rgba(255,252,245,0.9);
  }

  .lang-dropdown-menu {
    border-color: rgba(255,252,245,0.12);
    background: rgba(18,59,42,0.98);
  }

  .lang-dropdown-item:hover {
    background: rgba(255,252,245,0.08);
    color: var(--color-accent);
  }

  .menu-categories .tours-chip {
    color: rgba(255,252,245,0.9);
    background: rgba(255,252,245,0.08);
    font-size: 15px;
  }

  .menu-categories .tours-chip.active {
    background: rgba(201,107,36,0.18);
    color: var(--color-on-media);
  }

  .mobile-menu-footer {
    display: block;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255,252,245,0.12);
  }

  .mobile-menu-footer__title {
    margin: 0 0 10px;
    color: rgba(255,252,245,0.72);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
  }

  .mobile-menu-socials {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
  }

  .menu .mobile-menu-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-width: 42px;
    padding: 0;
    margin: 0;
    border: 1px solid rgba(255,252,245,0.14);
    border-radius: 999px;
    background: rgba(255,252,245,0.08);
    color: #fff;
    font-size: 18px;
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
  }

  .menu .mobile-menu-social:hover {
    transform: translateY(-1px);
    color: #fff;
    background: rgba(255,252,245,0.14);
    border-color: rgba(255,252,245,0.28);
  }

  .mobile-menu-social--whatsapp {
    background: rgba(37,211,102,0.16);
    border-color: rgba(37,211,102,0.28);
  }

  .mobile-menu-social--telegram {
    background: rgba(0,136,204,0.16);
    border-color: rgba(0,136,204,0.28);
  }

  .mobile-menu-social--instagram {
    background: rgba(201,107,36,0.18);
    border-color: rgba(201,107,36,0.3);
  }

  .menu .mobile-menu-phone {
    display: inline-flex;
    width: 100%;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255,252,245,0.08);
    color: rgba(255,252,245,0.92);
    font-size: 14px;
    font-weight: 800;
  }
}
