/* ==========================================================================
   Case Studies gallery (Figma "Case Studies", prototype page 12).
   Header, footer and the "I need a…" picker come from style.css.
   ========================================================================== */

/* ---------- Banner ---------- */
.csg-hero {
  --banner-pb: 115px;
  --banner-x: 2px;
  --banner-shade: linear-gradient(90deg, rgba(6, 7, 27, .88) 0%, rgba(6, 7, 27, .55) 50%, rgba(6, 7, 27, .2) 100%);
}
.csg-hero__title {
  width: 830px;
  font-family: var(--font-poppins);
  font-weight: 600;
  font-size: 62px;
  line-height: 78px;
  color: var(--color-white);
}
.csg-hero__text {
  width: 720px;
  margin-top: 37px;
  padding-left: 4px;
  font-family: var(--font-dm-sans);
  font-size: 18px;
  line-height: 30px;
  color: rgba(255, 255, 255, .9);
}

/* ---------- Gallery ---------- */
.csg-gallery { padding: var(--section-space) 0; background: var(--color-white); }
.csg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 41px 28px;
  width: var(--container-width);
  max-width: 100%;
  margin: 0 auto;
}
.csg-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 10px;
  background: #F5F6FD;
  color: inherit;
  transition: transform .3s ease, box-shadow .3s ease;
}
.csg-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(16, 24, 40, .10); }
.csg-card:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }
.csg-card__ph { height: 374px; border: 0; border-bottom: 2px dashed #A9B2C3; }
.csg-card__body { padding: 37px 16px 24px; text-align: center; }
.csg-card__title {
  font-family: var(--font-poppins);
  font-weight: 500;
  font-size: 24px;
  line-height: 32px;
  color: var(--color-heading);
}
.csg-card__tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 17px; }
.csg-card__tags li {
  padding: 4px 10px;
  border: 1px solid #E2E5EC;
  border-radius: 4px;
  background: var(--color-white);
  font-family: var(--font-poppins);
  font-size: 13px;
  line-height: 20px;
  color: var(--color-heading);
}

/* 85px of visible space: take off the empty space above the first line of text */
@media (min-width: 1200px) {
  .csg-page .cta-needs { padding-top: calc(var(--section-space) - 4px); }
}

/* ==========================================================================
   Smaller screens
   ========================================================================== */
@media (max-width: 1199.98px) {
  .csg-hero__title { width: auto; font-size: 38px; line-height: 48px; }
  .csg-hero__text { width: auto; max-width: 720px; margin-top: 20px; padding-left: 0; font-size: 17px; line-height: 28px; }
  .csg-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; padding: 0 16px; }
  .csg-card__ph { height: auto; aspect-ratio: 505 / 374; }
  .csg-card__body { padding: 24px 16px 28px; }
  .csg-card__title { font-size: 20px; line-height: 28px; }
  .csg-card__tags { gap: 8px; margin-top: 12px; }
  .csg-card__tags li { font-size: 13px; }
}
@media (max-width: 767.98px) {
  .csg-grid { grid-template-columns: 1fr; }
}
