@font-face {
  font-family: 'DrukWide';
  src: url('/assets/fonts/DrukWide/DrukWideBold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Helony';
  src: url('/assets/fonts/Helony/Helony.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-main: #2c2a2b;
  --accent: #621fff;
  --text-main: #e5e5e1;
  --services-gap: 32px;
}

/* ==========================================================
   1. ОБЩИЙ КОНТЕЙНЕР СТРАНИЦЫ + HERO
   ========================================================== */

.services-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.services-hero {
  min-height: 160px;
  display: flex;
  align-items: center;
  margin-bottom: 48px;
}

.services-hero__inner {
  max-width: 1200px;
}

.services-hero__title {
  margin: 0 0 16px;
  font-size: 32px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: 'DrukWide', sans-serif;
}

.services-hero__subtitle {
  margin: 0;
  font-size: 16px;
  color: var(--text-main);
  opacity: 0.9;
}

/* ==========================================================
   2. ОСНОВНОЙ ЛЕЙАУТ (ДЕСКТОП)
   ========================================================== */

.services-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr); /* слева меню, справа контент */
  gap: 56px;
}

/* ---------- ЛЕВАЯ КОЛОНКА (МЕНЮ) ---------- */

.services-sidebar {
  position: sticky;
  top: 120px;
  align-self: flex-start;
}

.services-nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.services-nav__item {
  cursor: pointer;
  user-select: none;
}

.services-nav__label {
  font-size: 16px;
  font-family:'DrukWide', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-main);
  opacity: 0.35;
  transition:
    opacity 0.2s ease,
    transform 0.18s ease,
    color 0.2s ease;

}

/* активная категория слева */
.services-nav__item.is-active .services-nav__label {
  opacity: 1;
  color: var(--accent);
  transform: translateX(4px);
}

.services-nav__item:hover .services-nav__label {
  opacity: 0.85;
}

/* подкатегории — видно только у активной категории */
.services-nav__sub {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  display: none;
  font-family: 'Helony', sans-serif;
}

.services-nav__item.is-active .services-nav__sub {
  display: block;
}

.services-nav__sub li {
  font-size: 13px;
  color: var(--text-main);
  opacity: 0.75;
  margin-bottom: 4px;
}

/* ---------- ПРАВАЯ КОЛОНКА (СЕКЦИИ) ---------- */

.services-sections {
  display: flex;
  flex-direction: column;
  gap: 96px;
}

/* БАЗОВОЕ СОСТОЯНИЕ секции (скрыта) */
.service-section {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.45s ease-out,
    transform 0.45s ease-out;
}

/* Когда JS добавляет .is-visible — секция плавно появляется */
.service-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.service-section__inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* верх: фото + текст */
.service-section__top {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.3fr);
  gap: 32px;
  align-items: flex-start; /* заголовок по верху, а не по центру */
}

.service-section__media {
  border-radius: 18px;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
}

.service-section__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  max-height: 420px;
}

.service-section__intro {
  max-width: 520px;
}

.service-section__title {
  margin: 0 0 12px;
  font-size: 20px;
  text-transform: uppercase;
  color: var(--accent);
  font-family: 'DrukWide', sans-serif;
}

.service-section__text {
  margin: 0;
  font-size: 13px;
  color: var(--text-main);
  opacity: 0.9;
  line-height: 1.2;
  font-family: 'Helony', sans-serif;

}

/* нижние 3 карточки-подуслуги */
.service-section__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.service-highlight {
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.service-highlight__title {
  margin: 0 0 6px;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-main);
  font-family:'DrukWide', sans-serif;
}

.service-highlight__text {
  margin: 0;
  font-size: 12px;
  opacity: 0.7;
  line-height: 1.6;
  font-family: 'Helony', sans-serif;

}

/* CTA-кнопка */
.service-section__cta {
  align-self: flex-start;
  margin-top: 8px;
  padding: 14px 32px;
  border-radius: 18px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-main);
  position: relative;
  overflow: hidden;
  background-color: var(--accent);
  font-family:'DrukWide', sans-serif;
}

.service-section__cta::before {
  content: "";
  position: absolute;
  inset: 0;
  mix-blend-mode: screen;
}

.service-section__cta span {
  position: relative;
  z-index: 1;
}

.service-section__cta:hover {
  transform: translateY(-2px);
}

/* ==========================================================
   ≤ 1024px — одна колонка: сверху меню, ниже контент
   ========================================================== */
@media (max-width: 1024px) {
  .services-page {
    padding-inline: 18px;
  }

  /* одна колонка: сверху меню, ниже контент */
  .services-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  /* меню закрепляем под шапкой, чтобы всегда было видно при скролле */
  .services-sidebar {
    position: sticky;
    top: 94px; /* подгони под высоту твоего header при необходимости */
    z-index: 20;
    background: var(--bg-main);
    padding-bottom: 12px;
  }

  .services-nav {
    flex-direction: column;
    gap: 10px;
  }

  .services-nav__label {
    font-size: 18px;
  }

  .services-nav__sub {
    margin: 2px 0 0;
    padding-left: 8px;
  }

  /* показываем подменю только у активной категории */
  .services-nav__item:not(.is-active) .services-nav__sub {
    display: none;
  }

  /* верх блока: фото сверху, текст под ним */
  .service-section__top {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .service-section__media img {
    max-height: 360px;
  }

  .services-sections {
    gap: 64px;
  }

  /* нижние карточки-подуслуги — 2 в ряд */
  .service-section__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ==========================================================
   ≤ 640px — мобила, меню всё ещё sticky
   ========================================================== */
@media (max-width: 640px) {
  .services-page {
    padding-inline: 14px;
    padding-top: 40px;
  }

  .services-hero {
    margin-bottom: 32px;
  }

  .services-hero__title {
    font-size: 24px;
  }

  .services-hero__subtitle {
    font-size: 14px;
  }

  .services-nav {
    gap: 8px;
  }

  .services-nav__label {
    font-size: 17px;
  }

  .services-sections {
    gap: 56px;
  }

  .service-section__top {
    gap: 20px;
  }

  .service-section__media img {
    max-height: 260px;
  }

  /* подкатегории одна под другой — для воздуха */
  .service-section__grid {
    grid-template-columns: 1fr;
  }

  .service-highlight__title {
    font-size: 13px;
  }

  .service-highlight__text {
    font-size: 12px;
  }

  .service-section__cta {
    width: 100%;
    text-align: center;
    justify-content: center;
    display: inline-flex;
    font-size: 12.5px;
  }

  /* меню остаётся закреплённым под шапкой */
  .services-sidebar {
    top: 94px; /* чутка ближе к верху для мобилы */
  }
}

/* ==========================================================
   ≤ 480px — обычные телефоны
   ========================================================== */
@media (max-width: 480px) {
  .services-page {
    padding-inline: 12px;
    padding-top: 36px;
    padding-bottom: 44px;
  }

  .services-hero__title {
    font-size: 22px;
  }

  .services-hero__subtitle {
    font-size: 12.5px;
  }

  .services-nav__label {
    font-size: 16px;
  }

  .services-nav__sub {
    padding-left: 6px;
  }

  .services-nav__sub li {
    font-size: 11.5px;
  }

  .service-section__top {
    gap: 18px;
  }

  .service-section__media img {
    max-height: 230px;
  }

  .service-section__title {
    font-size: 18px;
  }

  .service-section__text {
    font-size: 12.5px;
  }

  .service-highlight__title {
    font-size: 12.5px;
  }

  .service-highlight__text {
    font-size: 11.5px;
  }

  .service-section__cta {
    font-size: 12px;
    letter-spacing: 0.11em;
    padding: 10px 14px;
  }

  .services-sidebar {
    top: 90px;
  }
}

/* ==========================================================
   ≤ 380 / 360px — маленькие телефоны
   ========================================================== */
@media (max-width: 380px) {
  .services-page {
    padding-inline: 10px;
    padding-top: 32px;
    padding-bottom: 40px;
  }

  .services-hero__title {
    font-size: 20px;
    letter-spacing: 0.05em;
  }

  .services-hero__subtitle {
    font-size: 11.5px;
  }

  .services-nav__label {
    font-size: 15px;
  }

  .services-nav__sub li {
    font-size: 11px;
  }

  .service-section__media img {
    max-height: 210px;
  }

  .service-section__title {
    font-size: 16px;
  }

  .service-section__text {
    font-size: 12px;
  }

  .service-highlight__title {
    font-size: 12px;
  }

  .service-highlight__text {
    font-size: 11px;
  }

  .service-section__cta {
    font-size: 11.5px;
    letter-spacing: 0.1em;
    padding: 9px 12px;
  }

  .services-sidebar {
    top: 88px;
  }
}
/* ==========================================================
   CONTACT MODALS (Services)
   ========================================================== */

body.modal-open {
  overflow: hidden;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.contact-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.contact-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

/* CARD */

.contact-modal__dialog {
  position: relative;
  width: min(520px, 100% - 40px);
  max-height: min(640px, 100% - 60px);
  padding: 22px 22px 18px;
  border-radius: 18px;
  background: #211f20;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.85);
  overflow-y: auto;
}

.contact-modal__dialog--success {
  max-height: none;
}

/* CLOSE */

.contact-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 26px;
  height: 26px;
  border-radius: 18px;
  color: #e5e5e1;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}


/* HEADER */

.contact-modal__header {
  margin-bottom: 14px;
}

.contact-modal__header h2 {
  margin: 0 0 6px;
  font-size: 16px;
  text-transform: uppercase;
  font-family:'DrukWide', sans-serif;
}

.contact-modal__header--center {
  text-align: center;
}

.contact-modal__subtitle {
  margin: 0 0 6px;
  font-size: 12px;
  opacity: 0.8;
  font-family: 'Helony', sans-serif;
}

.contact-modal__context {
  margin: 0;
  font-size: 12px;
  color: #b7b7b2;
  font-family: 'Helony', sans-serif;
}

/* FORM LAYOUT */

.contact-modal__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-modal__row {
  width: 100%;
}

.contact-modal__row--two {
  display: flex;
  gap: 12px;
}

@media (max-width: 600px) {
  .contact-modal__dialog {
    width: calc(100% - 24px);
    max-height: calc(100% - 24px);
    padding: 18px 16px 16px;
  }

  .contact-modal__row--two {
    flex-direction: column;
  }

  .contact-modal__header h2 {
    font-size: 15px;
  }
}

/* INPUTS, SELECT, TEXTAREA */

.contact-modal__form input[type="text"],
.contact-modal__form input[type="tel"],
.contact-modal__form input[type="email"],
.contact-modal__form select,
.contact-modal__form textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 18px;
  border: 1px solid var(--text-main);
  font-size: 12px;
  color: var(--text-main);
  background-color: var(--bg-main);
  outline: none;
  box-sizing: border-box;
  font-family: 'Helony', sans-serif;
}

.contact-modal__form textarea {
  border-radius: 18px;
  min-height: 100px;
  resize: vertical;
  font-family: 'Helony', sans-serif;
}

.contact-modal__form input::placeholder,
.contact-modal__form textarea::placeholder {
  color:var(--text-main);
}

.contact-modal__form input:focus,
.contact-modal__form select:focus,
.contact-modal__form textarea:focus {
  border-color: var(--text-main);
  font-family: 'Helony', sans-serif;
}

/* SELECT ARROW */

.contact-modal__form select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23E5E5E1' stroke-width='1.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

/* CHECKBOX */

.contact-modal__row--checkbox {
  margin-top: 2px;
}

.contact-modal__checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  cursor: pointer;
  font-family: 'Helony', sans-serif;
}

.contact-modal__checkbox input {
  width: 16px;
  height: 16px;
}

/* BUTTONS */

.contact-modal__row--actions {
  margin-top: 4px;
}

.contact-modal__submit {
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(229, 229, 225, 0.9);
  background: transparent;
  padding: 10px 14px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  cursor: pointer;
  background-color: var(--bg-main);
  color: var(--accent);
  font-family: 'DrukWide', sans-serif;
}

.contact-modal__submit:hover {
  background: var(--accent);
  color: var(--text-main);
}

.contact-success__button {
  margin-top: 8px;
}

/* MESSAGES */

.contact-modal__message {
  margin-top: 4px;
  font-size: 12px;
  min-height: 16px;
  font-family: 'Helony', sans-serif;
}

.contact-modal__message--error {
  color: #ff7a7a;
}

.contact-modal__message--success {
  color: #8fe38f;
}

/* SUCCESS MODAL OVER BASE */

.contact-modal--success {
  z-index: 1000; /* выше формы */
}
