/* ================= RESET ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", Arial, sans-serif;
}

/* ================= PAGE BACKGROUND ================= */
body {
  background:
    radial-gradient(circle at top left, #eef3ff, transparent 60%),
    radial-gradient(circle at bottom right, #f5f7ff, transparent 55%),
    linear-gradient(180deg, #ffffff, #f2f5fb);
  color: #111;
}

/* ================= HERO ================= */
.case-hero {
  padding: 140px 10%;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
}

.case-hero h1 {
  font-size: 42px;
  margin-bottom: 12px;
}

.case-hero p {
  max-width: 600px;
  font-size: 18px;
  opacity: 0.9;
}

/* ================= GRID ================= */
.case-studies-wrapper {
  padding: 80px 10%;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 36px;
  justify-content: center;
}


/* ================= CARD ================= */
.case-card {
  background: linear-gradient(160deg, #f1f4ff, #e7ecff);
  padding: 34px;
  border-radius: 24px;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  position: relative;
  overflow: hidden;

  transform: translateY(40px);
  opacity: 0;
  animation: fadeUp 0.9s ease forwards;
  transition: transform 0.45s ease, box-shadow 0.45s ease;
}

/* Card hover pop */
.case-card:hover {
  transform: translateY(-14px) scale(1.03);
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.2);
}

/* Soft hover glow */
.case-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, #2f69ff, #5b8dff);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.case-card:hover::before {
  opacity: 0.08;
}

/* ================= TAG ================= */
.case-tag {
  display: inline-block;
  background: #dfe7ff;
  color: #2f69ff;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}

/* ================= TEXT ================= */
.case-card h3 {
  font-size: 20px;
  margin-bottom: 14px;
  color: #111;
}

.case-card p {
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 28px;
  color: #222;
}

/* ================= BUTTON ================= */
.case-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2f69ff, #5b8dff);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 14px 35px rgba(47, 105, 255, 0.35);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

/* Arrow */
.case-btn .arrow {
  transition: transform 0.3s ease;
}

/* Shimmer */
.case-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.55),
    transparent
  );
  transform: translateX(-120%);
}

/* Card hover triggers shimmer */
.case-card:hover .case-btn::before {
  animation: shimmer 0.9s ease forwards;
}

.case-card:hover .case-btn {
  transform: translateY(-3px);
  box-shadow: 0 22px 55px rgba(47, 105, 255, 0.55);
}

.case-card:hover .case-btn .arrow {
  transform: translateX(6px);
}

/* Button hover pop */
.case-btn:hover {
  transform: translateY(-6px) scale(1.07);
  box-shadow: 0 30px 70px rgba(47, 105, 255, 0.65);
}

/* ================= ANIMATIONS ================= */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  100% {
    transform: translateX(120%);
  }
}

/* ================= STAGGER ================= */
.case-card:nth-child(1) { animation-delay: 0.1s; }
.case-card:nth-child(2) { animation-delay: 0.2s; }
.case-card:nth-child(3) { animation-delay: 0.3s; }
.case-card:nth-child(4) { animation-delay: 0.4s; }
.case-card:nth-child(5) { animation-delay: 0.5s; }

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  .case-hero h1 {
    font-size: 32px;
  }
}
/* Center last card if odd count */
.case-card:last-child {
  grid-column: span 2;
  max-width: 520px;
  margin: 0 auto;
}
@media (max-width: 1024px) {
  .case-grid {
    grid-template-columns: 1fr;
  }

  .case-card:last-child {
    grid-column: auto;
    max-width: 100%;
  }
}
@media (hover: none) {
  .case-btn::before {
    animation: shimmer 1.2s ease forwards;
  }
}
@media (hover: none) {
  .case-btn::before {
    animation-delay: 0.6s;
  }
}
/* Mobile tap / press shimmer */
.case-btn:active::before,
.case-btn:focus-visible::before {
  animation: shimmer 0.9s ease forwards;
}
.case-btn:active {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 22px 55px rgba(47, 105, 255, 0.6);
}
/* ================= CASE STUDY HERO ================= */
.case-detail-hero {
    background: #f5f5f5;
    padding: 80px 20px 40px;
    text-align: center;
}

.case-detail-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 15px;
}

.case-detail-hero p {
    font-size: 1.2rem;
    color: #555;
}

/* ================= CASE STUDY CONTENT ================= */
.case-detail-wrapper {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    line-height: 1.7;
    color: #333;
    font-family: 'Inter', Arial, sans-serif;
}

.case-detail-wrapper h2 {
    font-size: 1.8rem;
    margin-top: 40px;
    margin-bottom: 15px;
    color: #111;
    border-left: 4px solid #0078d4;
    padding-left: 10px;
}

.case-detail-wrapper p {
    font-size: 1rem;
    margin-bottom: 20px;
}

/* ================= BLOCKQUOTE / CLIENT VOICE ================= */
.case-detail-wrapper blockquote {
    border-left: 4px solid #0078d4;
    padding-left: 15px;
    margin: 30px 0;
    font-style: italic;
    color: #555;
    background: #f9f9f9;
    padding: 140px 20px;
    border-radius: 6px;
    position: relative;
}

.case-detail-wrapper blockquote span {
    display: block;
    margin-top: 10px;
    font-weight: 600;
    color: #111;
}

/* ================= BACK LINK ================= */
.back-link {
    display: inline-block;
    margin-top: 30px;
    text-decoration: none;
    color: #0078d4;
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-link:hover {
    text-decoration: underline;
    color: #005a9e;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
    .case-detail-hero h1 {
        font-size: 2rem;
    }

    .case-detail-hero p {
        font-size: 1rem;
    }

    .case-detail-wrapper h2 {
        font-size: 1.5rem;
    }

    .case-detail-wrapper p {
        font-size: 0.95rem;
    }
}
