/* =========================================================
   Направления
   Плитки с текстом загораются синим, пока поднимаются
   снизу экрана. Цвет, размытие и рамку считает JS.
   ========================================================= */

.directions__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  column-gap: 16px;
}

.directions__col {
  display: flex;
  flex-direction: column;
  row-gap: 16px;
}

.dir-tile {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  border-radius: 24px;
  text-align: center;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
}

/* Состояние по умолчанию (до расчёта в JS) = неактивное стекло */
.dir-tile[data-dir] {
  background-color: var(--c-glass);
  border: 1px solid var(--c-glass-border);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  color: rgba(90, 90, 90, 0.5);
  will-change: background-color, box-shadow, color;
}

.directions__note {
  margin-top: 32px;
  text-align: center;
  color: var(--c-dim);
  font-size: 20px;
  line-height: 1.2;
}

@media (max-width: 1199px) {
  .dir-tile { font-size: 18px; }
}

/* На планшете и телефоне: две колонки, семь плиток с текстом
   и три пустые (.dir-tile--mobile) в шахматном порядке.
   Порядок задаёт --m-order в разметке. */
@media (max-width: 959px) {
  .directions__grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .directions__col { display: contents; }
  .dir-tile { order: var(--m-order, 99); min-height: 140px; }
  .dir-tile--empty:not(.dir-tile--mobile) { display: none; }
}
@media (max-width: 639px) {
  .directions__grid { gap: 12px; }
  .dir-tile { min-height: 128px; border-radius: 20px; }
}
@media (max-width: 479px) {
  .dir-tile { min-height: 120px; font-size: 16px; padding: 16px 8px; }
  .directions__note { font-size: 16px; }
}
@media (max-width: 359px) {
  .dir-tile { min-height: 112px; font-size: 14px; }
}
