/* ============================================================
   TELEGRAM.ORG FAQ STYLESHEET
   Replicating telegram.org/faq layout and interactive search
   ============================================================ */

.tl_faq_container {
  max-width: 980px;
  margin: 30px auto 60px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  align-items: flex-start;
}

/* Sidebar / Table of Contents */
.tl_faq_sidebar {
  position: sticky;
  top: 86px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.tl_faq_sidebar_title {
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.tl_faq_nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tl_faq_nav_item a {
  display: block;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.tl_faq_nav_item a:hover,
.tl_faq_nav_item.active a {
  background: var(--accent-light);
  color: var(--accent-color);
  font-weight: 600;
}

/* Main FAQ Content */
.tl_faq_content {
  min-width: 0;
}

.tl_faq_header {
  margin-bottom: 30px;
}

.tl_faq_header h1 {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.tl_faq_header p {
  color: var(--text-secondary);
  font-size: 16px;
}

/* Search bar */
.tl_faq_search_wrap {
  position: relative;
  margin-bottom: 32px;
}

.tl_faq_search_input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 46px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tl_faq_search_input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.tl_faq_search_icon {
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  fill: var(--text-muted);
  pointer-events: none;
}

/* Section & Question Blocks */
.tl_faq_section {
  margin-bottom: 40px;
}

.tl_faq_section_title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-color);
}

.tl_faq_item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
  overflow: hidden;
}

.tl_faq_item:hover {
  border-color: var(--accent-border);
}

.tl_faq_q {
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.tl_faq_q svg {
  width: 18px;
  height: 18px;
  fill: var(--text-secondary);
  transition: transform 0.2s ease;
}

.tl_faq_item.open .tl_faq_q svg {
  transform: rotate(180deg);
  fill: var(--accent-color);
}

.tl_faq_a {
  padding: 0 20px 18px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-secondary);
  border-top: 1px solid transparent;
}

.tl_faq_item.open .tl_faq_a {
  border-top-color: var(--border-subtle);
  padding-top: 14px;
}

.tl_faq_item:not(.open) .tl_faq_a {
  display: none;
}

.tl_faq_a p {
  margin-bottom: 10px;
}

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

.tl_faq_a ul {
  padding-left: 20px;
  margin-bottom: 10px;
}

.tl_faq_a li {
  margin-bottom: 6px;
}

@media (max-width: 820px) {
  .tl_faq_container {
    grid-template-columns: 1fr;
  }
  .tl_faq_sidebar {
    position: static;
  }
}
