/* Active Learning Architecture & Component Styles */

.active-hero {
  text-align: center;
  padding: 48px 24px 32px;
  background: radial-gradient(circle at 50% 20%, rgba(99, 102, 241, 0.12), transparent 70%);
}

.active-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 12px;
  font-weight: 900;
  background: linear-gradient(135deg, #1e293b 0%, #4338ca 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

:root[data-theme="dark"] .active-hero h1 {
  background: linear-gradient(135deg, #f8fafc 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.active-hero p {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: #64748b;
  max-width: 680px;
  margin: 0 auto;
}

:root[data-theme="dark"] .active-hero p {
  color: #94a3b8;
}

/* 2 Large Subject Cards on Main Hub */
.subject-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  max-width: 1100px;
  margin: 0 auto 60px;
  padding: 0 20px;
}

.subject-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 32px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.subject-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.subject-card.math::before {
  background: linear-gradient(90deg, #3b82f6, #6366f1);
}

.subject-card.science::before {
  background: linear-gradient(90deg, #10b981, #06b6d4);
}

.subject-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 45px rgba(99, 102, 241, 0.15);
  border-color: #c7d2fe;
}

:root[data-theme="dark"] .subject-card {
  background: #181533;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

:root[data-theme="dark"] .subject-card:hover {
  border-color: #818cf8;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
}

.subject-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.subject-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: #0f172a;
}

:root[data-theme="dark"] .subject-title {
  color: #f8fafc;
}

.subject-desc {
  font-size: 1rem;
  color: #64748b;
  margin-bottom: 24px;
  line-height: 1.6;
  flex-grow: 1;
}

:root[data-theme="dark"] .subject-desc {
  color: #cbd5e1;
}

.subject-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

:root[data-theme="dark"] .subject-footer {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.count-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #f1f5f9;
  color: #475569;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
}

:root[data-theme="dark"] .count-badge {
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

.enter-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  color: #4f46e5;
  font-size: 0.95rem;
}

:root[data-theme="dark"] .enter-link {
  color: #818cf8;
}

/* Filter Controls & Search Bar */
.controls-bar {
  max-width: 1100px;
  margin: 0 auto 32px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.search-box {
  width: 100%;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 14px 20px 14px 46px;
  border-radius: 16px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 1rem;
  color: #0f172a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

:root[data-theme="dark"] .search-box input {
  background: #181533;
  border-color: rgba(255, 255, 255, 0.16);
  color: #f8fafc;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 1.2rem;
}

.pills-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-pill {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-pill:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.filter-pill.active {
  background: #4f46e5;
  color: #ffffff;
  border-color: #4f46e5;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

:root[data-theme="dark"] .filter-pill {
  background: #181533;
  border-color: rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
}

:root[data-theme="dark"] .filter-pill.active {
  background: #6366f1;
  color: #ffffff;
  border-color: #6366f1;
}

/* Shared Activity Card Grid */
.activities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto 60px;
  padding: 0 20px;
}

.activity-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.activity-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.1);
  border-color: #c7d2fe;
}

:root[data-theme="dark"] .activity-card {
  background: #181533;
  border-color: rgba(255, 255, 255, 0.12);
}

.activity-thumb-wrap {
  width: 100%;
  height: 160px;
  position: relative;
  background: #f1f5f9;
  overflow: hidden;
}

.activity-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.status-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-tag.available {
  background: #dcfce7;
  color: #15803d;
}

.status-tag.in_development {
  background: #fef3c7;
  color: #b45309;
}

.status-tag.coming_soon {
  background: #f1f5f9;
  color: #64748b;
}

.activity-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.activity-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #6366f1;
}

.activity-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: #0f172a;
}

:root[data-theme="dark"] .activity-title {
  color: #f8fafc;
}

.activity-desc {
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 16px;
  line-height: 1.5;
  flex-grow: 1;
}

:root[data-theme="dark"] .activity-desc {
  color: #cbd5e1;
}

.stages-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 16px;
}

.stage-badge {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #64748b;
  font-weight: 700;
}

:root[data-theme="dark"] .stage-badge {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.activity-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 12px;
  background: #4f46e5;
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.2s ease;
}

.activity-cta:hover {
  background: #4338ca;
}

.activity-cta.disabled {
  background: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
  pointer-events: none;
}

:root[data-theme="dark"] .activity-cta.disabled {
  background: rgba(255, 255, 255, 0.12);
  color: #64748b;
}


/* Standardized Container & Alignment Rules for Math and Science Hubs */
.active-page.container {
  max-width: 1120px !important;
  margin: 0 auto !important;
  padding: 24px 20px 80px !important;
  box-sizing: border-box !important;
}

@media (max-width: 480px) {
  .active-page.container {
    padding: 16px 14px 40px !important;
  }
}

.active-hero {
  border-radius: 28px !important;
  margin-bottom: 28px !important;
}

.controls-bar {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 28px 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

.activities-grid {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 60px 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}
