/* ==========================================================================
   EMS Solution & Hành Mỹ Presentation Deck Style Sheet
   Includes Dual Viewing Modes (Slides & Scroll), KPI Blocks, Comparison Tables
   ========================================================================== */

/* --- Cascade Layers Setup --- */
@layer reset, base, theme, layout, components, pages, utilities;

@layer reset {
  *, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
  }

  body {
    min-height: 100vh;
    text-rendering: optimizeSpeed;
    line-height: 1.5;
    overflow: hidden;
  }

  img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
  }

  input, button, textarea, select {
    font: inherit;
  }

  ul, ol {
    list-style: none;
  }

  a {
    text-decoration: none;
    color: inherit;
  }
}

@layer base {
  :root {
    /* Font Families */
    --font-primary: 'Plus Jakarta Sans', sans-serif;

    /* Color Tokens (Literal) */
    --color-slate-50: #f8fafc;
    --color-slate-100: #f1f5f9;
    --color-slate-200: #e2e8f0;
    --color-slate-300: #cbd5e1;
    --color-slate-400: #94a3b8;
    --color-slate-800: #1e293b;
    --color-slate-900: #0f172a;
    --color-slate-950: #020617;

    --color-emerald-500: #10b981;
    --color-emerald-400: #34d399;
    --color-emerald-600: #059669;
    --color-cyan-500: #06b6d4;
    --color-cyan-400: #22d3ee;
    
    --color-rose-500: #f43f5e;
    --color-rose-600: #e11d48;
    --color-amber-500: #f59e0b;

    /* Semantic Tokens (Tier 2/3) */
    --bg-main: #060813;
    --bg-surface: #0b1122;
    --bg-card: rgba(15, 23, 42, 0.5);
    
    --text-primary: var(--color-slate-50);
    --text-secondary: var(--color-slate-300);
    --text-muted: var(--color-slate-400);
    
    --color-accent: var(--color-emerald-500);
    --color-accent-light: var(--color-emerald-400);
    --color-cyan: var(--color-cyan-500);
    --color-cyan-light: var(--color-cyan-400);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(6, 182, 212, 0.25);
    --border-glow-rose: rgba(244, 63, 94, 0.25);

    /* Animation Tokens */
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);

    /* Layout Tokens */
    --container-max-w: 1200px;
    --ribbon-height: 60px;
    --ctrl-height: 60px;
  }

  body {
    font-family: var(--font-primary);
    background-color: var(--bg-main);
    color: var(--text-primary);
    background-image: 
      radial-gradient(circle at 10% 20%, rgba(6, 182, 212, 0.06) 0%, transparent 40%),
      radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.06) 0%, transparent 40%),
      radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.45) 0%, transparent 100%);
    background-attachment: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
  }

  h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    color: var(--text-primary);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
  }

  /* Custom Scrollbar */
  ::-webkit-scrollbar {
    width: 8px;
  }
  ::-webkit-scrollbar-track {
    background: var(--bg-main);
  }
  ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
  }
  ::-webkit-scrollbar-thumb:hover {
    background: var(--color-cyan-500);
  }

  /* Accessible Focus Outlines */
  :focus-visible {
    outline: 2px solid var(--color-cyan-light);
    outline-offset: 4px;
  }
}

@layer layout {
  .container {
    width: 92%;
    max-width: var(--container-max-w);
    margin-inline: auto;
  }

  /* Top ribbon */
  .presenter-ribbon {
    height: var(--ribbon-height);
    background: rgba(6, 9, 19, 0.95);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
  }

  .ribbon-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .presenter-meta {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.82rem;
  }

  .ribbon-badge {
    background: rgba(6, 182, 212, 0.1);
    color: var(--color-cyan-light);
    border: 1px solid rgba(6, 182, 212, 0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
  }

  .ribbon-title {
    color: var(--text-secondary);
    font-weight: 700;
    letter-spacing: 0.5px;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    padding-left: 0.85rem;
  }

  /* Dual View switcher */
  .view-mode-switcher {
    display: flex;
    background: transparent;
    border: none;
    padding: 0;
  }

  .btn-mode {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 1.15rem;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .btn-mode:hover {
    background: rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.3);
    color: var(--color-cyan-light);
  }

  /* Mode Switch Visibility (Horizontal view vs Vertical scroll view toggle) */
  body.mode-slides #btn-mode-slides {
    display: none !important;
  }
  body.mode-slides #btn-mode-scroll {
    display: inline-flex !important;
  }

  body.mode-scroll #btn-mode-scroll {
    display: none !important;
  }
  body.mode-scroll #btn-mode-slides {
    display: inline-flex !important;
  }

  .ribbon-logos {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .ribbon-logo {
    height: 28px;
    width: 28px;
    object-fit: contain;
  }

  .ribbon-logo.round {
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .ribbon-divider {
    color: rgba(255,255,255,0.2);
    font-size: 0.85rem;
  }

  /* Presentation Layout Area */
  .presentation-layout {
    display: flex;
    flex: 1;
    position: relative;
  }

  /* Slide Deck Main Board */
  .slide-deck {
    flex: 1;
    position: relative;
  }

  .hero-bg-blobs {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 0;
  }

  @keyframes float-glow {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -30px) scale(1.1); }
    100% { transform: translate(0, 0) scale(1); }
  }

  .blob {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.12;
    animation: float-glow 12s infinite ease-in-out;
  }

  .blob-1 {
    background: var(--color-accent);
    top: -150px;
    left: -100px;
  }

  .blob-2 {
    background: var(--color-cyan);
    bottom: -150px;
    right: -100px;
    animation-delay: 4s;
  }

  .slide-container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
    position: relative;
    z-index: 10;
  }
}

/* ==========================================================================
   DUAL MODE LAYOUT CONFIGURATION (THE CORE WORKHORSE)
   ========================================================================== */

/* 1. SLIDES MODE active */
body.mode-slides {
  overflow: hidden;
  height: 100vh;
}

body.mode-slides #progress {
  position: fixed;
  left: 0; top: 0;
  width: 100%; height: 4px;
  background: linear-gradient(to right, var(--color-accent), var(--color-cyan));
  transform-origin: 0 50%;
  z-index: 1100;
  transform: scaleX(0);
}

body.mode-slides .presentation-layout {
  margin-top: var(--ribbon-height);
  margin-bottom: var(--ctrl-height);
  height: calc(100vh - var(--ribbon-height) - var(--ctrl-height));
  overflow: hidden;
}

body.mode-slides .slide-sidebar {
  width: 280px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
  z-index: 100;
}

body.mode-slides .slide-sidebar.hidden {
  margin-left: -280px;
}

body.mode-slides .slide-deck {
  height: 100%;
  overflow: hidden;
}

body.mode-slides .slide-section {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0; left: 0;
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transform: scale(0.96) translateY(12px);
  z-index: 10;
}

body.mode-slides .slide-section.prev-slide {
  transform: scale(0.96) translateY(-12px);
  opacity: 0;
  pointer-events: none;
}

body.mode-slides .slide-section.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translateY(0);
  z-index: 20;
}

body.mode-slides .presentation-controls {
  display: flex;
}

/* 2. SCROLL MODE active */
body.mode-scroll {
  overflow-y: auto;
  height: auto;
}

body.mode-scroll #progress {
  display: none; /* Hide top progress bar in scroll view */
}

body.mode-scroll .presentation-layout {
  margin-top: var(--ribbon-height);
  margin-bottom: 0;
  height: auto;
  display: block;
}

body.mode-scroll .slide-sidebar {
  display: none !important; /* Hide sidebar completely */
}

body.mode-scroll .slide-section {
  position: relative;
  width: 100%;
  height: auto;
  top: auto; left: auto;
  opacity: 1;
  pointer-events: auto;
  transform: none !important;
  display: flex;
  padding-block: 6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body.mode-scroll .slide-container {
  max-width: 1100px;
  width: 90%;
  margin-inline: auto;
}

body.mode-scroll .slide-num-indicator {
  display: none; /* Hide indicators in scroll mode */
}

body.mode-scroll .presentation-controls {
  display: none !important; /* Hide bottom controls */
}

/* ==========================================================================
   Presentation Layout Components
   ========================================================================== */
.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-header h3 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.sidebar-nav ul {
  display: grid;
  gap: 0.35rem;
}

.nav-slide-btn {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 0.65rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-slide-btn span {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.nav-slide-btn:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.nav-slide-btn.active {
  background: rgba(6, 182, 212, 0.08);
  border-color: rgba(6, 182, 212, 0.2);
  color: var(--color-cyan-light);
  font-weight: 700;
}

.nav-slide-btn.active span {
  background: var(--color-cyan-500);
  color: var(--color-slate-950);
}

@layer components {
  /* Buttons */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.6rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
  }

  .btn-lg {
    padding: 0.95rem 2.25rem;
    font-size: 1rem;
    border-radius: 12px;
  }

  .btn-primary {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-cyan) 100%);
    color: var(--color-slate-950);
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.2);
  }

  .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(6, 182, 212, 0.35);
  }

  .btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    border-color: var(--border-color);
  }

  .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
  }

  .btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.25);
  }

  .btn-outline:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--text-primary);
  }

  .btn-light {
    background: var(--color-slate-50);
    color: var(--color-slate-950);
  }

  .btn-light:hover {
    background: var(--color-slate-100);
    transform: translateY(-2px);
  }

  /* Glassmorphism Cards */
  .glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.4);
  }

  /* Slide Layout Grids */
  .slide-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3.5rem;
    align-items: center;
  }

  .slide-grid-center {
    max-width: 840px;
    margin-inline: auto;
    text-align: center;
  }

  /* Text elements inside slides */
  .slide-num-indicator {
    position: absolute;
    top: -3.5rem;
    right: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.5px;
  }

  .badge {
    background: rgba(6, 182, 212, 0.08);
    color: var(--color-cyan-light);
    border: 1px solid rgba(6, 182, 212, 0.2);
    padding: 0.35rem 0.95rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    display: inline-block;
  }

  .hero-title {
    font-size: clamp(2rem, 1.2rem + 3.2vw, 3rem);
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--color-slate-400) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .hero-description {
    font-size: clamp(1rem, 0.95rem + 0.1vw, 1.1rem);
    color: var(--text-secondary);
    margin-bottom: 2.25rem;
    line-height: 1.6;
  }

  .section-subtitle {
    color: var(--color-cyan-light);
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin-bottom: 0.5rem;
    display: block;
  }

  .slide-text h2 {
    font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.25rem);
    margin-bottom: 1.25rem;
    line-height: 1.2;
  }

  .text-secondary {
    color: var(--text-secondary);
  }

  .mb-4 {
    margin-bottom: 1.5rem;
  }
  
  .mt-3 {
    margin-top: 1rem;
  }
  
  .mt-4 {
    margin-top: 1.5rem;
  }

  /* Fancy lists */
  .fancy-bullet-list {
    display: grid;
    gap: 1rem;
  }

  .fancy-bullet-list li {
    font-size: 0.9rem;
    line-height: 1.5;
    position: relative;
    padding-left: 1.75rem;
    color: var(--text-secondary);
  }

  .fancy-bullet-list li::before {
    content: '➔';
    position: absolute;
    left: 0;
    color: var(--color-accent-light);
    font-weight: bold;
  }

  .fancy-bullet-list.border-rose-list li::before {
    color: var(--color-rose-500);
  }

  .fancy-bullet-list.border-cyan-list li::before {
    color: var(--color-cyan-light);
  }

  /* Checked list */
  .check-list {
    display: grid;
    gap: 0.75rem;
  }
  
  .check-list li {
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
  }

  .check-list li::before {
    content: '✓';
    color: var(--color-accent-light);
    font-weight: bold;
  }

  /* Info Blocks */
  .info-block {
    background: rgba(255, 255, 255, 0.02);
    border-left: 3px solid var(--color-cyan);
    padding: 0.75rem 1.25rem;
    border-radius: 0 8px 8px 0;
  }

  .info-block.border-rose {
    border-left-color: var(--color-rose-500);
  }

  .info-block h5 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
  }

  .info-block p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
  }

  /* Presenter Stats Box */
  .profile-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
  }

  .p-stat {
    display: flex;
    flex-direction: column;
  }

  .p-num {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--color-cyan-light);
    line-height: 1;
  }

  .p-label {
    font-size: 0.8rem;
    color: var(--text-muted);
  }

  .compliance-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .c-badge {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
  }

  /* Interactive diagram styles */
  .interactive-diagram-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  }

  .interactive-diagram-card.alert-card {
    border-color: rgba(244, 63, 94, 0.25);
  }

  .diagram-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 1.5rem;
  }

  .diagram-title.text-red {
    color: var(--color-rose-500);
  }

  .compliance-kpis {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .comp-badge {
    padding: 0.65rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    border: 1px solid var(--border-color);
  }

  .comp-badge.active {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--color-accent-light);
  }

  .comp-badge.error {
    background: rgba(244, 63, 94, 0.08);
    border-color: rgba(244, 63, 94, 0.3);
    color: var(--color-rose-500);
  }

  /* KPIs Display Grids */
  .kpi-challenges-card {
    border-color: rgba(244, 63, 94, 0.2);
  }

  .kpi-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 1rem;
  }

  .kpi-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .kpi-mini-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: var(--transition-fast);
  }

  .kpi-mini-card:hover {
    transform: translateY(-2px);
  }

  .kpi-mini-card.danger {
    border-color: rgba(244, 63, 94, 0.3);
    background: rgba(244, 63, 94, 0.03);
  }

  .kpi-mini-card.danger .kpi-num {
    color: var(--color-rose-500);
  }

  .kpi-mini-card.warning {
    border-color: rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.03);
  }

  .kpi-mini-card.warning .kpi-num {
    color: var(--color-amber-500);
  }

  .kpi-mini-card.accent {
    border-color: rgba(6, 182, 212, 0.3);
    background: rgba(6, 182, 212, 0.03);
  }

  .kpi-mini-card.accent .kpi-num {
    color: var(--color-cyan-light);
  }

  .kpi-num {
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1;
  }

  .kpi-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 500;
  }

  /* Comparison Table design */
  .comparison-card {
    border-color: var(--border-glow);
  }

  .presentation-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.85rem;
    text-align: left;
  }

  .presentation-table th,
  .presentation-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
  }

  .presentation-table th {
    font-weight: 800;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
  }

  .presentation-table tr:hover td {
    background: rgba(255,255,255,0.01);
  }

  .font-bold {
    font-weight: 700;
  }

  .text-red {
    color: var(--color-rose-500);
  }

  .text-green {
    color: var(--color-accent-light);
  }

  /* Horizontal flowchart styles */
  .flow-chart-horizontal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 2rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    padding: 1.75rem 1.25rem;
    border-radius: 16px;
  }

  .flow-step-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    gap: 0.35rem;
  }

  .node-circle {
    width: 50px;
    height: 50px;
    background: rgba(6, 182, 212, 0.08);
    border: 1.5px solid rgba(6, 182, 212, 0.3);
    color: var(--color-cyan-light);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.35rem;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.1);
    transition: var(--transition-fast);
  }

  .flow-step-node:hover .node-circle {
    background: var(--color-cyan-500);
    color: var(--color-slate-950);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.35);
  }

  .flow-step-node strong {
    font-size: 0.85rem;
    color: var(--text-primary);
  }

  .flow-step-node span {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.3;
  }

  .flow-arrow-next {
    color: var(--color-cyan-light);
    font-weight: 900;
    font-size: 1.25rem;
    padding-bottom: 25px; /* offset down to align with circles */
  }

  .dashboard-wrapper {
    position: relative;
    border-radius: 20px;
    padding: 6px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 50px -10px rgba(0, 0, 0, 0.7);
  }

  .dashboard-img {
    border-radius: 14px;
    width: 100%;
    display: block;
    cursor: zoom-in;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .dashboard-img:hover {
    transform: scale(1.015);
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.25);
  }

  /* Grid 3 for Benefits (Slide 6) */
  .benefits-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
  }

  .benefit-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: left;
    transition: var(--transition-smooth);
    backdrop-filter: blur(8px);
  }

  .benefit-box:hover {
    border-color: var(--border-glow);
    box-shadow: 0 15px 30px -10px rgba(6, 182, 212, 0.15);
    transform: translateY(-4px);
  }

  .benefit-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
  }

  .benefit-box h4 {
    font-size: 1.05rem;
    font-weight: 850;
    margin-bottom: 0.75rem;
    color: var(--color-cyan-light);
  }

  .benefit-box p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
  }

  /* AI Agent preview styling (Slide 7) */
  .ai-agent-preview-card {
    background: #0b1122;
    border: 1px solid var(--border-glow);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 15px 35px -10px rgba(6, 182, 212, 0.12);
  }

  .agent-chat-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
  }

  .agent-avatar {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.15rem;
  }

  .block-cyan {
    background-color: var(--color-cyan-500) !important;
    color: var(--color-slate-950) !important;
  }

  .agent-chat-body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
  }

  .chat-msg {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    max-width: 85%;
    line-height: 1.5;
  }

  .chat-msg.user {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    align-self: flex-end;
    border-bottom-right-radius: 2px;
  }

  .chat-msg.system {
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.2);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
  }

  .block {
    display: block;
  }
  
  .text-xs {
    font-size: 0.75rem;
  }
  
  .text-green {
    color: var(--color-accent-light);
  }

  /* Transfer values card */
  .transfer-value-card h4 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-primary);
  }

  /* Expert Profiles */
  .expert-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    border-radius: 12px;
    transition: var(--transition-fast);
  }

  .expert-profile:hover {
    border-color: var(--border-glow);
    background: rgba(255,255,255,0.04);
  }

  .expert-avatar-placeholder {
    width: 44px;
    height: 44px;
    background: var(--color-accent);
    color: var(--color-slate-950);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 800;
    font-size: 0.95rem;
    flex-shrink: 0;
  }

  .expert-profile h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
  }

  .expert-profile p {
    font-size: 0.8rem;
    line-height: 1.4;
  }

  /* Stats overview card */
  .stats-overview-card {
    border-color: var(--border-glow);
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
  }

  /* Roadmap Grid for Slides (Slide 10) */
  .roadmap-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
  }

  .roadmap-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.75rem;
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
  }

  .roadmap-box.highlight-border {
    border-color: var(--color-cyan);
    box-shadow: 0 10px 25px -5px rgba(6, 182, 212, 0.15);
  }

  .box-header {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-accent-light);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    align-self: flex-start;
    margin-bottom: 1.25rem;
  }

  .box-header.header-cyan {
    background: rgba(6, 182, 212, 0.1);
    color: var(--color-cyan-light);
    border-color: rgba(6, 182, 212, 0.25);
  }

  .roadmap-box h4 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.3;
  }

  .roadmap-box ul {
    display: grid;
    gap: 0.5rem;
  }

  .roadmap-box li {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    position: relative;
    padding-left: 1rem;
  }

  .roadmap-box li::before {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background-color: var(--color-accent-light);
    border-radius: 50%;
    left: 0;
    top: 7px;
  }

  .roadmap-box.highlight-border li::before {
    background-color: var(--color-cyan-light);
  }

  .roadmap-box a {
    color: var(--color-cyan-light);
    text-decoration: underline;
  }

  /* Slide 11: Value Proposition */
  .value-bullets {
    display: grid;
    gap: 1.25rem;
  }

  .value-bullet {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
  }

  .bullet-num {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-accent-light);
    border: 1px solid rgba(16, 185, 129, 0.25);
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-top: 2px;
  }

  .value-bullet strong {
    color: var(--text-primary);
  }

  .value-bullet p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
  }

  /* Demo links styling */
  .demo-showcase-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .demo-showcase-card h3 {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
  }

  .demo-links-list {
    display: grid;
    gap: 1.25rem;
  }

  .demo-links-list li a {
    display: block;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    border-radius: 12px;
    transition: var(--transition-fast);
  }

  .demo-links-list li a:hover {
    border-color: var(--border-glow);
    background: rgba(255,255,255,0.04);
    transform: translateY(-2px);
  }

  .demo-links-list strong {
    display: block;
    font-size: 0.95rem;
    color: var(--color-cyan-light);
    margin-bottom: 0.25rem;
  }

  .demo-links-list span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
    display: block;
  }

  /* Slide 12: CTA Box */
  .contact-card-box {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid var(--border-glow);
    border-radius: 20px;
    padding: 3rem;
    text-align: left;
    margin-top: 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  }

  .contact-box-left h4 {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 1.25rem;
  }

  .contact-list-plain {
    display: grid;
    gap: 0.85rem;
  }

  .contact-list-plain li {
    font-size: 0.9rem;
    color: var(--text-secondary);
  }

  .contact-list-plain a {
    color: var(--color-cyan-light);
    text-decoration: underline;
  }

  .contact-box-right {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  /* Presentation Bottom Controller Bar */
  .presentation-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--ctrl-height);
    background: rgba(6, 9, 19, 0.92);
    border-top: 1px solid var(--border-color);
    display: none; /* controlled by JS body class mapping */
    align-items: center;
    justify-content: space-between;
    padding-inline: 2rem;
    z-index: 1000;
    backdrop-filter: blur(12px);
  }

  .ctrl-arrows {
    display: flex;
    align-items: center;
    gap: 1.5rem;
  }

  #slide-number {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    min-width: 100px;
    text-align: center;
  }

  .btn-ctrl {
    font-size: 0.85rem;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    height: 36px;
  }

  /* Welcome logos style (Slide 1) */
  .welcome-logos-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.75rem;
    margin-bottom: 2.25rem;
  }

  .welcome-logo {
    height: 72px;
    width: 72px;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(6, 182, 212, 0.2));
    transition: var(--transition-smooth);
  }

  .welcome-logo.round {
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
  }
  
  .welcome-logo:hover {
    transform: scale(1.08);
  }

  .logo-connector {
    color: var(--text-muted);
    font-size: 1.2rem;
    font-weight: 500;
    opacity: 0.6;
  }

  /* Presentation meta footer info */
  .presentation-meta-footer {
    display: flex;
    justify-content: center;
    gap: 3.5rem;
    margin-block: 3rem 2rem;
    padding-top: 1.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    max-width: 680px;
    margin-inline: auto;
  }

  .meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    text-align: center;
  }

  .meta-item-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
  }

  .meta-item-value {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 700;
  }
}

@layer pages {
  /* Dialog modal customized */
  .consult-dialog {
    border: none;
    background: transparent;
    padding: 0;
    max-width: 600px;
    width: 90%;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.15);
    z-index: 2000;
  }

  .consult-dialog[open] {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
  }

  .consult-dialog::backdrop {
    background: rgba(2, 4, 10, 0.85);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .consult-dialog[open]::backdrop {
    opacity: 1;
  }

  .dialog-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-glow);
    border-radius: 20px;
    padding: 2.5rem;
    color: var(--text-primary);
  }

  .dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
  }

  .dialog-header h3 {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--color-cyan-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .btn-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
  }

  .btn-close:hover {
    color: var(--color-rose-500);
  }

  .dialog-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.5;
  }

  .form-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .form-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
  }

  .required {
    color: var(--color-rose-500);
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    background: rgba(2, 4, 10, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition-fast);
  }

  .form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23cbd5e1'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.1rem;
    padding-right: 2.5rem;
  }

  .form-group input:focus,
  .form-group select:focus,
  .form-group textarea:focus {
    border-color: var(--color-cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
  }

  .form-group input.border-red-500,
  .form-group select.border-red-500 {
    border-color: var(--color-rose-500) !important;
  }

  .error-message {
    font-size: 0.75rem;
    color: var(--color-rose-500);
    min-height: 1.25rem;
    font-weight: 600;
  }

  .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
  }

  /* Toast Notification */
  .toast {
    position: fixed;
    bottom: 5rem;
    right: 2.5rem;
    z-index: 2500;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }

  .toast.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .toast-content {
    background: var(--bg-surface);
    border: 1px solid var(--color-accent);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(16, 185, 129, 0.2);
  }

  .toast-icon {
    font-size: 1.5rem;
  }

  .toast-text {
    display: flex;
    flex-direction: column;
  }

  .toast-text strong {
    font-size: 0.9rem;
    color: var(--text-primary);
  }

  .toast-text span {
    font-size: 0.8rem;
    color: var(--text-secondary);
  }
}

/* ==========================================================================
   Responsive Presentation Styling
   ========================================================================== */
@media (max-width: 1024px) {
  .slide-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .slide-container {
    height: auto;
    overflow-y: auto;
    padding-vertical: 2rem;
    max-height: 90%;
  }

  .flow-grid-presentation {
    justify-content: center;
  }

  .benefits-grid-3,
  .roadmap-grid-3 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .contact-card-box {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.75rem;
  }

  .flow-chart-horizontal {
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem 1rem;
  }

  .flow-arrow-next {
    transform: rotate(90deg);
    padding-bottom: 0;
    margin-block: 0.25rem;
  }
}

@media (max-width: 768px) {
  :root {
    --ribbon-height: 50px;
    --ctrl-height: 50px;
  }

  .presenter-meta {
    font-size: 0.72rem;
  }
  
  .ribbon-title {
    display: none;
  }

  /* Slide 1 Mobile Styles */
  .welcome-logos-wrapper {
    gap: 1.25rem;
    margin-bottom: 1.5rem;
  }

  .welcome-logo {
    height: 52px;
    width: 52px;
  }

  .logo-connector {
    font-size: 1rem;
  }

  .presentation-meta-footer {
    flex-direction: column;
    gap: 1rem;
    margin-block: 2rem 1.5rem;
    padding-top: 1.25rem;
  }

  .meta-item {
    gap: 0.15rem;
  }

  .container {
    width: 96%;
  }

  .slide-container {
    width: 96%;
  }

  .slide-section {
    padding-inline: 0.25rem;
  }

  body.mode-scroll .slide-container {
    width: 96%;
  }

  .glass-card {
    padding: 1.25rem 0.75rem;
  }

  .contact-card-box {
    padding: 1.25rem 0.75rem;
  }

  /* Make sidebar cover the deck on small viewports */
  .slide-sidebar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
  }

  .slide-sidebar.hidden {
    margin-left: -280px;
  }

  .presentation-controls {
    padding-inline: 1rem;
  }

  #btn-fullscreen {
    display: none; /* Hide fullscreen button on mobile */
  }

  .btn-ctrl {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
  }
}

/* Active Autoplay Button Styling */
#btn-autoplay.active-play {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
  color: var(--color-accent-light) !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

/* Scroll Margins for Document Mode Navigation */
body.mode-scroll .slide-section {
  scroll-margin-top: var(--ribbon-height);
}

/* Floating Back-to-Top Button */
.btn-back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: rgba(11, 17, 34, 0.85);
  border: 1px solid rgba(6, 182, 212, 0.25);
  color: var(--color-cyan-light);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  pointer-events: none;
  z-index: 999;
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  transform: translateY(15px);
}

.btn-back-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.btn-back-to-top:hover {
  background: var(--color-cyan-500);
  color: var(--color-slate-950);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
  transform: translateY(-3px);
}

/* Print Styles */
@media print {
  body {
    background: white;
    color: black;
  }
  header, footer, button, dialog, .toast {
    display: none !important;
  }
}

/* ==========================================================================
   Image Lightbox Modal
   ========================================================================== */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(2, 4, 10, 0.95);
  backdrop-filter: blur(16px);
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.show {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  max-width: 90%;
  max-height: 85%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox.show .lightbox-content {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 2.5rem;
  font-weight: 300;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition-fast);
  z-index: 10001;
}

.lightbox-close:hover {
  color: var(--color-cyan-light);
}

.lightbox-caption {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: center;
  width: 80%;
  font-weight: 500;
}

.qr-img {
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.qr-img:hover {
  transform: scale(1.02);
}

/* ==========================================================================
   Horizontal Layout Fixes for 16:9 Screen Presentation Mode
   ========================================================================== */
body.mode-slides .slide-container {
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

body.mode-slides .dashboard-img {
  max-height: 42vh;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  margin-inline: auto;
  border-radius: 12px;
}

/* For slides with both card & image (Slide 8, 11), arrange them horizontally on desktop slides mode */
@media (min-width: 1025px) {
  /* Scale root font-size up to 2.7x / 3x (gấp 3 lần) for slides presentation, ensuring highly visible text */
  html.mode-slides {
    font-size: 270% !important;
  }
  html.mode-slides:fullscreen {
    font-size: 300% !important;
  }
  html.mode-slides:-webkit-full-screen {
    font-size: 300% !important;
  }

  /* Lock navigation & UI elements to original sizes to prevent layout breaks */
  body.mode-slides .presenter-ribbon {
    font-size: 13px !important;
    height: 48px !important;
  }
  body.mode-slides .presenter-meta {
    font-size: 10.5px !important;
    gap: 0.4rem !important;
  }
  body.mode-slides .ribbon-logo {
    height: 20px !important;
    width: 20px !important;
  }
  body.mode-slides .ribbon-badge {
    font-size: 9px !important;
    padding: 0.1rem 0.35rem !important;
  }
  body.mode-slides .ribbon-title {
    font-size: 11px !important;
    padding-left: 0.4rem !important;
  }
  body.mode-slides .btn-mode {
    width: 26px !important;
    height: 26px !important;
    font-size: 13px !important;
    border-radius: 6px !important;
  }
  body.mode-slides .presentation-controls {
    font-size: 12.5px !important;
    height: 45px !important;
    padding: 0.15rem 1rem !important;
  }
  body.mode-slides .btn-ctrl {
    padding: 0.2rem 0.5rem !important;
    font-size: 11px !important;
  }
  body.mode-slides #slide-number {
    font-size: 11.5px !important;
  }
  body.mode-slides .slide-sidebar {
    width: 220px !important;
    font-size: 11.5px !important;
  }
  body.mode-slides .slide-sidebar.hidden {
    margin-left: -220px !important;
  }
  body.mode-slides .sidebar-header {
    padding: 0.5rem !important;
  }
  body.mode-slides .sidebar-header h3 {
    font-size: 12px !important;
  }
  body.mode-slides .sidebar-item {
    padding: 0.4rem 0.6rem !important;
    font-size: 11px !important;
  }

  /* Structural Adjustments to slide layout to prevent vertical overflow with large text */
  body.mode-slides .slide-container {
    max-height: 84vh !important;
    padding: 0.25rem 0.75rem !important;
    width: 96% !important;
    max-width: 1700px !important;
  }

  /* Tighten spacing between text and graphics column */
  body.mode-slides .slide-grid {
    gap: 2rem !important;
    grid-template-columns: 1.15fr 0.85fr !important;
  }
  body.mode-slides .slide-grid-center {
    max-width: 1300px !important;
  }

  /* Compact glass cards padding */
  body.mode-slides .glass-card {
    padding: 0.65rem 0.95rem !important;
    border-radius: 10px !important;
  }
  
  /* Shrink images dynamically in slide mode to give more room for the big texts */
  body.mode-slides .dashboard-img {
    max-height: 24vh !important; /* down from 28vh */
  }

  body.mode-slides .slide-graphics {
    display: flex;
    flex-direction: row;
    gap: 0.5rem !important;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  body.mode-slides .slide-graphics > * {
    flex: 1;
    min-width: 0;
  }

  /* If only one child, keep it full width of column */
  body.mode-slides .slide-graphics > *:only-child {
    flex: none;
    width: 100%;
  }

  /* Tune fonts and vertical spacings dynamically to fit beautifully */
  body.mode-slides .slide-text h2 {
    font-size: 1.45rem !important; /* ~70px under 300% root scale */
    margin-bottom: 0.45rem !important;
  }
  body.mode-slides .slide-text p {
    font-size: 0.75rem !important; /* ~36px */
    margin-bottom: 0.45rem !important;
    line-height: 1.35 !important;
  }
  body.mode-slides .section-subtitle {
    font-size: 0.6rem !important;
    margin-bottom: 0.2rem !important;
  }
  body.mode-slides .fancy-bullet-list li,
  body.mode-slides .check-list li {
    font-size: 0.68rem !important; /* ~32px */
    margin-bottom: 0.25rem !important;
    line-height: 1.35 !important;
  }

  /* Specific Slide Components tuning */
  body.mode-slides .kpi-grid,
  body.mode-slides .kpi-grid-2 {
    gap: 0.35rem !important;
  }
  body.mode-slides .kpi-mini-card {
    padding: 0.35rem !important;
  }
  body.mode-slides .kpi-mini-card .kpi-num {
    font-size: 1.25rem !important;
  }
  body.mode-slides .kpi-mini-card .kpi-label {
    font-size: 0.58rem !important;
  }

  /* Table padding shrink (Slide 4) */
  body.mode-slides .presentation-table th,
  body.mode-slides .presentation-table td {
    padding: 0.25rem 0.35rem !important;
    font-size: 0.68rem !important;
  }

  /* Flow chart step sizes (Slide 5) */
  body.mode-slides .flow-chart-horizontal {
    margin-top: 0.75rem !important;
    padding: 0.5rem !important;
    gap: 0.15rem !important;
  }
  body.mode-slides .flow-step-node {
    gap: 0.15rem !important;
  }
  body.mode-slides .node-circle {
    width: 36px !important;
    height: 36px !important;
    font-size: 0.95rem !important;
  }
  body.mode-slides .flow-step-node strong {
    font-size: 0.68rem !important;
  }
  body.mode-slides .flow-step-node span {
    font-size: 0.55rem !important;
  }

  /* Info blocks shrink (Slide 3) */
  body.mode-slides .info-block {
    padding: 0.4rem 0.6rem !important;
    margin-bottom: 0.35rem !important;
  }
  body.mode-slides .info-block h5 {
    font-size: 0.75rem !important;
    margin-bottom: 0.15rem !important;
  }
  body.mode-slides .info-block p {
    font-size: 0.65rem !important;
  }

  /* Slide 8 and 11 detail layout refinements */
  body.mode-slides .transfer-value-card {
    padding: 0.5rem 0.65rem !important;
  }
  body.mode-slides .transfer-value-card .card-title {
    font-size: 0.8rem !important;
    margin-bottom: 0.35rem !important;
  }
  body.mode-slides .check-list {
    margin-bottom: 0.35rem !important;
  }

  body.mode-slides .demo-showcase-card {
    padding: 0.5rem 0.65rem !important;
  }
  body.mode-slides .demo-showcase-card h3 {
    font-size: 0.78rem !important;
    margin-bottom: 0.35rem !important;
  }
  body.mode-slides .demo-links-list li {
    margin-bottom: 0.25rem !important;
  }
  body.mode-slides .demo-link-header strong {
    font-size: 0.72rem !important;
  }
  body.mode-slides .demo-link-header .badge {
    font-size: 0.55rem !important;
    padding: 0.05rem 0.25rem !important;
  }
  body.mode-slides .demo-links-list .text-secondary {
    font-size: 0.62rem !important;
  }

  /* Slide 12 Contact adjustments */
  body.mode-slides .contact-card-box {
    padding: 0.75rem !important;
    gap: 0.75rem !important;
  }
  body.mode-slides .contact-box-left h4 {
    font-size: 0.8rem !important;
    margin-bottom: 0.35rem !important;
  }
  body.mode-slides .contact-list-plain li {
    font-size: 0.68rem !important;
    margin-bottom: 0.25rem !important;
  }
  body.mode-slides .qr-wrapper {
    padding: 0.35rem !important;
  }
  body.mode-slides .qr-wrapper img {
    max-height: 12vh !important;
  }

  /* Lightbox overrides for fullscreen */
  .lightbox-content img {
    max-height: 80vh !important;
  }
}
