/* Glossary Page Styles (slow- prefix) */

/* ===== Hero ===== */
.slow-hero {
  background: linear-gradient(135deg, var(--primary-blue, #1E88E5) 0%, var(--ai-purple, #8B5CF6) 100%);
  color: white;
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}

.slow-hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.slow-hero .slow-subtitle {
  font-size: 1.15rem;
  opacity: 0.92;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}

.slow-hero .slow-count {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.9rem;
  opacity: 0.8;
  background: rgba(255, 255, 255, 0.15);
  padding: 0.35rem 1rem;
  border-radius: 20px;
}

/* ===== Search & Filter ===== */
.slow-toolbar {
  padding: 2rem 0 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.slow-search {
  position: relative;
  max-width: 480px;
  margin: 0 auto 1.25rem;
}

.slow-search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s;
  background: #fff;
}

.slow-search-input:focus {
  outline: none;
  border-color: var(--primary-blue, #1E88E5);
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.12);
}

.slow-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}

.slow-search-icon svg {
  width: 20px;
  height: 20px;
}

.slow-search-clear {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 0.25rem;
  display: none;
  line-height: 1;
}

.slow-search-clear.visible {
  display: block;
}

.slow-search-clear:hover {
  color: var(--text-primary, #1f2937);
}

.slow-categories {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.slow-category-btn {
  padding: 0.4rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 20px;
  background: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-muted, #4b5563);
  font-family: 'Inter', sans-serif;
}

.slow-category-btn:hover {
  border-color: var(--primary-blue, #1E88E5);
  color: var(--primary-blue, #1E88E5);
}

.slow-category-btn--active {
  background: var(--primary-blue, #1E88E5);
  border-color: var(--primary-blue, #1E88E5);
  color: #fff;
}

.slow-category-btn--active:hover {
  background: var(--primary-blue-dark, #1565C0);
  border-color: var(--primary-blue-dark, #1565C0);
  color: #fff;
}

.slow-results-count {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted, #4b5563);
  margin-top: 0.75rem;
  min-height: 1.3em;
}

/* ===== Term Sections ===== */
.slow-content {
  padding: 2rem 0 0;
}

.slow-section {
  margin-bottom: 2.5rem;
}

.slow-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e5e7eb;
}

.slow-section-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.slow-section-icon svg {
  width: 20px;
  height: 20px;
  color: #fff;
}

.slow-section[data-cat="podstawowe"] .slow-section-icon { background: #1E88E5; }
.slow-section[data-cat="wskazniki"] .slow-section-icon { background: #8B5CF6; }
.slow-section[data-cat="koszty"] .slow-section-icon { background: #EA580C; }
.slow-section[data-cat="dokumenty"] .slow-section-icon { background: #059669; }
.slow-section[data-cat="splata"] .slow-section-icon { background: #0E7490; }

.slow-section-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary, #1f2937);
  margin: 0;
}

.slow-section-count {
  font-size: 0.8rem;
  color: var(--text-muted, #4b5563);
  font-weight: 500;
  margin-left: auto;
  white-space: nowrap;
}

/* ===== Term Cards ===== */
.slow-term-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s;
  scroll-margin-top: 140px;
}

.slow-term-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.slow-term-card--highlight {
  box-shadow: 0 0 0 2px var(--primary-blue, #1E88E5), 0 4px 16px rgba(30, 136, 229, 0.15);
}

.slow-term-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.slow-term-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary, #1f2937);
  margin: 0;
}

.slow-term-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(30, 136, 229, 0.1);
  color: var(--primary-blue, #1E88E5);
  white-space: nowrap;
}

.slow-term-anchor {
  margin-left: auto;
  color: #d1d5db;
  text-decoration: none;
  font-size: 1rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.slow-term-card:hover .slow-term-anchor {
  opacity: 1;
}

.slow-term-anchor:hover {
  color: var(--primary-blue, #1E88E5);
}

.slow-term-short {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-primary, #1f2937);
  margin-bottom: 0;
}

.slow-term-short[data-speakable] {
  /* Marker for speakable content — no visual change */
}

.slow-term-detail {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f3f4f6;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-muted, #4b5563);
}

.slow-term-detail p {
  margin-bottom: 0.5rem;
}

.slow-term-detail p:last-child {
  margin-bottom: 0;
}

.slow-term-links {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.slow-term-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--primary-blue, #1E88E5);
  text-decoration: none;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  background: rgba(30, 136, 229, 0.06);
  transition: background 0.2s;
}

.slow-term-link:hover {
  background: rgba(30, 136, 229, 0.12);
  text-decoration: none;
  color: var(--primary-blue-dark, #1565C0);
}

.slow-term-link svg {
  width: 14px;
  height: 14px;
}

/* ===== Hidden State ===== */
.slow-hidden {
  display: none !important;
}

.slow-no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted, #4b5563);
}

.slow-no-results-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}

.slow-no-results h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary, #1f2937);
}

/* ===== Back to Top ===== */
.slow-back-to-top {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-blue, #1E88E5);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(30, 136, 229, 0.35);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 90;
}

.slow-back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.slow-back-to-top:hover {
  background: var(--primary-blue-dark, #1565C0);
}

.slow-back-to-top svg {
  width: 20px;
  height: 20px;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .slow-hero h1 {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .slow-hero {
    padding: 2.5rem 0 2rem;
  }

  .slow-hero h1 {
    font-size: 1.6rem;
  }

  .slow-hero .slow-subtitle {
    font-size: 1rem;
  }

  .slow-toolbar {
    padding: 1.25rem 0 0.75rem;
  }

  .slow-categories {
    gap: 0.35rem;
  }

  .slow-category-btn {
    font-size: 0.78rem;
    padding: 0.35rem 0.75rem;
  }

  .slow-section-header h2 {
    font-size: 1.2rem;
  }

  .slow-term-card {
    padding: 1.25rem;
  }

  .slow-term-name {
    font-size: 1.05rem;
  }
}

@media (max-width: 576px) {
  .slow-hero h1 {
    font-size: 1.4rem;
  }

  .slow-categories {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
  }

  .slow-category-btn {
    flex-shrink: 0;
  }

  .slow-term-links {
    flex-direction: column;
    gap: 0.5rem;
  }

  .slow-back-to-top {
    bottom: 80px;
    right: 16px;
  }
}
