/* ==========================================================================
   1. БАЗОВЫЕ СТИЛИ И СКРОЛЛБАРЫ
   ========================================================================== */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Кастомный скроллбар для страницы */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: #3b82f6;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #2563eb;
}

/* Скрытие скроллбара для горизонтальных меню (табы фильтрации) */
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
/* Скрываем плавающий модуль Яндекс аналитики */
div[style*="position: fixed"][style*="bottom"],
div[style*="z-index: 2147483647"],
.yandex-metrika,
.ym-webvisor,
.ym-debug,
[class*="ym-"][style*="position:fixed"],
#ym-debug-panel {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
/* ==========================================================================
   2. КОМПОНЕНТЫ И ИНТЕРАКТИВНЫЕ ЭЛЕМЕНТЫ
   ========================================================================== */
.image-zoom-container {
  overflow: hidden;
}
.image-zoom-container img,
.image-zoom-container svg {
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.image-zoom-container:hover img,
.image-zoom-container:hover svg {
  transform: scale(1.08); 
}

/* Аккордеон для секции FAQ */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease-out, opacity 0.3s ease;
}
.faq-item[aria-expanded="true"] .faq-answer {
  max-height: 200px;
  opacity: 1;
}

/* Липкая панель CTA (Страница товара) */
.sticky-cta {
  transition: transform 0.3s ease-in-out;
}
.sticky-cta.visible {
  transform: translateY(0);
}
.sticky-cta.hidden-bar {
  transform: translateY(100%);
}

/* Интерактивная карта (Iframe на странице Контакты) */
.map-container iframe {
  filter: grayscale(100%) contrast(1.2) opacity(0.8);
  transition: all 0.5s ease;
}
.map-container:hover iframe {
  filter: grayscale(0%) contrast(1) opacity(1);
}

/* Кастомные маркеры и попапы для Leaflet (Страница Проекты) */
.custom-map-marker {
  background: transparent;
  border: none;
}
.leaflet-popup-content-wrapper {
  border-radius: 1rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}
.leaflet-popup-content {
  margin: 12px;
}
.leaflet-container {
  font-family: "Montserrat", sans-serif;
}

/* ==========================================================================
   3. ФИКС ДЛЯ ВКЛАДОК (ТАБОВ) 
   ========================================================================== */
/* Это правило перебивает стандартный hover:text-brand-500 от Tailwind, который вы нашли */
.tab-btn.bg-brand-500:hover,
.tab-btn.bg-brand-500:focus {
  color: #ffffff !important;
  border-color: #3b82f6 !important; 
}

/* ==========================================================================
   4. АНИМАЦИИ КНОПОК И ПОЛЬЗОВАТЕЛЬСКИЕ ЭФФЕКТЫ
   ========================================================================== */
.btn-shine {
  position: relative;
  overflow: hidden;
}
.btn-shine::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  animation: shine 4s infinite;
}
@keyframes shine {
  0% { left: -100%; }
  20% { left: 200%; }
  100% { left: 200%; }
}

.draw-line {
  width: 0;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  transition-delay: 300ms;
}
.draw-line.active {
  width: 80%;
}

.bg-text-parallax {
  will-change: transform;
}

.animate-marquee {
  animation: marquee 30s linear infinite;
}
@keyframes marquee {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

/* ==========================================================================
   5. СИСТЕМА ПОЯВЛЕНИЯ ПРИ СКРОЛЛЕ (SCROLL REVEAL)
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.reveal-blur {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(20px);
  transition: all 0.8s ease-out;
}

.reveal.active,
.reveal-left.active,
.reveal-right.active,
.reveal-scale.active,
.reveal-blur.active {
  opacity: 1;
  transform: translate(0) scale(1);
  filter: blur(0);
}

.reveal-delay-100 { transition-delay: 100ms; }
.reveal-delay-200 { transition-delay: 200ms; }
.reveal-delay-300 { transition-delay: 300ms; }
.reveal-delay-400 { transition-delay: 400ms; }
.reveal-delay-500 { transition-delay: 500ms; }
.reveal-delay-600 { transition-delay: 600ms; }
.reveal-delay-700 { transition-delay: 700ms; }

/* Скрываем плавающую кнопку Яндекс.Метрики (Webvisor Debugger) */
.__ymDebugger,
.__ymDebuggerOpener,
.__ymOpenerImageContainer,
.__ym_wv_ign,
.__ymHighlight {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
}