/* ==========================================================================
   CG Abhyas AI (GradeUP PRO) — Chhattisgarh Government Presentation Stylesheet
   Adaptive Dual-Mode: Desktop Keynote (16:9 Stage) + Mobile Story-Cards (100dvh)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800;900&family=Noto+Sans+Devanagari:wght@400;500;600;700;800&display=swap');

:root {
  --primary-950: #090d16;
  --primary-900: #0f172a;
  --primary-850: #131f38;
  --primary-800: #1e3a8a;
  --primary-700: #1d4ed8;
  --primary-600: #2563eb;
  --primary-500: #3b82f6;
  --primary-400: #60a5fa;
  --primary-100: #dbeafe;
  --primary-50: #eff6ff;

  --accent-green: #059669;
  --accent-amber: #d97706;

  --text-dark: #0f172a;
  --text-muted: #475569;
  --text-light: #94a3b8;

  --glass-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: 'Plus Jakarta Sans', 'Noto Sans Devanagari', sans-serif;
  background-color: var(--primary-950);
  color: var(--text-dark);
  overflow: hidden;
  user-select: none;
}

.desktop-only { display: block; }
.mobile-only { display: none; }

.deck-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: 
    radial-gradient(circle at 10% 10%, rgba(5, 150, 105, 0.22) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(37, 99, 235, 0.2) 0%, transparent 40%),
    linear-gradient(180deg, #0f172a 0%, #090d16 100%);
  overflow: hidden;
}

/* Header */
.top-navbar {
  height: 64px;
  min-height: 64px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  z-index: 100;
  color: #ffffff;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.brand-emblem {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #059669, #1e3a8a);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #ffffff;
  font-size: 1.1rem;
  box-shadow: 0 0 15px rgba(5, 150, 105, 0.5);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
}

.brand-text h1 {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.brand-text p {
  font-size: 0.78rem;
  color: #94a3b8;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-ctrl {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f8fafc;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: var(--transition-smooth);
}

.btn-ctrl:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-ctrl.primary {
  background: linear-gradient(135deg, #059669, #1e40af);
  border-color: #6ee7b7;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.45);
  padding: 8px 18px;
}

/* Stage & Slides */
.presentation-stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.25rem;
  overflow: hidden;
}

.slide {
  position: absolute;
  width: 96%;
  max-width: 1480px;
  height: calc(100vh - 130px);
  max-height: 840px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55);
  padding: 1.35rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.97) translateY(15px);
  transition: var(--transition-smooth);
  overflow-y: auto;
  overflow-x: hidden;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
  z-index: 10;
}

.slide.prev {
  opacity: 0;
  visibility: hidden;
  transform: scale(0.96) translateX(-40px);
}

.slide.next {
  opacity: 0;
  visibility: hidden;
  transform: scale(0.96) translateX(40px);
}

.slide-header {
  border-bottom: 1.5px solid #e2e8f0;
  padding-bottom: 0.6rem;
  margin-bottom: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  gap: 1rem;
}

.slide-category-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 3px 9px;
  border-radius: 5px;
  margin-bottom: 3px;
}

.slide-title {
  font-size: clamp(1.25rem, 1.8vw, 1.6rem);
  font-weight: 800;
  color: var(--primary-900);
  line-height: 1.2;
}

.slide-subtitle {
  font-size: clamp(0.78rem, 0.92vw, 0.88rem);
  color: var(--text-muted);
  margin-top: 2px;
}

.slide-badge-tag {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 1.5px solid #a7f3d0;
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-weight: 800;
  color: #065f46;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.15rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }

.card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 0.95rem 1.15rem;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -5px rgba(5, 150, 105, 0.15);
  border-color: #6ee7b7;
}

.card-title {
  font-size: clamp(0.88rem, 1.02vw, 1rem);
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 4px;
}

.card-desc {
  font-size: clamp(0.74rem, 0.82vw, 0.84rem);
  color: var(--text-muted);
  line-height: 1.45;
}

.highlight-box {
  background: linear-gradient(135deg, #065f46, #0f172a);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.highlight-box h3 { color: #6ee7b7; font-size: 1.1rem; font-weight: 800; margin-bottom: 5px; }
.highlight-box p { color: #cbd5e1; font-size: 0.82rem; line-height: 1.5; }

.metric-box {
  background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
  border: 1.5px solid #a7f3d0;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  text-align: center;
}

.metric-value {
  font-size: clamp(1.25rem, 1.6vw, 1.65rem);
  font-weight: 900;
  color: #065f46;
  line-height: 1.1;
}

.metric-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2px;
}

.media-frame {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid #cbd5e1;
  box-shadow: 0 10px 20px -4px rgba(0, 0, 0, 0.14);
  background: #0f172a;
  height: 250px;
}

.media-frame img { width: 100%; height: 100%; object-fit: cover; }
.media-caption { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; text-align: center; font-weight: 600; }

.slider-container { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.slider-label-row { display: flex; justify-content: space-between; font-size: 0.85rem; font-weight: 800; color: #1e293b; }
.custom-range { width: 100%; height: 7px; border-radius: 4px; background: #cbd5e1; outline: none; -webkit-appearance: none; }
.custom-range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #059669; border: 2px solid #ffffff; cursor: pointer; }

.roi-display-card {
  background: linear-gradient(135deg, #065f46 0%, #090d16 100%);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.bottom-statusbar {
  height: 48px;
  background: rgba(15, 23, 42, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  z-index: 100;
  color: #cbd5e1;
  font-size: 0.82rem;
  font-weight: 600;
}

.slide-dots { display: flex; gap: 5px; }
.slide-dot { width: 7px; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.25); cursor: pointer; transition: all 0.25s ease; }
.slide-dot.active { width: 22px; background: #059669; box-shadow: 0 0 10px rgba(5, 150, 105, 0.7); }

.slide-drawer {
  position: fixed; top: 64px; left: 0; bottom: 48px; width: min(320px, 85vw);
  background: rgba(15, 23, 42, 0.97); border-right: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 150; transform: translateX(-100%); transition: transform 0.25s ease; padding: 1rem; overflow-y: auto;
}
.slide-drawer.open { transform: translateX(0); }
.drawer-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; color: #cbd5e1; font-size: 0.84rem; cursor: pointer; margin-bottom: 4px; }
.drawer-item:hover { background: rgba(255, 255, 255, 0.12); color: #ffffff; }
.drawer-item.active { background: #059669; color: #ffffff; font-weight: 800; }
.drawer-num { width: 22px; height: 22px; border-radius: 6px; background: rgba(255, 255, 255, 0.18); display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 800; }

@media (max-width: 768px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: block !important; }
  .top-navbar { height: 48px; padding: 0 0.75rem; }
  .presentation-stage { padding: 6px 8px; }
  .slide { height: calc(100dvh - 110px); border-radius: 14px; padding: 12px 14px; display: block; overflow-y: auto; }
  .grid-2, .grid-3, .grid-4 { display: flex; flex-direction: column; gap: 8px; }
  .card { padding: 10px 12px; border-left: 3px solid #059669; }
  .bottom-statusbar { height: 52px; padding: 0 0.75rem; }
  .mobile-thumb-bar { width: 100%; display: flex; justify-content: space-between; gap: 8px; }
  .mobile-btn-nav { background: rgba(255, 255, 255, 0.1); color: #ffffff; padding: 8px 16px; border-radius: 8px; font-weight: 700; border: 1px solid rgba(255,255,255,0.2); }
  .mobile-btn-nav.primary { background: linear-gradient(135deg, #059669, #1e40af); flex: 1; }
  .mobile-card-pill { background: rgba(255,255,255,0.15); color: #6ee7b7; padding: 6px 12px; border-radius: 20px; font-weight: 800; font-size: 0.78rem; }
}
