/* Aqoonify Design System - Coursera-Inspired */

/* CSS Custom Properties */
:root {
  /* Primary Colors - Coursera Blue */
  --primary-500: #0056d2;
  --primary-600: #003e9b;
  --primary-700: #002b6b;
  --primary-50: #e8f0fe;
  --primary-100: #c5d9f9;
  --primary-200: #8fb3f3;
  --primary-300: #5a8dee;
  --primary-400: #2567e8;

  /* Secondary Colors */
  --secondary-500: #de6000;
  --secondary-600: #b84e00;
  --secondary-50: #fff3e0;

  /* Success Colors */
  --success-500: #40a92c;
  --success-600: #2e7d20;
  --success-50: #e8f5e9;
  --success-400: #66bb6a;

  /* Warning Colors */
  --warning-500: #faaf00;
  --warning-600: #e09800;
  --warning-50: #fff8e1;
  --warning-400: #ffca28;

  /* Error Colors */
  --error-500: #d30a28;
  --error-600: #b00020;
  --error-50: #fce4ec;
  --error-400: #ef5350;

  /* Neutral Colors - Coursera Greys */
  --gray-50: #f5f5f5;
  --gray-100: #e1e1e1;
  --gray-200: #c2c2c2;
  --gray-300: #9e9e9e;
  --gray-400: #757575;
  --gray-500: #636363;
  --gray-600: #525252;
  --gray-700: #373737;
  --gray-800: #1f1f1f;
  --gray-900: #0f1114;

  /* Typography - Source Sans Pro */
  --font-family-primary: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-family-heading: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing Scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Border Radius - Coursera uses small radius */
  --radius-sm: 4px;
  --radius-md: 4px;
  --radius-lg: 8px;
  --radius-xl: 8px;
  --radius-2xl: 12px;

  /* Shadows - Coursera uses subtle shadows */
  --shadow-sm: 0 1px 3px rgba(15, 17, 20, 0.08);
  --shadow-md: 0 2px 8px rgba(15, 17, 20, 0.1);
  --shadow-lg: 0 4px 16px rgba(15, 17, 20, 0.1);
  --shadow-xl: 0 8px 24px rgba(15, 17, 20, 0.12);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 200ms ease;
  --transition-slow: 300ms ease;
}

/* Dark Theme Variables */
body.dark-theme {
  --gray-50: #111827;
  --gray-100: #1f2937;
  --gray-200: #374151;
  --gray-300: #4b5563;
  --gray-400: #6b7280;
  --gray-500: #9ca3af;
  --gray-600: #d1d5db;
  --gray-700: #e5e7eb;
  --gray-800: #f3f4f6;
  --gray-900: #f9fafb;
}

/* Modern Typography */
body {
  font-family: var(--font-family-primary);
  line-height: 1.6;
  color: var(--gray-700);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.dark-theme body {
  color: var(--gray-300);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--gray-900);
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}

.dark-theme h1,
.dark-theme h2,
.dark-theme h3,
.dark-theme h4,
.dark-theme h5,
.dark-theme h6 {
  color: var(--gray-100);
}

/* Modern Navigation Links */
.nav-link-modern {
  color: var(--gray-700);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  transition: all var(--transition-normal);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.dark-theme .nav-link-modern {
  color: var(--gray-300);
}

.nav-link-modern:hover {
  color: var(--primary-500);
  background-color: var(--primary-50);
  text-decoration: none;
}

.dark-theme .nav-link-modern:hover {
  color: var(--primary-400);
  background-color: rgba(0, 86, 210, 0.1);
}

.nav-link-modern.active {
  color: var(--primary-500);
  background-color: var(--primary-50);
  font-weight: 700;
}

.dark-theme .nav-link-modern.active {
  color: var(--primary-400);
  background-color: rgba(0, 86, 210, 0.2);
}

/* ========================================
   BUTTONS - Coursera Style (Flat, no gradients)
   ======================================== */
.btn-modern {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.5;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.02em;
}

.btn-modern:before {
  display: none; /* Remove gradient sweep animation */
}

.btn-primary-modern {
  background: var(--primary-500);
  color: white;
  border-color: var(--primary-500);
}

.btn-primary-modern:hover {
  background: var(--primary-600);
  border-color: var(--primary-600);
  color: white;
  transform: none;
  box-shadow: none;
}

.btn-secondary-modern {
  background: transparent;
  color: var(--primary-500);
  border-color: var(--primary-500);
}

.btn-secondary-modern:hover {
  background: var(--primary-50);
  color: var(--primary-600);
  border-color: var(--primary-600);
  transform: none;
  box-shadow: none;
}

/* Ghost / Outline Button */
.btn-ghost-modern {
  background: transparent;
  color: var(--gray-700);
  border-color: var(--gray-200);
}

.btn-ghost-modern:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

/* Small button */
.btn-sm {
  padding: 6px 16px;
  font-size: 0.8125rem;
}

/* Large button */
.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
}

/* ========================================
   COURSE CARDS - Coursera Style
   ======================================== */
.course-card-modern {
  background: white;
  border-radius: var(--radius-sm);
  box-shadow: none;
  overflow: hidden;
  transition: all var(--transition-normal);
  border: 1px solid var(--gray-100);
  position: relative;
}

.dark-theme .course-card-modern {
  background: var(--gray-800);
  border-color: var(--gray-700);
}

.course-card-modern:hover {
  transform: none;
  box-shadow: var(--shadow-lg);
  border-color: var(--gray-200);
}

.course-card-image {
  position: relative;
  overflow: hidden;
  height: 180px;
}

.course-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: none;
}

.course-card-modern:hover .course-card-image img {
  transform: none;
}

.course-card-badge {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  background: var(--primary-500);
  color: white;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 10;
}

.course-card-content {
  padding: var(--space-4) var(--space-4) var(--space-6);
}

.course-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--space-1);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-card-title a {
  color: inherit;
}

.course-card-title a:hover {
  color: var(--primary-500);
}

.dark-theme .course-card-title {
  color: var(--gray-100);
}

.course-card-instructor {
  color: var(--gray-500);
  font-size: 0.8125rem;
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.dark-theme .course-card-instructor {
  color: var(--gray-400);
}

.course-card-stats {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.course-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--gray-500);
  font-size: 0.8125rem;
}

.dark-theme .course-stat {
  color: var(--gray-400);
}

.course-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-3);
  border-top: 1px solid var(--gray-100);
}

.dark-theme .course-card-footer {
  border-top-color: var(--gray-700);
}

.course-price {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gray-900);
}

.dark-theme .course-price {
  color: var(--gray-100);
}

.course-price-old {
  font-size: 0.8125rem;
  color: var(--gray-400);
  text-decoration: line-through;
  margin-left: var(--space-2);
}

/* ========================================
   HERO SECTION - Coursera Style
   ======================================== */
.hero-modern {
  background: #ffffff;
  color: var(--gray-900);
  padding: var(--space-20) 0;
  position: relative;
  overflow: hidden;
}

.hero-modern::before {
  display: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: var(--space-6);
  color: var(--gray-900);
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: unset;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--gray-600);
  margin-bottom: var(--space-8);
  max-width: 600px;
  line-height: 1.6;
}

/* ========================================
   SEARCH BAR - Coursera Style
   ======================================== */
.search-modern {
  background: white;
  border-radius: var(--radius-sm);
  padding: 0;
  box-shadow: none;
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 600px;
  border: 1px solid var(--gray-200);
}

.dark-theme .search-modern {
  background: var(--gray-800);
  border: 1px solid var(--gray-700);
}

.search-input-modern {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 16px;
  font-size: 0.9375rem;
  background: transparent;
  color: var(--gray-700);
  height: 40px;
}

.dark-theme .search-input-modern {
  color: var(--gray-300);
}

.search-input-modern::placeholder {
  color: var(--gray-400);
}

.search-btn-modern {
  background: var(--primary-500);
  color: white;
  border: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 10px 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  height: 40px;
}

.search-btn-modern:hover {
  background: var(--primary-600);
  transform: none;
}

/* ========================================
   FEATURE CARDS - Coursera Style
   ======================================== */
.feature-card-modern {
  background: white;
  border-radius: var(--radius-sm);
  padding: var(--space-6);
  text-align: left;
  box-shadow: none;
  border: 1px solid var(--gray-100);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.dark-theme .feature-card-modern {
  background: var(--gray-800);
  border-color: var(--gray-700);
}

.feature-card-modern:hover {
  transform: none;
  box-shadow: var(--shadow-md);
}

.feature-icon-modern {
  width: 48px;
  height: 48px;
  background: var(--primary-50);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 var(--space-4);
  font-size: 1.25rem;
  color: var(--primary-500);
}

.feature-title-modern {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--space-2);
}

.dark-theme .feature-title-modern {
  color: var(--gray-100);
}

.feature-description-modern {
  color: var(--gray-500);
  font-size: 0.875rem;
  line-height: 1.5;
}

.dark-theme .feature-description-modern {
  color: var(--gray-400);
}

/* ========================================
   STATS SECTION
   ======================================== */
.stats-modern {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-8);
  margin: var(--space-16) 0;
}

.stat-item-modern {
  text-align: center;
}

.stat-number-modern {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-500);
  margin-bottom: var(--space-1);
}

.dark-theme .stat-number-modern {
  color: var(--primary-400);
}

.stat-label-modern {
  color: var(--gray-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.8125rem;
}

.dark-theme .stat-label-modern {
  color: var(--gray-400);
}

/* ========================================
   NAVIGATION - Coursera Style
   ======================================== */
.navbar-modern {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-100);
  transition: all var(--transition-normal);
}

.dark-theme .navbar-modern {
  background: rgba(17, 24, 39, 0.98);
  border-bottom-color: var(--gray-700);
}

.navbar-modern.scrolled {
  box-shadow: var(--shadow-md);
}

/* ========================================
   LOADING SKELETON
   ======================================== */
.loading-skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

.dark-theme .loading-skeleton {
  background: linear-gradient(90deg, var(--gray-700) 25%, var(--gray-600) 50%, var(--gray-700) 75%);
  background-size: 200% 100%;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ========================================
   FORMS - Coursera Style
   ======================================== */
.form-modern {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: none;
  border: 1px solid var(--gray-100);
}

.dark-theme .form-modern {
  background: var(--gray-800);
  border-color: var(--gray-700);
}

.form-group-modern {
  margin-bottom: var(--space-6);
}

.form-label-modern {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--gray-700);
  margin-bottom: var(--space-2);
}

.dark-theme .form-label-modern {
  color: var(--gray-300);
}

.form-input-modern {
  width: 100%;
  padding: 8px 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-family: var(--font-family-primary);
  transition: all var(--transition-normal);
  background: white;
  color: var(--gray-700);
  height: 40px;
}

.dark-theme .form-input-modern {
  background: var(--gray-700);
  border-color: var(--gray-600);
  color: var(--gray-300);
}

.form-input-modern:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 1px var(--primary-500);
}

/* Select inputs */
.form-select-modern {
  width: 100%;
  padding: 8px 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-family: var(--font-family-primary);
  background: white;
  color: var(--gray-700);
  height: 40px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23636363' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
}

.form-select-modern:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 1px var(--primary-500);
}

/* Textarea */
.form-textarea-modern {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-family: var(--font-family-primary);
  background: white;
  color: var(--gray-700);
  resize: vertical;
  min-height: 100px;
}

.form-textarea-modern:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 1px var(--primary-500);
}

/* Checkbox & Radio - Coursera style */
.form-check-modern input[type="checkbox"],
.form-check-modern input[type="radio"] {
  accent-color: var(--primary-500);
  width: 18px;
  height: 18px;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-gradient {
  color: var(--primary-500);
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: unset;
}

.container-modern {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

@media (max-width: 768px) {
  .container-modern {
    padding: 0 var(--space-4);
  }
}

/* ========================================
   ANIMATIONS - Subtle, Coursera style
   ======================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.4s ease-out;
}

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

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

/* ========================================
   BADGE / TAG STYLES - Coursera
   ======================================== */
.badge-modern {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.badge-primary {
  background: var(--primary-50);
  color: var(--primary-500);
}

.badge-success {
  background: var(--success-50);
  color: var(--success-600);
}

.badge-warning {
  background: var(--warning-50);
  color: var(--secondary-600);
}

.badge-error {
  background: var(--error-50);
  color: var(--error-600);
}

/* ========================================
   CARD GENERAL - Coursera Style
   ======================================== */
.card-modern {
  background: white;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: box-shadow var(--transition-normal);
}

.card-modern:hover {
  box-shadow: var(--shadow-md);
}

.dark-theme .card-modern {
  background: var(--gray-800);
  border-color: var(--gray-700);
}

/* ========================================
   LINK STYLES - Coursera uses underlined blue links
   ======================================== */
.link-modern {
  color: var(--primary-500);
  text-decoration: underline;
  font-weight: 600;
}

.link-modern:hover {
  color: var(--primary-600);
}

/* ========================================
   RESPONSIVE HELPERS
   ======================================== */
@media (max-width: 640px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .stats-modern {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }

  .feature-card-modern {
    padding: var(--space-4);
  }
}

/* ========================================
   GLOBAL FORM OVERRIDES - Bootstrap inputs to Coursera style
   ======================================== */
.form-control {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm) !important;
  font-family: var(--font-family-primary);
  font-size: 0.9375rem;
  padding: 8px 16px;
  height: 40px;
  color: var(--gray-700);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.form-control:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 1px var(--primary-500);
}

.form-control::placeholder {
  color: var(--gray-400);
}

textarea.form-control {
  height: auto;
}

.form-select {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm) !important;
  font-family: var(--font-family-primary);
  font-size: 0.9375rem;
  padding: 8px 16px;
  height: 40px;
}

.form-select:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 1px var(--primary-500);
}

/* ========================================
   GLOBAL BUTTON OVERRIDES - Bootstrap buttons to Coursera style
   ======================================== */
.btn {
  border-radius: var(--radius-sm) !important;
  font-family: var(--font-family-primary);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 10px 24px;
  border: 2px solid transparent;
  transition: all var(--transition-normal);
  letter-spacing: 0.02em;
}

.btn-primary {
  background-color: var(--primary-500) !important;
  border-color: var(--primary-500) !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--primary-600) !important;
  border-color: var(--primary-600) !important;
  box-shadow: none !important;
}

.btn-outline-primary {
  color: var(--primary-500) !important;
  border-color: var(--primary-500) !important;
  background: transparent !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background: var(--primary-50) !important;
  color: var(--primary-600) !important;
  border-color: var(--primary-600) !important;
  box-shadow: none !important;
}

.btn-success {
  background-color: var(--success-500) !important;
  border-color: var(--success-500) !important;
}

.btn-danger {
  background-color: var(--error-500) !important;
  border-color: var(--error-500) !important;
}

.btn-warning {
  background-color: var(--warning-500) !important;
  border-color: var(--warning-500) !important;
}

.btn-link {
  color: var(--primary-500) !important;
  text-decoration: underline !important;
  font-weight: 600;
  padding: 0;
  border: none !important;
}

.btn-link:hover {
  color: var(--primary-600) !important;
}
