/* Глобальные стили */

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  color: currentColor;
  font-family: inherit;
  font-size: inherit;
  border: none;
  background-color: transparent;
  cursor: pointer;
}

html {
  scroll-behavior: smooth;
}

/* Элементы не видны на сайте, но видны скринридерам */
.visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

body {
  font-family: var(--main-font, "Montserrat-VF"), "Montserrat", sans-serif;
  font-variation-settings: "wght" var(--main-font-wght, 500);
  color: var(--font-main-color, #ddd);
  background-color: var(--bg-color, #121116);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  
  /* Запрещаем выделение текста */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  
  /* Запрещаем контекстное меню */
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* Разрешаем выделение в полях ввода */
input, textarea, [contenteditable="true"] {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

/* Контейнер для частиц */
#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-color: var(--bg-color, #121116);
}

/* Основной контент поверх частиц */
.main {
  position: relative;
  z-index: 1;
}

/* Стили для шапки и навигации */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(18, 17, 22, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 100;
  transition: all 0.3s ease;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* Fallback для браузеров без поддержки backdrop-filter */
@supports not (backdrop-filter: blur(15px)) {
  .header {
    background: rgba(18, 17, 22, 0.98);
  }
}

/* Linkin-Path: отсюда нужно будет убрать в отдельный файл с nav */
.nav {
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.nav__brand {
  flex: 1;
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  color: var(--font-highlight-color, #4de1cd);
  transition: all 0.3s ease;
}

.nav__logo:hover {
  transform: scale(1.05);
}

.nav__logo svg {
  width: 32px;
  height: 39px;
}

.nav__menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
  justify-content: center;
  flex: 2;
  flex-wrap: nowrap;
}

.nav__link {
  color: var(--font-main-color, #ddd);
  text-decoration: none;
  font-variation-settings: "wght" var(--main-font-wght, 400);
  transition: color 0.3s ease;
  position: relative;
  white-space: nowrap;
}

.nav__link:hover {
  color: var(--font-highlight-color, #4de1cd);
}

.nav__link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--font-highlight-color, #4de1cd);
  transition: width 0.3s ease;
}

.nav__link:hover::after {
  width: 100%;
}

.nav-btn-wrapper {
  display: inline-flex;
  align-self: center;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none;
}

.nav__actions {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
}

.nav__cta-button {
  display: inline-flex;
  background: var(--font-highlight-color, #4de1cd);
  color: var(--bg-color, #121116);
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  border: 2px solid var(--font-highlight-color,#4de1cd);
  font-variation-settings: "wght" var(--main-font-wght, 500);
  text-decoration: none;
  transition: all 0.3s ease;
  will-change: transform;
  white-space: nowrap;
}

.nav-btn-wrapper:hover .nav__cta-button {
  background-color: transparent;
  color: var(--font-highlight-color, #ddd);
  transform: translateY(-4px);
  box-shadow: 0 4px 15px rgba(77, 225, 205, 0.3);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  width: 30px;
  height: 30px;
  position: relative;
}

.nav__toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--font-main-color, #ddd);
  border-radius: 3px;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: absolute;
  transform-origin: center;
}

.nav__toggle span:nth-child(1) {
  top: 8px;
}

.nav__toggle span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.nav__toggle span:nth-child(3) {
  bottom: 8px;
}

/* Анимация превращения в крестик */
.nav__toggle.active span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.nav__toggle.active span:nth-child(2) {
  opacity: 0;
  transform: translateY(-50%) scale(0);
}

.nav__toggle.active span:nth-child(3) {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

/* Скрываем мобильную кнопку на десктопе */
.nav__item--mobile-cta {
  display: none;
}
/* Linkin-Path: до сюда */


.main {
  padding: 0 clamp(2.5rem, 1rem + 3vw, 3.75rem);
  /* боковые отступы меняются динамически от 60px до 40px при ширине экрана от 1440px до 768px */
}

/* Выделение цветом - для слов и букв для span */
.accent-colored {
  color: var(--font-highlight-color, #4de1cd);
}

/* общий стиль для заголовков */
.card-title {
  text-transform: uppercase;
  font-variation-settings: "wght" var(--main-font-wght-accent, 700);
  font-size: clamp(3rem, 6vw, 6rem);
  /* Размер заголовка меняется динамически от 96px до 48px при ширине экрана от 1440px до 768px */
}

/* Общие стили для секций */
section {
  padding: 5rem 0;
  min-height: auto;
}


/* Стили для секции "Интересы" без контейнера - полная ширина */
.interests {
  padding: 5rem 0;
  width: 100%;
}

.interests .section_interests {
  width: 100%;
  padding: 0 2rem;
}

/* Стили для секции "Услуги" без контейнера - полная ширина */
.services {
  padding: 5rem 0;
  width: 100%;
}

.services .services__header {
  width: 100%;
  padding: 0 2rem;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

/* Стили для заглушки портфолио */
.portfolio-placeholder {
  padding: 6rem 0;
  text-align: center;
}

.placeholder-content {
  max-width: 600px;
  margin: 0 auto;
  padding: 4rem 2rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
}

.placeholder-icon {
  margin-bottom: 2rem;
  color: var(--font-highlight-color, #4de1cd);
  opacity: 0.7;
}

.placeholder-title {
  font-size: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  font-variation-settings: "wght" var(--main-font-wght-accent, 700);
  color: var(--font-main-color, #fff);
  margin-bottom: 1rem;
}

.placeholder-text {
  font-size: clamp(1rem, 0.8rem + 0.5vw, 1.2rem);
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin: 0;
}

.section-title h2 {
  font-size: clamp(2.5rem, 1.5rem + 4vw, 4rem);
  font-variation-settings: "wght" var(--main-font-wght-accent, 700);
  color: var(--font-main-color, #fff);
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.section-title p {
  font-size: clamp(1rem, 0.8rem + 1vw, 1.5rem);
  color: var(--font-highlight-color, #4de1cd);
  margin: 0;
  opacity: 0.8;
}

/* Стили для планшетов */
@media (min-width: 900px) and (max-width: 1024px) {
  .nav__menu {
    gap: 1.5rem !important;
    flex-wrap: nowrap !important;
  }
  
  .nav__link {
    white-space: nowrap !important;
    font-size: 0.9rem !important;
  }
  
  .nav__actions {
    flex-shrink: 0 !important;
  }
  
  .nav__cta-button {
    padding: 0.6rem 1.2rem !important;
    font-size: 0.9rem !important;
  }
}

@media (max-width: 900px) {
  .nav {
    padding: 1rem 1.5rem;
  }
  
  .nav__actions .nav__cta-button {
    display: none; /* Скрываем десктопную кнопку на мобильных */
  }
  
  .nav__item--mobile-cta {
    display: block; /* Показываем мобильную кнопку */
  }
  
  .nav__cta-button--mobile {
    margin-top: 1rem;
  }
  
  .nav__menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100vw;
    height: calc(100vh - 70px);
    background: rgba(18, 17, 22, 0.95);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 2rem;
    transition: left 0.3s ease;
  }
  
  .nav__menu.active {
    left: 0;
  }
  
  /* Блокируем прокрутку при открытом мобильном меню */
  body.mobile-menu-open {
    overflow: hidden;
    /* position: fixed; */
    width: 100%;
    height: 100%;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
  }
  
  /* Плавное восстановление прокрутки */
  /* body.menu-closing {
      scroll-behavior: auto !important;
  } */
/*   
  html.menu-closing {
      scroll-behavior: auto !important;
  } */
  
  .nav__toggle {
    display: flex;
  }
  
  .nav__item {
    margin: 1rem 0;
  }
  
  .nav__link {
    font-size: 1.2rem;
  }
  
  /* Мобильные стили для секции "Интересы" */
  .interests {
    padding: 3rem 0;
  }
  
  .interests .section_interests {
    padding: 0 1rem;
  }
  
  /* Убираем конфликтующие стили - теперь они в interests.css */
}

/* Отключаем hover эффекты на сенсорных устройствах */
@media (hover: none) and (pointer: coarse) {
  .nav__link:hover,
  .nav__cta-button:hover,
  .nav__logo:hover {
    transform: none;
    color: inherit;
  }
  
  .nav__link:hover::after {
    width: 0;
  }
  
  .nav__cta-button:hover {
    background: var(--font-highlight-color, #4de1cd);
    box-shadow: none;
  }
}

@media (width <= 900px) {
  .card-title {
    font-size: clamp(2rem, 1.1176rem + 3.9216vw, 3rem);
    /* Размер заголовка меняется динамически от 48px до 32px при ширине экрана от 768px до 360px */
  }
  .main {
    padding: 0 clamp(1.25rem, 0.1471rem + 4.902vw, 2.5rem);
  }
  /* боковые отступы меняются динамически от 40px до 20px при ширине экрана от 768px до 360px */
}