/* === UX/SEO Improvements === */

/* Smooth scrolling behavior */
html {
  scroll-behavior: smooth;
}

/* Enhanced Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 52, 96, 0.5);
}

::-webkit-scrollbar-thumb {
  background: #209cee;
  border-radius: 5px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: #2db3ff;
}

/* Firefox Scrollbar */
* {
  scrollbar-color: #209cee rgba(15, 52, 96, 0.5);
  scrollbar-width: thin;
}

/* Feature Card Hover Effects */
.feature-card {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border-radius: 8px;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(32, 156, 238, 0.3);
  background: rgba(32, 156, 238, 0.1);
}

/* Icon Styles (CSS-based instead of Emoji) */
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(32, 156, 238, 0.15);
  font-size: 24px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
  background: rgba(32, 156, 238, 0.3);
  transform: scale(1.1);
}

/* Icon symbols using CSS ::before */
.icon-practice::before {
  content: "💻";
  font-size: 28px;
}

.icon-video::before {
  content: "🎥";
  font-size: 28px;
}

.icon-concept::before {
  content: "📚";
  font-size: 28px;
}

.icon-updates::before {
  content: "⚡";
  font-size: 28px;
}

.icon-path::before {
  content: "🗺️";
  font-size: 28px;
}

.icon-projects::before {
  content: "🚀";
  font-size: 28px;
}

/* Copy Code Button */
.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.copy-code-btn {
  background: #209cee;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.copy-code-btn:hover {
  background: #2db3ff;
  box-shadow: 0 4px 12px rgba(32, 156, 238, 0.3);
}

.copy-code-btn:active {
  transform: scale(0.95);
}

.copy-code-btn.copied {
  background: #4caf50;
}

/* Accessibility: Focus states */
.feature-card:focus-within,
.copy-code-btn:focus {
  outline: 2px solid #209cee;
  outline-offset: 2px;
}

/* Loading states for lazy-loaded images */
img[loading="lazy"] {
  transition: opacity 0.3s ease;
}

img[loading="lazy"]:not([src=""]) {
  opacity: 1;
}

/* Media Queries for responsiveness */
@media (max-width: 768px) {
  .feature-card:hover {
    transform: translateY(-4px);
  }

  .feature-card:hover .feature-icon {
    transform: scale(1.05);
  }

  .code-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .copy-code-btn {
    align-self: flex-end;
  }
}

/* High contrast mode support */
@media (prefers-contrast: more) {
  .feature-icon {
    border: 2px solid #209cee;
  }

  .copy-code-btn {
    border: 2px solid #fff;
  }
}

/* Hero CTA button center and sizing */
.hero-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  width: 100%;
}

.hero-footer .cta-button,
#ctaButton {
  width: 250px;
  max-width: 100%;
  display: inline-flex;
  justify-content: center;
  margin: 0 auto;
}


.form-error {
  color: #d93025;
  margin: 10px 0 0;
  font-size: 14px;
}

.hidden {
  display: none !important;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
