/* Case studies hub — Agilensmart theme (Mobius-inspired layout) */

.cs-page {
  background: #ffffff;
  color: #0f172a;
  font-family: "albert", "Poppins", sans-serif;
  overflow-x: hidden;
}

.cs-hero {
  position: relative;
  padding: clamp(6.5rem, 7vw, 5.5rem) clamp(1.25rem, 0vw, 3rem) clamp(0.5rem, 6vw, 1rem);
  text-align: center;
  background:
    radial-gradient(ellipse 80% 55% at 50% -10%, rgba(249, 163, 28, 0.28), transparent 65%),
    linear-gradient(180deg, #ffffff 0%, #fff9ed 55%, #ffffff 100%);
}

.cs-hero__badge {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 600;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.4rem 0.95rem;
}

.cs-hero__badge-dot {
  background: linear-gradient(135deg, #f9a31c, #ffd15c);
  border-radius: 50%;
  height: 8px;
  width: 8px;
}

.cs-hero__title {
  color: #111827;
  font-size: clamp(2.1rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0 auto 1rem;
  max-width: 18ch;
}

.cs-hero__title span {
  background: linear-gradient(135deg, #ff9924 0%, #f7b733 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cs-hero__subtitle {
  color: #64748b;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  line-height: 1.65;
  margin: 0 auto;
  max-width: 52rem;
}

.cs-stats {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
  margin: clamp(2.5rem, 5vw, 3.5rem) auto 0;
  max-width: 900px;
}

@media (min-width: 768px) {
  .cs-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.cs-stat {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 153, 36, 0.18);
  border-radius: 16px;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.cs-stat:hover {
  border-color: #ff9924;
  box-shadow: 0 18px 45px rgba(255, 153, 36, 0.14);
  transform: translateY(-2px);
}

.cs-stat__value {
  color: #ff9924;
  display: block;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  line-height: 1;
}

.cs-stat__label {
  color: #475569;
  display: block;
  font-size: 0.9rem;
  margin-top: 0.45rem;
}

.cs-main {
  padding: clamp(2rem, 4vw, 3rem) clamp(1.25rem, 4vw, 2rem) clamp(4rem, 6vw, 5.5rem);
}

.cs-main__inner {
  margin: 0 auto;
  max-width: 1180px;
}

.cs-section-head {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}

.cs-section-head h2 {
  color: #111827;
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 800;
  margin: 0;
}

.cs-section-head p {
  color: #64748b;
  font-size: 0.95rem;
  margin: 0.35rem 0 0;
}

.cs-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.cs-filter {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  color: #334155;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.cs-filter:hover,
.cs-filter:focus-visible {
  border-color: rgba(255, 153, 36, 0.45);
  color: #0f172a;
  outline: none;
}

.cs-filter.is-active {
  background: linear-gradient(135deg, #111827, #020617);
  border-color: transparent;
  box-shadow: 0 10px 24px -14px rgba(15, 23, 42, 0.65);
  color: #fff;
}

.cs-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .cs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .cs-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.cs-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  box-shadow: 0 14px 40px -24px rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.cs-card:hover {
  border-color: rgba(255, 153, 36, 0.35);
  box-shadow: 0 22px 50px -22px rgba(255, 153, 36, 0.28);
  transform: translateY(-4px);
}

.cs-card.is-hidden {
  display: none;
}

.cs-card--brief .cs-card__excerpt {
  font-size: 0.88rem;
}

.cs-card--brief .cs-card__challenges {
  font-size: 0.78rem;
}

.testimonials-page {
  --yag-navy: #0f172a;
  --yag-orange: #ff9924;
}

.testimonials-page .testimonials-main {
  padding-top: 0;
}

.testimonials-page .yag-testimonial-filters {
  margin-bottom: 2rem;
}

.testimonials-page .cs-cta {
  margin-top: 3rem;
}

.cs-card__media {
  aspect-ratio: 16 / 10;
  background: linear-gradient(180deg, #f8fafc, #fff7e8);
  overflow: hidden;
  position: relative;
}

.cs-card__media img {
  display: block;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  width: 100%;
}

.cs-card:hover .cs-card__media img {
  transform: scale(1.05);
}

.cs-card__tag {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 153, 36, 0.25);
  border-radius: 999px;
  color: #b45309;
  font-size: 0.72rem;
  font-weight: 700;
  left: 0.85rem;
  letter-spacing: 0.03em;
  padding: 0.3rem 0.65rem;
  position: absolute;
  text-transform: uppercase;
  top: 0.85rem;
}

.cs-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem 1.25rem 1.35rem;
}

.cs-card__title {
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
}

.cs-card__duration {
  align-items: center;
  color: #94a3b8;
  display: flex;
  font-size: 0.82rem;
  font-weight: 600;
  gap: 0.4rem;
  margin: 0;
}

.cs-card__duration i {
  color: #ff9924;
  font-size: 0.75rem;
}

.cs-card__excerpt {
  color: #64748b;
  flex: 1;
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
}

.cs-card__challenges {
  color: #475569;
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 0;
}

.cs-card__challenges strong {
  color: #0f172a;
  font-weight: 700;
}

.cs-card__meta {
  align-items: center;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: space-between;
  margin-top: 0.25rem;
  padding-top: 0.85rem;
}

.cs-card__metric {
  color: #ff9924;
  font-size: 0.8rem;
  font-weight: 700;
}

.cs-card__link {
  align-items: center;
  color: #0f172a;
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 700;
  gap: 0.35rem;
  text-decoration: none;
  transition: color 0.2s ease, gap 0.2s ease;
}

.cs-card__link:hover {
  color: #ff9924;
  gap: 0.55rem;
}

.cs-load-wrap {
  margin-top: 2.5rem;
  text-align: center;
}

.cs-load-btn {
  background: #fff;
  border: 2px solid #111827;
  border-radius: 999px;
  color: #111827;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  min-width: 180px;
  padding: 0.85rem 2rem;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.cs-load-btn:hover,
.cs-load-btn:focus-visible {
  background: linear-gradient(135deg, #ffb84d, #ff9924);
  border-color: #ff9924;
  color: #111827;
  outline: none;
  transform: translateY(-2px);
}

.cs-load-btn.is-hidden {
  display: none;
}

.cs-empty {
  color: #64748b;
  display: none;
  grid-column: 1 / -1;
  padding: 3rem 1rem;
  text-align: center;
}

.cs-empty.is-visible {
  display: block;
}

.cs-cta {
  background:
    radial-gradient(circle at top right, rgba(249, 163, 28, 0.2), transparent 40%),
    linear-gradient(135deg, #0f172a 0%, #020617 100%);
  border-radius: 24px;
  color: #fff;
  margin-top: clamp(3rem, 5vw, 4rem);
  padding: clamp(2.5rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 2.5rem);
  text-align: center;
}

.cs-cta h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin: 0 0 0.75rem;
}

.cs-cta p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0 auto 1.5rem;
  max-width: 36rem;
}

.cs-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.cs-cta__btn {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.85rem 1.6rem;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cs-cta__btn--primary {
  background: linear-gradient(135deg, #ffb84d, #ff9924);
  box-shadow: 0 12px 28px -10px rgba(255, 153, 36, 0.55);
  color: #111827;
}

.cs-cta__btn--primary:hover {
  transform: translateY(-2px);
}

.cs-cta__btn--outline {
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}

.cs-cta__btn--outline:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

/* Detail panel (modal) */
.cs-modal {
  align-items: center;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  display: flex;
  inset: 0;
  justify-content: center;
  opacity: 0;
  padding: 1.25rem;
  pointer-events: none;
  position: fixed;
  transition: opacity 0.3s ease;
  z-index: 100;
}

.cs-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.cs-modal__dialog {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 30px 80px -20px rgba(15, 23, 42, 0.45);
  max-height: min(90vh, 720px);
  max-width: 640px;
  overflow: hidden;
  overflow-y: auto;
  position: relative;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.3s ease;
  width: 100%;
}

.cs-modal.is-open .cs-modal__dialog {
  transform: translateY(0) scale(1);
}

.cs-modal__close {
  align-items: center;
  background: rgba(15, 23, 42, 0.06);
  border: 0;
  border-radius: 50%;
  color: #334155;
  cursor: pointer;
  display: flex;
  height: 40px;
  justify-content: center;
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 40px;
  z-index: 2;
}

.cs-modal__close:hover {
  background: rgba(255, 153, 36, 0.15);
  color: #0f172a;
}

.cs-modal__image {
  aspect-ratio: 16 / 9;
  background: #f1f5f9;
  width: 100%;
}

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

.cs-modal__content {
  padding: 1.5rem 1.75rem 1.75rem;
}

.cs-modal__tag {
  color: #ff9924;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.cs-modal__title {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 1rem;
}

.cs-modal__field {
  margin-bottom: 0.75rem;
}

.cs-modal__field.is-hidden {
  display: none;
}

.cs-modal__field-label {
  color: #94a3b8;
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
  text-transform: uppercase;
}

.cs-modal__field-value {
  color: #334155;
  display: block;
  font-size: 0.92rem;
  line-height: 1.5;
}

.cs-modal__body {
  color: #475569;
  font-size: 0.98rem;
  line-height: 1.65;
}

.cs-modal__body p {
  margin: 0 0 1rem;
}

.cs-modal__body ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.cs-modal__body li {
  margin-bottom: 0.35rem;
}
