/* Исправления для корректной работы Tailwind CSS */

/* Убираем переопределения, которые мешают Tailwind */
* {
  box-sizing: border-box;
}

/* Базовые переменные цветов */
:root {
  --brand-green: #253f66;
  --brand-green-light: #4a6491;
  --brand-green-lighter: #7a92c2;
  --brand-cream: #f8f7f2;
  --brand-dark: #333333;
}

/* Базовый фон для всего сайта */
html,
body {
  background-color: #f9fafb;
  margin: 0;
  padding: 0;
}

/* Убираем стандартный header WordPress на главной */
.home #masthead {
  display: none;
}

/* Кастомные классы для цветов бренда */
.bg-brand-green {
  background-color: var(--brand-green);
}
.bg-brand-green-light {
  background-color: var(--brand-green-light);
}
.bg-brand-green-lighter {
  background-color: var(--brand-green-lighter);
}
.bg-brand-cream {
  background-color: var(--brand-cream);
}
.text-brand-green {
  color: var(--brand-green);
}
.text-brand-dark {
  color: var(--brand-dark);
}
.border-brand-green {
  border-color: var(--brand-green);
}
.border-brand-green-lighter {
  border-color: var(--brand-green-lighter);
}

/* Стили для карточек домиков */
.listing-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.listing-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Анимации появления убраны */

/* Стили для анимированной стрелочки вниз */
.scroll-arrow-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.scroll-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  animation: bounce 2s infinite;
  cursor: pointer;
}

.scroll-arrow:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.scroll-arrow svg {
  transition: transform 0.3s ease;
}

.scroll-arrow:hover svg {
  transform: translateY(2px);
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Адаптивные стили для стрелочки */
@media (max-width: 768px) {
  .scroll-arrow {
    width: 40px;
    height: 40px;
  }

  .scroll-arrow svg {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 480px) {
  .scroll-arrow-container {
    margin-top: 1.5rem;
  }

  .scroll-arrow {
    width: 36px;
    height: 36px;
  }

  .scroll-arrow svg {
    width: 20px;
    height: 20px;
  }
}

/* Стили для отзывов */
.testimonial-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-2px);
}

/* Стили для логотипа */
.custom-logo {
  max-width: 50px;
  max-height: 50px;
}

.custom-logo img {
  width: auto;
  height: auto;
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
}

/* Стили для hero секции */
.hero-section {
  position: relative !important;
  overflow: hidden !important;
  height: 100vh !important;
  max-height: 900px !important;
  min-height: 700px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.hero-section img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  z-index: 1 !important;
}

.hero-section .absolute.inset-0 {
  z-index: 2 !important;
}

.hero-section .hero-content {
  position: relative !important;
  z-index: 3 !important;
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 2rem 1rem !important;
}

.hero-section .hero-content .container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
}

.hero-section .hero-content h1 {
  margin-top: 0 !important;
  color: white !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
}

.hero-section .hero-content p {
  color: white !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

/* Адаптивные стили для hero */
@media (max-width: 768px) {
  .hero-section {
    height: 100vh !important;
    max-height: 800px !important;
    min-height: 600px !important;
  }

  .hero-section img {
    object-position: center 30% !important;
  }

  .hero-section .hero-content {
    padding: 1rem 0.5rem !important;
  }
}

@media (max-width: 480px) {
  .hero-section {
    height: 100vh !important;
    max-height: 700px !important;
    min-height: 500px !important;
  }
}

/* Стили для HomeReserve виджетов */
#hr-widget,
#hr-widget-russia,
#hr-widget-belarus {
  width: 100% !important;
  min-height: 200px;
  max-width: 100% !important;
}

/* Специальные стили для поискового виджета в hero */
#hr-widget[data-instance-id="search"] {
  width: 100% !important;
  max-width: 100% !important;
}

/* Обеспечиваем правильную ширину для всех элементов внутри виджета */
#hr-widget * {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Стили для формы поиска внутри виджета */
#hr-widget form,
#hr-widget .search-form,
#hr-widget .widget-form {
  width: 100% !important;
  max-width: 100% !important;
}

/* Стили для полей ввода в виджете */
#hr-widget input,
#hr-widget select,
#hr-widget .form-control {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Адаптивные стили для виджета поиска */
@media (max-width: 768px) {
  #hr-widget[data-instance-id="search"] {
    padding: 0 !important;
    margin: 0 !important;
  }

  #hr-widget[data-instance-id="search"] * {
    font-size: 14px !important;
  }
}

@media (max-width: 480px) {
  #hr-widget[data-instance-id="search"] {
    min-height: 150px !important;
  }

  #hr-widget[data-instance-id="search"] * {
    font-size: 13px !important;
  }
}

/* Кастомизация кнопок виджетов под наш бренд */
#hr-widget button,
#hr-widget .btn,
#hr-widget [class*="btn"],
#hr-widget-russia button,
#hr-widget-belarus button {
  background-color: var(--brand-green) !important;
  border-color: var(--brand-green) !important;
  transition: all 0.3s ease !important;
}

#hr-widget button:hover,
#hr-widget .btn:hover,
#hr-widget [class*="btn"]:hover,
#hr-widget-russia button:hover,
#hr-widget-belarus button:hover {
  background-color: var(--brand-green) !important;
  opacity: 0.9 !important;
  transform: translateY(-1px) !important;
}

/* Стили для табов переключения стран */
.hr-tabs-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.hr-tabs {
  display: flex;
  background: white;
  border-radius: 12px;
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(37, 63, 102, 0.2);
}

.hr-tab {
  padding: 12px 24px;
  cursor: pointer;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
  color: #6b7280;
  background: transparent;
  border: none;
  font-size: 16px;
  min-width: 120px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.hr-tab:hover {
  color: var(--brand-green);
  background: rgba(37, 63, 102, 0.05);
}

.hr-tab.active {
  background: var(--brand-green);
  color: white;
  box-shadow: 0 2px 4px rgba(37, 63, 102, 0.3);
}

/* Стили для флагов в табах */
.hr-tab .country-flag,
.hr-tab img.country-flag {
  width: 16px !important;
  height: 12px !important;
  max-width: 16px !important;
  max-height: 12px !important;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
  display: block;
}

/* Адаптивные стили для табов */
@media (max-width: 640px) {
  .hr-tabs {
    width: 100%;
    margin: 0 1rem;
  }

  .hr-tab {
    flex: 1;
    padding: 10px 16px;
    font-size: 14px;
    min-width: auto;
    gap: 6px;
  }

  .hr-tab .country-flag,
  .hr-tab img.country-flag {
    width: 14px !important;
    height: 10px !important;
    max-width: 14px !important;
    max-height: 10px !important;
  }
}

/* Дополнительные стили для очень маленьких экранов */
@media (max-width: 390px) {
  .hr-tabs-wrapper {
    margin-bottom: 1.5rem;
    padding: 0 0.5rem; /* Добавляем отступы по бокам */
  }

  .hr-tabs {
    margin: 0; /* Убираем боковые отступы */
    padding: 2px; /* Уменьшаем внутренние отступы */
    width: 100%;
    max-width: 100%;
    overflow: hidden; /* Предотвращаем выход за границы */
  }

  .hr-tab {
    flex: 1;
    padding: 8px 6px; /* Уменьшаем отступы */
    font-size: 12px; /* Уменьшаем размер шрифта */
    min-width: 0; /* Позволяем сжиматься */
    gap: 4px;
    white-space: nowrap; /* Предотвращаем перенос текста */
    overflow: hidden;
    text-overflow: ellipsis; /* Добавляем многоточие если текст не помещается */
  }

  .hr-tab .country-flag,
  .hr-tab img.country-flag {
    width: 12px !important;
    height: 9px !important;
    max-width: 12px !important;
    max-height: 9px !important;
    flex-shrink: 0; /* Не позволяем флагу сжиматься */
  }
}

/* Стили для экранов 360px и меньше */
@media (max-width: 360px) {
  .hr-tabs-wrapper {
    padding: 0 0.25rem; /* Еще меньше отступы */
  }

  .hr-tab {
    padding: 6px 4px; /* Минимальные отступы */
    font-size: 11px; /* Еще меньше шрифт */
    gap: 3px;
  }

  .hr-tab .country-flag,
  .hr-tab img.country-flag {
    width: 10px !important;
    height: 8px !important;
    max-width: 10px !important;
    max-height: 8px !important;
  }
}

/* Стили для форм - ТОЛЬКО специфичные исправления */
.booking-form-container input:focus,
.booking-form-container select:focus,
.booking-form-container textarea:focus {
  outline: none;
  border-color: #9ca3af;
  box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.1);
}

/* Убираем visited эффекты для ссылок */
a:visited {
  color: inherit;
}

/* Стили для футера */
.site-footer {
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -100px;
  left: -100px;
  right: -100px;
  bottom: -100px;
  background-color: #f9fafb;
  z-index: -2;
}

/* Анимация появления футера */
.site-footer {
  animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Адаптивные отступы для hero контента */
.hero-content {
  top: 200px !important; /* Мобильные устройства */
  position: absolute !important;
}

@media (min-width: 768px) {
  .hero-content {
    top: 100px !important; /* Планшеты */
  }
}

@media (min-width: 1024px) {
  .hero-content {
    top: 120px !important; /* Десктоп */
  }
}

/* Предотвращаем автоскролл к полям ввода на мобильных */
@media (max-width: 768px) {
  input,
  textarea,
  select {
    scroll-margin-top: 0;
  }

  /* Убираем автофокус стили на мобильных */
  input:focus,
  textarea:focus,
  select:focus {
    scroll-behavior: auto;
  }
}

/* Принудительные стили для футера */
@media (min-width: 768px) {
  .footer-container {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 0 !important;
  }

  .footer-container > div {
    flex: 0 1 auto !important;
    max-width: 30% !important;
  }
}

@media (max-width: 768px) {
  .hero-content {
    justify-content: flex-start !important;
    align-items: center !important;
    padding-top: 80px !important;
    padding-bottom: 40px !important;
  }

  .hero-content .container {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
}

@media (max-width: 480px) {
  .hero-content {
    padding-top: 60px !important;
    padding-bottom: 30px !important;
  }
}

@media (max-width: 360px) {
  .hero-content {
    padding-top: 50px !important;
    padding-bottom: 20px !important;
  }
}

@media (max-width: 768px) {
  .hero-section .hero-content {
    justify-content: flex-start !important;
    align-items: center !important;
    padding-top: 280px !important;
    top: 0 !important;
    transform: none !important;
  }

  .hero-section .hero-content .container {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
}

@media (max-width: 480px) {
  .hero-section .hero-content {
    padding-top: 220px !important;
  }
}
/* Ограничиваем ширину поискового виджета на планшетах */
@media (min-width: 769px) and (max-width: 1024px) {
  #hr-widget[data-instance-id="search"] {
    max-width: 600px !important;
    margin: 0 auto !important;
  }
}

@media (min-width: 1025px) and (max-width: 1200px) {
  #hr-widget[data-instance-id="search"] {
    max-width: 700px !important;
    margin: 0 auto !important;
  }
}
/* Исправляем проблему с заблокированным скроллом после закрытия drawer в виджете */
body {
  overflow: auto !important;
  position: static !important;
  height: auto !important;
  width: auto !important;
}

html {
  overflow: auto !important;
  position: static !important;
  height: auto !important;
  width: auto !important;
}

/* Убираем возможные блокировки скролла от виджета */
body.no-scroll,
body.modal-open,
body.drawer-open {
  overflow: auto !important;
  position: static !important;
}

/* Принудительно включаем скролл для всех состояний */
body,
html {
  scroll-behavior: smooth !important;
  -webkit-overflow-scrolling: touch !important;
}
