/* ──────────────────────────────────────────────────────────────
   CASE STUDIES PAGE (page-case-studies.php)
   Only enqueued when is_page('case-studies').
   All selectors namespaced under .cs-*.
   ────────────────────────────────────────────────────────────── */

body.page {
  font-family: 'Inter', sans-serif;
  color: var(--black);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* ── HERO ───────────────────────────────────────────── */
.cs-hero {
  position: relative;
  padding: 56px 48px 44px;
  background:
    radial-gradient(circle at 88% 10%, rgba(255,44,85,0.10) 0%, transparent 45%),
    var(--bg);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}

.cs-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(10,10,10,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10,10,10,0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, transparent 75%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, transparent 75%);
}

.cs-hero-watermark {
  position: absolute;
  top: 12px;
  right: 48px;
  font-size: clamp(5rem, 11vw, 11rem);
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.08em;
  line-height: 0.85;
  color: var(--black);
  opacity: 0.04;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.cs-hero-inner {
  position: relative;
  z-index: 1;
  max-width: none;
  margin: 0;
}

.cs-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
}

.cs-hero-eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--red);
}

.cs-hero-h1 {
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.04;
  margin: 0 0 16px;
  color: var(--black);
}

.cs-hero-h1 em {
  font-style: italic;
  color: var(--red);
}

.cs-hero-sub {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.55;
  max-width: 720px;
  margin-bottom: 24px;
}

.cs-hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding-top: 18px;
  border-top: 1px solid #E5E5E5;
}

.cs-hero-meta-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.cs-hero-meta-num {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--red);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.cs-hero-meta-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.cs-hero-meta-divider {
  width: 1px;
  height: 18px;
  background: #D0D0D0;
}

/* ── FILTER PILLS ───────────────────────────────────── */
.cs-filter-bar {
  padding: 40px 48px 8px;
  max-width: none;
  margin: 0;
}

.cs-filter-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 24px;
  border-bottom: 1px solid #E5E5E5;
}

.cs-filter {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: 1px solid #D8D8D8;
  background: var(--white);
  color: var(--black);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
}

.cs-filter:hover {
  color: var(--red);
  border-color: var(--red);
  background: rgba(255,44,85,0.04);
}

.cs-filter.is-active {
  color: var(--white);
  background: var(--red);
  border-color: var(--red);
}

/* ── FEATURED CASE STUDY (full-width banner) ────────── */
.cs-featured {
  padding: 32px 48px 24px;
  max-width: none;
  margin: 0;
}

.cs-featured-link {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  align-items: stretch;
  background:
    radial-gradient(circle at 100% 0%, rgba(255,44,85,0.16) 0%, transparent 50%),
    linear-gradient(155deg, #1a1a1a 0%, #0A0A0A 70%);
  color: var(--white);
  text-decoration: none;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.cs-featured-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 32px 64px rgba(0,0,0,0.25), 0 8px 18px rgba(0,0,0,0.15);
  border-color: rgba(255,44,85,0.4);
}

.cs-featured-media {
  position: relative;
  overflow: hidden;
  min-height: 480px;
  background: #1a1a1a;
}

.cs-featured-img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.cs-featured-link:hover .cs-featured-img { transform: scale(1.04); }

.cs-featured-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,10,10,0.5) 0%, rgba(10,10,10,0.15) 60%, transparent 100%);
  z-index: 1;
}

.cs-featured-badge {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--red);
  color: var(--white);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.cs-featured-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--white);
  border-radius: 50%;
}

.cs-featured-body {
  position: relative;
  z-index: 1;
  padding: 72px 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cs-featured-stat {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.cs-featured-stat-num {
  font-size: clamp(3rem, 5.6vw, 5rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  color: var(--red);
  line-height: 0.85;
}

.cs-featured-stat-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  line-height: 1.35;
  max-width: 180px;
}

.cs-featured-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 16px;
}

.cs-featured-excerpt {
  font-size: 15.5px;
  line-height: 1.65;
  color: rgba(255,255,255,0.75);
  margin-bottom: 26px;
}

.cs-featured-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  transition: gap 0.22s;
  margin-top: auto;
}

.cs-featured-cta svg { width: 14px; height: 14px; transition: transform 0.22s; }
.cs-featured-link:hover .cs-featured-cta { gap: 14px; }
.cs-featured-link:hover .cs-featured-cta svg { transform: translateX(4px); }

/* ── GRID ───────────────────────────────────────────── */
.cs-grid {
  padding: 24px 48px 56px;
  max-width: none;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.cs-grid--standalone { padding-top: 56px; }

.cs-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--black);
  color: var(--white);
  text-decoration: none;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.cs-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 44px rgba(0,0,0,0.25), 0 6px 16px rgba(0,0,0,0.15);
  border-color: rgba(255,44,85,0.4);
}

.cs-card-media {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0%, rgba(255,44,85,0.12) 0%, transparent 60%),
    linear-gradient(155deg, #1a1a1a 0%, #0a0a0a 100%);
}

.cs-card-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

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

.cs-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0.2) 0%, rgba(10,10,10,0.6) 100%);
  z-index: 1;
  pointer-events: none;
}

.cs-card-body {
  padding: 28px 28px 30px;
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
}

.cs-card-stat {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.cs-card-stat-num {
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--red);
  line-height: 0.9;
}

.cs-card-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.65);
  line-height: 1.35;
  max-width: 140px;
}

.cs-card-title {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 18px;
  color: var(--white);
  word-wrap: break-word;
}

.cs-card-cta {
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-top: auto;
  transition: letter-spacing 0.22s;
}

.cs-card:hover .cs-card-cta { letter-spacing: 0.24em; }

/* ── SERVICE TAGS (categories) ──────────────────────── */
.cs-tags {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.cs-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
}

.cs-tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  flex-shrink: 0;
}

/* Per-service dot colours — exact palette from liondigital.com.au/case-studies/. */
.cs-tag[data-svc="seo"]            .cs-tag-dot { background: #00f0ff; }
.cs-tag[data-svc="sem"]            .cs-tag-dot { background: #ffc000; }
.cs-tag[data-svc="email"]          .cs-tag-dot { background: #ff8e3e; }
.cs-tag[data-svc="social"]         .cs-tag-dot { background: #a100ff; }
.cs-tag[data-svc="dev"]            .cs-tag-dot { background: #0800b2; }
.cs-tag[data-svc="seo-migration"]  .cs-tag-dot { background: #25f4ee; }
.cs-tag[data-svc="blended-search"] .cs-tag-dot { background: #8fec3d; }
.cs-tag[data-svc="cro"]            .cs-tag-dot { background: #ff2c55; }

.cs-tags--card {
  margin: 14px 0 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  gap: 6px 12px;
}

.cs-tags--card .cs-tag { font-size: 9.5px; letter-spacing: 0.14em; }
.cs-tags--card .cs-tag-dot { width: 6px; height: 6px; }

.cs-tags--featured {
  margin: 0 0 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  gap: 8px 18px;
}

.cs-tags--featured .cs-tag { font-size: 11.5px; letter-spacing: 0.18em; }
.cs-tags--featured .cs-tag-dot { width: 9px; height: 9px; }

/* ── FILTER STATE: HIDDEN CARDS ─────────────────────── */
.cs-is-hidden { display: none !important; }

.cs-empty-filter {
  max-width: none;
  padding: 36px 48px 64px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.cs-empty-filter a {
  color: var(--red);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── PAGINATION ─────────────────────────────────────── */
.cs-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px 48px 88px;
  flex-wrap: wrap;
}

.cs-pag-item .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--black);
  background: var(--white);
  border: 1px solid #D8D8D8;
  text-decoration: none;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
}

.cs-pag-item .page-numbers:hover {
  color: var(--red);
  border-color: var(--red);
  background: rgba(255,44,85,0.04);
}

.cs-pag-item .page-numbers.current {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

.cs-pag-item .page-numbers.dots { border: none; background: transparent; cursor: default; }

/* ── EMPTY STATE ────────────────────────────────────── */
.cs-empty { padding: 96px 48px; text-align: center; }
.cs-empty-title { font-size: 28px; font-weight: 900; letter-spacing: -0.03em; margin-bottom: 10px; color: var(--black); }
.cs-empty-sub { font-size: 16px; color: var(--muted); }

/* ── BOTTOM CTA ─────────────────────────────────────── */
.cs-cta {
  position: relative;
  padding: 104px 48px;
  background:
    radial-gradient(circle at 100% 100%, rgba(255,44,85,0.22) 0%, transparent 45%),
    radial-gradient(circle at 0% 0%, rgba(255,44,85,0.08) 0%, transparent 50%),
    var(--black);
  text-align: center;
  color: var(--white);
  overflow: hidden;
}

.cs-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  mask-image: radial-gradient(circle at 50% 50%, rgba(0,0,0,0.5) 0%, transparent 65%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, rgba(0,0,0,0.5) 0%, transparent 65%);
}

.cs-cta-inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }

.cs-cta-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  padding: 8px 14px;
  border: 1px solid rgba(255,44,85,0.35);
  background: rgba(255,44,85,0.08);
  margin-bottom: 26px;
}

.cs-cta-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--red);
  border-radius: 50%;
  animation: cs-pulse 2s ease-in-out infinite;
}

@keyframes cs-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.75); }
}

.cs-cta-h2 {
  font-size: clamp(2.4rem, 4.6vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.02;
  color: var(--white);
  margin-bottom: 18px;
}

.cs-cta-h2 em { font-style: italic; color: var(--red); }

.cs-cta-sub {
  font-size: 18px;
  color: rgba(255,255,255,0.75);
  line-height: 1.6;
  margin-bottom: 36px;
}

.cs-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 20px 38px;
  background: var(--red);
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
  box-shadow: 0 8px 24px rgba(255,44,85,0.25);
}

.cs-cta-btn svg { width: 14px; height: 14px; flex-shrink: 0; transition: transform 0.22s; }

.cs-cta-btn:hover {
  background: var(--white);
  color: var(--black);
  transform: translateY(-2px);
}

.cs-cta-btn:hover svg { transform: translateX(4px); }

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 1100px) {
  .cs-grid { grid-template-columns: repeat(2, 1fr); }
  .cs-featured-link { grid-template-columns: 1fr; }
  .cs-featured-media { min-height: 320px; }
  .cs-featured-body { padding: 36px 32px; }
}

@media (max-width: 720px) {
  .cs-hero { padding: 64px 24px 48px; }
  .cs-hero-watermark { display: none; }
  .cs-hero-meta { gap: 16px; }
  .cs-hero-meta-divider { display: none; }
  .cs-filter-bar { padding: 32px 24px 16px; }
  .cs-featured { padding: 24px 24px 16px; }
  .cs-featured-body { padding: 28px 24px 32px; }
  .cs-grid { grid-template-columns: 1fr; padding: 16px 24px 40px; }
  .cs-card-body { padding: 22px 22px 26px; }
  .cs-pagination { padding: 16px 24px 64px; }
  .cs-cta { padding: 64px 24px; }
}
