/* ==========================================
   FRANCHISE FAQ SECTION - ENHANCED STYLING
   ========================================== */

.faq-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: 1rem;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.faq-item:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: rgba(11, 87, 208, 0.2);
  transform: translateY(-2px);
}

.faq-question {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.75rem 2rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.faq-question:hover {
  background: rgba(11, 87, 208, 0.02);
}

.faq-question[aria-expanded="true"] {
  background: rgba(11, 87, 208, 0.05);
  padding-bottom: 1.25rem;
}

.faq-question:active {
  transform: scale(0.99);
}

.faq-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(11, 87, 208, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.faq-question[aria-expanded="true"] .faq-icon {
  background: #0b57d0;
  transform: rotate(135deg);
  box-shadow: 0 4px 12px rgba(11, 87, 208, 0.3);
}

.faq-icon i {
  font-size: 1.5rem;
  color: #0b57d0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-question[aria-expanded="true"] .faq-icon i {
  color: white;
}

.faq-question h4 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.9);
  line-height: 1.5;
  transition: color 0.3s ease;
}

.faq-question[aria-expanded="true"] h4 {
  color: #0b57d0;
}

.faq-answer {
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 0;
  opacity: 0;
}

.faq-answer.show {
  max-height: 2000px;
  opacity: 1;
}

.faq-answer.collapsing {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-content {
  padding: 1.5rem 2rem 2rem 5.25rem;
  animation: fadeInContent 0.5s ease 0.2s both;
}

@keyframes fadeInContent {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.faq-content p {
  margin-bottom: 1rem;
  color: rgba(15, 23, 42, 0.75);
  line-height: 1.7;
}

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

.faq-content strong {
  color: rgba(15, 23, 42, 0.9);
  display: block;
  margin-bottom: 0.75rem;
}

.faq-content ul {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0 0;
}

.faq-content li {
  padding: 0.5rem 0;
  padding-left: 28px;
  position: relative;
  color: rgba(15, 23, 42, 0.75);
  line-height: 1.6;
}

.faq-content li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #0b57d0;
  font-weight: 900;
  font-size: 1.125rem;
}

/* Add indicator arrow */
.faq-question::after {
  content: "";
  position: absolute;
  right: 2rem;
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(11, 87, 208, 0.5);
  border-bottom: 2px solid rgba(11, 87, 208, 0.5);
  transform: rotate(45deg);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.6;
}

.faq-question[aria-expanded="true"]::after {
  transform: rotate(-135deg);
  opacity: 1;
  border-color: #0b57d0;
}

/* Smooth scrolling to expanded FAQ */
.faq-item {
  scroll-margin-top: 100px;
}

/* Enhanced focus states for accessibility */
.faq-question:focus {
  outline: 2px solid rgba(11, 87, 208, 0.5);
  outline-offset: 2px;
}

.faq-question:focus:not(:focus-visible) {
  outline: none;
}

/* Responsive */
@media (max-width: 768px) {
  .faq-question {
    padding: 1.25rem 3rem 1.25rem 1.5rem;
    gap: 1rem;
  }

  .faq-question[aria-expanded="true"] {
    padding-bottom: 0.75rem;
  }

  .faq-question h4 {
    font-size: 1rem;
  }

  .faq-content {
    padding: 0 1.5rem 1.5rem 4.5rem;
  }

  .faq-icon {
    width: 32px;
    height: 32px;
  }

  .faq-icon i {
    font-size: 1.25rem;
  }

  .faq-question::after {
    right: 1.5rem;
  }
}

@media (max-width: 520px) {
  .faq-question {
    padding: 1rem 2.5rem 1rem 1rem;
    gap: 0.75rem;
  }

  .faq-question[aria-expanded="true"] {
    padding-bottom: 0.5rem;
  }

  .faq-content {
    padding: 0 1rem 1rem 3.75rem;
  }

  .faq-question::after {
    right: 1rem;
    width: 6px;
    height: 6px;
  }
}

/* ==========================================
   EQUAL HEIGHT CARDS FOR SUPPORT & EXPANSION
   ========================================== */

.franchise-page .info-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 320px;
}

.franchise-page .info-card h4 {
  margin-bottom: 1.5rem;
}

.franchise-page .info-card ul,
.franchise-page .info-card p {
  flex: 1;
}

.franchise-page .info-card ul {
  margin-bottom: 0;
}

/* Make rows equal height */
.franchise-page .section .row {
  display: flex;
  flex-wrap: wrap;
}

.franchise-page .section .row > [class*="col-"] {
  display: flex;
  flex-direction: column;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .faq-item,
  .faq-question,
  .faq-icon,
  .faq-answer {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  
  .faq-content {
    animation: none !important;
  }
}
