/* ===== ПОДКЛЮЧЕНИЕ ШРИФТА MONTSERRAT ===== */
@font-face {
  font-family: 'Montserrat';
  src: url('/assets/fonts/Montserrat-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Montserrat';
  src: url('/assets/fonts/Montserrat-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Montserrat';
  src: url('/assets/fonts/Montserrat-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
}

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

@font-face {
  font-family: 'Montserrat';
  src: url('/assets/fonts/Montserrat-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
}

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  --primary: #38d2d4;
  --bg: #f5f5f5;
  --bg-card: #ffffff;
  --text: #2a2a2a;
  --text-muted: #707070;
  --text-light: #3a3a3a;
  --border: #e0e0e0;
  
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 32px;
  --sp-2xl: 48px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== НАВИГАЦИЯ (pdoMenu) ===== */
.main-nav--home {
  margin-top: var(--sp-lg);
  margin-bottom: var(--sp-2xl);
}

.main-nav--home .nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 28px;
  justify-content: center;
}

.main-nav--home .nav-item {
  position: relative;
}

.main-nav--home .nav-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s ease;
  padding: 6px 0;
  display: inline-block;
  border-bottom: 2px solid transparent;
}

.main-nav--home .nav-link:hover {
  color: var(--text-light);
  border-bottom-color: var(--text-light);
}

.main-nav--home .nav-link--active {
  color: var(--text-light);
  border-bottom-color: var(--text-light);
  font-weight: 600;
}

/* Подменю Портфолио */
.main-nav--home .nav-item--parent:hover .nav-submenu {
  display: block;
}

.main-nav--home .nav-submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 0;
  min-width: 150px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  list-style: none;
  margin: 8px 0 0 0;
  z-index: 100;
}

.main-nav--home .nav-submenu-item {
  margin: 0;
}

.main-nav--home .nav-submenu-link {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.main-nav--home .nav-submenu-link:hover {
  background: var(--bg);
  color: var(--text-light);
}

.main-nav--home .nav-submenu-link--active {
  color: var(--text-light);
  font-weight: 600;
  background: var(--bg);
}

/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
main {
  margin-top: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--sp-2xl) var(--sp-md);
}

.container {
  width: 100%;
  max-width: 1200px;
}

/* ===== ЗАГОЛОВОК ===== */
.hero-section {
  text-align: center;
  margin-bottom: var(--sp-xl);
  animation: fadeIn 0.8s ease-out;
}

.main-title {
  font-size: clamp(32px, 7vw, 48px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: var(--sp-lg);
}

.main-title .highlight {
  color: var(--primary);
}

.main-title .regular {
  color: var(--text-muted);
}

/* ===== КАРТОЧКИ ===== */
.directions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(200px, 30vw, 300px), 1fr));
  gap: clamp(var(--sp-lg), 5vw, var(--sp-2xl));
}

.direction-card {
  background: var(--bg-card);
  border: none;
  padding: 0;
  text-align: center;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  animation: slideUpIn 0.8s ease-out;
  animation-fill-mode: both;
}

.direction-card:nth-child(1) {
  animation-delay: 0.2s;
}

.direction-card:nth-child(2) {
  animation-delay: 0.4s;
}

.direction-card:nth-child(3) {
  animation-delay: 0.6s;
}

/* Фоновое изображение */
.card-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.3;
  transition: opacity 0.35s ease;
  z-index: 0;
}

.direction-card:hover .card-bg {
  opacity: 0.7;
}

/* Контент карточки */
.card-content {
  position: relative;
  z-index: 1;
  padding: clamp(var(--sp-lg), 5vw, var(--sp-2xl));
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.card-title {
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  text-transform: uppercase;
  transition: all 0.35s ease;
}

.direction-card:hover .card-title {
  animation: cardTitleVibrate 0.4s ease-in-out;
  color: #ffffff;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Зелёная обводка - только при наведении */
.direction-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 1px solid var(--primary);
  border-radius: 0;
  opacity: 0;
  transition: opacity 0.35s ease, box-shadow 0.35s ease;
  pointer-events: none;
  box-shadow: 0 0 20px rgba(56, 210, 212, 0.5), inset 0 0 12px rgba(56, 210, 212, 0.2);
}

.direction-card:hover::before {
  opacity: 1;
}

.direction-card:hover {
  transform: translateY(-8px);
}

/* ===== АНИМАЦИИ ===== */
@keyframes slideUpIn {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes cardTitleVibrate {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-2px);
  }
  75% {
    transform: translateX(2px);
  }
}

/* ===== ФУТЕР ===== */
footer {
  background: var(--bg-card);
  border-top: none;
  padding: var(--sp-lg) var(--sp-md);
  text-align: center;
  margin-top: auto;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--sp-lg);
  flex-wrap: nowrap;
  margin-bottom: var(--sp-md);
  font-size: 13px;
  border: none;
  align-items: center;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 400;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.footer-links a.vk-link {
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  transition: all 0.3s ease;
  color: var(--text-muted);
}

.footer-links a.vk-link:hover {
  color: var(--primary);
  background: rgba(56, 210, 212, 0.1);
}

.footer-links a:nth-child(1) {
  font-weight: 400;
}

.footer-links a:nth-child(2) {
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  font-size: 13px;
  color: var(--text-muted);
  padding-top: var(--sp-md);
  border-top: none;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
  .nav-menu {
    gap: 30px;
  }
  
  .nav-link {
    font-size: 14px;
  }

  .nav-item.active .nav-link,
  .nav-link.active-link {
    font-size: 17px;
  }

  main {
    padding: var(--sp-xl) var(--sp-md);
  }

  .hero-section {
    margin-bottom: var(--sp-lg);
  }

  .directions-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-lg);
  }

  .direction-card {
    min-height: 250px;
  }

  .footer-links {
    flex-direction: column;
    gap: var(--sp-md);
  }
}