/* ============================================
   AWS AMPLIFY DEVELOPER COURSE - COMPILED CSS
   ============================================
   This is a compiled version of the SCSS files.
   To customize branding, edit the variables at the top.
*/

/* --------------------------------------------
   CSS VARIABLES (Edit these to customize)
   -------------------------------------------- */
:root {
  /* Primary Colors */
  --brand-primary: #6366f1;
  --brand-primary-dark: #4f46e5;
  --brand-primary-light: #818cf8;
  
  /* Secondary Colors */
  --brand-secondary: #10b981;
  --brand-secondary-dark: #059669;
  --brand-secondary-light: #34d399;
  
  /* Neutral Colors */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Semantic Colors */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-info: #3b82f6;
  
  /* Code Block Colors */
  --code-bg: #1e293b;
  --code-text: #e2e8f0;
  
  /* Typography */
  --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-code: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  
  /* Layout */
  --sidebar-width: 280px;
  --content-max-width: 900px;
  --border-radius: 8px;
  --border-radius-lg: 12px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
}

/* --------------------------------------------
   RESET & BASE
   -------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family-base);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--gray-800);
  background-color: var(--gray-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------
   TYPOGRAPHY
   -------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-base);
  font-weight: 700;
  line-height: 1.25;
  color: var(--gray-900);
  margin-top: 0;
}

h1 {
  font-size: 2.25rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.875rem;
  margin-bottom: 1.25rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-200);
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--gray-800);
}

h4 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--gray-700);
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--brand-primary-dark);
  text-decoration: underline;
}

strong {
  font-weight: 600;
}

/* --------------------------------------------
   LAYOUT
   -------------------------------------------- */
.course-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--gray-50);
  border-right: 1px solid var(--gray-200);
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.sidebar-header .logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.sidebar-header .logo img,
.sidebar-header .logo svg {
  width: 40px;
  height: 40px;
}

.sidebar-header .logo span {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gray-900);
}

.sidebar-nav {
  flex: 1;
  padding: 1rem;
}

.nav-section {
  margin-bottom: 1.5rem;
}

.nav-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
  padding: 0 0.75rem;
}

.nav-item {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--border-radius);
  color: var(--gray-600);
  font-size: 0.875rem;
  transition: all var(--transition-fast);
  margin-bottom: 2px;
  text-decoration: none;
}

.nav-item:hover {
  background: var(--gray-100);
  color: var(--gray-900);
  text-decoration: none;
}

.nav-item.active {
  background: rgba(99, 102, 241, 0.1);
  color: var(--brand-primary);
  font-weight: 500;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

.content-header {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--gray-500);
}

.breadcrumb a {
  color: var(--gray-500);
}

.breadcrumb a:hover {
  color: var(--brand-primary);
}

.breadcrumb .separator {
  color: var(--gray-300);
}

.breadcrumb .current {
  color: var(--gray-700);
  font-weight: 500;
}

.content-body {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 2rem;
}

/* --------------------------------------------
   COMPONENTS
   -------------------------------------------- */

/* Cards */
.card {
  background: var(--gray-50);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--border-radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--brand-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--brand-primary-dark);
  text-decoration: none;
}

/* Code blocks */
pre {
  background: var(--code-bg);
  border-radius: var(--border-radius);
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
}

pre code {
  font-family: var(--font-family-code);
  font-size: 0.875rem;
  color: var(--code-text);
  line-height: 1.75;
  background: transparent;
  padding: 0;
}

code {
  font-family: var(--font-family-code);
  font-size: 0.9em;
  background: var(--gray-100);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  color: var(--brand-primary-dark);
}

/* Callouts */
.callout {
  padding: 1rem 1.25rem;
  border-radius: var(--border-radius);
  margin: 1.25rem 0;
  display: flex;
  gap: 0.75rem;
}

.callout-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  font-size: 1.25rem;
}

.callout-content {
  flex: 1;
}

.callout-content strong {
  display: block;
  margin-bottom: 0.25rem;
}

.callout-content p:last-child {
  margin-bottom: 0;
}

.callout-info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.callout-info .callout-icon {
  color: var(--color-info);
}

.callout-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.callout-warning .callout-icon {
  color: var(--color-warning);
}

.callout-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.callout-success .callout-icon {
  color: var(--color-success);
}

.callout-danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.callout-danger .callout-icon {
  color: var(--color-error);
}

/* Module cards (for index page) */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.module-card {
  background: var(--gray-100);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  padding: 1.5rem;
  transition: all var(--transition-fast);
  text-decoration: none;
  display: block;
}

.module-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--brand-primary-light);
  text-decoration: none;
  transform: translateY(-2px);
}

.module-number {
  display: inline-block;
  background: rgba(99, 102, 241, 0.1);
  color: var(--brand-primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.module-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.module-description {
  color: var(--gray-600);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.module-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--gray-500);
}

.module-meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Navigation footer */
.lesson-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-200);
}

.lesson-nav .nav-link {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--gray-200);
  text-decoration: none;
  transition: all var(--transition-fast);
  max-width: 45%;
}

.lesson-nav .nav-link:hover {
  border-color: var(--brand-primary-light);
  background: rgba(99, 102, 241, 0.02);
}

.lesson-nav .nav-label {
  font-size: 0.75rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.lesson-nav .nav-title {
  font-weight: 500;
  color: var(--brand-primary);
}

.lesson-nav .prev {
  align-items: flex-start;
}

.lesson-nav .next {
  align-items: flex-end;
  margin-left: auto;
}

/* Table styles */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.875rem;
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}

th {
  background: var(--gray-50);
  font-weight: 600;
  color: var(--gray-700);
}

tr:hover td {
  background: var(--gray-50);
}

/* Lists */
ul, ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
  line-height: 1.75;
}

/* Footer */
.course-footer {
  padding: 1.5rem 2rem;
  background: var(--gray-100);
  border-top: 1px solid var(--gray-200);
  margin-top: 3rem;
}

.footer-content {
  max-width: var(--content-max-width);
  margin: 0 auto;
  text-align: center;
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* Hero section for index */
.hero {
  text-align: center;
  padding: 3rem 0;
}

.hero-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
}

.hero-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  border: none;
  padding-top: 0;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin: 2rem 0;
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand-primary);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* Section headers */
.section-header {
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.5rem;
  border: none;
  padding-top: 0;
  margin-bottom: 0.5rem;
}

.section-description {
  color: var(--gray-600);
}

/* --------------------------------------------
   RESPONSIVE
   -------------------------------------------- */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .content-body {
    padding: 1rem;
  }
  
  h1 {
    font-size: 1.875rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .lesson-nav {
    flex-direction: column;
    gap: 1rem;
  }
  
  .lesson-nav .nav-link {
    max-width: 100%;
  }
  
  .stats {
    flex-wrap: wrap;
    gap: 1.5rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
}

/* --------------------------------------------
   SYNTAX HIGHLIGHTING (basic)
   -------------------------------------------- */
.hljs-keyword,
.hljs-selector-tag,
.hljs-built_in,
.hljs-name,
.hljs-tag {
  color: #f472b6;
}

.hljs-string,
.hljs-title,
.hljs-section,
.hljs-attribute,
.hljs-literal,
.hljs-template-tag,
.hljs-template-variable,
.hljs-type,
.hljs-addition {
  color: #34d399;
}

.hljs-comment,
.hljs-quote,
.hljs-deletion,
.hljs-meta {
  color: #64748b;
}

.hljs-function,
.hljs-class .hljs-title {
  color: #60a5fa;
}

.hljs-number {
  color: #fbbf24;
}

/* --------------------------------------------
   DARK MODE THEME
   -------------------------------------------- */
.dark-mode {
  --brand-primary: #818cf8;
  --brand-primary-dark: #6366f1;
  --brand-primary-light: #a5b4fc;
  
  --gray-50: #0f172a;
  --gray-100: #1e293b;
  --gray-200: #334155;
  --gray-300: #475569;
  --gray-400: #64748b;
  --gray-500: #94a3b8;
  --gray-600: #cbd5e1;
  --gray-700: #e2e8f0;
  --gray-800: #f1f5f9;
  --gray-900: #f8fafc;
  
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --info: #38bdf8;
  
  --sidebar-bg: #0f172a;
  --sidebar-text: #e2e8f0;
  --sidebar-hover: #1e293b;
  --sidebar-active: #6366f1;
  
  --content-bg: #1e293b;
  --content-text: #e2e8f0;
  --heading-color: #f8fafc;
  
  --code-bg: #0f172a;
  --code-text: #e2e8f0;
  --code-border: #334155;
  
  --border-color: #334155;
  --shadow-color: rgba(0, 0, 0, 0.4);
}

/* Theme Toggle Button */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--gray-100);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: auto;
}

.theme-toggle:hover {
  background: var(--gray-200);
  transform: scale(1.05);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: var(--gray-600);
  transition: fill 0.2s ease;
}

.theme-toggle:hover svg {
  fill: var(--brand-primary);
}

/* Sun icon (shown in dark mode) */
.theme-toggle .icon-sun {
  display: none;
}

/* Moon icon (shown in light mode) */
.theme-toggle .icon-moon {
  display: block;
}

.dark-mode .theme-toggle .icon-sun {
  display: block;
}

.dark-mode .theme-toggle .icon-moon {
  display: none;
}

/* Sidebar header adjustment for toggle */
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-header .logo {
  flex-shrink: 0;
}

.sidebar-header h1 {
  flex: 1;
  min-width: 0;
}

/* Dark mode specific overrides for elements with hardcoded colors */
.dark-mode body {
  background-color: #0f172a;
  color: #e2e8f0;
}

.dark-mode .sidebar {
  background: #0f172a;
  border-right-color: #334155;
}

.dark-mode .sidebar-header {
  border-bottom-color: #334155;
}

.dark-mode .content-header {
  background: #1e293b;
  border-bottom-color: #334155;
}

.dark-mode .card,
.dark-mode .module-card {
  background: #1e293b;
  border-color: #334155;
}

.dark-mode .module-card:hover {
  border-color: #818cf8;
}

.dark-mode .callout {
  border-color: #334155;
}

.dark-mode .callout-info {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
}

.dark-mode .callout-warning {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
}

.dark-mode .callout-success {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
}

.dark-mode .callout-danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
}

.dark-mode .lesson-nav .nav-link {
  background: #1e293b;
  border-color: #334155;
}

.dark-mode .lesson-nav .nav-link:hover {
  background: #334155;
  border-color: #818cf8;
}

.dark-mode table th {
  background: #1e293b;
}

.dark-mode table tr:hover td {
  background: #1e293b;
}

.dark-mode code {
  background: #334155;
  color: #a5b4fc;
}

.dark-mode pre {
  background: #0f172a;
  border: 1px solid #334155;
}

.dark-mode pre code {
  color: #e2e8f0;
}

.dark-mode .course-footer {
  background: #0f172a;
  border-top-color: #334155;
}

.dark-mode h2 {
  border-top-color: #334155;
}

.dark-mode .nav-item.active {
  background: rgba(129, 140, 248, 0.15);
}
