/* InfinityIT case studies page - /case-studies/. Load after testimonials.css.
   The hero reuses the site's shared .why-hero / .why-hero-grid / .why-photo
   classes (menu-pages.css, which stays global, styles the desktop version
   for every page-hero variant) - the mobile fix and border-radius below are
   duplicated from partner.css since case-studies.php doesn't load that
   file (it's why.php-specific) but needs the same two small rules. */
.why-photo {
  border-radius: var(--radius-lg);
}

@media (max-width: 950px) {
  .why-hero .why-hero-grid { grid-template-columns: 1fr !important; gap: 1.6rem !important; align-items: start !important; }
  .why-hero .why-photo { display: grid !important; grid-template-rows: auto auto !important; width: 100% !important; min-width: 0 !important; margin: 0 !important; overflow: hidden !important; border: 1px solid var(--line) !important; border-radius: 22px !important; background: var(--surface) !important; box-shadow: var(--shadow) !important; }
  .why-hero .why-photo > img { display: block !important; width: 100% !important; height: clamp(240px, 58vw, 360px) !important; min-height: 0 !important; max-height: none !important; object-fit: cover !important; object-position: center !important; transform: none !important; }
  .why-hero .why-photo:hover > img { transform: none !important; }
  .why-hero .why-photo > figcaption { position: static !important; inset: auto !important; display: block !important; width: 100% !important; max-width: none !important; margin: 0 !important; padding: .9rem 1rem !important; border-radius: 0 !important; background: var(--surface) !important; color: var(--text) !important; backdrop-filter: none !important; }
  .why-hero .why-photo > figcaption b { display: block !important; color: var(--text) !important; overflow-wrap: anywhere; }
  .why-hero .why-photo > figcaption span { display: block !important; color: var(--muted) !important; overflow-wrap: anywhere; }
}

@media (max-width: 600px) {
  .why-hero .why-photo > img { height: clamp(220px, 68vw, 310px) !important; }
}

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

.case-study-card {
  padding: clamp(1.8rem, 3vw, 2.6rem);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  transition: .2s;
}

.case-study-card:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow);
}

.case-study-card .hover-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  border-radius: 14px;
  background: color-mix(in srgb, var(--teal) 12%, transparent);
  color: var(--teal);
}

.case-study-card h2 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  margin-bottom: .3rem;
}

.case-study-industry {
  color: var(--teal);
  font-weight: 800;
  font-size: .85rem;
  margin-bottom: .8rem;
}

.case-study-detail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
  margin-top: 1.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}

.case-study-detail b {
  display: block;
  margin-bottom: .4rem;
  color: var(--text);
}

.case-study-detail p {
  font-size: .92rem;
}

@media (max-width: 800px) {
  .case-study-detail {
    grid-template-columns: 1fr;
  }
}
