/* FAQ layout: single-column, clean design */
.section_faq5 {
  background-color: #fff !important;
}

.section_faq5 .faq5_component {
  max-width: 900px;
  margin: 0 auto;
}

.section_faq5 .faq5_list {
  grid-template-columns: 1fr;
  grid-auto-columns: 1fr;
  grid-row-gap: 0.75rem !important; /* Increased slightly for breathing room */
}

/* Remove grid-column spanning for open items (no longer needed with single column) */
.section_faq5 .faq5_accordion.is-open {
  grid-column: 1;
}

.faq-search-wrapper {
  max-width: 600px;
  margin: 0 auto 1.5rem auto; /* Reduced from 3rem */
}

.faq-search-input {
  width: 100%;
  padding: 0.75rem 1.25rem; /* Reduced from 1rem 1.5rem */
  font-size: 0.95rem; /* Slightly smaller */
  border: 1px solid #e0e0e0; /* Reduced from 2px */
  border-radius: 6px; /* Reduced from 8px */
  transition: border-color 0.3s ease;
}

.faq-search-input:focus {
  outline: none;
  border-color: #EF4424;
}

.faq-tabs-wrapper {
  margin-bottom: 1.5rem; /* Reduced from 3rem */
  border-bottom: 1px solid #e0e0e0; /* Reduced from 2px */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.faq-tabs {
  display: flex;
  gap: 0.25rem; /* Reduced from 0.5rem - tighter spacing */
  min-width: min-content;
}

.faq-tab {
  padding: 0.625rem 1rem; /* Reduced from 1rem 1.5rem */
  font-size: 0.875rem; /* Slightly smaller */
  font-weight: 600;
  color: #666;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent; /* Reduced from 3px */
  transition: all 0.3s ease;
  cursor: pointer;
}

.faq-tab:hover {
  color: #EF4424;
}

.faq-tab.active {
  color: #EF4424;
  border-bottom-color: #EF4424;
  border-bottom-width: 2px; /* Ensure consistent border width */
}

.faq-featured-section {
  background: #f8f8f8;
  padding: 1.25rem 1.5rem; /* Reduced from 2rem */
  border-radius: 8px; /* Reduced from 12px */
  margin-bottom: 1.5rem; /* Reduced from 3rem */
}

.faq-section-title {
  font-size: 1.25rem; /* Reduced from 1.5rem */
  font-weight: 700;
  margin-bottom: 1rem; /* Reduced from 1.5rem */
  color: #1a1a1a;
}

.faq5_icon-wrapper {
  transition: transform 0.3s ease;
}

.faq5_question {
  cursor: pointer;
  transition: background-color 0.3s ease;
  color: #1a1a1a !important; /* Dark text for visibility */
  padding: 0.875rem 1.25rem !important; /* Reduced from 1.25rem 1.5rem */
}

.faq5_question * {
  color: #1a1a1a !important; /* Ensure all child elements have dark text */
}

.faq5_question:hover {
  background-color: #f8f8f8;
  color: #1a1a1a !important;
}

.faq5_question:hover * {
  color: #1a1a1a !important;
}

.faq5_answer {
  overflow: hidden;
  transition: height 0.3s ease;
  color: #333 !important; /* Dark text for answer content */
  height: 0 !important; /* Ensure closed by default */
  padding: 0 !important; /* No padding when closed */
}

/* Add padding only when accordion is open */
.faq5_accordion.is-open .faq5_answer {
  padding-left: 1.25rem !important;
  padding-right: 1.25rem !important;
  padding-top: 0.25rem !important;
  padding-bottom: 0.75rem !important;
}

.faq5_answer p {
  color: #333 !important; /* Ensure paragraphs are dark */
}

.faq5_answer * {
  color: #333 !important; /* Ensure all answer content is dark */
}

/* Remove grey boxes - clean single-column design with subtle dividers */
.faq5_accordion {
  position: relative;
  background-color: transparent !important;
  border: none !important;
  border-bottom: 0.5px solid #e5e5e5 !important; /* Thinner border */
  border-radius: 0 !important;
  padding-bottom: 0;
  margin-bottom: 0;
}

/* Remove border from last item */
.faq5_accordion:last-child {
  border-bottom: none !important;
}

.popular-ribbon {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 70px;
  height: 70px;
  overflow: hidden;
  z-index: 10;
  pointer-events: none;
}

.popular-ribbon::before {
  content: 'Popular';
  position: absolute;
  top: 18px;
  right: -22px;
  width: 100px;
  padding: 5px 0;
  background-color: #EF4424;
  color: white;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transform: rotate(45deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.faq-learn-more {
  display: inline-block;
  margin-top: 0.5rem; /* Reduced from 0.75rem */
  color: #EF4424 !important; /* Override answer text color for links */
  font-weight: 600;
  font-size: 0.875rem; /* Slightly smaller */
  text-decoration: none;
  transition: all 0.3s ease;
}

.faq-learn-more:hover {
  color: #d6391f !important;
  transform: translateX(3px);
}

.faq-learn-more::after {
  content: ' →';
  margin-left: 0.25rem;
}

@media (max-width: 768px) {
  .faq-tabs {
    flex-wrap: nowrap;
    padding-bottom: 0.375rem; /* Reduced from 0.5rem */
    gap: 0.125rem; /* Even tighter on mobile */
  }
  
  .faq-tab {
    padding: 0.5rem 0.75rem; /* Reduced from 0.75rem 1rem */
    font-size: 0.8125rem; /* Slightly smaller */
  }
  
  .faq-search-input {
    font-size: 0.95rem;
    padding: 0.625rem 1rem; /* Reduced padding on mobile */
  }
  
  .faq-search-wrapper {
    margin-bottom: 1rem; /* Reduced on mobile */
  }
  
  .faq-tabs-wrapper {
    margin-bottom: 1rem; /* Reduced on mobile */
  }
  
  .popular-ribbon {
    width: 60px;
    height: 60px;
  }
  
  .popular-ribbon::before {
    font-size: 10px;
    top: 15px;
    right: -25px;
  }
  
  /* Ensure single column on mobile (already handled, but explicit) */
  .section_faq5 .faq5_list {
    grid-template-columns: 1fr;
    grid-row-gap: 0.625rem !important; /* Slightly increased for mobile */
  }
  
  .faq5_question {
    padding: 0.75rem 1rem !important; /* Reduced on mobile */
  }
  
  .faq5_answer {
    height: 0 !important; /* Ensure closed by default */
    padding: 0 !important; /* No padding when closed */
  }
  
  .faq5_accordion.is-open .faq5_answer {
    padding-left: 1rem !important; /* Reduced on mobile when open */
    padding-right: 1rem !important;
    padding-top: 0.25rem !important;
    padding-bottom: 0.625rem !important;
  }
}

/* Fix text color for bottom "Still have questions?" section */
.section_faq5 .heading-style-h4 {
  color: #1a1a1a !important;
}

.section_faq5 .text-size-medium {
  color: #333 !important;
}

.section_faq5 .button.is-secondary.is-alternate {
  color: #1a1a1a !important;
  border-color: #1a1a1a !important;
}

.section_faq5 .button.is-secondary.is-alternate:hover {
  background-color: #1a1a1a !important;
  color: #fff !important;
}
