@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --primary-light: #818cf8;
  --secondary: #6366f1;
  --bg-main: #f9fafb;
  --bg-white: #ffffff;
  --sidebar-bg: #1e1b4b;
  --text-main: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --shadow:
    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);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  max-width: 100vw; /* Force all elements to not exceed viewport width */
}

html,
body {
  overflow-x: hidden;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background-color: var(--sidebar-bg);
  color: white;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
  text-decoration: none;
  color: white;
}

.logo-img {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.25rem;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.nav-menu {
  list-style: none;
  flex-grow: 1;
}

.nav-item {
  margin-bottom: 0.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: #9ca3af;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.2s;
  font-weight: 500;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: white;
}

.nav-link.active {
  background-color: var(--primary);
  color: white;
}

.nav-link i {
  width: 20px;
  text-align: center;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 3rem 4rem;
  max-width: 1200px;
}

/* Sections */
section {
  display: none;
  animation: fadeIn 0.5s ease-in-out;
  margin-bottom: 5rem;
}

section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
  color: var(--text-main);
}

h2 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

p {
  color: var(--text-muted);
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  max-width: 800px;
}

/* Feature Cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.card {
  background-color: var(--bg-white);
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  width: 48px;
  height: 48px;
  background-color: #eef2ff;
  color: var(--primary);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 1rem;
  margin-bottom: 0;
}

/* Image Display */
.img-container {
  background-color: #eaedff;
  border-radius: 1.5rem;
  padding: 1rem;
  margin-top: 2rem;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.img-container img {
  width: 100%;
  height: auto;
  border-radius: 1rem;
  display: block;
  transition: transform 0.3s;
}

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

.context-box {
  background-color: var(--bg-white);
  border-left: 4px solid var(--primary);
  padding: 1.25rem 1.5rem;
  margin-top: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
}

.context-box p {
  margin-bottom: 0;
  font-size: 1.05rem;
  color: var(--text-main);
}

/* Badge */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  background-color: #eef2ff;
  color: var(--primary);
}

/* Steps */
.step-list {
  margin-top: 2rem;
  list-style: none;
}

.step-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.step-number {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background-color: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: bold;
}

.step-content strong {
  display: block;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

/* Overlay for mobile menu */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.overlay.active {
  display: block;
  opacity: 1;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
  width: 40px;
  height: 40px;
  background-color: var(--sidebar-bg);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.25rem;
  z-index: 101;
  cursor: pointer;
  transition: transform 0.2s;
}

.menu-toggle:hover {
  transform: scale(1.1);
}

/* Responsive */
@media (max-width: 1200px) {
  .main-content {
    padding: 3rem;
    max-width: none; /* Allow content to fill space */
  }
}

@media (max-width: 1024px) {
  .sidebar {
    width: 80px;
    padding: 2rem 1rem;
  }
  .logo-text,
  .nav-text {
    display: none;
  }
  .main-content {
    margin-left: 80px;
    padding: 2rem;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    width: 280px; /* Full width when open */
    box-shadow: var(--shadow-lg);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar.open .logo-text,
  .sidebar.open .nav-text {
    display: inline; /* Show text when open */
  }

  .main-content {
    margin-left: 0;
    padding: 6rem 1.5rem 2rem 1.5rem; /* Add top padding for menu toggle */
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  p {
    font-size: 1rem;
    max-width: 100%; /* Remove fixed max-width */
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .img-container {
    padding: 0.75rem;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 5rem 1rem 2rem 1rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.375rem;
  }

  .card {
    padding: 1.25rem;
  }

  .context-box {
    padding: 1rem;
  }
}
