/* =====================
   m_projects — «Projects» (Figma 2084:2279, sits between hero and services)
   Desktop: full viewport, justify-between — title 52 top, «SEE ALL PROJECTS»
            button middle, 3-card grid bottom (image 264, gap 20, card gap 12).
   Mobile:  same content, cards become a Swiper rail (slides 260, image 180).
   Structurally identical to m_essential — kept as its own m_* block so each
   section stays independently editable after the Webflow migration.
   (Replaces the Embacy baseline projects grid.)
===================== */

.m_projects {
  min-height: calc(100svh - 40px); /* page_main pad-block 20×2 */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 36px;
  padding-block: 16px;
}

.m_projects_title {
  font-size: var(--font-size--h1);
  line-height: var(--line-height--tight);
}

.m_projects_rail { width: 100%; }

.m_projects_card_media { width: 100%; }
.m_projects_card_media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.m_projects_card_text {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.m_projects_card_title {
  font-size: var(--font-size--h3);
  line-height: var(--line-height--card);
}

.m_projects_card_desc {
  font-size: var(--font-size--body);
  line-height: var(--line-height--body);
}

/* ---- desktop: static 3-col grid (Swiper is destroyed ≥992) ---- */
@media (min-width: 992px) {
  .m_projects_rail.swiper { overflow: visible; }
  .m_projects_rail .swiper-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 20px;
  }
  .m_projects_card {
    flex: 1 0 0;
    min-width: 1px;
    width: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  /* Figma 2084:2288/2293/2298 — 264/264/266, normalised to 264 */
  .m_projects_card_media { height: 264px; }

  /* same 512-tall card row as Figma (card 1 has a fixed height, ~154px of it
     is empty) — keeps the button at its designed mid-section position */
  .m_projects_rail { min-height: 512px; }
}

/* ---- mobile: Swiper rail ---- */
@media (max-width: 991px) {
  .m_projects {
    min-height: 0;
    padding-block: 0;
    gap: 24px;
  }
  .m_projects_title { font-size: var(--font-size--h1-mob); }

  .m_projects_card {
    width: 260px; /* slidesPerView:'auto' reads this */
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .m_projects_card_media { height: 180px; }
  .m_projects_card_text { gap: 6px; }
  .m_projects_card_title { font-size: var(--font-size--h3-mob); }
}
