body {
  font-family: Arial, sans-serif;
  background: #f9f9f9;
  padding: 20px;
}
.faq-container {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
#faq-search {
  width: 100%;
  padding: 12px;
  margin-bottom: 20px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 16px;
}
.faq-item {
  border-bottom: 1px solid #eee;
  padding: 10px 0;
}
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-size: 17px;
  font-weight: bold;
  color: #333;
  padding: 10px 40px 10px 0; /* Extra right padding makes room for the icon */
  cursor: pointer;
  position: relative;
  
  /* Fix: Force standard inline text rendering so <mark> tags don't break apart */
  display: block; 
}

/* Position the indicator icon cleanly without breaking inline text typography */
.faq-question::after {
  content: '+';
  font-size: 18px;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.faq-item.active .faq-question::after {
  content: '−';
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  color: #666;
  line-height: 1.5;
}
.faq-item.active .faq-answer {
  max-height: 800px; /* Adjust according to maximum expected text content */
  opacity: 1;
  padding-top: 5px;
}

/* Style for matching text strings */
mark {
  background-color: #ffeb3b;
  color: #000;
  padding: 0px !important;    /* Forces zero extra padding around letters */
  margin: 0px !important;     /* Forces zero spacing around words */
  border-radius: 0px;         /* Removes rounded edges that push text away */
  display: inline;            /* Ensures it stays inline with standard typography */
}

/* Category Title Styling */
.faq-category-title {
  font-size: 20px;
  color: #2c3e50;
  margin: 25px 0 10px 0;
  border-bottom: 2px solid #3498db;
  padding-bottom: 5px;
}

.faq-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
}

.faq-controls button {
  background: #3498db;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: background 0.2s ease;
}

.faq-controls button:hover {
  background: #2980b9;
}

code {
  background-color: #f1f3f5;
  color: #333;
  padding: 0.5em 0.7em;
  border-radius: 999px;
  font-size: 85%;
}
