/* Enhanced Styling for Games, Resources, and Teacher Hub Pages */

/* ============================================
   FILTER SECTION - UNIFIED STYLING
   ============================================ */

.filter-section {
  padding: 2.5rem 1rem;
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  border-bottom: 1px solid #e5e7eb;
}

.filter-section .container {
  max-width: 1200px;
}

.filter-section h2 {
  margin: 0 0 1.75rem 0;
  color: #111827;
  font-size: 1.4rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-section h2 i {
  color: #667eea;
}

/* Filter Groups Container */
.filter-buttons {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.filter-group label {
  font-weight: 600;
  color: #1f2937;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-group label i {
  color: #667eea;
  font-size: 0.85rem;
}

/* Filter Buttons */
.filter-btn {
  padding: 0.65rem 1.2rem;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  background: white;
  color: #374151;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.filter-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: #667eea;
  transition: left 0.3s ease;
  z-index: -1;
}

.filter-btn:hover {
  border-color: #667eea;
  color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.filter-btn:hover::before {
  left: 100%;
}

.filter-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
  font-weight: 600;
}

.filter-btn.active::before {
  left: 100%;
}

/* Level Badge Colors */
.filter-btn[data-filter="level"] {
  min-width: 80px;
}

.filter-btn[data-value="prea1"],
.filter-btn[data-value="pre-a1"] {
  --level-color: #ec4899;
}

.filter-btn[data-value="a1"] {
  --level-color: #f97316;
}

.filter-btn[data-value="a2"] {
  --level-color: #eab308;
}

.filter-btn[data-value="b1"] {
  --level-color: #22c55e;
}

.filter-btn[data-value="b2"] {
  --level-color: #06b6d4;
}

.filter-btn[data-value="c1"] {
  --level-color: #8b5cf6;
}

.filter-btn[data-value="c2"] {
  --level-color: #6366f1;
}

.filter-btn.active[data-filter="level"] {
  background: var(--level-color);
  border-color: var(--level-color);
}

/* Level Badge Display in Results */
.level-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.level-badge.prea1,
.level-badge.pre-a1 {
  background: #fce7f3;
  color: #be185d;
}

.level-badge.a1 {
  background: #ffedd5;
  color: #b45309;
}

.level-badge.a2 {
  background: #fef3c7;
  color: #92400e;
}

.level-badge.b1 {
  background: #dcfce7;
  color: #15803d;
}

.level-badge.b2 {
  background: #cffafe;
  color: #0e7490;
}

.level-badge.c1 {
  background: #ede9fe;
  color: #6d28d9;
}

.level-badge.c2 {
  background: #e0e7ff;
  color: #3730a3;
}

/* Responsive Filter Layout */
@media (min-width: 768px) {
  .filter-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .filter-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
  }

  .filter-group label {
    min-width: 80px;
    margin-right: 0.5rem;
  }
}

/* Clear All Button */
.btn-primary,
.clear-all-btn,
.btn-clear-filters {
  padding: 0.7rem 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.btn-primary:hover,
.clear-all-btn:hover,
.btn-clear-filters:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

/* ============================================
   CARD STYLING - RESOURCES & TOOLS & GAMES
   ============================================ */

.resource-card,
.tool-card,
.game-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.resource-card::before,
.tool-card::before,
.game-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
  transition: width 0.3s ease;
}

.resource-card:hover,
.tool-card:hover,
.game-card:hover {
  /* Subtle hover effect - removed aggressive translateY(-6px) and scale */
  /* Using page-specific CSS hover styles instead */
}

.resource-card:hover::before,
.tool-card:hover::before,
.game-card:hover::before {
  /* Removed width expansion animation */
}

/* Card Icon */
.resource-icon,
.tool-icon,
.game-icon {
  font-size: 2rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #f3f4f6;
  color: #667eea;
  transition: all 0.3s ease;
}

.resource-card:hover .resource-icon,
.tool-card:hover .tool-icon,
.game-card:hover .game-icon {
  /* Removed gradient background and scale animation for subtle effect */
}

/* Card Content */
.resource-content h3,
.tool-content h3,
.game-content h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #1f2937;
  font-weight: 600;
  line-height: 1.4;
}

.resource-content p,
.tool-content p,
.game-content p {
  margin: 0.5rem 0 0 0;
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Card Meta */
.resource-meta,
.tool-meta,
.game-meta {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
  flex-wrap: wrap;
}

.type-badge,
.category-badge {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: #f0fdf4;
  color: #16a34a;
}

.category-badge {
  background: #f0f9ff;
  color: #0369a1;
}

/* ============================================
   GRID LAYOUTS
   ============================================ */

.resources-grid,
.tools-grid,
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .resources-grid,
  .tools-grid,
  .games-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .resources-grid,
  .tools-grid,
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   EMPTY STATE
   ============================================ */

.no-results-message,
#noResourcesMessage,
#noToolsMessage {
  text-align: center;
  padding: 3rem 1rem;
  color: #6b7280;
}

.no-results-message i,
#noResourcesMessage i,
#noToolsMessage i {
  font-size: 2.5rem;
  color: #d1d5db;
  margin-bottom: 1rem;
}

.no-results-message h3,
#noResourcesMessage h3,
#noToolsMessage h3 {
  color: #1f2937;
  margin-bottom: 0.5rem;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 640px) {
  .filter-section {
    padding: 1.5rem 1rem;
  }

  .filter-section h2 {
    font-size: 1.2rem;
    margin-bottom: 1.25rem;
  }

  .filter-group {
    gap: 0.5rem;
  }

  .filter-btn {
    padding: 0.55rem 1rem;
    font-size: 0.85rem;
  }

  .resource-card,
  .tool-card,
  .game-card {
    padding: 1.25rem;
  }
}
