/**
 * «Направления обучения» — тонкий слой предметов за карточками.
 * Фон секции, карточки, veil, mesh JS, анимации — без изменений по смыслу.
 */

/* --- Скрыть abstract mesh / fallback (JS продолжает работать) --- */
.section--directions .directions__mesh-canvas,
.section--directions .directions__mesh-fallback {
  z-index: 0;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* --- Dark luxury background (без full-photo wallpaper) --- */
.section--directions {
  position: relative;
  overflow: hidden;
  background: #161412;
  border-block-color: rgba(255, 255, 255, 0.08);
}

.section--directions .directions__mesh-wrap::before {
  content: none;
  display: none;
}

/* Слой предметов — над veil, под .directions__inner */
.section--directions .directions__scene {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.section--directions .directions__scene-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: transparent;
}

/* --- Предметы: читаемая мягкая декорация --- */
.section--directions .directions__prop {
  position: absolute;
  display: block;
  height: auto;
  max-width: none;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  border: none;
  box-shadow: none;
  background: none;
}

/* Ноутбук: справа-снизу, заметный, без «постерного» blur/mask */
.section--directions .directions__prop--laptop {
  right: -4%;
  bottom: -6%;
  top: auto;
  width: clamp(520px, 38vw, 620px);
  max-width: 620px;
  z-index: 1;
  opacity: 0.5;
  transform: rotate(-2deg);
  transform-origin: 85% 100%;
  filter: blur(0.7px);
  -webkit-mask-image: radial-gradient(
    ellipse 140% 125% at 78% 88%,
    #000 0%,
    #000 82%,
    transparent 100%
  );
  mask-image: radial-gradient(
    ellipse 140% 125% at 78% 88%,
    #000 0%,
    #000 82%,
    transparent 100%
  );
}

/* Блокнот: снизу, ближе к центру-слева */
.section--directions .directions__prop--notebook {
  left: 6%;
  bottom: -3%;
  right: auto;
  width: clamp(260px, 24vw, 340px);
  max-width: 340px;
  z-index: 2;
  opacity: 0.37;
  transform: rotate(-1.5deg);
  transform-origin: 40% 100%;
  filter: blur(0.4px);
  -webkit-mask-image: radial-gradient(
    ellipse 130% 120% at 45% 90%,
    #000 0%,
    #000 78%,
    transparent 100%
  );
  mask-image: radial-gradient(
    ellipse 130% 120% at 45% 90%,
    #000 0%,
    #000 78%,
    transparent 100%
  );
}

/* Ручка: рядом с блокнотом */
.section--directions .directions__prop--pen {
  left: 4%;
  bottom: 14%;
  right: auto;
  width: clamp(22px, 2.2vw, 32px);
  z-index: 3;
  opacity: 0.3;
  transform: rotate(8deg);
  filter: blur(0.35px);
  -webkit-mask-image: radial-gradient(ellipse 130% 130% at 50% 55%, #000 0%, #000 85%, transparent 100%);
  mask-image: radial-gradient(ellipse 130% 130% at 50% 55%, #000 0%, #000 85%, transparent 100%);
}

/* --- Ambient veil (читаемость, без image-overlay) --- */
.section--directions .directions__mesh-veil {
  position: absolute;
  z-index: 1;
  background:
    linear-gradient(
      90deg,
      rgba(22, 20, 18, 0.42) 0%,
      rgba(22, 20, 18, 0.18) 38%,
      transparent 58%
    ),
    linear-gradient(
      180deg,
      rgba(22, 20, 18, 0.28) 0%,
      transparent 22%,
      transparent 76%,
      rgba(22, 20, 18, 0.34) 100%
    );
}

.section--directions .directions__inner {
  position: relative;
  z-index: 3;
}

/* --- Typography (только этот блок) --- */
/* typography: .section__title / .section__subtitle — typography.css */
.section--directions .section__title {
  color: #f4efe7;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.45);
}

.section--directions .section__subtitle,
.section--directions .section__subtitle--directions {
  color: #e5ddd1;
  opacity: 0.96;
  text-shadow: 0 1px 20px rgba(0, 0, 0, 0.5);
  max-width: 36em;
}

/* --- Scroll shell — лёгкое стекло, часть сцены --- */
.section--directions .directions-scroll {
  background: rgba(245, 240, 233, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.section--directions .directions-scroll.is-scrollable::before {
  background: rgba(245, 240, 233, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.08);
}

.section--directions .directions-scroll__list {
  scrollbar-color: rgba(229, 221, 209, 0.5) rgba(255, 255, 255, 0.06);
}

.section--directions .directions-scroll__list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.section--directions .directions-scroll__list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(229, 221, 209, 0.55) 0%, rgba(200, 190, 175, 0.45) 100%);
  border-color: rgba(255, 255, 255, 0.15);
}

.section--directions .directions-scroll__gradient--top {
  background: linear-gradient(to bottom, rgba(22, 20, 18, 0.72) 0%, transparent 100%);
}

.section--directions .directions-scroll__gradient--bottom {
  background: linear-gradient(to top, rgba(22, 20, 18, 0.78) 0%, transparent 100%);
}

/* --- Direction cards — frosted glass (transitions / transform не трогаем) --- */
.section--directions .direction-card {
  background: rgba(245, 240, 233, 0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.section--directions .direction-card::before {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

/* typography: .direction-card h3 / p — typography.css */
.section--directions .direction-card h3 {
  color: #f4efe7;
}

.section--directions .direction-card p {
  color: #e5ddd1;
  opacity: 0.94;
}

.section--directions .direction-card--entrance.is-inview:hover {
  background: rgba(245, 240, 233, 0.16);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.section--directions .direction-card--wide {
  background: rgba(245, 240, 233, 0.12);
  border-color: rgba(255, 255, 255, 0.14);
}

/* --- Mobile: та же логика, объекты остаются видимыми --- */
@media (max-width: 900px) {
  .section--directions .directions__prop--laptop {
    right: -6%;
    bottom: -5%;
    top: auto;
    width: min(72vw, 420px);
    max-width: none;
    opacity: 0.42;
    transform: rotate(-2deg);
    filter: blur(0.6px);
  }

  .section--directions .directions__prop--notebook {
    left: 2%;
    bottom: -2%;
    width: clamp(200px, 42vw, 300px);
    opacity: 0.32;
    transform: rotate(-1deg);
    filter: blur(0.4px);
  }

  .section--directions .directions__prop--pen {
    left: 1%;
    bottom: 12%;
    width: clamp(20px, 3vw, 28px);
    opacity: 0.28;
    filter: blur(0.35px);
  }

  .section--directions .section__subtitle,
  .section--directions .section__subtitle--directions {
    opacity: 0.98;
  }

  .section--directions .directions-scroll {
    background: rgba(245, 240, 233, 0.08);
    box-shadow:
      0 14px 44px rgba(0, 0, 0, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
}

@media (max-width: 480px) {
  .section--directions .directions__prop--laptop {
    right: -8%;
    bottom: -4%;
    width: min(78vw, 360px);
    opacity: 0.38;
    filter: blur(0.55px);
  }

  .section--directions .directions__prop--notebook {
    left: 0%;
    bottom: 0%;
    width: min(46vw, 260px);
    opacity: 0.28;
  }

  .section--directions .directions__prop--pen {
    opacity: 0.25;
    width: clamp(18px, 5vw, 24px);
    filter: blur(0.3px);
  }
}
