/* ── Services Grid ───────────────────────────────────────────── */

.cew-services-grid {
  width: 100%;
}

/* ── Shared grid base ────────────────────────────────────────── */
.cew-sg-grid {
  display: grid;
  gap: 12px;
}

/* ── Bento layout (20-col base, rows: 2 / 3 / 2) ────────────── */
/* Row 1 & 3: 50/50 (span 10 each)                               */
/* Row 2: 25/50/25 = 2.5:5:2.5 (span 5 / 10 / 5)                */
.cew-sg-bento {
  grid-template-columns: repeat(20, 1fr);
}

/* Items 1-2 → 50/50 */
.cew-sg-bento .cew-sg-card:nth-child(1),
.cew-sg-bento .cew-sg-card:nth-child(2) {
  grid-column: span 10;
}

/* Items 3 & 5 → 25% each */
.cew-sg-bento .cew-sg-card:nth-child(3),
.cew-sg-bento .cew-sg-card:nth-child(5) {
  grid-column: span 5;
}

/* Item 4 → 50% (center) */
.cew-sg-bento .cew-sg-card:nth-child(4) {
  grid-column: span 10;
}

/* Items 6-7 → 50/50 */
.cew-sg-bento .cew-sg-card:nth-child(6),
.cew-sg-bento .cew-sg-card:nth-child(7) {
  grid-column: span 10;
}

/* Default height for bento size classes */
.cew-sg-bento .cew-sg-large { min-height: 280px; }
.cew-sg-bento .cew-sg-small { min-height: 280px; }

/* ── Equal grid layout ───────────────────────────────────────── */
.cew-sg-equal {
  --cew-sg-cols: 3;
  grid-template-columns: repeat(var(--cew-sg-cols), 1fr);
}

.cew-sg-equal .cew-sg-card {
  min-height: 280px;
}

/* ── Card ────────────────────────────────────────────────────── */
.cew-sg-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background-color: #1a1a1a;
  cursor: pointer;
  transition: transform 0.3s ease;
}

/* Background image layer — grayscale filter applied here only */
.cew-sg-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: filter 0.3s ease;
  will-change: filter;
}

.cew-sg-card:hover .cew-sg-bg {
  filter: grayscale(100%);
}

/* Gradient overlay */
.cew-sg-card-inner {
  position: absolute;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding: 24px;
  border-radius: 16px;
  background: linear-gradient(0deg, rgba(7, 9, 14, 0.92) 0%, rgba(7, 9, 14, 0.20) 65%, rgba(7, 9, 14, 0.00) 100%);
}

/* ── Arrow button (top-right, same style, individual link) ───── */
.cew-sg-arrow-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  text-decoration: none;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
  line-height: 1;
}

.cew-sg-card:hover .cew-sg-arrow-btn {
  background: #58CBE6;
  border-color: #58CBE6;
  transform: translate(2px, -2px);
}

/* ── Icon (bottom content area) ──────────────────────────────── */
.cew-sg-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid rgba(0, 194, 255, 0.20);
  background: var(--color-azure-5015, rgba(0, 85, 255, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cew-sg-icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

/* ── Card content (bottom) ───────────────────────────────────── */
.cew-sg-card-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}


.cew-sg-title {
  font-family: 'Manrope';
  font-size: 17px;
  font-weight: 800;
  line-height: 24px;
  letter-spacing: -0.34px;
  color: #ffffff;
  margin: 0;
}

.cew-sg-description {
  font-family: "Instrument Sans";
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.48);
  line-height: 19px;
  margin: 0;
}


/* ── Responsive ──────────────────────────────────────────────── */

@media ( max-width: 1024px ) {
  /* Bento collapses to 2 columns */
  .cew-sg-bento {
    grid-template-columns: repeat(2, 1fr);
  }

  .cew-sg-bento .cew-sg-card:nth-child(1),
  .cew-sg-bento .cew-sg-card:nth-child(2),
  .cew-sg-bento .cew-sg-card:nth-child(3),
  .cew-sg-bento .cew-sg-card:nth-child(4),
  .cew-sg-bento .cew-sg-card:nth-child(5),
  .cew-sg-bento .cew-sg-card:nth-child(6),
  .cew-sg-bento .cew-sg-card:nth-child(7) {
    grid-column: span 1;
  }

  .cew-sg-bento .cew-sg-large { min-height: 280px; }
  .cew-sg-bento .cew-sg-small { min-height: 280px; }

  .cew-sg-title {
    font-size: 20px;
  }
}

@media ( max-width: 600px ) {
  .cew-sg-bento {
    grid-template-columns: 1fr;
  }

  .cew-sg-bento .cew-sg-large,
  .cew-sg-bento .cew-sg-small {
    min-height: 280px;
  }

  .cew-sg-equal {
    --cew-sg-cols: 1;
  }

  .cew-sg-title {
    font-size: 18px;
  }
}