
/* Modern Tutorial Website Styles with Dark Mode */
:root {
  --primary: #3b82f6;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --accent: #10b981;
  --accent-light: #d1fae5;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #ced4da;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --code-bg: #1e293b;
  --code-text: #e2e8f0;
  --sidebar-width: 380px;
  --content-max-width: 1800px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --border-radius: 12px;
  --border-radius-sm: 8px;

  /* Light theme variables */
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --card-bg: #ffffff;
  --border-color: #e5e7eb;
  --hero-overlay: rgba(255, 255, 255, 0.1);
}

/* Dark theme variables */
[data-theme="dark"] {
  --bg-primary: #111827;
  --bg-secondary: #1f2937;
  --bg-hero: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --card-bg: #1f2937;
  --border-color: #374151;
  --hero-overlay: rgba(0, 0, 0, 0.3);
  --gray-50: #1f2937;
  --gray-100: #374151;
  --gray-200: #4b5563;
  --primary-light: rgba(59, 130, 246, 0.1);
}

/* Typography */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

code, pre {
  font-family: 'Fira Code', monospace;
}

/* Dark Mode Toggle */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 50px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-md);
}

.theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.theme-toggle-icon {
  font-size: 18px;
  transition: transform 0.3s ease;
}

[data-theme="dark"] .theme-toggle .sun-icon {
  display: none;
}

[data-theme="light"] .theme-toggle .moon-icon,
:root .theme-toggle .moon-icon {
  display: none;
}

/* Enhanced Hero Section */
.hero-section {
  background: var(--bg-hero) !important;
  min-height: 20vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius) !important;
  margin-bottom: 3rem !important;
  box-shadow: var(--shadow-lg);
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--hero-overlay);
  backdrop-filter: blur(10px);
}

.hero-section .container {
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-section h1 {
  font-size: 4rem;
  font-weight: 800;
  color: white;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 1s ease-out;
}

.hero-section .lead {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-search {
  animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-search .input-group {
  max-width: 600px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
  border-radius: 50px;
  overflow: hidden;
}

.hero-search .form-control {
  border: none;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

.hero-search .btn {
  border: none;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  font-weight: 600;
  transition: all 0.3s ease;
}

.hero-search .btn:hover {
  transform: translateX(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

/* Enhanced Tutorial Cards */
.tutorial-card {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--card-bg);
  overflow: hidden;
  position: relative;
  height: 100%;
}

.tutorial-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.tutorial-card:hover::before {
  transform: scaleX(1);
}

.tutorial-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-light);
}

[data-theme="dark"] .tutorial-card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.tutorial-card .card-body {
  padding: 1.5rem;
  background: var(--card-bg);
  color: var(--text-primary);
}

.tutorial-card .card-title {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.tutorial-card .card-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.tutorial-card .card-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
}

.tutorial-card .card-footer small {
  color: var(--text-secondary);
}

/* Enhanced Badges */
.badge {
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  overflow: hidden;
}

.badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.tutorial-card:hover .badge::before {
  left: 100%;
}

.bg-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.bg-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.bg-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

/* Category Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

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

.card-title {
  color: var(--text-primary);
}

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

.btn-outline-primary {
  border-color: var(--primary);
  color: var(--primary);
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* Container and Layout */
.container {
  color: var(--text-primary);
}

.container h2 {
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 2rem;
  position: relative;
}

.container h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 2px;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.animate-pulse {
  animation: pulse 2s infinite;
}

/* Keep all existing tutorial-related styles */
.tutorial-container {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--primary-light) 100%);
}

.tutorial-wrapper {
  display: flex;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  min-height: 100vh;
  gap: 2rem;
  padding: 0 1rem;
}

.tutorial-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  position: sticky;
  top: 6.7rem;
  height: calc(100vh - 4rem);
  overflow-y: auto;
  background: linear-gradient(145deg, var(--card-bg) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
  padding: 0;
}

.sidebar-sticky {
  padding: 1.5rem;
}

.sidebar-header {
  padding: 0 0 1rem 0;
  border-bottom: 2px solid var(--primary-light);
  margin-bottom: 1.5rem;
}

.sidebar-header h5 {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0;
  line-height: 1.4;
}

.nav.flex-column {
  gap: 0.25rem;
}

.nav-item {
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  transition: all 0.2s ease;
}

.nav-link {
  padding: 0.875rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--border-radius-sm);
  border-left: 4px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  position: relative;
  display: flex;
  align-items: center;
  background: transparent;
}

.nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  transition: width 0.3s ease;
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

.nav-link:hover {
  color: var(--primary);
  background-color: var(--primary-light);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.nav-link:hover::before {
  width: 4px;
}

.nav-link.active {
  color: var(--primary);
  background: linear-gradient(135deg, var(--primary-light) 0%, rgba(59, 130, 246, 0.1) 100%);
  border-left-color: var(--primary);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.nav-link.active::before {
  width: 4px;
}

.tutorial-content-container {
  flex: 1;
  max-width: var(--content-max-width);
  margin: 2rem 0;
}

.tutorial-content {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  border: 1px solid var(--border-color);
}

.tutorial-content header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-color);
}

.tutorial-content h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.content {
  line-height: 1.8;
  font-size: 1.125rem;
  color: var(--text-secondary);
}

.content h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2.5rem 0 1.5rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-light);
}

.content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 2rem 0 1rem 0;
}

.content p {
  margin-bottom: 1.5rem;
}

.content ul, .content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.content li {
  margin-bottom: 0.5rem;
}

.content code {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--border-color) 100%);
  color: var(--primary-dark);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-family: 'Fira Code', 'JetBrains Mono', monospace;
  font-size: 0.9em;
  font-weight: 500;
}

.content pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  overflow-x: auto;
  position: relative;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: 0.9rem;
}

.copy-code {
  position: absolute;
  right: 1rem;
  top: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: var(--border-radius-sm);
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  cursor: pointer;
  opacity: 0;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.content pre:hover .copy-code {
  opacity: 1;
}

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

.tutorial-navigation {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.tutorial-navigation .btn {
  display: inline-flex;
  align-items: center;
  padding: 0.875rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid;
  min-width: 200px;
  justify-content: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .tutorial-wrapper {
    flex-direction: column;
    gap: 1rem;
  }

  .tutorial-sidebar {
    width: 100%;
    position: static;
    height: auto;
    order: 2;
  }

  .tutorial-content-container {
    max-width: 100%;
    order: 1;
  }

  .tutorial-content {
    padding: 1.5rem;
  }

  .tutorial-content h1 {
    font-size: 2rem;
  }

  .hero-section h1 {
    font-size: 2.5rem;
  }

  .hero-section .lead {
    font-size: 1.2rem;
  }
}

@media (max-width: 640px) {
  .tutorial-wrapper {
    padding: 0 0.5rem;
  }

  .tutorial-content {
    padding: 1rem;
  }

  .tutorial-navigation {
    flex-direction: column;
  }

  .tutorial-navigation .btn {
    min-width: auto;
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .hero-section .lead {
    font-size: 1rem;
  }

  .theme-toggle {
    top: 10px;
    right: 10px;
    padding: 6px 12px;
  }
}

.tutorial-sidebar::-webkit-scrollbar {
  width: 6px;
}

.tutorial-sidebar::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 3px;
}

.tutorial-sidebar::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.tutorial-sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

.tutorial-content {
  animation: fadeInUp 0.6s ease-out;
}

.nav-link:focus,
.btn:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}


/* Share , Bookmark, Social Media button*/
.action-card {
  background-color: #f9f9f9;
  border: 1px solid var(--gray-200, #ddd);
}

.btn-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
}

.btn-social:hover {
  transform: scale(1.02);
}

.btn-facebook {
  background-color: #3b5998;
  color: white;
}
.btn-facebook:hover {
  background-color: #2d4373;
}

.btn-whatsapp {
  background-color: #25D366;
  color: white;
}
.btn-whatsapp:hover {
  background-color: #1ebe5d;
}

.btn-twitter {
  background-color: #000000;
  color: white;
}
.btn-twitter:hover {
  background-color: #222222;
}

.btn-linkedin {
  background-color: #0077b5;
  color: white;
}
.btn-linkedin:hover {
  background-color: #005983;
}