/* ═══════════════════════════════════════════════════════════════════════════
   Гид по каркасным домам (страница 2325) — карточки как на главной.
   01.09.2026.

   🚨 ЧТО БЫЛО СЛОМАНО. Я задал сетку в 12 колонок и раздавал карточкам
   grid-column: span 7 / span 5 / span 4 ради «журнального ритма». Но контейнер
   в разметке несёт СВОИ классы темы — .scandi-gid-cards--3 и --4, — которые
   ставят repeat(3, 1fr) и repeat(4, 1fr) и перебивают моё правило. Карточка,
   просящая семь колонок из трёх, растягивалась на всю строку: замер в Arc на
   1440/1680/1920 — фото 1142×252, то есть 4,5:1. Владелец: «карточки
   растягиваются в сосисочные баннеры».

   🚨 ВЫВОД НА БУДУЩЕЕ: не навязывать свою сетку контейнеру, у которого уже
   есть классы колонок от темы. Стилизуем саму карточку, число колонок оставляем
   теме — тогда правки не спорят друг с другом.

   РЕШЕНИЕ. Карточки одинаковые, как карточки домов на главной. У кадра
   постоянная пропорция 3:2 вместо фиксированной высоты — фото масштабируется
   вместе с шириной и НИ ПРИ КАКОЙ ширине экрана не превращается в полосу.

   🚨 Золотая заливка текста. Карточка целиком — <a>, а правило
   `section a:not(.button):not([class*="btn"])…` задаёт не только `color`, но и
   `-webkit-text-fill-color: #a67c3a`. Заливка сильнее цвета и наследуется
   внутрь, поэтому цвет у каждого текста задаём парой.

   Файл подключается ТОЛЬКО на этой странице (includes/enqueue.php, is_page(2325)).
   ═══════════════════════════════════════════════════════════════════════════ */

.scandi-gid-cards {
  --gd-ink: #1a1410;
  --gd-gold: #a67c3a;
  --gd-card: #ffffff;
  --gd-line: rgba(166, 124, 58, 0.3);
  --gd-line-in: rgba(166, 124, 58, 0.16);
  gap: 20px;
}

/* ── карточка ───────────────────────────────────────────────────────────── */
.scandi-gid-cards .scandi-gid-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--gd-card);
  border: 1px solid var(--gd-line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(120, 90, 50, 0.05);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.scandi-gid-cards .scandi-gid-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(120, 90, 50, 0.1);
  border-color: rgba(166, 124, 58, 0.45);
}
.scandi-gid-cards .scandi-gid-card:focus-visible {
  outline: 2px solid var(--gd-gold);
  outline-offset: 3px;
}

/* ── кадр: пропорция, а не высота ───────────────────────────────────────── */
.scandi-gid-cards .scandi-gid-card__media {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #efe7d8, #e3d7c2);
}
.scandi-gid-cards .scandi-gid-card__media::after { content: none; }
.scandi-gid-cards .scandi-gid-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s cubic-bezier(.2, .7, .3, 1);
}
.scandi-gid-cards .scandi-gid-card:hover .scandi-gid-card__media img { transform: scale(1.045); }

.scandi-gid-cards .scandi-gid-card__ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(107, 97, 85, .5);
  -webkit-text-fill-color: rgba(107, 97, 85, .5);
  letter-spacing: .2em;
  font-size: 13px;
}

/* ── подпись под кадром ─────────────────────────────────────────────────── */
.scandi-gid-cards .scandi-gid-card__body {
  position: static;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
  padding: 15px 18px 17px;
  background: none;
  border: 0;
  border-top: 1px solid var(--gd-line-in);
}
.scandi-gid-cards .scandi-gid-card__title {
  color: var(--gd-ink);
  -webkit-text-fill-color: var(--gd-ink);
  font-size: 17px;
  line-height: 1.28;
  font-weight: 600;
  text-wrap: balance;
  text-shadow: none;
}
.scandi-gid-cards .scandi-gid-card__title::after { content: none; }
.scandi-gid-cards .scandi-gid-card__more {
  margin-top: auto;
  padding-top: 8px;
  color: var(--gd-gold);
  -webkit-text-fill-color: var(--gd-gold);
  font-size: 13.5px;
  opacity: 1;
  transform: none;
}

/* ── плитки выбора стиля наверху ────────────────────────────────────────── */
.scandi-kproj-tiles .scandi-kproj-tile {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(120, 90, 50, 0.08);
  transition: transform .2s ease, box-shadow .2s ease;
}
.scandi-kproj-tiles .scandi-kproj-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(120, 90, 50, 0.16);
}
.scandi-kproj-tiles .scandi-kproj-tile__title,
.scandi-kproj-tiles .scandi-kproj-tile__desc,
.scandi-kproj-tiles .scandi-kproj-tile__more { -webkit-text-fill-color: currentColor; }

@media (max-width: 1100px) {
  .scandi-gid-cards { gap: 16px; }
  .scandi-gid-cards .scandi-gid-card__title { font-size: 16px; }
}
@media (max-width: 760px) {
  .scandi-gid-cards { gap: 14px; }
  .scandi-gid-cards .scandi-gid-card__body { padding: 14px 16px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .scandi-gid-cards .scandi-gid-card,
  .scandi-gid-cards .scandi-gid-card__media img,
  .scandi-kproj-tiles .scandi-kproj-tile { transition: none; }
  .scandi-gid-cards .scandi-gid-card:hover,
  .scandi-kproj-tiles .scandi-kproj-tile:hover { transform: none; }
  .scandi-gid-cards .scandi-gid-card:hover .scandi-gid-card__media img { transform: none; }
}
