/* Определение переменных для цветов */
:root {
  --kpl-red: #ee0202;
  --kpl-orange: #f99800;
  --kpl-dark: #111111;
  --kpl-gray: #555;
  --kpl-light: #ffffff;
}

/* Базовые стили для всех элементов */
* {
  box-sizing: border-box; /* Учитывать padding и border в ширине элементов */
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #222;
  background: #fff;
}

/* Контейнер для ограничения ширины контента */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Стили для шапки сайта */
.site-header {
  position: sticky;
  top: 0;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

.logo img {
  height: 42px;
  display: block;
}

.nav a {
  margin: 0 10px;
  text-decoration: none;
  color: #222;
  font-weight: 600;
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--kpl-red), var(--kpl-orange));
  transition: width 0.25s;
}

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

.lang-switch a {
  margin-left: 10px;
  text-decoration: none;
  color: #444;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
}

.lang-switch a.active {
  border-color: var(--kpl-orange);
}

.lang-switch .admin-link {
  margin-left: 16px;
  border-color: var(--kpl-red);
  color: var(--kpl-red);
}

/* Стили для секции с видео на заднем плане */
.hero-video {
  position: relative;
  min-height: 56vh;
  display: flex;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
}

.hero-video video {
  position: absolute;
  inset: 0;
  min-width: 100%;
  min-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero-video::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(238, 2, 2, 0.35), rgba(249, 152, 0, 0.25));
  z-index: -1;
}

.hero-video .hero-content {
  position: relative;
  color: #fff;
  max-width: 720px;
  padding: 40px 0;
}

.hero-video h1 {
  font-size: 46px;
  line-height: 1.1;
  margin: 0 0 12px 0;
}

.hero-video p {
  font-size: 18px;
  margin: 0 0 16px 0;
}

.btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 12px;
  text-decoration: none;
  border: 0;
  background: linear-gradient(90deg, var(--kpl-red), var(--kpl-orange));
  color: #fff;
  font-weight: 700;
}

/* Общие стили для секций и карточек */
.section {
  padding: 40px 0;
}

.section h2 {
  margin-top: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  border: 1px solid #eee;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
  background: #fff;
}

.card h3 {
  margin: 6px 0 4px;
}

.card p {
  margin: 0;
  color: #555;
}

.card .icon {
  width: 42px;
  height: 42px;
  margin-bottom: 10px;
}

/* Стили для разделителей */
.divider {
  height: 50px;
  overflow: hidden;
}

.divider svg {
  display: block;
  width: 100%;
  height: 100%;
}

.divider.top path,
.divider.bottom path {
  fill: #fff;
}

/* Стили для формы контактов */
.contact {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 12px;
}

label {
  font-size: 14px;
  color: #555;
  margin-bottom: 6px;
  display: block;
}

.form-group {
  margin-bottom: 12px;
}

/* Стили для секции услуг */
.services-section {
  padding: 50px 0;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
  font-weight: bold;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.service-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.service-card .icon img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 15px;
}

.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: #222;
}

.service-text {
  font-size: 0.95rem;
  color: #555;
  text-align: left;
}

/* Адаптивные стили для мобильных устройств */
@media (max-width: 1024px) {
  /* Уменьшение шрифтов и отступов для планшетов */
  .hero-video {
    min-height: 50vh;
  }

  .hero-video h1 {
    font-size: 38px;
  }

  .hero-video p {
    font-size: 16px;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact {
    grid-template-columns: 1fr;
  }

  .nav a {
    margin: 0 8px;
    font-size: 14px;
  }

  .logo img {
    height: 36px;
  }

  .btn {
    padding: 10px 16px;
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  /* Оптимизация для небольших планшетов и больших смартфонов */
  .hero-video {
    min-height: 45vh;
  }

  .hero-video h1 {
    font-size: 32px;
  }

  .hero-video p {
    font-size: 15px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    padding: 15px;
  }

  .service-card h3 {
    font-size: 1.1rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
  }

  .nav a {
    margin: 5px 8px;
  }
}

@media (max-width: 480px) {
  /* Оптимизация для смартфонов */
  .hero-video {
    min-height: 40vh;
  }

  .hero-video h1 {
    font-size: 28px;
  }

  .hero-video p {
    font-size: 14px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 30px 0;
  }

  .services-section {
    padding: 30px 0;
  }

  .section-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
  }

  .service-card .icon img {
    width: 50px;
    height: 50px;
  }

  .btn {
    padding: 8px 14px;
    font-size: 13px;
  }

  .container {
    padding: 0 12px;
  }

  .lang-switch a {
    font-size: 12px;
    padding: 3px 6px;
  }

  .lang-switch .admin-link {
    margin-left: 10px;
  }
}