/* Glossary Page Specific Styles */

/* Glossary Hero Section */
.glossary-hero {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 150px 0 80px;
  text-align: center;
}

.glossary-hero h1 {
  font-size: 48px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 20px;
}

.glossary-hero p {
  font-size: 20px;
  color: #666;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Search Container */
.search-container {
  position: relative;
  max-width: 500px;
  margin: 0 auto;
}

.search-container input {
  width: 100%;
  padding: 15px 50px 15px 20px;
  font-size: 16px;
  border: 2px solid #e0e0e0;
  border-radius: 50px;
  outline: none;
  transition: all 0.3s ease;
}

.search-container input:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-container i {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  font-size: 18px;
}

/* Alphabet Navigation */
.alphabet-nav {
  background: white;
  padding: 20px 0;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 110px;
  z-index: 100;
}

.alphabet-letters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.alphabet-letters a {
  display: inline-block;
  width: 35px;
  height: 35px;
  line-height: 35px;
  text-align: center;
  background: #f8f9fa;
  color: #666;
  text-decoration: none;
  border-radius: 50%;
  font-weight: 600;
  transition: all 0.3s ease;
}

.alphabet-letters a:hover,
.alphabet-letters a.active {
  background: #3498db;
  color: white;
  transform: scale(1.1);
}

.alphabet-letters a.disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* Glossary Content */
.glossary-content {
  padding: 60px 0;
  background: #fafafa;
}

.glossary-grid {
  max-width: 1000px;
  margin: 0 auto;
}

.glossary-section {
  margin-bottom: 60px;
}

.section-letter {
  font-size: 48px;
  font-weight: 700;
  color: #3498db;
  margin-bottom: 30px;
  text-align: center;
  position: relative;
}

.section-letter::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: #3498db;
}

/* Term Cards */
.term-card {
  background: white;
  padding: 25px;
  margin-bottom: 20px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border-left: 4px solid #3498db;
}

.term-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.term-title {
  font-size: 22px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 15px;
}

.term-definition {
  font-size: 16px;
  line-height: 1.6;
  color: #555;
  margin: 0;
}

/* Search Results */
.search-results {
  display: none;
}

.search-active .glossary-section {
  display: none;
}

.search-active .search-results {
  display: block;
}

.search-results .term-card {
  margin-bottom: 15px;
}

.search-highlight {
  background: yellow;
  padding: 2px 4px;
  border-radius: 3px;
}

.no-results {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.no-results i {
  font-size: 48px;
  color: #ddd;
  margin-bottom: 20px;
}

.no-results h3 {
  font-size: 24px;
  margin-bottom: 10px;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: #2980b9;
  transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .glossary-hero {
    padding: 120px 0 60px;
  }

  .glossary-hero h1 {
    font-size: 36px;
  }

  .glossary-hero p {
    font-size: 18px;
  }

  .alphabet-nav {
    top: 90px;
    padding: 15px 0;
  }

  .alphabet-letters {
    gap: 10px;
  }

  .alphabet-letters a {
    width: 30px;
    height: 30px;
    line-height: 30px;
    font-size: 14px;
  }

  .section-letter {
    font-size: 36px;
  }

  .term-card {
    padding: 20px;
  }

  .term-title {
    font-size: 20px;
  }

  .term-definition {
    font-size: 15px;
  }

  .search-container {
    margin: 0 20px;
  }
}

@media (max-width: 480px) {
  .glossary-hero h1 {
    font-size: 28px;
  }

  .glossary-hero p {
    font-size: 16px;
  }

  .alphabet-letters a {
    width: 25px;
    height: 25px;
    line-height: 25px;
    font-size: 12px;
  }

  .term-card {
    padding: 15px;
    margin-bottom: 15px;
  }

  .term-title {
    font-size: 18px;
  }

  .back-to-top {
    width: 45px;
    height: 45px;
    bottom: 20px;
    right: 20px;
  }
}
