/* ============================================================
   EASTERN BRIDGE — Case Study Grid  |  eb-case-study-grid.css
   All selectors scoped to .eb-csg to avoid theme conflicts.
   ============================================================ */

.eb-csg {
  --eb-red:        #F00000;
  --eb-red-dark:   #C00000;
  --eb-black:      #000000;
  --eb-near-black: #111111;
  --eb-grey-dark:  #333333;
  --eb-grey-mid:   #888888;
  --eb-grey-light: #F5F5F5;
  --eb-border:     #E8E8E8;
  --eb-white:      #FFFFFF;
  --eb-radius:     3px;
  --eb-max-w:      1100px;

  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  color: var(--eb-grey-dark);
  width: 100%;
  display: block;
  padding: 64px 0 80px;
}

.eb-csg *, .eb-csg *::before, .eb-csg *::after {
  box-sizing: border-box;
}

/* ── Section Header ─────────────────────────────────────── */
.eb-csg__header {
  max-width: var(--eb-max-w);
  margin: 0 auto 48px;
  padding: 0 24px;
  display: flex;
  align-items: flex-end;
  gap: 32px;
}

.eb-csg__header-inner {
  flex-shrink: 0;
}

.eb-csg__eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--eb-red);
  margin-bottom: 6px;
}

.eb-csg__title {
  font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  font-size: clamp(24px, 3.5vw, 38px);
  font-weight: 800;
  color: var(--eb-black);
  line-height: 1.1;
  margin: 0 0 8px;
}

.eb-csg__subtitle {
  font-size: 15px;
  color: var(--eb-grey-mid);
  margin: 0;
}

.eb-csg__header-line {
  flex: 1;
  height: 2px;
  background: var(--eb-border);
  margin-bottom: 10px;
}

/* ── Grid ───────────────────────────────────────────────── */
.eb-csg__grid {
  max-width: var(--eb-max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  gap: 28px;
}

.eb-csg--cols-3 .eb-csg__grid { grid-template-columns: repeat(3, 1fr); }
.eb-csg--cols-2 .eb-csg__grid { grid-template-columns: repeat(2, 1fr); }
.eb-csg--cols-1 .eb-csg__grid { grid-template-columns: 1fr; }

/* ── Card ───────────────────────────────────────────────── */
.eb-csg__card {
  background: var(--eb-white);
  border: 1px solid var(--eb-border);
  border-radius: var(--eb-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.22s ease, transform 0.22s ease;
}

.eb-csg__card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.10);
  transform: translateY(-3px);
}

/* Card image */
.eb-csg__card-img-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--eb-black);
  flex-shrink: 0;
}

.eb-csg__card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.35s ease, opacity 0.35s ease;
  opacity: 0.88;
}

.eb-csg__card:hover .eb-csg__card-img {
  transform: scale(1.04);
  opacity: 1;
}

/* Category badge */
.eb-csg__card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--eb-red);
  color: var(--eb-white);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
  pointer-events: none;
}

/* Card body */
.eb-csg__card-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.eb-csg__card-meta {
  margin-bottom: 8px;
}

.eb-csg__card-date {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--eb-grey-mid);
}

.eb-csg__card-title {
  font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--eb-black);
  margin: 0 0 10px;
}

.eb-csg__card-title a {
  color: inherit;
  text-decoration: none;
}

.eb-csg__card-title a:hover {
  color: var(--eb-red);
}

.eb-csg__card-excerpt {
  font-size: 13px;
  line-height: 1.7;
  color: var(--eb-grey-dark);
  margin: 0 0 14px;
  flex: 1;
}

/* Optional stat callout */
.eb-csg__card-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
  background: var(--eb-grey-light);
  border-left: 3px solid var(--eb-red);
  padding: 8px 12px;
  border-radius: 0 var(--eb-radius) var(--eb-radius) 0;
  margin-bottom: 16px;
}

.eb-csg__card-stat-num {
  font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--eb-red);
  line-height: 1;
}

.eb-csg__card-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--eb-grey-dark);
  line-height: 1.3;
}

/* Read more link */
.eb-csg__card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--eb-red);
  text-decoration: none;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--eb-border);
}

.eb-csg__card-link:hover {
  color: var(--eb-red-dark);
  text-decoration: none;
}

/* No results */
.eb-csg__no-results {
  max-width: var(--eb-max-w);
  margin: 0 auto;
  padding: 24px;
  background: #fff8f8;
  border: 1px solid #fdd;
  border-left: 4px solid var(--eb-red);
  border-radius: var(--eb-radius);
  font-size: 14px;
  color: var(--eb-grey-dark);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 960px) {
  .eb-csg--cols-3 .eb-csg__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .eb-csg--cols-3 .eb-csg__grid,
  .eb-csg--cols-2 .eb-csg__grid { grid-template-columns: 1fr; }
  .eb-csg__header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .eb-csg__header-line { display: none; }
}
