/**
 * Glossary Page Styles
 */

/* Glossary Section */
.glossary-section {
  position: relative;
  min-height: 400px; /* Minimum yükseklik - layout shift önleme */
}

/* Blog Wrapper - Layout shift önleme */
.glossary-blog-wrapper {
  margin-top: 0;
  padding-top: 0;
  position: relative;
  z-index: 1;
}

/* Intro Section */
.glossary-intro {
  margin-bottom: 60px;
  text-align: left;
}

.glossary-intro__title {
  font-size: 48px;
  font-weight: 700;
  color: var(--color-green);
  margin: 0 0 24px 0;
  line-height: 1.3;
}

.glossary-intro__description {
  font-size: 20px;
  color: var(--color-gray-dark);
  max-width: 100%;
  margin: 0;
}

/* Alphabet Grid */
.glossary-alphabet {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 60px;
}

.glossary-alphabet__letter {
  width: 72px;
  height: 88px;
  border-radius: 24px;
  background: #fff;
  border: none;
  color: var(--color-gray-dark);
  font-size: 48px;
  font-weight: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  margin: 0;
}

.glossary-alphabet__letter:hover {
  background-color: var(--color-green);
  color: #fff;
}

.glossary-alphabet__letter.is-active {
  background: var(--color-green);
  color: #fff;
}

/* Terms Grid */
.glossary-terms {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 40px;
  min-height: 200px;
  position: relative;
}

.glossary-term__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-green);
  margin: 0 0 16px 0;
  line-height: 1.3;
}

.glossary-term__content {
  font-size: 20px;
  color: var(--color-gray-dark);
}

.glossary-term__content p {
  margin: 0 0 16px 0;
}

.glossary-term__content p:last-child {
  margin-bottom: 0;
}

/* Empty State */
.glossary-terms__empty {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-size: 18px;
}

/* Loader */
.glossary-loader {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100px; /* Observer için minimum yükseklik */
  height: 100px; /* Sabit yükseklik - layout shift önleme */
  transition: opacity 0.3s ease, visibility 0.3s ease;
  box-sizing: border-box;
}

.glossary-loader--hidden {
  opacity: 0;
  visibility: hidden;
  /* height korunuyor - layout shift önleme */
  padding: 40px 20px;
  min-height: 100px;
  height: 100px;
}

.glossary-loader img {
  width: 48px;
  height: 48px;
  animation: spin 1s linear infinite;
}

/* Error Message */
.glossary-error-message {
  text-align: center;
  padding: 20px;
  color: #d63638;
  font-size: 16px;
  margin-bottom: 20px;
}

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

/* Responsive */
@media (max-width: 768px) {
  .glossary-section .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .glossary-intro {
    margin-bottom: 40px;
  }

  .glossary-intro__title {
    font-size: 36px;
  }

  .glossary-intro__description {
    font-size: 18px;
  }

  /* Alphabet - Mobilde yatay scroll */
  .glossary-alphabet {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    gap: 12px;
    margin-bottom: 40px;
    padding-bottom: 4px;
  }

  .glossary-alphabet::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
  }

  .glossary-alphabet__letter {
    width: 48px;
    height: 59px;
    font-size: 32px;
    border-radius: 24px;
    flex-shrink: 0;
  }

  .glossary-terms {
    gap: 20px;
    margin-bottom: 0;
  }

  .glossary-term__title {
    font-size: 18px;
  }

  .glossary-term__content {
    font-size: 16px;
  }

  .glossary-terms__empty {
    padding: 40px 16px;
    font-size: 16px;
  }

  .glossary-loader {
    padding: 30px 0;
    min-height: 80px;
    height: 80px;
  }

  .glossary-loader--hidden {
    padding: 30px 0;
    min-height: 80px;
    height: 80px;
  }

  .glossary-loader img {
    width: 40px;
    height: 40px;
  }
}
