/* ==========================================================================
   CASE STUDIES MODULE DEDICATED STYLESHEET (DARK & LIGHT THEMES)
   ========================================================================== */

/* ─── DARK THEME DEFAULT ─── */
.cs-grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-bottom: 40px;
}

@media (max-width: 1024px) {
  .cs-grid-2x2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .cs-grid-2x2 {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.cs-card-featured {
  position: relative;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  cursor: pointer;
  text-decoration: none !important;
  color: inherit;
}

.cs-card-featured:hover {
  transform: translateY(-8px);
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 24px rgba(37, 99, 235, 0.15);
}

.cs-card-img-wrap {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #0f172a;
}

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

.cs-card-featured:hover .cs-card-img-wrap img {
  transform: scale(1.06);
}

.cs-card-content {
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.cs-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.cs-industry-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 100px;
  padding: 5px 14px;
}

.cs-result-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 100px;
  padding: 5px 14px;
}

.cs-card-h3 {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  color: var(--white, #ffffff);
  line-height: 1.35;
  margin-bottom: 12px;
  transition: color 0.3s ease;
}

.cs-card-featured:hover .cs-card-h3 {
  color: #3b82f6;
}

.cs-card-desc-text {
  font-size: 15px;
  color: var(--muted-dark, #94a3b8);
  line-height: 1.65;
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cs-card-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cs-read-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #3b82f6;
  text-decoration: none !important;
  transition: gap 0.3s ease, color 0.3s ease;
}

.cs-read-btn svg {
  transition: transform 0.3s ease;
}

.cs-card-featured:hover .cs-read-btn {
  color: #60a5fa;
}

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

/* SEARCH & FILTER CONTROLS FOR CASE-STUDIES.HTML */
.cs-filter-bar {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg, 16px);
  padding: 24px 30px;
  margin-bottom: 48px;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cs-search-box {
  position: relative;
  width: 100%;
}

.cs-search-box input {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 14px 20px 14px 48px;
  color: #ffffff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

.cs-search-box input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.cs-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
}

.cs-filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cs-filter-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  min-width: 80px;
}

.cs-filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.25s ease;
}

.cs-filter-btn:hover,
.cs-filter-btn.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

/* DETAIL PAGES STYLES */
.cs-detail-hero {
  position: relative;
  padding: 160px 6% 80px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.cs-detail-hero h1 {
  color: #ffffff !important;
  font-family: var(--font-head);
  font-size: clamp(32px, 4.5vw, 54px);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 20px;
}

.cs-detail-hero p {
  color: #f1f5f9 !important;
  font-size: 19px;
  line-height: 1.7;
  max-width: 860px;
  opacity: 1 !important;
}

.cs-detail-hero a {
  color: #93c5fd !important;
  text-decoration: none !important;
}

.cs-detail-hero a:hover {
  color: #ffffff !important;
}

.cs-detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
  margin: 60px auto;
  max-width: 1240px;
}

@media (max-width: 1024px) {
  .cs-detail-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

.cs-sidebar-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg, 16px);
  padding: 32px;
  backdrop-filter: blur(12px);
  margin-bottom: 24px;
}

.cs-timeline-step {
  position: relative;
  padding-left: 32px;
  margin-bottom: 24px;
  border-left: 2px solid rgba(59, 130, 246, 0.3);
}

.cs-timeline-step::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 10px #3b82f6;
}

.cs-tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
  margin: 4px;
}

.cs-testimonial-box {
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 70%), rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: var(--radius-lg, 16px);
  padding: 40px;
  margin: 48px 0;
  position: relative;
}

/* ─── LIGHT MODE OVERRIDES ─── */
body.light-mode .cs-detail-hero {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
  border-bottom: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

body.light-mode .cs-detail-hero h1 {
  color: #0f172a !important;
  text-shadow: none !important;
}

body.light-mode .cs-detail-hero p {
  color: #334155 !important;
  opacity: 1 !important;
}

body.light-mode .cs-detail-hero a {
  color: #2563eb !important;
}

body.light-mode .cs-detail-hero a:hover {
  color: #1d4ed8 !important;
}

body.light-mode .cs-detail-hero .cs-industry-tag {
  background: #dbeafe !important;
  color: #1e40af !important;
  border-color: #93c5fd !important;
}

body.light-mode .cs-detail-hero .cs-result-tag {
  background: #d1fae5 !important;
  color: #065f46 !important;
  border-color: #6ee7b7 !important;
}

body.light-mode .cs-card-featured {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
}

body.light-mode .cs-card-featured:hover {
  border-color: rgba(37, 99, 235, 0.4) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12) !important;
}

body.light-mode .cs-card-h3 {
  color: #0f172a !important;
}

body.light-mode .cs-card-desc-text {
  color: #475569 !important;
}

body.light-mode .cs-card-footer {
  border-top-color: rgba(0, 0, 0, 0.08) !important;
}

body.light-mode .cs-filter-bar {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
}

body.light-mode .cs-search-box input {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

body.light-mode .cs-filter-btn {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}

body.light-mode .cs-filter-btn:hover,
body.light-mode .cs-filter-btn.active {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
}

body.light-mode .cs-sidebar-card {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
  color: #0f172a !important;
}

body.light-mode .cs-sidebar-card h3 {
  color: #0f172a !important;
}

body.light-mode .cs-sidebar-card span {
  color: #1e293b !important;
}

body.light-mode .cs-sidebar-card span[style*="color: #64748b"] {
  color: #64748b !important;
}

body.light-mode .cs-tech-badge {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #1e293b !important;
}

body.light-mode .cs-testimonial-box {
  background: #f8fafc !important;
  border-color: rgba(37, 99, 235, 0.25) !important;
  color: #0f172a !important;
}

body.light-mode .cs-testimonial-box p {
  color: #1e293b !important;
}

body.light-mode main h2 {
  color: #0f172a !important;
}

body.light-mode main p,
body.light-mode main li {
  color: #334155 !important;
}

body.light-mode .cs-timeline-step h4 {
  color: #0f172a !important;
}

body.light-mode .cs-timeline-step p {
  color: #475569 !important;
}


