@import url('/static/styles/components/footer.css');

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  max-width: 100%;
}

:root {
  --primary-color: #062c47;
  --secondary-color: #38485d;
  --accent-color: #0056fd;
  --text-color: #38485d;
  --background-color: #f2f6ff;
  --navbar-bg: rgb(255, 255, 255);
  --btn-bg: #062c47;
}

body {
  font-family: "Montserrat", sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  overflow-x: hidden !important;
  width: 100%;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

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

/* Prevent horizontal overflow from media elements */
img,
video,
iframe,
svg {
  max-width: 100%;
  height: auto;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 15px;
  padding-right: 15px;
  box-sizing: border-box;
}

/* Стили навигации */

/* Кнопка телефона на ПК */
.phone-number-item a {
  font-weight: 600;
  color: #062c47;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.phone-number-item a:hover {
  color: #006dff;
}

/* На ПК — как кнопка */
@media (min-width: 769px) {
  .phone-number-item a {
    background: linear-gradient(135deg, #0056fd 0%, #004ad9 100%);
    color: white !important;
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 15px;
    box-shadow: 0 3px 10px rgba(0, 86, 253, 0.3);
  }
  .phone-number-item a:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 86, 253, 0.4);
    background: linear-gradient(135deg, #004ad9 0%, #0056fd 100%);
  }
}

/* На мобильных — как обычный пункт меню */
@media (max-width: 768px) {
  .phone-number-item {
    margin: 15px 0;
    padding-left: 20px;
  }
  .phone-number-item a {
    font-size: 24px;
    color: #0056fd;
  }
}

/* Иконка телефона на мобильных */
.mobile-phone-icon {
  display: none;
  color: #0056fd;
  font-size: 26px;
  margin-right: 15px;
  transition: all 0.3s ease;
  animation: pulse-phone 2s infinite;
}

.mobile-phone-icon:hover {
  transform: scale(1.1);
  color: #004ad9;
}

.mobile-nav-btns {
  display: flex;
  align-items: center;
}

@keyframes pulse-phone {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 86, 253, 0.4);
  }

  70% {
    box-shadow: 0 0 0 12px rgba(0, 86, 253, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(0, 86, 253, 0);
  }
}

@media (max-width: 768px) {
  .mobile-phone-icon {
    display: block;
  }

  /* Позиционирование: логотип → телефон → меню → меню-тогглер */
  nav .container {
    display: flex;
    align-items: center;
    position: relative;
    flex-direction: row-reverse !important;
    justify-content: space-between;
  }

  .container>.logo {
    order: 1;
  }

  .container>.mobile-phone-icon {
    order: 2;
  }

  .container>ul {
    order: 4;
  }
}

@media (max-width: 480px) {
  .mobile-phone-icon {
    font-size: 24px;
    margin-right: 10px;
  }
}

nav {
  position: fixed;
  width: 100%;
  max-width: 100%;
  top: 0;
  left: 0;
  right: 0;
  /* убрали backdrop-filter (дорогостоящая операция при скролле) */
  background-color: rgba(255, 255, 255, 0.95);
  padding: 15px 0;
  z-index: 9001;
  transition: top 0.3s ease, background-color 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  /* позволяем выпадающему меню выходить за пределы навбара */
  overflow: visible;
}

nav.scrolled {
  padding: 15px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-direction: row;
}

/* Стили логотипа */
nav .logo {
  text-decoration: none;
}

nav .logo .one-day {
  font-weight: 700;
  font-size: 28px;
  color: #38485d;
}

nav .logo .dom {
  font-weight: 700;
  font-size: 28px;
  color: #006dff;
}

nav.nav-up {
  top: -100px;
  transition: top 0.3s ease;
}

/* Стили меню */
nav ul {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
}

nav ul li {
  margin-left: 30px;
  position: relative;
}

nav ul li a {
  font-size: 16px;
  font-weight: 500;
  color: #062c47;
  text-decoration: none;
  transition: color 0.3s ease;
}

nav ul li a:hover {
  color: #006dff;
}

/* Подчеркивание при наведении */
nav ul li::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  background-color: #006dff;
  left: 0;
  bottom: -5px;
  transition: width 0.3s ease;
}

nav ul li:hover::after {
  width: 100%;
}

/* Стрелочка рядом с текстом */
nav ul li a .arrow {
  display: inline-block;
  margin-left: 5px;
  width: 14px;
  height: 14px;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAxNCAxNCI+PHBhdGggc3Ryb2tlPSIjOTE5NEExIiBzdHJva2Utd2lkdGg9IjEuNCIgZD0ibTMgNiA0IDQgNC00Ii8+PC9zdmc+');
  background-size: cover;
  transition: transform 0.3s ease;
}

nav ul li.dropdown:hover>a .arrow {
  transform: rotate(180deg);
}

/* Стили для выпадающего меню */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  /* Открывается вниз */
  left: 0;
  /* Выравнивание по левому краю */
  right: auto;
  /* Отменяем выравнивание по правому краю */
  background-color: #fff;
  padding: 10px 0;
  list-style: none;
  min-width: 150px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 10002;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  max-height: 360px;
  /* Ограничиваем высоту */
  overflow-y: auto;
  /* Добавляем прокрутку, если меню слишком большое */
}

nav ul li.dropdown:hover .dropdown-menu {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-menu li {
  width: 100%;
}

.dropdown-menu li a {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: #062c47;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.dropdown-menu li a:hover {
  background-color: #f0f0f0;
}

.dropdown-menu li a i {
  margin-right: 10px;
  margin-left: -10px;
  font-size: 18px;
  transition: color 0.3s ease;
}

.dropdown-menu li a:hover i {
  color: #006dff;
}

.dropdown-menu li {
  margin-left: 0 !important;
}

.dropdown.open .dropdown-menu {
  display: block;
  /* Показываем при открытии */
  opacity: 1;
  transform: translateY(0);
}

/* Кнопка меню для мобильных */
.menu-toggle {
  display: none;
  position: relative;
  width: 30px;
  height: 25px;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: #062c47;
  transition: all 0.3s ease;
}

.menu-toggle span:nth-child(1) {
  top: 0;
}

.menu-toggle span:nth-child(2) {
  top: 11px;
}

.menu-toggle span:nth-child(3) {
  top: 22px;
}

.menu-toggle.open span:nth-child(1) {
  transform: rotate(45deg);
  top: 11px;
  transform-origin: center;
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: rotate(-45deg);
  top: 11px;
  transform-origin: center;
}

/* Навигация для мобильных устройств */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .dropdown-menu li {
    margin-left: -45px !important;
  }

  nav ul {
    position: fixed;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: #fff;
    flex-direction: column;
    justify-content: flex-start;
    /* Выравниваем элементы по верхнему краю */
    align-items: flex-start;
    /* Выравниваем элементы по левому краю */
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding-top: 60px;
    /* Добавляем отступ сверху, чтобы элементы были чуть выше */
  }

  nav ul.open {
    transform: translateX(0);
  }

  nav ul li {
    margin: 15px 0;
    /* Уменьшаем отступы между элементами */
    padding-left: 20px;
    /* Добавляем отступ слева для выравнивания текста */
  }

  nav ul li a {
    font-size: 24px;
  }

  /* Стили для выпадающего меню на мобильных */
  nav ul li.dropdown .dropdown-menu {
    position: static;
    display: none;
    box-shadow: none;
    padding-left: 20px;
    /* Добавляем отступ слева для выпадающего меню */
  }

  nav ul li.dropdown.open .dropdown-menu {
    display: block !important;
  }

  nav ul li.dropdown .dropdown-menu {
    display: none !important;
  }

  nav ul li.dropdown:not(.open):hover::after {
    display: none;
  }

  nav ul li.dropdown:not(.open) a:hover {
    color: #062c47;
  }

  /* Обработчик для открытия подменю при клике */
  nav ul li.dropdown>a {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  nav ul li.dropdown>a .arrow {
    transform: rotate(90deg);
    transition: transform 0.3s;
  }

  nav ul li.dropdown.open>a .arrow {
    transform: rotate(-90deg);
  }

  body.menu-opened::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 900;
    transition: opacity 0.3s ease;
  }
}

@media (max-width: 480px) {

  nav .logo .one-day,
  nav .logo .dom {
    font-size: 24px;
  }



  .menu-toggle span {
    height: 2px;
  }
}



/* Стили для кнопки WhatsApp */

.whatsapp-float {
  position: fixed;
  right: 30px;
  bottom: 15px;
  z-index: 9999;
  transform: translateY(200%);
}

.whatsapp-float.show{
  transform: translateY(0);
}

.whatsapp-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  background-color: #25D366;
  color: white;
  border-radius: 50%;
  font-size: 36px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
}



.notification {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: #FF3B30;
  color: white;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  animation: wave 1.5s infinite;
}

.tooltip {
  font-family: "Montserrat", sans-serif;
  position: absolute;
  bottom: 75px;
  right: 30px;
  background-color: #ffffff;
  color: #676161;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  opacity: 1;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none;
}

/* Наклонный уголок */
.tooltip::after {
  content: "";
  position: absolute;
  bottom: -4px;
  right: 6px;
  width: 10px;
  height: 10px;
  background-color: #ffffff;
  transform: rotate(45deg);
  z-index: -1;
  clip-path: polygon(0% 100%, 100% 100%, 100% 0%);
}

.whatsapp-btn:hover .tooltip {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }

  70% {
    box-shadow: 0 0 0 32px rgba(37, 211, 102, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

@keyframes wave {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
  }
}

/* Адаптация для мобильных */
@media (max-width: 480px) {
  .whatsapp-float {
    right: 15px;
    bottom: 15px;
  }

  .whatsapp-btn {
    width: 60px;
    height: 60px;
    font-size: 32px;
  }

  .notification {
    width: 22px;
    height: 22px;
    font-size: 12px;
  }

  .tooltip {
    font-size: 13px;
    padding: 9px 11px;
    bottom: 70px;
  }

  .tooltip::after {
    right: 12px;
    bottom: -6px;
    width: 12px;
    height: 12px;
  }
}

/* Для очень маленьких экранов */
@media (max-width: 360px) {
  .tooltip {
    white-space: normal;
    width: 130px;
    right: -35px;
    text-align: center;
  }

  .tooltip::after {
    right: 50%;
    margin-right: -6px;
  }
}

/* Sticky Mobile CTA Button */
.sticky-mobile-cta {
  display: none;
  position: fixed;
  border-radius: 20px;
  left: 2px;
  right: 140px;
  bottom: 10px;
  background: linear-gradient(135deg, #0056fd 0%, #004ad9 100%);
  z-index: 9998;
  padding: 15px 20px;
  transform: translateY(120%);
  transition: transform 0.3s ease;
}

.sticky-mobile-cta.show {
  transform: translateY(0);
}

.sticky-cta-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 75%;
  margin: 0;
  gap: 15px;
}

.sticky-cta-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  color: white;
}

.sticky-cta-text strong {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 3px;
}

.sticky-cta-text span {
  font-size: 13px;
  opacity: 0.9;
}

.sticky-cta-button {
  background: linear-gradient(135deg, #0dc450 0%, #14b354 100%);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 15px rgba(13, 196, 80, 0.4);
  transition: all 0.3s ease;
  animation: pulse-cta 2s infinite;
  text-decoration: none;
}

.sticky-cta-button:hover {
  background: linear-gradient(135deg, #14b354 0%, #0dc450 100%);
  transform: scale(1.05);
  color: white;
  text-decoration: none;
}

@keyframes pulse-cta {
  0% {
    box-shadow: 0 4px 15px rgba(13, 196, 80, 0.4);
  }

  50% {
    box-shadow: 0 4px 25px rgba(13, 196, 80, 0.6);
  }

  100% {
    box-shadow: 0 4px 15px rgba(13, 196, 80, 0.4);
  }
}

@media (max-width: 768px) {
  .sticky-mobile-cta {
    display: block;
  }

  body {
    padding-bottom: 80px;
    /* Space for sticky CTA */
  }
}

@media (max-width: 480px) {
  .sticky-cta-text strong {
    font-size: 14px;
  }

  .sticky-cta-text span {
    font-size: 12px;
  }

  .sticky-cta-button {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
}