/* =========================================
   Header
========================================= */

.site-header {   
  border-bottom: 1px solid #e7eef3; 
  box-shadow: 0 4px 18px rgba(30, 61, 82, 0.05);
}

.site-header .topnav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.5vw, 42px);
 
  min-height: 100px;
  margin: 0 auto;
  padding: 0;
}

/* =========================================
   Logo
========================================= */

.site-header .logo {
  flex: 0 0 auto;
}

.site-header .logo a {
  display: block;
}

.site-header .logo img {
  display: block;
  width: 185px;
  max-height: 90px;
  object-fit: contain;
}

/* =========================================
   Desktop navigation
========================================= */

.header__menu {
  min-width: 0;
  margin-left: auto;
}

.main-navigation,
.main-menu {
  height: 100%;
    align-items: center;
    display: flex;
    justify-content: center;
}

.main-navigation .main_menu {
  display: flex;
  align-items: center;
  gap: 25px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-navigation .menu-item {
  position: relative;
  margin: 0;
  padding: 0;
}

.main-navigation .menu-item > a {
  position: relative;
  display: flex;
  align-items: center; 
  padding: 15px 0;
  color: #202428;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.25s ease;
}

.main-navigation .menu-item > a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  border-radius: 5px;
  background: #159fe8;
  content: "";
  opacity: 0;
  transform: scaleX(0);
  transform-origin: center;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.main-navigation .menu-item:hover > a,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a,
.main-navigation .current-menu-ancestor > a {
  color: #159fe8;
}

.main-navigation .menu-item:hover > a::after,
.main-navigation .current-menu-item > a::after,
.main-navigation .current_page_item > a::after,
.main-navigation .current-menu-ancestor > a::after {
  opacity: 1;
  transform: scaleX(1);
}

/* Якщо старий walker додає p та .mline */

.main-navigation .menu-item a p {
  margin: 0;
  padding: 0;
  font: inherit;
}

.main-navigation .menu-item a .mline {
  display: none;
}

/* =========================================
   Header actions
========================================= */

.site-header__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 18px;
  margin-left: 30px;
}

/* =========================================
   Phones
========================================= */

.header-phones {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-phones__icon {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #159fe8;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-phones__primary {
  color: #4d5358;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.25s ease;
}

.header-phones__primary:hover {
  color: #159fe8;
}

.header-phones__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #5b6267;
  cursor: pointer;
  transition:
    color 0.25s ease,
    background 0.25s ease;
}

.header-phones__toggle:hover,
.header-phones.is-open .header-phones__toggle {
  background: #e5f6ff;
  color: #159fe8;
}

.header-phones__toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s ease;
}

.header-phones__dropdown {
  position: absolute;
  top: calc(100% + 17px);
  right: 0;
  z-index: 20;
  width: 220px;
  padding: 9px;
  visibility: hidden;
  border: 1px solid #e3edf2;
  border-radius: 15px;
  background: #fff;
  opacity: 0;
  box-shadow: 0 15px 35px rgba(32, 63, 82, 0.14);
  pointer-events: none;
  transform: translateY(-10px);
  transition:
    visibility 0.25s ease,
    opacity 0.25s ease,
    transform 0.25s ease;
}

.header-phones__dropdown::before {
  position: absolute;
  right: 0;
  bottom: 100%;
  left: 0;
  height: 18px;
  content: "";
}

.header-phones__dropdown a {
  display: block;
  padding: 11px 20px;
  border-radius: 10px;
  color: #252a2e;
  text-align: right;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.header-phones__dropdown a span {
  display: block;
  margin-bottom: 3px;
  color: #8a9197;
  font-size: 12px;
  font-weight: 400;
}

.header-phones__dropdown a:hover {
  background: #edf9ff;
  color: #159fe8;
}

.header-phones:hover .header-phones__dropdown,
.header-phones:focus-within .header-phones__dropdown,
.header-phones.is-open .header-phones__dropdown {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.header-phones:hover .header-phones__toggle svg,
.header-phones:focus-within .header-phones__toggle svg,
.header-phones.is-open .header-phones__toggle svg {
  transform: rotate(180deg);
}

/* =========================================
   Blue menu button
========================================= */
.header__mobile-menu,
.header-menu-button {
  display: flex;
  flex: 0 0 58px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 58px;
  height: 58px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, #18acf6, #078ee5);
  box-shadow: 0 8px 20px rgba(13, 151, 235, 0.25);
  cursor: pointer;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.header-menu-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(13, 151, 235, 0.32);
}

.header__mobile-menu span,
.header-menu-button span {
  display: block;
  width: 21px;
  height: 2px;
  border-radius: 3px;
  background: #fff;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.header-menu-button.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header-menu-button.is-active span:nth-child(2) {
  opacity: 0;
}

.header-menu-button.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =========================================
   Get in touch
========================================= */

.get_in_touch_btn {
  display: none;
}

/* =========================================
   Dropdown/mobile menu
========================================= */

.mobile-menu {
  position: fixed;
  top: 125px;
  right: max(20px, calc((100vw - 1450px) / 2));
  z-index: 999;
  width: min(330px, calc(100% - 32px));
  padding: 15px;
  visibility: hidden;
  border: 1px solid #e3edf2;
  border-radius: 20px;
  background: #fff;
  opacity: 0;
  box-shadow: 0 20px 50px rgba(30, 60, 80, 0.17);
  pointer-events: none;
  transform: translateY(-15px);
  transition:
    visibility 0.3s ease,
    opacity 0.3s ease,
    transform 0.3s ease;
}

.mobile-menu.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mobile-menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-menu li {
  margin: 0;
  padding: 0;
}

.mobile-menu a {
  display: block;
  padding: 13px 15px;
  border-radius: 10px;
  color: #22272b;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.mobile-menu a:hover,
.mobile-menu a.is-active,
.mobile-menu .current-menu-item > a {
  background: #edf9ff;
  color: #159fe8;
}
 

.header__mobile-menu {
  display: none !important;
}

/* =========================================
   Tablet
========================================= */

@media (max-width: 1200px) {
  .site-header .topnav {
    min-height: 90px;
  }

  .site-header .logo img {
    width: 150px;
    max-height: 68px;
  }

  .header__menu {
    display: none;
  }

  .mobile-menu {
    top: 105px;
    right: 16px;
  }
}

/* =========================================
   Mobile
========================================= */

@media (max-width: 900px) {

  .header-menu-button {
    display: none !important;
  } 
   .header__mobile-menu {
    display: flex !important;
  }
}
@media (max-width: 650px) {
 

  .site-header .topnav {
    width: calc(100% - 28px);
    min-height: 82px;
    gap: 12px;
  }

  .site-header .logo img {
    width: 125px;
    max-height: 58px;
  }

  .site-header__actions {
    margin-left: auto;
    gap: 12px;
  }
  
  .header__mobile-menu,
  .header-menu-button {
    flex-basis: 49px;
    width: 49px;
    height: 49px;
  }

  .mobile-menu {
    top: 94px;
  }

}

@media (max-width: 650px) {
	.header-phones__primary,
	.header-phones__toggle {
		display: none;
	}

	.header-phones {
		position: relative;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		border: 1px solid #e3edf2;
		border-radius: 50%;
		background: #fff;
		cursor: pointer;
		transition:
			background-color 0.25s ease,
			border-color 0.25s ease,
			box-shadow 0.25s ease;
	}

	.header-phones:hover,
	.header-phones:focus-visible,
	.header-phones.is-open {
		border-color: #bfe8fb;
		background: #edf9ff;
		box-shadow: 0 7px 18px rgba(21, 159, 232, 0.15);
		outline: none;
	}

	.header-phones__icon {
		flex: none;
		width: 23px;
		height: 23px;
	}

	.header-phones__dropdown {
		position: absolute;
		top: calc(100% + 14px);
		right: 0;
		z-index: 1000;
		display: block;
		width: 235px;
		padding: 9px;
		visibility: hidden;
		border: 1px solid #e3edf2;
		border-radius: 15px;
		background: #fff;
		opacity: 0;
		box-shadow: 0 15px 35px rgba(32, 63, 82, 0.16);
		pointer-events: none;
		transform: translateY(-10px);
		transition:
			visibility 0.25s ease,
			opacity 0.25s ease,
			transform 0.25s ease;
	}

	.header-phones__dropdown::after {
		position: absolute;
		right: 15px;
		bottom: 100%;
		width: 12px;
		height: 12px;
		border-top: 1px solid #e3edf2;
		border-left: 1px solid #e3edf2;
		background: #fff;
		content: "";
		transform: translateY(6px) rotate(45deg);
	}

	.header-phones.is-open .header-phones__dropdown {
		visibility: visible;
		opacity: 1;
		pointer-events: auto;
		transform: translateY(0);
	}

	.header-phones__dropdown a {
		position: relative;
		z-index: 1;
		padding: 11px 13px;
		text-align: left;
	}

	/* На мобільному не відкриваємо меню простим hover */
	.header-phones:not(.is-open):hover .header-phones__dropdown {
		visibility: hidden;
		opacity: 0;
		pointer-events: none;
		transform: translateY(-10px);
	}
}


.language-switcher {
	position: relative;
	flex: 0 0 auto;
	font-family: "Inter", sans-serif;
}

.language-switcher__toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 78px;
	height: 44px;
	padding: 0 12px;
	color: #384047;
	background: #fff;
	border: 1px solid #e3edf2;
	border-radius: 22px;
	cursor: pointer;
	transition:
		color 0.25s ease,
		border-color 0.25s ease,
		background-color 0.25s ease;
}

.language-switcher__toggle:hover,
.language-switcher.is-open .language-switcher__toggle {
	color: #159fe8;
	background: #edf9ff;
	border-color: #bfe8fb;
}

.language-switcher__toggle img,
.language-switcher__item img {
	display: block;
	width: 24px;
	height: 16px;
	object-fit: cover;
	border-radius: 2px;
	box-shadow: 0 0 0 1px rgba(20, 40, 60, 0.08);
}

.language-switcher__toggle > span {
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
}

.language-switcher__toggle > svg {
	width: 15px;
	height: 15px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform 0.25s ease;
}

.language-switcher.is-open .language-switcher__toggle > svg {
	transform: rotate(180deg);
}

.language-switcher__dropdown {
	position: absolute;
	top: calc(100% + 12px);
	right: 0;
	z-index: 1000;
	width: 160px;
	padding: 8px;
	visibility: hidden;
	background: #fff;
	border: 1px solid #e3edf2;
	border-radius: 15px;
	box-shadow: 0 15px 35px rgba(32, 63, 82, 0.15);
	opacity: 0;
	pointer-events: none;
	transform: translateY(-10px);
	transition:
		visibility 0.25s ease,
		opacity 0.25s ease,
		transform 0.25s ease;
}

.language-switcher__dropdown::before {
	position: absolute;
	right: 20px;
	bottom: 100%;
	width: 12px;
	height: 12px;
	background: #fff;
	border-top: 1px solid #e3edf2;
	border-left: 1px solid #e3edf2;
	content: "";
	transform: translateY(6px) rotate(45deg);
}

.language-switcher.is-open .language-switcher__dropdown {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0);
}

.language-switcher__item {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 24px minmax(0, 1fr) 18px;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 8px 10px;
	color: #252a2e;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	border-radius: 9px;
	transition:
		color 0.2s ease,
		background-color 0.2s ease;
}

.language-switcher__item:hover {
	color: #159fe8;
	background: #edf9ff;
}

.language-switcher__item.is-active {
	color: #159fe8;
	background: #f3faff;
	cursor: default;
}

.language-switcher__check {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* На мобільному залишаємо компактну кнопку */
@media (max-width: 650px) {
	.language-switcher__toggle {
		min-width: 44px;
		width: 44px;
		height: 44px;
		padding: 0;
	}
 

	.language-switcher__toggle > svg {
		display: none;
	}

	.language-switcher__dropdown {
		right: -54px;
	}

	.language-switcher__dropdown::before {
		right: 72px;
	}
}