/**
 * Header & Footer Styles for Custom Templates
 * Extracted from main.min.css for use with franchise, blog, and other custom pages
 */

/* ===== RESET & BASE ===== */
* {
  border: 0;
  font-variant-numeric: proportional-nums lining-nums;
  margin: 0;
  padding: 0;
}
*,
:after,
:before {
  box-sizing: border-box;
}
:active,
:focus {
  outline: none;
}
a {
  color: inherit;
  text-decoration: none;
}
a:active,
a:focus {
  outline: none;
}
body {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
button,
input,
textarea {
  font-family: inherit;
}
textarea {
  resize: none;
}
input::-ms-clear {
  display: none;
}
button {
  cursor: pointer;
  font-family: inherit;
}
button::-moz-focus-inner {
  border: 0;
  padding: 0;
}
ul {
  list-style: none;
}
img {
  vertical-align: top;
}

/* ===== FONTS ===== */
@font-face {
  font-display: swap;
  font-family: Vela Sans;
  font-style: normal;
  font-weight: 400;
  src: url(../fonts/VelaSans-Regular.woff2) format("woff2"),
    url(../fonts/VelaSans-Regular.woff) format("woff");
}
@font-face {
  font-display: swap;
  font-family: Vela Sans;
  font-style: normal;
  font-weight: 500;
  src: url(../fonts/VelaSans-Medium.woff2) format("woff2"),
    url(../fonts/VelaSans-Medium.woff) format("woff");
}
@font-face {
  font-display: swap;
  font-family: Vela Sans;
  font-style: normal;
  font-weight: 600;
  src: url(../fonts/VelaSans-SemiBold.woff2) format("woff2"),
    url(../fonts/VelaSans-SemiBold.woff) format("woff");
}

/* ===== TYPOGRAPHY ===== */
.typo-h1 {
  font-size: clamp(40px, 36px + 0.8333333333vw, 48px);
}
.typo-h1,
.typo-h2 {
  font-weight: 600;
  line-height: 120%;
}
.typo-h2 {
  font-size: clamp(32px, 28px + 0.8333333333vw, 40px);
}
.typo-h3 {
  font-size: clamp(24px, 20px + 0.8333333333vw, 32px);
}
.typo-h3,
.typo-t1 {
  font-weight: 500;
  line-height: 120%;
}
.typo-t1 {
  font-size: 24px;
}
.typo-t2 {
  font-size: 16px;
}
.typo-t2,
.typo-t3 {
  font-weight: 600;
  line-height: 140%;
}
.typo-t3 {
  font-size: 14px;
}
.typo-t4 {
  font-size: 12px;
  font-weight: 600;
  line-height: 140%;
}
.typo-p-xl {
  font-size: 20px;
}
.typo-p-l,
.typo-p-xl {
  font-weight: 400;
  line-height: 140%;
}
.typo-p-l {
  font-size: 16px;
}
.typo-p-m {
  font-size: 14px;
}
.typo-p-m,
.typo-p-s {
  font-weight: 400;
  line-height: 140%;
}
.typo-p-s {
  font-size: 12px;
}
.typo-p-xs {
  font-size: 10px;
  font-weight: 400;
  line-height: 140%;
}

/* ===== HTML & BODY ===== */
html {
  box-sizing: border-box;
  height: 100%;
  line-height: normal;
}
body {
  background-color: #231f25;
  color: #f5f5f5;
  font-family: Vela Sans, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  height: 100%;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "pnum" on, "lnum" on;
  font-weight: 400;
}
body > #app {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}
#app > main {
  flex: 1 1 auto;
  overflow: hidden;
  width: 100%;
}

/* ===== UTILITIES ===== */
.visually-hidden {
  border: 0;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  clip: rect(0 0 0 0);
  clip-path: inset(100%);
  white-space: nowrap;
}
.container {
  margin: 0 auto;
  max-width: 1440px;
  padding: 0 16px;
  width: 100%;
}

/* ===== BURGER MENU ===== */
.burger {
  align-items: center;
  background-color: transparent;
  cursor: pointer;
  display: flex;
  height: 32px;
  justify-content: center;
  width: 32px;
  z-index: 1001;
}
@media (hover: hover) {
  .burger:not(.is-active):hover span:first-child {
    top: 3px;
  }
  .burger:not(.is-active):hover span:last-child {
    bottom: 3px;
  }
}
.burger__inner {
  flex-shrink: 0;
  height: 18px;
  position: relative;
  width: 24px;
}
.burger__inner,
.burger__inner span {
  transition: all 0.3s cubic-bezier(0.4, 0.01, 0.165, 0.99) 0s;
}
.burger__inner span {
  background-color: #f4b44d;
  border-radius: 5px;
  height: 2px;
  left: 0;
  position: absolute;
  top: calc(50% - 1px);
  width: 100%;
}
.burger__inner span:first-child {
  top: 0;
}
.burger__inner span:last-child {
  bottom: 0;
  top: auto;
}
.burger.is-active span {
  transform: scale(0);
}
.burger.is-active span:first-child {
  top: calc(50% - 1px);
  transform: rotate(-45deg);
}
.burger.is-active span:last-child {
  bottom: calc(50% - 1px);
  transform: rotate(45deg);
}
@media (hover: hover) {
  .burger.is-active:hover .burger__inner {
    transform: rotate(90deg);
  }
}

/* ===== LOGO ===== */
.logo {
  align-items: center;
  display: inline-flex;
  gap: 12px;
}
.logo__icon {
  height: auto;
  width: 40px;
  color: #f4b44d;
  fill: #f4b44d;
}
.logo__text {
  color: #f5f5f5;
  font-size: 24px;
  font-weight: 600;
  line-height: 100%;
}
.logo__text span {
  color: #f4b44d !important;
}

/* ===== HEADER ===== */
.header {
  color: #fff;
  height: 84px;
  position: fixed;
  z-index: 6;
}
.header,
.header:before {
  left: 0;
  top: 0;
  width: 100%;
}
.header:before {
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  background-color: rgba(18, 14, 20, 0.8);
  border-bottom: 1px solid rgba(244, 180, 77, 0.16);
  content: "";
  height: 100%;
  position: absolute;
}
.header .container {
  align-items: center;
  display: flex;
  gap: 24px;
  height: 100%;
}
@media (max-width: 1024.9px) {
  .header__nav {
    height: 100%;
    left: 0;
    overflow: hidden auto;
    padding: 60px 16px 24px;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 2;
  }
}
@media (min-width: 1025px) {
  .header__nav {
    align-items: center;
    display: flex;
    flex-direction: row;
    height: 100%;
    justify-content: space-between;
    padding: 0;
    position: relative;
    z-index: 5;
  }
}
.header__container {
  height: 100%;
}
@media (max-width: 1024.9px) {
  .header__container {
    height: calc(100% - 84px);
    left: 0;
    opacity: 0;
    position: fixed;
    top: 84px;
    transition: all 0.2s ease 0s;
    visibility: hidden;
    width: 100%;
  }
}
@media (min-width: 1025px) {
  .header__container {
    left: 50%;
    position: absolute;
    transform: translateX(-50%);
  }
}
.header__container.is-open {
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  background-color: hsla(0, 0%, 100%, 0.04);
  opacity: 1;
  visibility: visible;
}
.header__logo {
  cursor: pointer;
  flex-shrink: 0;
  z-index: 6;
}
.header__logo .logo__text {
  display: none;
}
@media (min-width: 1025px) {
  .header__logo .logo__text {
    display: block;
  }
}
.header__burger {
  align-items: center;
  display: flex;
  z-index: 6;
}
@media (min-width: 1025px) {
  .header__burger {
    display: none;
  }
}
.header__telegram {
  align-items: center;
  color: #f4b44d;
  display: flex;
  gap: 8px;
  position: relative;
  z-index: 6;
}
.header__telegram span {
  display: none;
}
@media (min-width: 1025px) {
  .header__telegram span {
    display: block;
    font-size: 16px;
    font-weight: 500;
    line-height: 100%;
  }
}
.header__telegram svg {
  height: 24px;
  width: 24px;
  fill: currentColor;
}
@media (min-width: 1025px) {
  .header__telegram svg {
    height: 24px;
    width: 24px;
  }
}

/* Mobile header layout */
@media (max-width: 1024px) {
  .header .container {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    height: 100% !important;
    padding: 0 16px !important;
  }
  
  .header__burger {
    align-items: center !important;
    display: flex !important;
    z-index: 6 !important;
    flex-shrink: 0 !important;
  }
  
  .header__logo {
    cursor: pointer !important;
    flex-shrink: 0 !important;
    z-index: 6 !important;
  }
  
  .header__telegram {
    align-items: center !important;
    color: #f4b44d !important;
    display: flex !important;
    gap: 8px !important;
    position: relative !important;
    z-index: 6 !important;
  }
  
  .header__telegram span {
    display: none !important;
  }
  
  .header__telegram svg {
    height: 24px !important;
    width: 24px !important;
    fill: currentColor !important;
  }
  
  .header__region,
  div.header__region {
    position: relative !important;
    z-index: 6 !important;
    flex-shrink: 0 !important;
  }
}

@media (max-width: 767px) {
  .header .container {
    gap: 12px !important;
    padding: 0 12px !important;
  }
  
  #regionToggle,
  .header__region-toggle {
    height: 36px !important;
    padding: 0 10px !important;
    font-size: 13px !important;
  }
}

/* Desktop header layout */
@media (min-width: 1025px) {
  .header .container {
    gap: 24px;
  }
  
  .header__telegram {
    margin-left: auto;
  }
  
  .header__region,
  div.header__region {
    position: relative !important;
    z-index: 6 !important;
  }
}

/* ===== MAIN CONTENT PADDING FOR FIXED HEADER ===== */
main,
.main-content,
.blog-page-wrapper,
#app > main,
#site-content,
.section.menu-overlap {
  padding-top: 100px;
}

/* Franchise page specific */
.franchise-page main,
.page-template-page-franchise main,
.page-template-page-franchise #site-content {
  padding-top: 100px;
}

/* Blog page specific */
.blog main,
.single main,
.archive main,
.category main,
.page-template-blog main,
.page-template-blog #site-content {
  padding-top: 100px;
}

/* 404 page */
.error404 main,
.error404 #app > div {
  padding-top: 100px;
}

/* ===== NAVIGATION ===== */
#menu-main-menu {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100%;
  justify-content: center;
}
@media (min-width: 1025px) {
  #menu-main-menu {
    flex-direction: row;
    gap: 48px;
    height: auto;
  }
}
.nav__item a,
.nav__link {
  color: #f5f5f5;
  font-size: 20px;
  font-weight: 500;
  line-height: 100%;
  transition: all 0.2s ease 0s;
}
@media (min-width: 1025px) {
  .nav__item a,
  .nav__link {
    color: #9c9c9c;
    font-size: 16px;
    font-weight: 400;
  }
}
@media (hover: hover) {
  .nav__item a:hover,
  .nav__link:hover {
    color: #f5f5f5;
  }
}

/* ===== FOOTER ===== */
.footer {
  background: rgba(18, 14, 20, 0.66);
  padding: 32px 0;
}
@media (min-width: 1025px) {
  .footer {
    padding: 48px 0;
  }
}
.footer__grid {
  display: grid;
  gap: 32px;
}
@media (min-width: 1025px) {
  .footer__grid {
    gap: 24px;
    grid-template-columns: repeat(4, 1fr);
  }
  .footer__logo {
    grid-column: 1;
  }
  .footer__partners {
    grid-column: 2;
  }
  .footer__doc {
    grid-column: 3;
  }
  .footer__contacts {
    grid-column: 4;
  }
}
.footer__partners {
  display: flex;
  flex-direction: column;
}
.footer__partners-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer__partners-list a {
  display: inline-block;
  transition: all 0.2s ease;
}
@media (hover: hover) {
  .footer__partners-list a:hover {
    opacity: 0.8;
    transform: translateY(-2px);
  }
}
.footer__partners-list img {
  display: block;
  max-width: 100%;
  height: auto;
}
.footer__subtitle {
  color: #f5f5f5;
  margin-bottom: 24px;
  font-weight: 600;
}
.footer__doc-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer__doc-list a {
  color: #9c9c9c;
  transition: all 0.2s ease 0s;
}
@media (hover: hover) {
  .footer__doc-list a:hover {
    color: #f5f5f5;
  }
}
.footer__contacts-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer__contacts-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer__contacts-subtitle {
  color: #9c9c9c;
  font-size: 14px;
}
.footer__contacts-link {
  color: #f4b44d;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}
@media (hover: hover) {
  .footer__contacts-link:hover {
    color: #f5c96d;
  }
}
.footer__contacts-link svg {
  fill: currentColor;
  flex-shrink: 0;
}
.footer__bottom {
  color: #9c9c9c;
  margin-top: 40px;
  text-align: center;
}
@media (min-width: 1025px) {
  .footer__bottom {
    margin-top: 48px;
  }
}
@media (max-width: 1024px) {
  .footer__logo {
    text-align: center;
  }
  .footer__partners,
  .footer__doc,
  .footer__contacts {
    text-align: left;
  }
  .footer__partners-list {
    align-items: flex-start;
  }
}

/* ===== BUTTONS (common) ===== */
.btn {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 500;
  gap: 8px;
  justify-content: center;
  line-height: 100%;
  padding: 16px 24px;
  transition: all 0.2s ease 0s;
}
.btn--primary {
  background-color: #f4b44d;
  color: #231f25;
}
@media (hover: hover) {
  .btn--primary:hover {
    background-color: #f5c96d;
  }
}
.btn--secondary {
  background-color: rgba(244, 180, 77, 0.12);
  color: #f4b44d;
}
@media (hover: hover) {
  .btn--secondary:hover {
    background-color: rgba(244, 180, 77, 0.2);
  }
}

/* ===== GOLD LABEL ===== */
.gold-label {
  background: rgba(244, 180, 77, 0.12);
  border-radius: 4px;
  color: #f4b44d;
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
}

/* ===== HEADER REGION SELECTOR ===== */
/* Base styles for all devices */
.header__region,
div.header__region {
  position: relative !important;
  z-index: 6 !important;
}

/* Region toggle */
#regionToggle,
.header__region-toggle {
  align-items: center !important;
  background: rgba(18, 14, 20, 0.8) !important;
  border: 1px solid rgba(244, 180, 77, 0.3) !important;
  border-radius: 6px !important;
  color: #f5f5f5 !important;
  cursor: pointer !important;
  display: flex !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  gap: 8px !important;
  height: 40px !important;
  padding: 0 12px !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
}

#regionToggle .header__region-name,
.header__region-name {
  flex: 1 !important;
  text-align: center !important;
  padding: 0 8px !important;
  color: #f5f5f5 !important;
}

#regionToggle .header__region-arrow,
.header__region-arrow {
  width: 12px !important;
  height: 12px !important;
  transition: transform 0.3s ease !important;
  fill: none !important;
  stroke: #f4b44d !important;
  flex-shrink: 0 !important;
  margin-left: auto !important;
}

#regionToggle:hover,
.header__region-toggle:hover {
  border-color: #f4b44d !important;
  background: rgba(18, 14, 20, 0.9) !important;
}

#regionToggle.is-active,
.header__region-toggle.is-active {
  border-color: #f4b44d !important;
  background: rgba(18, 14, 20, 0.9) !important;
}

#regionToggle.is-active .header__region-arrow,
.header__region-toggle.is-active .header__region-arrow {
  transform: rotate(180deg) !important;
}

/* Region dropdown */
#regionDropdown,
.header__region-dropdown {
  background: #231f25 !important;
  border: 1px solid rgba(244, 180, 77, 0.3) !important;
  border-radius: 8px !important;
  box-shadow: 0 6px 36px rgba(0, 0, 0, 0.4) !important;
  margin-top: 8px !important;
  opacity: 0 !important;
  position: absolute !important;
  right: 0 !important;
  top: 100% !important;
  transform: translateY(-10px) !important;
  transition: all 0.3s ease !important;
  visibility: hidden !important;
  min-width: 150px !important;
  width: auto !important;
  z-index: 1001 !important;
  pointer-events: none !important;
}

#regionDropdown.is-open,
.header__region-dropdown.is-open {
  opacity: 1 !important;
  transform: translateY(0) !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

#regionDropdown .header__region-list,
.header__region-list {
  display: flex !important;
  flex-direction: column !important;
  max-height: 300px !important;
  overflow-y: auto !important;
  padding: 8px !important;
  background: #231f25 !important;
}

#regionDropdown .header__region-item,
.header__region-item,
a.header__region-item {
  align-items: center !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  display: flex !important;
  justify-content: center !important;
  text-align: center !important;
  text-decoration: none !important;
  color: #f5f5f5 !important;
  gap: 12px !important;
  padding: 10px 12px !important;
  transition: all 0.2s ease !important;
  background: transparent !important;
}

#regionDropdown .header__region-item:hover,
.header__region-item:hover,
a.header__region-item:hover {
  background: rgba(244, 180, 77, 0.1) !important;
  text-decoration: none !important;
  color: #f5f5f5 !important;
}

#regionDropdown .header__region-item.is-active,
.header__region-item.is-active,
a.header__region-item.is-active {
  background: rgba(244, 180, 77, 0.15) !important;
  color: #f4b44d !important;
}

.header__region-item-name {
  font-size: 14px !important;
  font-weight: 500 !important;
  width: 100% !important;
  text-align: center !important;
  color: inherit !important;
}

/* Mobile specific adjustments */
@media (max-width: 1024px) {
  .header__region,
  div.header__region {
    margin-left: auto !important;
  }
}

/* ===== LINK STYLES ===== */
.link--yellow {
  color: #f4b44d;
  transition: all 0.2s ease;
}
@media (hover: hover) {
  .link--yellow:hover {
    color: #f5c96d;
  }
}