/* ==========================================================================
   RankStellar SEO Case Study Stylesheet
   Strictly aligned with GEO Case Study Color Combination & Button System
   Inherits dark hero, orange radial glow, navy cards & typography from geo-citation-case-study.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   Scoped Container Variables & Baseline
   -------------------------------------------------------------------------- */
.rs-seo-case-study {
  --rsc-orange: var(--theme-accent, #ff7a00);
  --rsc-navy: #050e1f;
  --rsc-ink: var(--theme-heading, #0b1f41);
  --rsc-muted: var(--theme-text, #475569);
  --rsc-line: #e2e8f0;
  --rsc-pale: #f8fafc;
  --rsc-cream: #fff8f2;
  --rsc-cream-border: #fde2cc;
}

/* --------------------------------------------------------------------------
   Section 6: Search Performance, Visualised (GEO Color-Aligned Dashboards)
   -------------------------------------------------------------------------- */
.rs-seo-dashboard-section {
  background: #ffffff;
}

.rs-seo-dash-stack {
  display: grid;
  gap: 20px;
  margin-top: 24px;
}

.rs-seo-dash {
  background: #ffffff;
  border: 1px solid #e5ebf4;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(11, 31, 65, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rs-seo-dash:hover {
  border-color: #cbd5e1;
  box-shadow: 0 10px 30px rgba(11, 31, 65, 0.07);
}

.rs-seo-dash-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.rs-seo-dash-top b {
  font-family: var(--font-heading, "Manrope", sans-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--theme-heading, #0b1f41);
}

.rs-seo-dash-top small {
  font-family: var(--font-body, "Inter", sans-serif);
  font-size: 12px;
  color: #64748b;
}

/* Mini Metric Badges: Warm Cream & RankStellar Orange */
.rs-seo-mini-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.rs-seo-mini-metrics span {
  background: var(--rsc-cream, #fff8f2);
  border: 1px solid var(--rsc-cream-border, #fde2cc);
  border-radius: 10px;
  padding: 12px 14px;
}

.rs-seo-mini-metrics small {
  display: block;
  font-family: var(--font-body, "Inter", sans-serif);
  font-size: 11px;
  color: #64748b;
}

.rs-seo-mini-metrics b {
  display: block;
  font-family: var(--font-heading, "Manrope", sans-serif);
  font-size: 24px;
  font-weight: 800;
  color: var(--theme-accent, #ff7a00);
  margin-top: 4px;
  line-height: 1.1;
}

/* SVG Line Chart: Orange Clicks Line + Navy Impressions Line */
.rs-seo-linechart {
  height: 170px;
  width: 100%;
  margin: 15px 0 10px;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 39px,
    #f8fafc 40px
  );
  border-bottom: 1px solid #e2e8f0;
}

.rs-seo-linechart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.rs-seo-chart-foot {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-body, "Inter", sans-serif);
  color: #8794a8;
  font-size: 11px;
  margin-top: 8px;
}

/* GA4 Bar Chart: RankStellar Orange Bars */
.rs-seo-bars {
  height: 140px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 15px 10px 0;
  border-bottom: 1px solid #e2e8f0;
}

.rs-seo-bars i {
  display: block;
  flex: 1;
  max-width: 44px;
  background: var(--theme-accent, #ff7a00);
  border-radius: 5px 5px 0 0;
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.rs-seo-bars i:hover {
  background: #e86e00;
  transform: translateY(-2px);
}

/* Keyword Mini Table (Inside Dashboard 3) */
.rs-seo-dash-table {
  font-family: var(--font-body, "Inter", sans-serif);
  font-size: 13px;
  color: #334155;
  overflow-x: auto;
}

.rs-seo-dash-table-head {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) 1fr 1fr 1fr;
  gap: 12px;
  padding: 12px 14px;
  background: #f1f5f9;
  border-radius: 8px;
  font-family: var(--font-heading, "Manrope", sans-serif);
  font-weight: 700;
  font-size: 15px;
  color: var(--theme-heading, #0b1f41);
  min-width: 540px;
}

.rs-seo-dash-table-row {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) 1fr 1fr 1fr;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  align-items: center;
  min-width: 540px;
}

.rs-seo-data-note {
  font-family: var(--font-body, "Inter", sans-serif);
  font-size: 12px;
  color: #64748b;
  margin: 14px 0 0;
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   Section 7: Results at a Glance Split Card
   -------------------------------------------------------------------------- */
.rs-seo-glance-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.rs-seo-split-label {
  display: block;
  font-family: var(--font-body, "Inter", sans-serif);
  font-size: 13px;
  color: #94a3b8;
}

.rs-seo-split-num {
  display: block;
  font-family: var(--font-heading, "Manrope", sans-serif);
  font-size: 26px;
  font-weight: 800;
  color: var(--theme-accent, #ff7a00);
  margin: 4px 0 8px;
}

.rs-seo-glance-split i {
  display: block;
  background: #1e293b;
  height: 5px;
  border-radius: 8px;
  overflow: hidden;
}

.rs-seo-glance-split em {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ffb35c, var(--theme-accent, #ff7a00));
  border-radius: 8px;
}

/* --------------------------------------------------------------------------
   Section 8: Target Keywords Table
   -------------------------------------------------------------------------- */
.rs-seo-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--rsc-line, #e2e8f0);
  border-radius: 12px;
  background: #ffffff;
  margin-top: 20px;
}

.rs-seo-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body, "Inter", sans-serif);
  font-size: 0.875rem;
  min-width: 620px;
}

.rs-seo-table th {
  background: #f1f5f9;
  color: var(--theme-heading, #0b1f41);
  text-align: left;
  font-family: var(--font-heading, "Manrope", sans-serif);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 18px;
  border-bottom: 2px solid var(--rsc-line, #e2e8f0);
}

.rs-seo-table td {
  padding: 14px 18px;
  border-top: 1px solid var(--rsc-line, #e2e8f0);
  color: #1e293b;
  font-family: var(--font-body, "Inter", sans-serif);
  font-size: 0.875rem;
  line-height: 1.55;
}

.rs-seo-table tr:hover td {
  background: #f8fafc;
}

/* Opportunity Callout Banner (Matching GEO .gcr-opportunity) */
.rs-seo-callout-note {
  background: var(--rsc-cream, #fff8f2);
  border: 1px solid var(--rsc-cream-border, #fde2cc);
  color: #334155;
  border-radius: 10px;
  padding: 16px 20px;
  margin-top: 18px;
  font-family: var(--font-body, "Inter", sans-serif);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Responsive Parity for SEO Case Study
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .rs-seo-mini-metrics {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 767.98px) {
  .rs-seo-glance-split {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .rs-seo-bars {
    gap: 6px;
  }
}

@media (max-width: 520px) {
  .rs-seo-dash {
    padding: 18px 14px;
  }
  .rs-seo-dash-top {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* SEO hero: optional uploaded right-side image (GEO-style ACF switch) */
.rs-seo-case-study .rs-seo-hero-art-image {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
}
.rs-seo-case-study .rs-seo-hero-uploaded-image {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: 22px;
}
@media (max-width: 767px) {
  .rs-seo-case-study .rs-seo-hero-art-image {
    min-height: 0;
  }
  .rs-seo-case-study .rs-seo-hero-uploaded-image {
    max-height: 360px;
  }
}
