/* ================================================
   NEW HOMEPAGE DESIGN PREVIEW
   Figma: Десктоп 1877×1272 / Мобайл 904×3526
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap');

/* ---- ГЛОБАЛЬНЫЕ СТИЛИ ПРЕВЬЮ ---- */

/* Убираем подчёркивание у всех ссылок в блоках превью.
   Шаблон рисует подчёркивание через a::after { border-bottom: 1px dotted } —
   именно это нужно гасить, text-decoration тут ни при чём. */
.nm-section a,
.nm-footer a {
  text-decoration: none !important;
  color: inherit;
}
.nm-section a::after,
.nm-footer a::after {
  display: none !important;
  border-bottom: none !important;
  content: none !important;
}

/* ---- СКРЫВАЕМ ЛИШНЕЕ ИЗ ШАБЛОНА ---- */

/* Стандартный футер шаблона */
.footer { display: none !important; }

/* Старые плитки tiles-v2 */
.tiles-v2 { display: none !important; }

/* Блок с иконками (main-buttons) и раскрытое меню */
.main-buttons             { display: none !important; }
.main-buttons-celebration { display: none !important; }

/* Белый фон под всей главной страницей */
.home-page { background: #fff !important; }

/* ---- СЕКЦИЯ КАРТОЧЕК ---- */

.nm-section {
  /* Широкоформатно — без ограничения max-width, вровень с баннером */
  padding: 36px 24px 12px;
  background: #fff;
  box-sizing: border-box;
}

.nm-grid {
  display: grid;
  grid-template-columns: 325fr 530fr 485fr 325fr;
  grid-template-rows: 220px 220px;
  gap: 16px;
}

/* Явное размещение карточек */
.nm-card--cake      { grid-column: 1; grid-row: 1; }
.nm-card--animation { grid-column: 2; grid-row: 1; }
.nm-card--afisha    { grid-column: 3; grid-row: 1 / 3; }
.nm-card--catering  { grid-column: 4; grid-row: 1; }
.nm-card--nashi     { grid-column: 1; grid-row: 2; }
.nm-card--wedding   { grid-column: 2; grid-row: 2; }
.nm-card--friends   { grid-column: 4; grid-row: 2; }

/* Базовые стили карточки */
.nm-card {
  position: relative;
  border-radius: 13px;
  overflow: hidden;
  display: block;
  text-decoration: none !important;
  -webkit-tap-highlight-color: transparent;
}

.nm-card__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.35s ease;
}

.nm-card:hover .nm-card__bg {
  transform: scale(1.04);
}

.nm-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.29);
}

.nm-card__text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Inter, Arial, sans-serif;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.21;
  color: #fff;
  text-align: center;
  padding: 16px;
  z-index: 1;
}

/* ---- НОВЫЙ ФУТЕР ---- */

.nm-footer {
  background: #1a1a1a;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-top: 0;
}

.nm-footer__deco {
  position: absolute;
  /* Отступ от края — по Figma дека на x:81 из 1877px ≈ 4.3% */
  left: 60px;
  top: 0;
  bottom: 0;
  width: auto;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  display: block;
  pointer-events: none;
}

.nm-footer__container {
  padding: 40px 60px 36px;
  box-sizing: border-box;
}

.nm-footer__main {
  display: flex;
  align-items: flex-start;
  padding-bottom: 36px;
  margin-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Левая часть: лого, телефон, соцсети */
.nm-footer__left {
  /* padding-left — отступ чтобы контент был правее декоративной ленты */
  padding-left: 120px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.nm-footer__logo {
  display: block;
  width: 180px;
  height: auto;
  margin-bottom: 18px;
}

.nm-footer__phone {
  display: block;
  font-family: Inter, Arial, sans-serif;
  font-size: 20px;
  line-height: 1.21;
  color: #fff;
  text-decoration: none !important;
  margin-bottom: 6px;
  padding-left: 17px;
}

.nm-footer__phone:hover { opacity: 0.8; }

.nm-footer__phone-label {
  font-family: Inter, Arial, sans-serif;
  font-size: 20px;
  line-height: 1.21;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 36px;
  padding-left: 17px;
}

.nm-footer__socials {
  display: flex;
  gap: 14px;
  align-items: center;
  padding-left: 17px;
}

.nm-footer__social-link { display: block; flex-shrink: 0; text-decoration: none !important; }

.nm-footer__social-link img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
}

/* Telegram иконка — круглая, как в Figma */
.nm-footer__social-link:last-child img {
  border-radius: 50%;
  overflow: hidden;
}

/* Правая часть: навигационные ссылки */
.nm-footer__nav {
  display: flex;
  gap: 80px;
  align-items: flex-start;
  margin-left: auto;
}

.nm-footer__nav-col {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.nm-footer__nav-link {
  font-family: Inter, Arial, sans-serif;
  font-size: 20px;
  line-height: 1.21;
  color: #fff;
  text-decoration: none !important;
}

.nm-footer__nav-link:hover { opacity: 0.7; }

/* Юридические ссылки */
.nm-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 36px;
}

.nm-footer__legal-link {
  font-family: Inter, Arial, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.21;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none !important;
}

.nm-footer__legal-link:hover { color: rgba(255, 255, 255, 0.9); }

/* ================================================
   ADAPTIVE ≤ 900px
   ================================================ */

@media (max-width: 900px) {
  /* Шаблон добавляет main { padding-bottom: 9rem } — уменьшаем вдвое на мобайле */
  main { padding-bottom: 4.5rem !important; }

  /* ---- КАРТОЧКИ ---- */
  .nm-section { padding: 12px 12px 6px; }

  .nm-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 10px;
  }

  .nm-card--cake,
  .nm-card--animation,
  .nm-card--afisha,
  .nm-card--catering,
  .nm-card--nashi,
  .nm-card--wedding,
  .nm-card--friends {
    grid-column: 1;
    grid-row: auto;
    aspect-ratio: 733 / 290;
  }

  .nm-card--afisha { aspect-ratio: 733 / 324; }

  .nm-card--cake      { order: 1; }
  .nm-card--animation { order: 2; }
  .nm-card--afisha    { order: 3; }
  .nm-card--nashi     { order: 4; }
  .nm-card--catering  { order: 5; }
  .nm-card--wedding   { order: 6; }
  .nm-card--friends   { order: 7; }

  .nm-card__text { font-size: 18px; }

  /* ---- ФУТЕР ---- */
  .nm-footer__deco { display: none; }

  .nm-footer__container { padding: 32px 20px 28px; }

  .nm-footer__main {
    flex-direction: column;
    gap: 32px;
    padding-bottom: 28px;
    margin-bottom: 20px;
  }

  /* Мобайл: лого + соцсети в одну строку (как в Figma),
     телефон и лейбл — ниже на всю ширину */
  .nm-footer__left {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
    column-gap: 16px;
    row-gap: 20px;
    align-items: center;
    padding-left: 0;
  }

  /* Ссылка-обёртка логотипа */
  .nm-footer__left > a:first-child {
    grid-column: 1;
    grid-row: 1;
  }

  .nm-footer__logo { width: 160px; margin-bottom: 0; }

  /* Соцсети — правая колонка, первая строка */
  .nm-footer__socials {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    padding-left: 0;
    gap: 12px;
  }

  /* Телефон и лейбл — на всю ширину, сброс PC-отступов */
  .nm-footer__phone {
    grid-column: 1 / 3;
    grid-row: 2;
    font-size: 18px;
    padding-left: 0;
  }

  .nm-footer__phone-label {
    grid-column: 1 / 3;
    grid-row: 3;
    padding-left: 0;
    margin-bottom: 0;
  }

  .nm-footer__social-link img { width: 44px; height: 44px; }

  /* Навигация — сброс PC-позиционирования */
  .nm-footer__nav { gap: 32px; margin-left: 0; padding-top: 0; }

  .nm-footer__nav-col { gap: 14px; }

  .nm-footer__nav-link { font-size: 17px; }

  /* Юридические — сброс PC-выравнивания, вертикальный список */
  .nm-footer__legal {
    flex-direction: column;
    justify-content: flex-start;
    gap: 10px;
    padding-left: 0;
  }

  .nm-footer__legal-link { font-size: 13px; }
}
