/* ===========================
   HERO — CLEAN (MATCH FIGMA)
   =========================== */

.hero{
  padding: var(--space-48) 0 var(--space-64);
}

/* 3-колоночная сетка */
.hero__grid{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(18px, 2.2vw, 28px);
  align-items: start !important;
}

.hero__col{
  display: flex !important;
  flex-direction: column !important;
  gap: clamp(16px, 1.9vw, 22px) !important;
  grid-template-rows: unset !important; /* убить repeat(3,1fr) */
}

/* карточки не должны пытаться "занять этаж" */
.hero-card{
  height: auto !important;
  grid-template-rows: auto auto auto !important;
}

/* центр: не растягиваем медиа на всю высоту */
.hero-main{
  height: auto !important;
}
.hero-main__media{
  flex: 0 0 auto !important;
}
.hero-main__img,
.hero-main__ph{
  height: auto !important;
}

.hero-card__thumb{
  display: block;
  overflow: hidden;
  border-radius: 2px;
}

.hero-card__img,
.hero-card__thumb img{
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  background: #e8e2db;
}

.hero-card__ph{
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #e8e2db;
}

/* meta как в макете (компактная) */
.hero-card__meta{
  margin: 0;
  font-family: "Source Sans 3", sans-serif;
  font-weight: 400;
  font-size: clamp(11px, .85vw, 12px);
  line-height: 1.25;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8b7f74;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ВАЖНО: полностью переопределяем заголовок, чтобы не лезли h3/.h4 */
.hero-card__title{
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.25;
  color: var(--accent-primary);
  min-width: 0;

  /* как в макете: максимум 2 строки, без “распухания” карточек */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.hero-card__title a{
  color: inherit;
  text-decoration: none;
}
.hero-card__title a:hover{
  color: var(--accent-soft);
}

/* ===========================
   CENTER (ISSUE)
   =========================== */

.hero-main{
  height: 100%;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hero-main__media{
  display: block;
  overflow: hidden;
  border-radius: 2px;
  flex: 1 1 auto;
  min-height: 0;
}

.hero-main__img{
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #e8e2db;
}
.hero-main__ph{
  width: 100%;
  aspect-ratio: 4 / 5;
  background: #e8e2db;
}

/* блок текста и кнопок снизу */
.hero-main__content{
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.hero-main__title{
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(26px, 2.25vw, 40px);
  line-height: 1.08;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: .02em;
}

.hero-main__date{
  margin: 0;
  font-family: "Source Sans 3", sans-serif;
  font-weight: 400;
  font-size: clamp(12px, 1vw, 14px);
  line-height: 1.2;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #8b7f74;
}

.hero-main__buttons{
  margin-top: 10px;
  display: grid;
  gap: 14px;
}

/* ===========================
   RESPONSIVE
   =========================== */

/* tablet: 2 колонки (центр + правая), левую скрываем */
@media (max-width: 1024px){
  .hero__grid{
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  }
  .hero__left{
    display: none;
  }

  .hero-main__title{
    font-size: clamp(20px, 2.25vw, 30px) !important;
  }

  .hero__right{
    grid-template-rows: repeat(3, 1fr);
  }

  .hero-main__img,
  .hero-main__ph{
    aspect-ratio: 3 / 4;
  }
}

/* mobile: только центр */
@media (max-width: 700px){
  .hero__grid{
    grid-template-columns: 1fr;
  }


  .hero-main__img,
  .hero-main__ph{
    aspect-ratio: 4 / 5;
  }

  .hero-main__buttons .sp-btn{
    width: 100%;
  }
}

/* ===========================
   HERO responsive layout fix
   =========================== */

/* grid areas — чтобы контролировать порядок */
.hero__grid{
  grid-template-areas: "left center right";
}
.hero__left{ grid-area: left; }
.hero__center{ grid-area: center; }
.hero__right{ grid-area: right; }

/* ВАЖНО: placeholder должен быть с тем же ratio что и img */
.hero-card__img,
.hero-card__thumb img,
.hero-card__ph{
  aspect-ratio: 2 / 1; /* или 16/9 если захочешь */
  width: 100%;
  object-fit: cover;
}

/* фикс цвета/жирности заголовка, чтобы тема не делала “черным” */
.hero-card__title{
  font-weight: 400 !important;
  color: var(--accent-primary) !important;
}
.hero-card__title a{
  color: var(--accent-primary) !important;
}

/* meta: перебиваем ui-light14 если он раздувает */
.hero-card__meta{
  font-size: clamp(11px, .85vw, 12px) !important;
  letter-spacing: .12em !important;
  color: #8b7f74 !important;
}

/* ===========================
   TABLET: center + right
   =========================== */
@media (max-width: 1024px){
  .hero__grid{
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    grid-template-areas: "center right";
  }
  .hero__left{ display: none !important; }
}

/* ===========================
   PHONE: center then right (NOT hidden)
   =========================== */
@media (max-width: 700px){
  .hero__grid{
    grid-template-columns: 1fr;
    grid-template-areas:
      "center"
      "right";
    gap: clamp(18px, 3.5vw, 28px);
  }

  .hero-card__title a{
      font-size: clamp(16px, 1.05vw, 18px);

  }

  .hero__right{
    display: flex !important;
    flex-direction: column !important;
    gap: clamp(16px, 3vw, 22px) !important;
  }
}