/* ==========================================================================
   KEYWELL.AI FLAGSHIP CASE STUDY STYLESHEET
   Enterprise RAG, Azure Databricks, Delta Lake & Production AI Engineering
   NextGen TechEdge Solutions - Production Architecture
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. RESET & MEGA MENU BULLETPROOFING
   -------------------------------------------------------------------------- */
.keywell-page .site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 6, 20, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(132, 38, 176, 0.2);
}

.keywell-page .site-header a {
  text-decoration: none;
}

.keywell-page .mega-menu {
  background: #ffffff;
  color: #171124;
}

.keywell-page .mega-menu a,
.keywell-page .mega-col-list a,
.keywell-page .mega-link {
  text-decoration: none !important;
  color: inherit;
}

.keywell-page .mega-link:hover .mega-link-title {
  color: #8426b0 !important;
}

.keywell-page .mega-link-title {
  color: #171124 !important;
  font-weight: 700;
  font-size: 0.86rem;
  line-height: 1.3;
}

.keywell-page .mega-link-desc {
  color: #6a6279 !important;
  font-size: 0.72rem;
  line-height: 1.35;
  margin-top: 2px;
}

.keywell-page .mega-col-header {
  color: #8426b0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.keywell-page .mega-bottom-bar {
  border-top: 1px solid rgba(132, 38, 176, 0.12);
  color: #6a6279;
}

.keywell-page .mega-bottom-link {
  color: #8426b0 !important;
  font-weight: 700;
  text-decoration: none !important;
}

/* --------------------------------------------------------------------------
   1. HERO SECTION & FLAGSHIP SHOWCASE BANNER
   -------------------------------------------------------------------------- */
.keywell-hero-section {
  padding: 30px 0 20px;
  background: linear-gradient(180deg, #070412 0%, #0d081e 50%, #150a28 100%);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(132, 38, 176, 0.25);
}

/* Breadcrumb Navigation on Dark Flagship Hero */
.keywell-hero-section .case-breadcrumb,
.keywell-breadcrumb {
  display: flex !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #94a3b8;
  margin-bottom: 18px;
  padding: 0;
  list-style: none !important;
}

.keywell-hero-section .case-breadcrumb a,
.keywell-breadcrumb a {
  color: #94a3b8 !important;
  text-decoration: none !important;
  transition: color 0.2s ease;
}

.keywell-hero-section .case-breadcrumb a:hover,
.keywell-breadcrumb a:hover {
  color: #00e5ff !important;
}

.keywell-hero-section .case-breadcrumb .sep,
.keywell-breadcrumb .sep {
  color: #64748b;
  margin: 0 4px;
}

.keywell-hero-section .case-breadcrumb [aria-current="page"],
.keywell-breadcrumb [aria-current="page"] {
  color: #00e5ff !important;
  font-weight: 600;
}

/* Eliminate any unstyled fallback ordered list container */
.breadcrumb-container {
  display: none !important;
}

.keywell-hero-banner {
  background: linear-gradient(135deg, #0c081a 0%, #130a24 50%, #1b0c2c 100%);
  border: 1.5px solid rgba(132, 38, 176, 0.45);
  border-radius: 24px;
  padding: clamp(28px, 4vw, 44px) clamp(20px, 3.5vw, 40px);
  box-shadow: 0 20px 60px -15px rgba(5, 2, 15, 0.85), 0 0 35px rgba(132, 38, 176, 0.2);
  position: relative;
  overflow: hidden;
  margin-top: 10px;
  margin-bottom: 20px;
}

.keywell-hero-banner::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -80px;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(132, 38, 176, 0.22) 0%, rgba(0, 212, 255, 0.1) 50%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(50px);
}

.keywell-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: clamp(28px, 4vw, 48px);
  align-items: center;
  position: relative;
  z-index: 2;
}

/* Eyebrow & Live Indicator */
.flagship-eyebrow-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.flagship-eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 212, 255, 0.12);
  border: 1px solid rgba(0, 212, 255, 0.35);
  color: #00d4ff;
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pulse-cyan-dot {
  width: 8px;
  height: 8px;
  background: #00d4ff;
  border-radius: 50%;
  box-shadow: 0 0 8px #00d4ff;
  animation: pulseCyan 2s infinite ease-in-out;
}

@keyframes pulseCyan {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.flagship-category-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(132, 38, 176, 0.15);
  border: 1px solid rgba(132, 38, 176, 0.35);
  color: #d8b4fe;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 0.74rem;
  font-weight: 600;
}

/* Typography */
.keywell-hero-title {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(2rem, 3.2vw, 2.9rem);
  font-weight: 800;
  line-height: 1.16;
  color: #ffffff;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, #00d4ff 0%, #b862f2 50%, #e056fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.keywell-hero-desc {
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  line-height: 1.65;
  color: #cbd5e1;
  margin-bottom: 22px;
  max-width: 620px;
}

/* Rotator Card */
.keywell-rotator-card {
  background: rgba(15, 10, 30, 0.88);
  border: 1px solid rgba(132, 38, 176, 0.45);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 22px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 8px 24px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}

.rotator-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}

.rotator-title-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #00d4ff;
}

.rotator-counter {
  font-family: 'Space Grotesk', monospace;
  font-size: 0.82rem;
  font-weight: 700;
  color: #d8b4fe;
}

.rotator-active-item {
  display: flex;
  flex-direction: column;
}

.rotator-item-body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.rotator-icon {
  color: #00d4ff;
  font-size: 0.9rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.rotator-text {
  font-size: 0.93rem;
  line-height: 1.5;
  color: #f8fafc;
  margin: 0;
  font-weight: 500;
  min-height: 44px;
}

.rotator-progress-track {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin-top: 10px;
  overflow: hidden;
}

.rotator-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00d4ff, #b862f2);
  border-radius: 2px;
}

/* Tech Chips */
.flagship-tech-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.f-tech-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.25s ease;
}

.f-tech-chip:hover {
  background: rgba(0, 212, 255, 0.15);
  border-color: rgba(0, 212, 255, 0.4);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Hero Actions */
.flagship-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.flagship-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #8426b0 0%, #a838dc 100%);
  color: #ffffff !important;
  font-weight: 700;
  border-radius: 10px;
  padding: 12px 24px;
  box-shadow: 0 4px 16px rgba(132, 38, 176, 0.4);
  transition: all 0.25s ease;
  text-decoration: none;
}

.flagship-cta-primary:hover {
  background: linear-gradient(135deg, #962cc9 0%, #b942f2 100%);
  box-shadow: 0 6px 22px rgba(132, 38, 176, 0.6);
  transform: translateY(-2px);
}

.flagship-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f1f5f9 !important;
  font-weight: 600;
  border-radius: 10px;
  padding: 12px 22px;
  transition: all 0.25s ease;
  text-decoration: none;
}

.flagship-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(0, 212, 255, 0.5);
  color: #00d4ff !important;
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   RIGHT COLUMN: BROWSER MOCKUP & PRODUCT INTERFACE
   -------------------------------------------------------------------------- */
.keywell-browser-frame {
  background: #0f0a1c;
  border: 1px solid rgba(132, 38, 176, 0.45);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 30px rgba(132, 38, 176, 0.2);
  position: relative;
}

.keywell-browser-bar {
  background: #180f2d;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.keywell-browser-dots {
  display: flex;
  gap: 6px;
}

.k-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.k-dot-red { background: #ef4444; }
.k-dot-yellow { background: #f59e0b; }
.k-dot-green { background: #10b981; }

.keywell-browser-url {
  flex: 1;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 6px;
  padding: 4px 12px;
  font-family: 'Space Grotesk', monospace;
  font-size: 0.74rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.keywell-live-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  color: #00d4ff;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.keywell-browser-screen {
  position: relative;
  overflow: hidden;
  background: #06030c;
  height: 330px;
  max-height: 330px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.keywell-screen-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* Subtle Technical Spec Strip Below Browser */
.keywell-browser-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  justify-content: center;
}

.meta-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(132, 38, 176, 0.3);
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
}

/* --------------------------------------------------------------------------
   2. EDITORIAL PROSE & SECTION HEADINGS
   -------------------------------------------------------------------------- */
.editorial-section,
.keywell-editorial-section {
  padding: clamp(60px, 7vw, 90px) 0;
  position: relative;
}

.editorial-section:nth-of-type(even),
.keywell-editorial-section:nth-of-type(even) {
  background: #faf8fc;
  border-top: 1px solid #eae5f0;
  border-bottom: 1px solid #eae5f0;
}

.editorial-section:nth-of-type(odd),
.keywell-editorial-section:nth-of-type(odd) {
  background: #ffffff;
}

.editorial-header {
  text-align: center;
  max-width: 840px;
  margin: 0 auto clamp(36px, 5vw, 56px);
}

.editorial-kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8426b0;
  margin-bottom: 10px;
}

.editorial-title {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(1.8rem, 2.6vw, 2.4rem);
  font-weight: 800;
  line-height: 1.22;
  color: #0f172a;
  margin-bottom: 14px;
}

.editorial-subtitle {
  font-size: clamp(0.98rem, 1.2vw, 1.1rem);
  line-height: 1.6;
  color: #475569;
  margin: 0 auto;
}

.editorial-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #8426b0, #00d4ff);
  margin: 20px auto 0;
  border-radius: 2px;
}

.editorial-lead {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #1e293b;
  font-weight: 500;
  margin-bottom: 18px;
}

.editorial-body {
  max-width: 860px;
  margin: 0 auto 40px;
}

.editorial-body p {
  font-size: 1rem;
  line-height: 1.75;
  color: #334155;
  margin-bottom: 16px;
}

/* Overview Fact Cards */
.keywell-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.overview-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 26px 22px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
}

.editorial-section:nth-of-type(even) .overview-card {
  background: #ffffff;
}

.overview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(132, 38, 176, 0.1);
  border-color: rgba(132, 38, 176, 0.35);
}

.card-icon {
  font-size: 1.8rem;
  margin-bottom: 14px;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.card-desc {
  font-size: 0.92rem;
  line-height: 1.6;
  color: #475569;
  margin: 0;
}

/* --------------------------------------------------------------------------
   3. THE 6 ENGINEERING CHALLENGES (CARDS)
   -------------------------------------------------------------------------- */
.challenges-grid,
.keywell-challenges-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.challenge-card,
.keywell-challenge-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 28px 24px;
  position: relative;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.challenge-card:hover,
.keywell-challenge-card:hover {
  border-color: rgba(132, 38, 176, 0.4);
  box-shadow: 0 12px 28px -6px rgba(132, 38, 176, 0.12);
  transform: translateY(-3px);
}

.challenge-num,
.keywell-challenge-num {
  font-family: 'Space Grotesk', monospace;
  font-size: 1.6rem;
  font-weight: 800;
  color: #8426b0;
  opacity: 0.85;
  margin-bottom: 12px;
  line-height: 1;
}

.challenge-title,
.keywell-challenge-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 10px;
  line-height: 1.3;
}

.challenge-desc,
.keywell-challenge-desc {
  font-size: 0.92rem;
  line-height: 1.65;
  color: #475569;
  margin: 0;
}

/* --------------------------------------------------------------------------
   4. SIGNATURE ARCHITECTURE SECTION (REBUILT COHERENT VISUAL)
   -------------------------------------------------------------------------- */
.architecture-diagram-container,
.keywell-arch-section {
  background: #0c081a;
  border: 1.5px solid rgba(132, 38, 176, 0.45);
  border-radius: 20px;
  padding: clamp(24px, 4vw, 40px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  color: #ffffff;
}

.flow-panel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
}

.flow-panel:last-child {
  margin-bottom: 0;
}

.flow-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.flow-badge {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(0, 212, 255, 0.15);
  color: #00d4ff;
  border: 1px solid rgba(0, 212, 255, 0.3);
}

.flow-panel:nth-of-type(3) .flow-badge {
  background: rgba(184, 98, 242, 0.15);
  color: #d8b4fe;
  border-color: rgba(184, 98, 242, 0.3);
}

.flow-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.flow-steps-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  position: relative;
}

.flow-step-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  position: relative;
}

.flow-step-box:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(0, 212, 255, 0.45);
  transform: translateY(-2px);
}

.step-num-pill {
  font-family: 'Space Grotesk', monospace;
  font-size: 0.68rem;
  font-weight: 800;
  color: #00d4ff;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.flow-panel:nth-of-type(3) .step-num-pill {
  color: #d8b4fe;
}

.step-heading {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
  line-height: 1.3;
}

.step-text {
  font-size: 0.78rem;
  line-height: 1.48;
  color: #94a3b8;
  margin: 0;
}

/* Directional Flow Connectors */
.flow-step-box:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(0, 212, 255, 0.6);
  font-size: 1.1rem;
  font-weight: 800;
  pointer-events: none;
  z-index: 5;
}

.flow-panel:nth-of-type(3) .flow-step-box:not(:last-child)::after {
  color: rgba(184, 98, 242, 0.6);
}

/* Governance Bridge */
.governance-bridge {
  background: linear-gradient(90deg, rgba(132, 38, 176, 0.25) 0%, rgba(0, 212, 255, 0.2) 100%);
  border: 1px dashed rgba(0, 212, 255, 0.45);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 18px 0 24px;
  text-align: center;
}

.bridge-label {
  font-size: 0.88rem;
  color: #e2e8f0;
}

.bridge-icon {
  color: #00d4ff;
  margin-right: 8px;
  font-size: 1.1rem;
}

/* --------------------------------------------------------------------------
   5. TECHNICAL DEEP DIVE (6 ENGINEERING SUBSECTIONS)
   -------------------------------------------------------------------------- */
.deep-dive-grid,
.keywell-deepdive-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.deep-dive-card,
.keywell-deepdive-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
}

.deep-dive-card:hover,
.keywell-deepdive-card:hover {
  transform: translateY(-3px);
  border-color: rgba(132, 38, 176, 0.35);
  box-shadow: 0 12px 30px rgba(132, 38, 176, 0.1);
}

.deep-dive-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.deep-dive-num {
  font-family: 'Space Grotesk', monospace;
  font-size: 1.4rem;
  font-weight: 800;
  color: #8426b0;
  background: rgba(132, 38, 176, 0.08);
  padding: 4px 10px;
  border-radius: 8px;
}

.deep-dive-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.3;
}

.deep-dive-lead {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #334155;
  margin-bottom: 16px;
  font-weight: 500;
}

.deep-dive-specs {
  list-style: none;
  padding: 0;
  margin: 0;
}

.deep-dive-specs li {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #475569;
  margin-bottom: 10px;
  padding-left: 20px;
  position: relative;
}

.deep-dive-specs li:last-child {
  margin-bottom: 0;
}

.deep-dive-specs li::before {
  content: "•";
  color: #8426b0;
  font-size: 1.2rem;
  position: absolute;
  left: 4px;
  top: -1px;
}

.deep-dive-specs strong {
  color: #0f172a;
}

/* --------------------------------------------------------------------------
   6. IMPLEMENTATION SCREENSHOT GALLERY (WITH LIGHTBOX)
   -------------------------------------------------------------------------- */
.gallery-container {
  margin-top: 50px;
  padding-top: 40px;
  border-top: 1px solid #e2e8f0;
}

.gallery-header {
  text-align: center;
  margin-bottom: 36px;
}

.gallery-title {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 10px;
}

.gallery-subtitle {
  font-size: 0.96rem;
  color: #64748b;
  max-width: 680px;
  margin: 0 auto;
}

.case-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.case-gallery-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.case-gallery-card:hover {
  transform: translateY(-4px);
  border-color: rgba(132, 38, 176, 0.4);
  box-shadow: 0 12px 28px rgba(132, 38, 176, 0.12);
}

.gallery-thumb-wrapper {
  position: relative;
  height: 200px;
  background: #0f0a1c;
  overflow: hidden;
}

.gallery-thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.4s ease;
}

.case-gallery-card:hover .gallery-thumb-wrapper img {
  transform: scale(1.04);
}

.gallery-zoom-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 10, 28, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.case-gallery-card:hover .gallery-zoom-overlay {
  opacity: 1;
}

.gallery-zoom-overlay span {
  background: rgba(255, 255, 255, 0.95);
  color: #171124;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 700;
}

.gallery-card-body {
  padding: 16px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.gallery-badge {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8426b0;
  margin-bottom: 6px;
}

.gallery-card-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
  line-height: 1.3;
}

.gallery-card-desc {
  font-size: 0.82rem;
  line-height: 1.5;
  color: #64748b;
  margin: 0;
}

/* Lightbox Modal */
.case-lightbox-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 6, 20, 0.92);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.case-lightbox-modal.active {
  display: flex;
}

.case-lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.case-lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.case-lightbox-caption {
  margin-top: 14px;
  color: #ffffff;
  font-size: 0.92rem;
  text-align: center;
}

.case-lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   7. PRODUCT SHOWCASE (THE PLATFORM: KEYWELL.AI)
   -------------------------------------------------------------------------- */
.product-showcase-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.product-showcase-visual {
  background: #0f0a1c;
  border: 1px solid rgba(132, 38, 176, 0.4);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.showcase-browser-header {
  background: #180f2d;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.showcase-browser-title {
  color: #94a3b8;
  font-family: 'Space Grotesk', monospace;
  font-size: 0.74rem;
}

.showcase-image-wrapper {
  max-height: 520px;
  overflow-y: auto;
  background: #ffffff;
}

.showcase-full-img {
  width: 100%;
  height: auto;
  display: block;
}

.product-capabilities-panel {
  display: flex;
  flex-direction: column;
}

.capabilities-title {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
}

.capabilities-subtitle {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 24px;
}

.capability-items-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.capability-item {
  display: flex;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  transition: all 0.25s ease;
}

.capability-item:hover {
  border-color: rgba(132, 38, 176, 0.35);
  box-shadow: 0 6px 18px rgba(132, 38, 176, 0.08);
}

.cap-item-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.cap-item-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.cap-item-text {
  font-size: 0.8rem;
  line-height: 1.5;
  color: #64748b;
  margin: 0;
}

/* --------------------------------------------------------------------------
   8. OUTCOMES & WHY NEXTGEN
   -------------------------------------------------------------------------- */
.outcomes-grid,
.keywell-outcomes-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.outcome-card,
.keywell-outcome-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 24px 18px;
  text-align: center;
  transition: all 0.3s ease;
}

.editorial-section:nth-of-type(even) .outcome-card {
  background: #ffffff;
}

.outcome-card:hover,
.keywell-outcome-card:hover {
  transform: translateY(-4px);
  border-color: rgba(132, 38, 176, 0.4);
  box-shadow: 0 10px 24px rgba(132, 38, 176, 0.1);
}

.outcome-metric {
  font-family: 'Space Grotesk', monospace;
  font-size: 1.8rem;
  font-weight: 800;
  color: #8426b0;
  line-height: 1;
  margin-bottom: 10px;
}

.outcome-title,
.keywell-outcome-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.outcome-desc,
.keywell-outcome-desc {
  font-size: 0.82rem;
  line-height: 1.55;
  color: #475569;
  margin: 0;
}

/* Why NextGen 4 Pillars */
.why-grid,
.keywell-why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.why-card,
.keywell-why-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 26px 20px;
  transition: all 0.3s ease;
}

.why-card:hover,
.keywell-why-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 212, 255, 0.4);
  box-shadow: 0 10px 24px rgba(0, 212, 255, 0.1);
}

.why-icon {
  font-size: 1.8rem;
  margin-bottom: 14px;
}

.why-title,
.keywell-why-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.why-desc,
.keywell-why-desc {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #475569;
  margin: 0;
}

/* --------------------------------------------------------------------------
   9. HIGH-IMPACT CALL TO ACTION
   -------------------------------------------------------------------------- */
.keywell-cta-section {
  padding: 60px 0 80px;
  background: #ffffff;
}

.keywell-cta-card {
  background: linear-gradient(135deg, #0c081a 0%, #150926 50%, #1d0c35 100%);
  border: 1.5px solid rgba(132, 38, 176, 0.45);
  border-radius: 20px;
  padding: clamp(36px, 5vw, 60px) clamp(24px, 4vw, 48px);
  text-align: center;
  box-shadow: 0 20px 50px rgba(12, 8, 26, 0.4);
  position: relative;
  overflow: hidden;
}

.cta-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #00d4ff;
  background: rgba(0, 212, 255, 0.12);
  border: 1px solid rgba(0, 212, 255, 0.3);
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.cta-heading {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(1.8rem, 2.6vw, 2.4rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 14px;
  line-height: 1.25;
}

.cta-sub {
  font-size: clamp(0.98rem, 1.2vw, 1.1rem);
  color: #cbd5e1;
  max-width: 680px;
  margin: 0 auto 30px;
  line-height: 1.65;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* --------------------------------------------------------------------------
   10. RESPONSIVE BREAKPOINTS (ZERO HORIZONTAL OVERFLOW)
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .outcomes-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .keywell-hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .challenges-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .flow-steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .flow-step-box:not(:last-child)::after {
    display: none;
  }
  .deep-dive-grid {
    grid-template-columns: 1fr;
  }
  .case-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .product-showcase-container {
    grid-template-columns: 1fr;
  }
  .keywell-overview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .challenges-grid {
    grid-template-columns: 1fr;
  }
  .outcomes-grid {
    grid-template-columns: 1fr;
  }
  .why-grid {
    grid-template-columns: 1fr;
  }
  .flow-steps-grid {
    grid-template-columns: 1fr;
  }
  .case-gallery-grid {
    grid-template-columns: 1fr;
  }
  .capability-items-grid {
    grid-template-columns: 1fr;
  }
  .keywell-browser-screen {
    height: 240px;
    max-height: 240px;
  }
}

@media (max-width: 480px) {
  .keywell-hero-banner {
    padding: 24px 16px;
  }
  .flagship-hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .flagship-hero-actions .btn,
  .flagship-hero-actions a {
    width: 100%;
    justify-content: center;
  }
  .cta-buttons {
    flex-direction: column;
  }
  .cta-buttons a {
    width: 100%;
    justify-content: center;
  }
}
