/* Glossary Page Enhanced Styles */

/* Hero Section */
.glossary-hero {
  background: linear-gradient(135deg, #f8f9fc 0%, #e8ebf4 100%);
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.glossary-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(77, 101, 255, 0.05) 0%, transparent 70%);
  border-radius: 50%;
}

.glossary-hero-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.glossary-hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #1a1f36 0%, #4d65ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glossary-subtitle {
  font-size: 1.25rem;
  line-height: 1.6;
  color: #5a6c87;
  margin-bottom: 2.5rem;
}

/* Search Bar */
.glossary-search-wrapper {
  position: relative;
  max-width: 500px;
  margin: 0 auto 2.5rem;
}

.glossary-search-input {
  width: 100%;
  padding: 16px 50px 16px 20px;
  font-size: 1rem;
  border: 2px solid #e1e8f0;
  border-radius: 12px;
  background: white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.glossary-search-input:focus {
  outline: none;
  border-color: #4d65ff;
  box-shadow: 0 4px 25px rgba(77, 101, 255, 0.15);
  transform: translateY(-2px);
}

.glossary-search-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #8b95a7;
  pointer-events: none;
}

/* Alphabet Navigation */
.glossary-alphabet-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.alphabet-label {
  font-size: 0.9rem;
  color: #5a6c87;
  font-weight: 500;
}

.alphabet-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.alphabet-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: white;
  color: #4d65ff;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid #e1e8f0;
}

.alphabet-link:hover {
  background: #4d65ff;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(77, 101, 255, 0.25);
}

.alphabet-link.active {
  background: #4d65ff;
  color: white;
}

.alphabet-link.disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

/* Glossary Terms Section */
.glossary-terms-list {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

/* Glossary Item Card */
.glossary-item {
  background: white;
  border-radius: 12px;
  padding: 1.75rem;
  border: 1px solid #e1e8f0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.glossary-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #4d65ff 0%, #667eea 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.glossary-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  border-color: #4d65ff;
}

.glossary-item:hover::before {
  opacity: 1;
}

.glossary-term {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1f36;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.glossary-term-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: linear-gradient(135deg, #4d65ff 0%, #667eea 100%);
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  margin-right: 0.5rem;
}

.glossary-definition {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #5a6c87;
}

/* Letter Section Headers */
.glossary-letter-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #e1e8f0;
}

.glossary-letter-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.glossary-letter-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.glossary-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #4d65ff 0%, #667eea 100%);
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(77, 101, 255, 0.25);
}

.glossary-letter-count {
  font-size: 0.9rem;
  color: #8b95a7;
  font-weight: 500;
}

/* No Results Message */
.glossary-no-results {
  text-align: center;
  padding: 4rem 2rem;
  background: #f8f9fc;
  border-radius: 12px;
  margin: 2rem 0;
}

.glossary-no-results p {
  font-size: 1.1rem;
  color: #5a6c87;
  margin: 0;
}

/* Loading State */
.glossary-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
}

.glossary-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e1e8f0;
  border-top-color: #4d65ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .glossary-hero h1 {
    font-size: 2rem;
  }
  
  .glossary-subtitle {
    font-size: 1.1rem;
  }
  
  .glossary-search-input {
    font-size: 0.95rem;
    padding: 14px 45px 14px 18px;
  }
  
  .alphabet-link {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }
  
  .glossary-item {
    padding: 1.25rem;
  }
  
  .glossary-term {
    font-size: 1.2rem;
  }
  
  .glossary-definition {
    font-size: 1rem;
  }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Highlight Animation */
@keyframes highlight {
  0% { background-color: transparent; }
  50% { background-color: rgba(77, 101, 255, 0.1); }
  100% { background-color: transparent; }
}

.glossary-item.highlight {
  animation: highlight 1s ease-out;
}