/* ============================================================
   ПЕРЕМЕННЫЕ / RESET
============================================================ */
:root {
  --color-accent: #1ca0d0;
  --color-accent-dark: #1580ab;
  --color-text: #2c3e50;
  --color-text-soft: #5a6b7a;
  --color-bg: #ffffff;
  --color-bg-alt: #eef1f3;
  --color-border: #d8dee3;

  --container: 1200px;
  --gap: 48px;
  --radius: 6px;
  --transition: 0.25s ease;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  color: var(--color-text);
  line-height: 1.6;
  background: var(--color-bg);
  font-size: 15px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent-dark);
}

button {
  font-family: inherit;
  cursor: pointer;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================================
   БЛОК: ШАПКА (header)
============================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  gap: 16px;
}

.header__logo {
  font-size: 28px;
  font-weight: 500;
  color: #0ea2bd;
  letter-spacing: 0.5px;
}

.header__logo:hover {
  color: var(--color-accent);
}

/* --- навигация --- */
.header__nav-list {
  display: flex;
  align-items: center;
  gap: 28px;
}

.header__nav-link {
  font-size: 14px;
  color: var(--color-text);
  font-weight: 500;
}

.header__nav-link:hover {
  color: var(--color-accent);
}

/* --- выпадающий список «Услуги» (dropdown) --- */
.header__nav-item--dropdown {
  position: relative;
}

.header__dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 0;
  background: none;
  border: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  transition: color var(--transition);
}

.header__dropdown-toggle:hover {
  color: var(--color-accent);
}

.header__dropdown-arrow {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform var(--transition);
}

.header__nav-item--open .header__dropdown-arrow {
  transform: rotate(180deg);
}

.header__dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 290px;
  margin-top: 6px;
  padding: 8px 0;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--transition), transform var(--transition),
              visibility var(--transition);
  z-index: 200;
}

.header__nav-item--open .header__dropdown-list {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.header__dropdown-item + .header__dropdown-item {
  border-top: 1px solid var(--color-bg-alt);
}

.header__dropdown-link {
  display: block;
  padding: 11px 18px;
  font-size: 14px;
  color: var(--color-text);
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
}

.header__dropdown-link:hover {
  color: var(--color-accent);
  background: var(--color-bg-alt);
}

/* --- гамбургер (скрыт на десктопе) --- */
.header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 8px;
  background: transparent;
  border: 0;
}

.header__burger-line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ============================================================
   БЛОК: ГЛАВНЫЙ ЭКРАН (hero)
============================================================ */
.hero {
  position: relative;
  padding: 200px 0;
  color: #fff;
  text-align: center;
  background:
    linear-gradient(rgba(15, 60, 80, 0.55), rgba(15, 60, 80, 0.55)),
    url("../images/home/home-hg.webp") center/cover no-repeat;
}

.hero__inner {
  max-width: 1200px;
}

.hero__title {
  font-size: 56px;
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 22px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.hero__text {
  font-size: 24px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* ============================================================
   БЛОК: ОБЛАСТЬ СТРАНИЦЫ
============================================================ */
.page {
  display: block;
}

/* ============================================================
   БЛОК: ПРЕДЛАГАЮ УСЛУГИ (services)
============================================================ */
.services {
  padding: 64px 0;
  background: var(--color-bg);
}

.services__title {
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 44px;
}

.services__body {
  display: flex;
  align-items: flex-start;
  gap: var(--gap);
}

.services__media {
  flex: 0 0 42%;
}

.services__image {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
}

.services__list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.services__item-title {
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 500;
  margin-bottom: 8px;
}

.services__item-text {
  font-size: 16px;
  line-height: 22px;
  color: var(--color-text-soft);
}

/* ============================================================
   БЛОК: УНИВЕРСАЛЬНАЯ ФУНКЦИОНАЛЬНАЯ СЕКЦИЯ (feature)
============================================================ */
.feature {
  padding: 64px 0;
  background: var(--color-bg);
}

.feature--reversed {
  background: var(--color-bg-alt);
}

.feature__inner {
  display: flex;
  align-items: center;
  gap: var(--gap);
}

.feature__media {
  flex: 0 0 42%;
}

.feature__image {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  background: #fff;
}

.feature__content {
  flex: 1;
}

.feature__title {
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 16px;
  line-height: 1.3;
}

.feature__lead {
  font-size: 16px;
  color: var(--color-text-soft);
  margin-bottom: 18px;
}

.feature__text {
  font-size: 16px;
  color: var(--color-text-soft);
  margin-bottom: 16px;
}

/* --- список с галочками --- */
.feature__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}

.feature__item {
  position: relative;
  padding-left: 33px;
  font-size: 16px;
  line-height: 22px;
  color: var(--color-text-soft);
}

.feature__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-accent);
  border-radius: 3px;
}

.feature__item::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 3px;
  width: 18px;
  height: 9px;
  border-left: 2px solid var(--color-accent);
  border-bottom: 2px solid var(--color-accent);
  transform: rotate(-45deg);
}

/* --- кнопки --- */
.feature__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.feature__button {
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color var(--transition), color var(--transition),
              background var(--transition);
}

.feature__button:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.feature__button--accent {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.feature__button--accent:hover {
  background: var(--color-accent);
  color: #fff;
}

/* ============================================================
   БЛОК: ПОДВАЛ (footer)
============================================================ */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 22px 0;
  background: var(--color-bg);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer__left,
.footer__right {
  font-size: 13px;
}

.footer__sep {
  margin: 0 8px;
  color: var(--color-border);
}

.footer__link {
  color: var(--color-accent);
}

/* ============================================================
   АДАПТИВНОСТЬ
============================================================ */
@media (max-width: 768px) {

  .hero {
    padding: 64px 0;
  }

  .hero__title {
    font-size: 28px;
  }

  .hero__text {
    font-size: 15px;
  }

  .services {
    padding: 48px 0;
  }

  .services__title {
    font-size: 22px;
    margin-bottom: 32px;
  }

  .services__body {
    flex-direction: column;
    gap: 28px;
  }

  .services__media {
    flex: none;
    width: 100%;
  }

  .feature {
    padding: 48px 0;
  }

  .feature__inner {
    flex-direction: column;
    gap: 28px;
  }

  .feature__media {
    flex: none;
    width: 100%;
    order: -1;
  }

  .feature__title {
    font-size: 18px;
  }

  /* --- мобильное меню --- */
  .header__burger {
    display: flex;
  }

  .header__nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
  }

  /* увеличено, чтобы вместить раскрытый dropdown «Услуги» */
  .header__nav--open {
    max-height: 280px;
  }

  .header__nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0;
  }

  .header__nav-item {
    border-bottom: 1px solid var(--color-bg-alt);
  }

  .header__nav-item:last-child {
    border-bottom: 0;
  }

  .header__nav-link {
    display: block;
    padding: 14px 20px;
    font-size: 15px;
  }

  /* --- dropdown «Услуги» как вложенный аккордеон --- */
  .header__nav-item--dropdown {
    position: static;
  }

  .header__dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 14px 20px;
    font-size: 15px;
  }

  .header__dropdown-list {
    position: static;
    min-width: 0;
    margin-top: 0;
    padding: 0 0 8px 20px;
    background: var(--color-bg-alt);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
  }

  .header__nav-item--open .header__dropdown-list {
    max-height: 500px;
  }

  .header__dropdown-item + .header__dropdown-item {
    border-top: 0;
  }

  .header__dropdown-link {
    padding: 12px 8px;
    white-space: normal;
  }

  /* гамбургер превращается в крестик */
  .header__burger--active .header__burger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .header__burger--active .header__burger-line:nth-child(2) {
    opacity: 0;
  }
  .header__burger--active .header__burger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
