
/* =========================================================
   CASE STUDIES — IG Profile Mockup + Hero Slider
   Real Instagram-style: white card, IG colors, system font.
   ========================================================= */

.cs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 28px;
  max-width: 1280px;
  margin: 0 auto;
}

/* === IG Card === */
.cs-ig {
  background: #fff;
  color: #262626;
  border-radius: 12px;
  border: 1px solid #dbdbdb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: box-shadow .2s ease, transform .2s ease;
}
.cs-ig:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

/* Header: avatar + meta + Follow */
.cs-ig-header {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px 16px 12px;
}
.cs-ig-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5, #feda75);
  padding: 3px;
  flex-shrink: 0;
}
.cs-ig-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 600;
  color: #262626;
}
.cs-ig-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.cs-ig-username-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cs-ig-username {
  font-weight: 600;
  font-size: 14px;
  color: #262626;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cs-ig-msg {
  padding: 4px 12px;
  background: #efefef;
  color: #262626;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.cs-ig-msg:hover { background: #dbdbdb; }
.cs-ig-stats {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: #262626;
}
.cs-ig-stats b { font-weight: 600; }
.cs-ig-follow {
  padding: 7px 16px;
  background: #0095f6;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.cs-ig-follow:hover { background: #1877f2; }
.cs-ig-follow.following { background: #efefef; color: #262626; }

/* Bio block */
.cs-ig-bio {
  padding: 0 16px 14px;
  font-size: 13px;
  line-height: 1.4;
  color: #262626;
}
.cs-ig-displayname {
  font-weight: 600;
  margin-bottom: 4px;
}
.cs-ig-biotext {
  margin: 0 0 8px 0;
  white-space: pre-wrap;
  color: #262626;
}
.cs-ig-tier-badge {
  display: inline-block;
  padding: 3px 10px;
  background: linear-gradient(90deg, #833ab4, #fd1d1d, #fcb045);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Highlights row */
.cs-ig-highlights {
  display: flex;
  gap: 14px;
  padding: 8px 16px 14px;
  overflow-x: auto;
  border-bottom: 1px solid #efefef;
}
.cs-ig-highlight {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  width: 64px;
}
.cs-ig-highlight > div:first-child {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5);
  padding: 2px;
}
.cs-ig-highlight-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: #262626;
}
.cs-ig-highlight-name {
  font-size: 11px;
  color: #8e8e8e;
  text-align: center;
  white-space: nowrap;
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tabs */
.cs-ig-tabs {
  display: flex;
  border-bottom: 1px solid #efefef;
}
.cs-ig-tab {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  font-size: 11px;
  letter-spacing: 1px;
  color: #8e8e8e;
  border-top: 1px solid transparent;
  margin-top: -1px;
  cursor: pointer;
}
.cs-ig-tab.active {
  color: #262626;
  border-top-color: #262626;
  font-weight: 600;
}

/* 3×2 thumbnail grid */
.cs-ig-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: #fff;
}
.cs-ig-thumb {
  position: relative;
  aspect-ratio: 1/1;
  overflow: hidden;
  padding: 0;
  margin: 0;
  border: none;
  background: #efefef;
  cursor: pointer;
}
.cs-ig-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .25s ease;
}
.cs-ig-thumb:hover img { transform: scale(1.05); }
.cs-ig-thumb-icon {
  position: absolute;
  top: 6px;
  right: 6px;
  color: #fff;
  font-size: 14px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.cs-ig-thumb-stats {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 3px;
}
.cs-ig-thumb-stats i {
  color: #ff3040;
  font-style: normal;
}

/* Campaign footer */
.cs-ig-campaign {
  padding: 14px 16px 16px;
  border-top: 1px solid #efefef;
  background: #fafafa;
}
.cs-ig-campaign-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #8e8e8e;
  font-weight: 600;
  margin-bottom: 4px;
}
.cs-ig-campaign-name {
  font-weight: 600;
  font-size: 14px;
  color: #262626;
  margin-bottom: 6px;
  line-height: 1.3;
}
.cs-ig-campaign-growth {
  font-size: 12px;
  color: #0095f6;
  font-weight: 600;
  margin-bottom: 12px;
}
.cs-ig-cta {
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  color: #0095f6;
  border: 1px solid #0095f6;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.cs-ig-cta:hover { background: #0095f6; color: #fff; }

/* Tier accent: subtle background tint for the campaign footer */
.cs-ig--celebrity .cs-ig-tier-badge { background: linear-gradient(90deg, #833ab4, #fd1d1d, #fcb045); }
.cs-ig--macro .cs-ig-tier-badge { background: #0095f6; }
.cs-ig--mid .cs-ig-tier-badge { background: #e0f16b; color: #262626; }
.cs-ig--micro .cs-ig-tier-badge { background: #d4ff3f; color: #262626; }

/* === Hero Slider === */
.cs-hero {
  position: fixed;
  inset: 0;
  background: rgba(15, 10, 25, 0.96);
  z-index: 9999;
  display: none;
  flex-direction: column;
  color: #fff;
  overflow-y: auto;
}
.cs-hero.open { display: flex; }

.cs-hero-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.cs-hero-back {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.cs-hero-back:hover { background: rgba(255, 255, 255, 0.05); }
.cs-hero-meta { text-align: center; }
.cs-hero-campaign {
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: 0.5px;
}
.cs-hero-handle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 2px;
}
.cs-hero-open-ig {
  font-size: 13px;
  color: #0095f6;
  text-decoration: none;
  padding: 7px 14px;
  border: 1px solid #0095f6;
  border-radius: 6px;
}
.cs-hero-open-ig:hover { background: #0095f6; color: #fff; }

.cs-hero-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0;
  min-height: 0;
}

.cs-hero-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  overflow: hidden;
  min-height: 60vh;
}
.cs-hero-slide {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.cs-hero-media {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cs-hero-media video,
.cs-hero-media img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.cs-hero-metrics {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.cs-hero-metric {
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.cs-hero-metric i {
  font-style: normal;
  color: #ff3040;
}
.cs-hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  width: 48px;
  height: 48px;
  font-size: 28px;
  line-height: 48px;
  text-align: center;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
}
.cs-hero-arrow:hover { background: rgba(0, 0, 0, 0.9); }
.cs-hero-arrow-l { left: 16px; }
.cs-hero-arrow-r { right: 16px; }

.cs-hero-panel {
  padding: 32px 36px;
  background: #0d0716;
  overflow-y: auto;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}
.cs-hero-counter {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-family: var(--font-mono);
  border-radius: 4px;
  margin-bottom: 24px;
}
.cs-hero-eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--signal);
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 20px;
  margin-bottom: 8px;
}
.cs-hero-eyebrow:first-of-type { margin-top: 0; }
.cs-hero-headline {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 12px 0;
  color: #fff;
}
.cs-hero-importance {
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 20px 0;
}
.cs-hero-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
}
.cs-hero-list li {
  position: relative;
  padding: 8px 0 8px 24px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.85);
}
.cs-hero-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  width: 12px;
  height: 1px;
  background: var(--signal);
}
.cs-hero-signal {
  font-size: 14px;
  line-height: 1.5;
  color: var(--lime);
  background: rgba(212, 255, 63, 0.08);
  padding: 12px 16px;
  border-left: 2px solid var(--lime);
  margin: 0 0 24px 0;
}
.cs-hero-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 16px;
}
.cs-hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background .2s;
}
.cs-hero-dot.active {
  background: var(--signal);
  width: 24px;
  border-radius: 4px;
}

/* === Filter bar === */
.cs-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 32px;
  justify-content: center;
}
.cs-filter-row button {
  padding: 8px 18px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .2s ease;
}
.cs-filter-row button:hover {
  border-color: var(--signal);
  color: var(--signal);
}
.cs-filter-row button.active {
  background: var(--signal);
  border-color: var(--signal);
  color: #fff;
}

/* === Responsive === */
@media (max-width: 960px) {
  .cs-hero-body {
    grid-template-columns: 1fr;
    grid-template-rows: 50vh auto;
  }
  .cs-hero-panel {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
}
@media (max-width: 480px) {
  .cs-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .cs-hero-bar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
  }
  .cs-hero-arrow { width: 40px; height: 40px; line-height: 40px; font-size: 22px; }
}
