/**
 * Smart Home Glossary Styles
 */

.glossary {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem 4rem;
}

.glossary__intro {
  text-align: center;
  margin-bottom: 2rem;
}

.glossary__intro .lead {
  font-size: 1.15rem;
  color: #555;
  max-width: 700px;
  margin: 0 auto;
}

/* Alphabetical Navigation */
.glossary__nav {
  position: sticky;
  top: 0;
  background: #fff;
  padding: 1rem 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid #e0e0e0;
  z-index: 10;
}

.glossary__letters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.glossary__letter-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  color: #333;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.glossary__letter-link:hover {
  background: #4a90d9;
  border-color: #4a90d9;
  color: #fff;
}

/* Content Sections */
.glossary__content {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.glossary__section {
  scroll-margin-top: 80px;
}

.glossary__section-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: #4a90d9;
  color: #fff;
  border-radius: 10px;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* Term Cards */
.glossary__terms {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.glossary__term-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  transition: all 0.2s ease;
}

.glossary__term-card:hover {
  border-color: #4a90d9;
  box-shadow: 0 2px 8px rgba(74, 144, 217, 0.15);
}

.glossary__term {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: #333;
}

.glossary__definition {
  margin: 0;
  color: #555;
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Back to Top */
.glossary__back-to-top {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e0e0e0;
}

/* Empty State */
.glossary__empty {
  text-align: center;
  padding: 3rem;
  background: #f8f9fa;
  border-radius: 12px;
  color: #666;
}

/* CTA Section */
.glossary__cta {
  text-align: center;
  background: linear-gradient(135deg, #4a90d9 0%, #357abd 100%);
  color: #fff;
  padding: 2.5rem;
  border-radius: 12px;
  margin-top: 3rem;
}

.glossary__cta h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
}

.glossary__cta p {
  margin: 0 0 1.5rem 0;
  opacity: 0.9;
}

.glossary__cta .btn-primary {
  background: #fff;
  color: #4a90d9;
  padding: 0.75rem 2rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
}

.glossary__cta .btn-primary:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
  .glossary__nav {
    position: relative;
  }

  .glossary__letter-link {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  .glossary__section-title {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }
}
