/* ==========================================================================
   site.css — Кастомные стили сайта «Улучшение бизнеса»
   Tailwind CSS покрывает большинство стилей; здесь — только то, что нельзя
   или неудобно выразить через утилитарные классы.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Базовые стили
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
}

/* --------------------------------------------------------------------------
   2. Hero-фон — CSS-паттерн (сетка из точек)
   -------------------------------------------------------------------------- */
.hero-bg {
  background: linear-gradient(135deg, #0B1121 0%, #1E3A5F 100%);
  position: relative;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 30px 30px;
}

/* Паттерн для hero-секции (класс .hero-grid-pattern в HTML) */
.hero-grid-pattern {
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.15) 1px, transparent 1px);
  background-size: 30px 30px;
}

/* --------------------------------------------------------------------------
   3. Кнопки
   -------------------------------------------------------------------------- */
.btn-accent {
  display: inline-block;
  background-color: #F97316;
  color: #ffffff;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.25);
}

.btn-accent:hover {
  background-color: #EA580C;
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.35);
}

.btn-primary {
  display: inline-block;
  background-color: #0F172A;
  color: #ffffff;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: #1E293B;
}

.btn-outline {
  display: inline-block;
  background-color: transparent;
  color: #F97316;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  border: 2px solid #F97316;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background-color: #F97316;
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   4. Фиксированная шапка при скролле
   -------------------------------------------------------------------------- */
#header {
  background-color: rgba(15, 23, 42, 0.95);
}

.header-scrolled {
  background-color: rgba(15, 23, 42, 0.95) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* --------------------------------------------------------------------------
   5. Аккордеон (FAQ + Процесс)
   -------------------------------------------------------------------------- */
/* --- Аккордеон блока «Процесс» --- */
.process-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.process-step.active .process-content,
.process-step[aria-expanded="true"] .process-content {
  max-height: 500px;
}

.process-chevron {
  transition: transform 0.3s ease;
}

.process-step.active .process-chevron,
.process-step[aria-expanded="true"] .process-chevron {
  transform: rotate(180deg);
}

/* --- Аккордеон блока FAQ --- */
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-content,
.faq-item[aria-expanded="true"] .faq-content {
  max-height: 500px;
}

.faq-chevron {
  transition: transform 0.3s ease;
}

.faq-item.active .faq-chevron,
.faq-item[aria-expanded="true"] .faq-chevron {
  transform: rotate(180deg);
}

/* --------------------------------------------------------------------------
   6. Модальное окно
   -------------------------------------------------------------------------- */
/* Модальное окно в HTML (#modal-callback) */
#modal-callback {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

#modal-callback.active {
  display: flex;
}

/* --------------------------------------------------------------------------
   7. Мобильное меню
   -------------------------------------------------------------------------- */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

#mobile-menu.active {
  max-height: 500px;
}

/* --------------------------------------------------------------------------
   8. Карточки услуг и преимуществ — hover-эффект
   -------------------------------------------------------------------------- */
.service-card,
.advantage-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover,
.advantage-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* --------------------------------------------------------------------------
   9. Кнопка «Наверх»
   -------------------------------------------------------------------------- */
#scroll-top {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

#scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

/* --------------------------------------------------------------------------
   10. Кастомный скроллбар (Webkit)
   -------------------------------------------------------------------------- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #F1F5F9;
}

::-webkit-scrollbar-thumb {
  background: #94A3B8;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #64748B;
}

/* --------------------------------------------------------------------------
   11. Звёзды рейтинга
   -------------------------------------------------------------------------- */
.star-rating .fa-star,
.fa-star.text-yellow-400 {
  color: #F59E0B;
}

/* --------------------------------------------------------------------------
   Адаптивные уточнения (Mobile First)
   -------------------------------------------------------------------------- */

/* --- Планшет (≥ 640px) --- */
@media (min-width: 640px) {
  .hero-grid-pattern {
    background-size: 40px 40px;
  }
}

/* --- Десктоп (≥ 1024px) --- */
@media (min-width: 1024px) {
  .hero-grid-pattern {
    background-size: 50px 50px;
  }
}

/* --------------------------------------------------------------------------
   12. Активный пункт навигации
   --------------------------------------------------------------------------
   Класс .nav-active добавляется сервером (activeNav: «Главная»/«Блог») и
   клиентским scroll-spy (якорные разделы на главной). !important нужен,
   чтобы перебить унаследованный цвет .text-slate-300 и hover-состояние.
   -------------------------------------------------------------------------- */
.nav-active {
  color: #F97316 !important;
  font-weight: 600;
}
