/* ===================================
   Glossary-Specific Styles
   =================================== */

/* Glossary Controls */
.glossary-controls {
  background: var(--card-background);
  padding: 2rem;
  margin: 2rem auto;
  max-width: 1200px;
  border-radius: 12px;
  box-shadow: var(--shadow-light);
  border: 1px solid var(--border-color);
}

/* Alphabet Filter */
.alphabet-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
}

.filter-btn {
  padding: 0.5rem 1rem;
  border: 2px solid var(--border-color);
  background: var(--background-color);
  color: var(--text-color);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  min-width: 40px;
  text-align: center;
}

.filter-btn:hover {
  border-color: var(--accent-color);
  background: rgba(237, 137, 54, 0.1);
  transform: translateY(-1px);
}

.filter-btn.active {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
  box-shadow: 0 2px 8px rgba(237, 137, 54, 0.3);
}

/* Glossary Section */
.glossary-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.glossary-container {
  display: grid;
  gap: 2rem;
  margin-bottom: 4rem;
}

/* Individual Glossary Terms */
.glossary-term {
  background: var(--card-background);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-light);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.glossary-term::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-color);
  transform: scaleY(0);
  transition: transform 0.3s ease;
  transform-origin: bottom;
}

.glossary-term:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.glossary-term:hover::before {
  transform: scaleY(1);
}

.term-title {
  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.term-title::after {
  content: "○";
  color: var(--accent-color);
  font-size: 0.8rem;
  opacity: 0.7;
}

.pronunciation {
  font-style: italic;
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.definition {
  color: var(--text-color);
  line-height: 1.7;
  font-size: 1rem;
}

.definition em {
  color: var(--accent-color);
  font-style: italic;
  font-weight: 500;
}

/* Quick Reference Section */
.quick-reference {
  background: linear-gradient(135deg, var(--background-color) 0%, #f7fafc 100%);
  padding: 4rem 2rem;
  margin: 4rem 0;
  border-radius: 16px;
  border: 1px solid var(--border-color);
}

.quick-reference h2 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 3rem;
  font-size: 2rem;
}

.positions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.position-card {
  background: var(--card-background);
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: var(--shadow-light);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

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

.position-card h4 {
  color: var(--accent-color);
  margin-bottom: 1rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.position-card p {
  color: var(--text-color);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section {
    padding: 3rem 1rem;
  }

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

  .glossary-controls {
    padding: 1.5rem;
    margin: 1rem;
  }

  .alphabet-filter {
    gap: 0.25rem;
  }

  .filter-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    min-width: 35px;
  }

  .glossary-section {
    padding: 0 1rem;
  }

  .glossary-term {
    padding: 1.5rem;
  }

  .term-title {
    font-size: 1.3rem;
  }

  .quick-reference {
    padding: 3rem 1rem;
    margin: 2rem 1rem;
  }

  .positions-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .position-card {
    padding: 1.25rem;
  }
}

@media (max-width: 480px) {
  .hero-section h1 {
    font-size: 2rem;
  }

  .hero-section p {
    font-size: 1.1rem;
  }

  .alphabet-filter {
    justify-content: space-between;
  }

  .filter-btn {
    flex: 1;
    max-width: 45px;
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
  }

  .glossary-term {
    padding: 1rem;
  }

  .term-title {
    font-size: 1.2rem;
  }
}

/* Animation for terms appearing */
.glossary-term {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading state for search */
.glossary-container.searching .glossary-term {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.glossary-term[style*="display: none"] {
  opacity: 0;
  transform: translateY(-10px);
}

/* Special styling for pronunciation guides */
.pronunciation::before {
  content: "♪ ";
  color: var(--accent-color);
  font-size: 0.9rem;
}

/* Enhanced definition styling */
.definition strong {
  color: var(--primary-color);
  font-weight: 600;
}
