/* CASE STUDIES PAGE CSS */
body { margin:0; font-family:system-ui; background:#f5f6fb; color:#111; }

.container { max-width:1180px; margin:auto; padding:0 20px; }

.site-header { position:sticky; top:0; background:#0b1120cc; backdrop-filter:blur(12px); padding:12px 0; z-index:100; }
.header-inner { display:flex; justify-content:space-between; align-items:center; }
.logo { display:flex; gap:8px; align-items:center; color:#fff; font-weight:600; }
.logo-mark { background:#2563eb; color:#fff; padding:6px 10px; border-radius:8px; }

.main-nav ul { display:flex; gap:20px; }
.main-nav a { color:#c7d2fe; font-size:14px; }
.main-nav a.active { color:#fff; }

.nav-toggle { display:none; background:none; border:0; }

/* HERO */
.cs-hero {
    position:relative;
    padding:100px 0;
    text-align:center;
    color:white;
    background:linear-gradient(90deg,#2563EB,#7E22CE);
}
.cs-stats { display:flex; gap:20px; justify-content:center; margin-top:20px; opacity:.9; }
.cs-stats span { background:#ffffff22; padding:6px 14px; border-radius:20px; font-size:14px; }

.section { padding:70px 0; }
.center { text-align:center; }
.muted { color:#555; }

.filter-bar { display:flex; gap:10px; flex-wrap: wrap; justify-content:center; margin:20px 0; }
.filter { padding:8px 18px; border-radius:20px; white-space: nowrap; border:1px solid #ddd; background:#fff; cursor:pointer; }
.filter.active { background:#fc8a10; color:#fff; border-color:#fc8a10; }

.grid { display:grid; gap:24px; }
.cs-grid { grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); }
/* responsive */
@media (max-width: 640px) {
    .cs-grid {
        grid-template-columns: 1fr; 
    }

    .card {
        border-radius: 14px;
    }

    .cs-img {
        height: 140px;
        border-radius: 14px 14px 0 0;
    }
}


.card { background:white; padding:0 0 18px; border-radius:16px; box-shadow:0 6px 20px #0001; }
.cs-img { height:160px; border-radius:16px 16px 0 0; background-size:cover; }
.img1 { background-image:linear-gradient(#ccc,#999); }
.img2 { background-image:linear-gradient(#bbb,#888); }
.img3 { background-image:linear-gradient(#aaa,#777); }
.img4 { background-image:linear-gradient(#999,#666); }
.img5 { background-image:linear-gradient(#ccc,#999); }

.cs-tag { display:inline-block; padding:4px 10px; border-radius:10px; font-size:12px; margin:12px 0 4px 12px; }
.blue { background:#dbeafe; color:#1d4ed8; }
.green { background:#dcfce7; color:#166534; }
.purple { background:#ede9fe; color:#5b21b6; }

.cs-card h3 { margin:0 12px; font-size:18px; }
.cs-card p { margin:8px 12px; color:#555; font-size:14px; }
.cs-link { margin-left:12px; color:#2563eb; font-weight:500; font-size:14px; }

/* CTA */
.cta { background:#ff8400de; color:white; padding:70px 0; text-align:center; }
.cta-actions { display:flex; justify-content:center; gap:20px; margin-top:20px; }
.btn { padding:10px 20px; border-radius:20px; text-decoration:none; }
.btn-primary { background:white; color:#fc8a10; font-weight:600; }
.btn-light { background:#ffffff22; color:white; border:1px solid #fff; }


/* ==============================
   CASE STUDIES GRID – CENTER ALIGN
   Auto-center 1–2 cards
   ============================== */

.cs-grid{
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;   /* 🔑 center cards */
  align-items: stretch;
  gap: 24px;
}

/* card sizing */
.cs-grid > .card,
.cs-grid > .cs-card{
  flex: 0 1 340px;
  max-width: 380px;
  width: 100%;
}

@media (min-width: 1200px){
  .cs-grid > .cs-card{
    flex-basis: 380px;
  }
}


/* =========================================
   CASE STUDIES GRID (match screenshot)
========================================= */

.case-grid-ui{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

/* Card */
.caseCardUI{
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}

.caseCardUI:hover{
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

/* Top image */
.caseCardUI__img{
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7;
  background: #eef1f7;
  overflow: hidden;
}

.caseCardUI__img img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.caseCardUI__imgPlaceholder{
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #eef1f7, #f7f8fc);
}

/* Body */
.caseCardUI__body{
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Meta row: tag left + small text right */
.caseCardUI__meta{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 24px;
}

.tag-pill{
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

/* Screenshot-like pill: soft orange */
.tag-pill--orange{ background: rgba(255, 133, 2, 0.14); color: #ff8502; }
.tag-pill--green{ background: rgba(34, 197, 94, 0.14); color: #16a34a; }
.tag-pill--purple{ background: rgba(124, 58, 237, 0.14); color: #6d28d9; }

.caseCardUI__metaRight{
  font-size: 12.5px;
  color: rgba(15, 23, 42, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 55%;
  text-align: right;
}

.caseCardUI__title{
  margin: 0;
  font-size: 18px;
  font-weight: 850;
  color: #0b1020;
  line-height: 1.35;
}

.caseCardUI__desc{
  margin: 0;
  color: rgba(15, 23, 42, 0.70);
  font-size: 13.5px;
  line-height: 1.65;
  /* keep card heights consistent */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Link */
.caseCardUI__link{
  margin-top: 2px;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-weight: 850;
  font-size: 13.5px;
  color: #ff8502;
  text-decoration: none;
}

.caseCardUI__link:hover{
  text-decoration: underline;
}

/* Responsive: 2 cols tablet, 1 col mobile */
@media (max-width: 1024px){
  .case-grid-ui{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .case-grid-ui{ grid-template-columns: 1fr; }
  .caseCardUI__img{ aspect-ratio: 16 / 8; }
}
