/* ============================================
   LOCKOUT TAGOUT — Основные стили
   ============================================ */

/* --- CSS-переменные --- */
:root {
  --brand-red: #ff3333;
  --brand-red-dark: #e62e2e;
  --brand-red-active: #cc2a2a;
  --font-stack: 'Mulish', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* --- Базовые стили --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 7rem;
}

html,
body {
  overflow-x: hidden;
  max-width: 100vw;
  scroll-behavior: smooth;
}

/* --- Шрифты --- */
.font-mulish-regular {
  font-family: var(--font-stack);
  font-weight: 400;
}

.font-mulish-semibold {
  font-family: var(--font-stack);
  font-weight: 600;
}

.font-mulish-extrabold {
  font-family: var(--font-stack);
  font-weight: 800;
}

/* RemixIcon fallback */
@font-face {
  font-family: 'remixicon';
  src: url('https://cdn.jsdelivr.net/npm/remixicon@4.6.0/fonts/remixicon.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

[class^="ri-"],
[class*=" ri-"] {
  font-family: 'remixicon', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: inline-block;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
}

/* --- Кастомные размеры текста --- */
.text-4x {
  font-size: 4rem;
  line-height: 0.7;
}

.text-2x {
  font-size: 2rem;
  line-height: 1.2;
}

.text-x {
  font-size: 1rem;
  line-height: 1.5;
}

/* --- Утилиты --- */
.max-w-8xl {
  max-width: 100rem;
}

/* --- Фоны секций --- */
.hero-bg {
  background-image: url('../images/backgrounds/mainbg.webp');
  background-size: cover;
  background-position: left center;
  background-repeat: no-repeat;
  background-color: #1a1a1a;
}

.hero-bg-lockout {
  background-image: url('../images/backgrounds/hero-worker.webp');
  background-size: cover;
  background-position: right top;
  background-repeat: no-repeat;
  background-color: #f59e0b;
}

.hero-bg-lockout .overlay {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
}

.overlay {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 100%);
}

section.bg-white {
  background-color: #ffffff;
}

section.bg-gray-50 {
  background-color: #f1f1f1;
}

section.bg-custom-gray,
.bg-custom-gray {
  background-color: #E4E4E4 !important;
}

/* --- Переходы для интерактивных элементов --- */
a,
button {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

/* --- Анимации появления --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.fade-in.in-view {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Карточки --- */
.card-hover {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.card-hover:hover {
  transform: translateY(-12px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* --- Кнопки --- */
.button-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.button-hover::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.button-hover:hover::before {
  left: 100%;
}

.button-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.button-hover:active {
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
  transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-bounce {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-bounce:hover {
  transform: scale(1.15) rotate(8deg);
}

/* --- Модальные окна --- */
.modal-enter {
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-enter-active {
  opacity: 1;
  transform: scale(1);
}

.modal-exit {
  opacity: 1;
  transform: scale(1);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-exit-active {
  opacity: 0;
  transform: scale(0.95);
}

/* --- Мобильное меню --- */
#mobile-menu-overlay {
  backdrop-filter: blur(6px);
  background: rgba(0, 0, 0, 0.55);
  transition: opacity 0.3s ease;
}

.mobile-menu-transition {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-hidden {
  transform: translateX(110%);
}

.mobile-menu-visible {
  transform: translateX(0%);
}

/* --- Формы --- */
input:focus,
textarea:focus,
select:focus {
  transform: scale(1.02);
  box-shadow: 0 0 0 3px rgba(255, 51, 51, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- FAQ --- */
.faq-answer {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 0;
  overflow: hidden;
}

.faq-answer.show {
  max-height: 500px;
}

/* --- Навигация --- */
nav a {
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--brand-red);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

nav a:hover::after {
  width: 100%;
}

/* --- Брендовые цвета (переопределение Tailwind) --- */
.text-red-500,
.text-red-600,
.text-red-700 {
  color: var(--brand-red) !important;
}

.bg-red-600,
.bg-red-700 {
  background-color: var(--brand-red) !important;
}

.border-red-600,
.border-red-700 {
  border-color: var(--brand-red) !important;
}

.hover\:bg-red-700:hover {
  background-color: var(--brand-red-dark) !important;
}

.bg-red-600.button-hover:hover,
.bg-red-700.button-hover:hover {
  background-color: var(--brand-red-dark) !important;
}

.bg-red-600.button-hover:active,
.bg-red-700.button-hover:active {
  background-color: var(--brand-red-active) !important;
}

.hover\:text-red-700:hover {
  color: var(--brand-red) !important;
}

.focus\:border-red-600:focus {
  border-color: var(--brand-red) !important;
}

.ring-red-500,
.ring-red-600,
.focus\:ring-red-500:focus,
.focus\:ring-red-600:focus {
  --tw-ring-color: var(--brand-red) !important;
}

.from-red-600 {
  --tw-gradient-from: var(--brand-red) !important;
  --tw-gradient-to: rgb(255 51 51 / 0) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

.to-red-700 {
  --tw-gradient-to: var(--brand-red) !important;
}


/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */

/* --- Планшеты и мобильные (< 768px) --- */
@media (max-width: 768px) {

  /* Контейнеры */
  .container,
  .max-w-8xl,
  .max-w-7xl,
  .max-w-6xl,
  .max-w-5xl,
  .max-w-4xl,
  .max-w-3xl {
    max-width: 100% !important;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  .case-modal-panel {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Hero */
  .hero-bg {
    min-height: 100vh;
    background-attachment: scroll !important;
  }

  /* Типографика */
  .text-4x {
    font-size: 1.5rem !important;
    line-height: 1.1 !important;
  }

  .text-2x {
    font-size: 1.1rem !important;
    line-height: 1.3 !important;
  }

  .text-5xl {
    font-size: 2.25rem !important;
    line-height: 1.2 !important;
  }

  .text-4xl {
    font-size: 2rem !important;
    line-height: 1.2 !important;
  }

  .text-3xl {
    font-size: 1.5rem !important;
    line-height: 1.3 !important;
  }

  .text-2xl {
    font-size: 1.25rem !important;
    line-height: 1.35 !important;
  }

  /* Кнопки */
  .whitespace-nowrap {
    white-space: normal !important;
    text-align: center !important;
  }

  /* Сетка */
  .grid {
    overflow-x: hidden;
  }

  /* Отступы */
  .px-6,
  .px-8 {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  .w-full.px-6,
  .w-full.px-8 {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .promo-padding {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  .py-20 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  .py-32,
  .py-28 {
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
  }

  .py-16 {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  .p-12 { padding: 2rem !important; }
  .p-10 { padding: 2rem !important; }
  .p-8  { padding: 1.5rem !important; }

  .mb-16 { margin-bottom: 2.5rem !important; }
  .mb-12 { margin-bottom: 2rem !important; }
  .mb-8  { margin-bottom: 1.5rem !important; }

  .gap-10 { gap: 2rem !important; }
  .gap-8  { gap: 1.5rem !important; }

  /* Карточки */
  .card-hover {
    margin-bottom: 1rem;
  }

  /* Навигация */
  .lg\:px-8 {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  /* Секции */
  section {
    overflow-x: hidden;
  }

  /* Кнопки */
  button {
    word-wrap: break-word;
    hyphens: auto;
  }

  /* Изображения */
  img {
    max-width: 100%;
    height: auto;
  }

  img[data-error-handled="true"] {
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
  }

  /* Отключение анимаций */
  .fade-in,
  .fade-in-delay-1,
  .fade-in-delay-2,
  .fade-in-delay-3,
  .fade-in-delay-4 {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .card-hover {
    transition: none !important;
    transform: none !important;
  }

  .card-hover:hover {
    transform: none !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
  }
}

/* --- Маленькие экраны (< 640px) --- */
@media (max-width: 640px) {
  .text-4x  { font-size: 1.5rem !important; }
  .text-2x  { font-size: 1.1rem !important; }
  .text-4xl { font-size: 1.75rem !important; }
  .text-3xl { font-size: 1.35rem !important; }
  .text-2xl { font-size: 1.15rem !important; }

  .py-20 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }

  .py-32,
  .py-28 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  .py-16 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }

  .p-12 { padding: 1.5rem !important; }
  .p-10 { padding: 1.5rem !important; }
  .p-8  { padding: 1.25rem !important; }

  .mb-16 { margin-bottom: 2rem !important; }
  .mb-12 { margin-bottom: 1.5rem !important; }
  .mb-8  { margin-bottom: 1.25rem !important; }

  .gap-10 { gap: 1.5rem !important; }
  .gap-8  { gap: 1.25rem !important; }

  .px-8 {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }
}
