/* ==========================================
   GLOBAL VARIABLES & LIGHT THEME RESET
========================================== */
:root {
  --cs-navy: #091E3E;
  --cs-navy-dark: #050d1f;
  --cs-cyan: #06A3DA;
  --cs-cyan-light: #0dcaf0;
  --cs-bg-light: #f8fafc;
  --cs-card-bg: #ffffff;
  --cs-border: rgba(9, 30, 62, 0.1);
  --cs-border-cyan: rgba(6, 163, 218, 0.3);
  --cs-text-main: #071233;
  --cs-text-muted: #475569;
  --cs-font-main: "Segoe UI", system-ui, -apple-system, sans-serif;
  --cs-font-mono: 'JetBrains Mono', Consolas, monospace;
}

.cs-wrapper {
  background-color: var(--cs-bg-light);
  color: var(--cs-text-main);
  font-family: var(--cs-font-main);
  line-height: 1.6;
}

.cs-container {
  width: 90%;
  max-width: 1140px;
  margin: 0 auto;
  padding-top: 20px;
}

.cs-section {
  padding: 0px 0px 42px 0px;
}

/* ==========================================
   HERO HEADER BANNER (Tightened Viewport Fit)
========================================== */
.cs-hero-banner {
  background: linear-gradient(135deg, #091E3E, #050d1f);
  color: #ffffff;
  padding: 35px 20px 25px;
  padding-top: 130px; /* Offset for fixed top navbar */
  border-bottom: 3px solid var(--cs-cyan);
}

.cs-tag {
  display: inline-block;
  background: rgba(6, 163, 218, 0.15);
  color: var(--cs-cyan-light);
  border: 1px solid var(--cs-cyan);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.cs-hero-banner h1 {
  font-size: clamp(24px, 3.2vw, 38px);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 10px;
}

.cs-hero-sub {
  color: #94a3b8;
  font-size: 15px;
  max-width: 650px;
  margin: 0 auto;
}

/* ==========================================
   INTRO SECTION (Compact Layout)
========================================== */
.cs-intro-section {
  padding: 32px 0; /* Reduced to bring stats strip into viewport */
}

.cs-intro-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: center;
}

.cs-intro-grid p {
    text-align: justify;
}

.cs-eyebrow {
  color: var(--cs-cyan);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: block;
  margin-bottom: 4px;
}

.cs-intro-text h2 {
  font-size: 28px;
  color: var(--cs-navy);
  margin-bottom: 12px;
  font-weight: 700;
}

.cs-intro-text p {
  color: var(--cs-text-muted);
  font-size: 14.5px;
  margin-bottom: 10px;
}

.cs-img-frame {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(9, 30, 62, 0.12);
  border: 1px solid var(--cs-border);
}

.cs-img-frame img {
  width: 100%;
  height: 15.5rem; /* Reduced height to keep stats strip visible above fold */
  object-fit: cover;
  display: block;
}

/* ==========================================
   STATS STRIP (NAVY BAR)
========================================== */
.cs-stats-strip {
  background: var(--cs-navy);
  color: #ffffff;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cs-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.cs-stat-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cs-stat-item i {
  font-size: 24px;
  color: var(--cs-cyan);
}

.cs-stat-item span {
  display: block;
  font-size: 10.5px;
  color: #94a3b8;
  text-transform: uppercase;
}

.cs-stat-item strong {
  display: block;
  font-size: 14.5px;
  color: #ffffff;
  font-weight: 700;
}

/* ==========================================
   MID-PAGE PORTFOLIO SAMPLE BUTTON
========================================== */
.cs-sample-btn-wrapper {
  text-align: center;
  margin: 36px 0 16px;
}

.cs-btn-sample {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--cs-cyan), #0284c7);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 30px;
  border-radius: 30px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(6, 163, 218, 0.25);
  transition: all 0.3s ease;
}

.cs-btn-sample:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(6, 163, 218, 0.4);
  background: linear-gradient(135deg, #0284c7, var(--cs-cyan));
}

.cs-btn-sample i {
  font-size: 14px;
}

.cs-card-content p {
    text-align: justify;
}

/* ==========================================
   STORY CARDS
========================================== */
.cs-title {
  text-align: center;
  margin-bottom: 36px;
}

.cs-title h2 {
  font-size: 30px;
  color: var(--cs-navy);
  font-weight: 700;
}

.cs-title .cs-sub {
  color: var(--cs-text-muted);
  font-size: 15px;
  max-width: 600px;
  margin: 8px auto 0;
}

.cs-story-card {
  background: #ffffff;
  border: 1px solid var(--cs-border);
  border-radius: 18px;
  padding: 30px;
  margin-bottom: 28px;
  box-shadow: 0 10px 30px rgba(9, 30, 62, 0.05);
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 32px;
  align-items: center;
}

.cs-img-placeholder {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--cs-border);
  background: #f1f5f9;
}

.cs-img-placeholder img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  display: block;
}

.cs-img-label {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  background: rgba(9, 30, 62, 0.85);
  color: #ffffff;
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  gap: 6px;
}

.cs-card-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--cs-cyan);
  background: rgba(6, 163, 218, 0.1);
  padding: 4px 12px;
  border-radius: 12px;
  margin-bottom: 10px;
}

.cs-badge-danger {
  color: #e11d48;
  background: rgba(225, 29, 72, 0.1);
}

.cs-badge-success {
  color: #16a34a;
  background: rgba(22, 163, 74, 0.1);
}

.cs-card-content h2 {
  font-size: 23px;
  color: var(--cs-navy);
  margin-bottom: 10px;
  font-weight: 700;
}

.cs-card-content p {
  color: var(--cs-text-muted);
  font-size: 14.5px;
  margin-bottom: 16px;
}

/* ==========================================
   FIXED BULLET LIST ALIGNMENT
========================================== */
.cs-bullet-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cs-bullet-list li {
  font-size: 14.5px;
  color: var(--cs-text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.cs-bullet-list i {
  color: var(--cs-cyan);
  font-size: 16px;
  margin-top: 3px;
  flex-shrink: 0;
}

.cs-bullet-list i.error {
  color: #e11d48;
}

.cs-bullet-list li div {
  flex: 1;
  line-height: 1.5;
}

.cs-bullet-list strong {
  color: var(--cs-navy);
  font-weight: 700;
  display: inline;
  margin-right: 4px;
}

/* ==========================================
   SYSTEM OUTPUT DEMO (DARK CODE BOX)
========================================== */
.cs-demo-box {
  background: var(--cs-navy);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 15px 40px rgba(9, 30, 62, 0.15);
  color: #ffffff;
}

.cs-demo-grid {
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  align-items: center;
  gap: 20px;
}

.cs-preview-panel {
  background: #040a17;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
}

.cs-panel-header {
  background: #0c182e;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--cs-font-mono);
  font-size: 11.5px;
  color: #94a3b8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cs-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.cs-dot.red { background: #ff5f56; }
.cs-dot.yellow { background: #ffbd2e; }
.cs-dot.green { background: #27c93f; }

.cs-panel-body {
  padding: 18px;
  font-family: var(--cs-font-mono);
  font-size: 12.5px;
  line-height: 1.6;
}

.cs-screenshot-placeholder {
  min-height: 180px;
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  color: #94a3b8;
}

.cs-screenshot-placeholder i {
  font-size: 32px;
  color: var(--cs-cyan);
}

.cs-arrow-divider {
  text-align: center;
  color: var(--cs-cyan);
  font-size: 22px;
}

.json-key { color: #38bdf8; }
.json-str { color: #4ade80; }
.json-num { color: #facc15; }

.badge-high {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  border: 1px solid #22c55e;
}

.badge-low {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  border: 1px solid #ef4444;
}

/* ==========================================
   FAQ ACCORDION
========================================== */
.cs-faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cs-faq-item {
  background: #ffffff;
  border: 1px solid var(--cs-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.cs-faq-q {
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: var(--cs-navy);
  font-weight: 600;
  font-size: 15px;
}

.cs-faq-q i {
  color: var(--cs-cyan);
  transition: transform 0.3s ease;
}

.cs-faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 22px;
  color: var(--cs-text-muted);
  font-size: 14px;
}

.cs-faq-item.open .cs-faq-a {
  max-height: 200px;
  padding: 0 22px 18px;
}

.cs-faq-item.open .cs-faq-q i {
  transform: rotate(45deg);
}

/* ==========================================
   RELATED PROJECTS
========================================== */
.cs-related-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
}

.cs-related-card {
  background: #ffffff;
  border: 1px solid var(--cs-border);
  padding: 28px;
  border-radius: 16px;
  transition: 0.3s;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.03);
}

.cs-related-card:hover {
  transform: translateY(-5px);
  border-color: var(--cs-cyan);
  box-shadow: 0 12px 30px rgba(6, 163, 218, 0.12);
}

.cs-related-card i {
  font-size: 32px;
  color: var(--cs-cyan);
  margin-bottom: 14px;
  display: block;
}

.cs-related-card h3 {
  color: var(--cs-navy);
  font-size: 18px;
  margin-bottom: 8px;
  font-weight: 700;
}

.cs-related-card p {
  color: var(--cs-text-muted);
  font-size: 13.5px;
  margin-bottom: 16px;
}

.cs-related-card a {
  color: var(--cs-cyan);
  text-decoration: none;
  font-weight: 600;
  font-size: 13.5px;
}

/* ==========================================
   CALL TO ACTION BAND
========================================== */
.cs-cta-band {
  background: linear-gradient(135deg, var(--cs-navy), #050d1f);
  color: #ffffff;
  border-radius: 20px;
  padding: 50px 30px;
  text-align: center;
  box-shadow: 0 15px 35px rgba(9, 30, 62, 0.15);
}

.cs-cta-band h2 {
  color: #ffffff;
  font-size: 32px;
  margin-bottom: 12px;
  font-weight: 700;
}

.cs-cta-band p {
  color: #94a3b8;
  max-width: 520px;
  margin: 0 auto 24px;
  font-size: 15px;
}

.cs-btn-primary {
  background: linear-gradient(135deg, var(--cs-cyan), #2563eb);
  color: #ffffff !important;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: 0.25s;
}

.cs-btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 15px rgba(6, 163, 218, 0.4);
}

.cs-btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff !important;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  margin-left: 12px;
  transition: 0.25s;
}

.cs-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ==========================================
   RESPONSIVE DESIGN
========================================== */
@media(max-width: 992px) {
  .cs-intro-grid, .cs-story-card, .cs-demo-grid {
    grid-template-columns: 1fr;
  }
  .cs-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cs-related-grid {
    grid-template-columns: 1fr;
  }
  .cs-btn-secondary {
    margin-left: 0;
    margin-top: 12px;
    display: block;
  }
}

@media(max-width: 600px) {
  .cs-stats-grid {
    grid-template-columns: 1fr;
  }
}