/* ===== FAQ SECTION ===== */
.faq-section {
  padding: var(--space-2xl) 0;
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--space-2xl);
}

.section-header h2 {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
  font-weight: 800;
}

.section-header p {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--color-gray-dark);
}

/* FAQ Grid - 2×5 on desktop */
.faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin: 0 auto;
}

/* FAQ Type Container */
.faq-type {
  background: white;
  border-radius: 16px;
  padding: var(--space-xl);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.faq-type:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

/* Type Header - Icon + Title side by side */
.type-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 2px solid;
}

/* Unique colors for each FAQ type header */
.faq-type[data-type="1"] .type-header { border-color: #4f46e5; } /* Admissions - Indigo */
.faq-type[data-type="2"] .type-header { border-color: #059669; } /* Curriculum - Emerald */
.faq-type[data-type="3"] .type-header { border-color: #dc2626; } /* Faith - Red */
.faq-type[data-type="4"] .type-header { border-color: #7c3aed; } /* Safety - Purple */
.faq-type[data-type="5"] .type-header { border-color: #0891b2; } /* Teachers - Cyan */
.faq-type[data-type="6"] .type-header { border-color: #ea580c; } /* Programs - Orange */
.faq-type[data-type="7"] .type-header { border-color: #db2777; } /* Fees - Pink */
.faq-type[data-type="8"] .type-header { border-color: #65a30d; } /* Parents - Lime */
.faq-type[data-type="9"] .type-header { border-color: #0d9488; } /* Outcomes - Teal */
.faq-type[data-type="10"] .type-header { border-color: #9333ea; } /* Visits - Violet */

.type-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Icon backgrounds matching header colors */
.faq-type[data-type="1"] .type-icon { background: rgba(79, 70, 229, 0.1); }
.faq-type[data-type="2"] .type-icon { background: rgba(5, 150, 105, 0.1); }
.faq-type[data-type="3"] .type-icon { background: rgba(220, 38, 38, 0.1); }
.faq-type[data-type="4"] .type-icon { background: rgba(124, 58, 237, 0.1); }
.faq-type[data-type="5"] .type-icon { background: rgba(8, 145, 178, 0.1); }
.faq-type[data-type="6"] .type-icon { background: rgba(234, 88, 12, 0.1); }
.faq-type[data-type="7"] .type-icon { background: rgba(219, 39, 119, 0.1); }
.faq-type[data-type="8"] .type-icon { background: rgba(101, 163, 13, 0.1); }
.faq-type[data-type="9"] .type-icon { background: rgba(13, 148, 136, 0.1); }
.faq-type[data-type="10"] .type-icon { background: rgba(147, 51, 234, 0.1); }

.type-icon img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.type-title {
  font-size: 1.4rem;
  color: var(--color-primary);
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
}

/* FAQ Questions */
.faq-questions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.08);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: white;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-family: inherit;
  font-size: 1rem;
}

.faq-question:hover {
  background-color: #f8fafc;
}

.question-text {
  font-weight: 600;
  color: var(--color-gray-dark);
  line-height: 1.5;
  flex: 1;
  padding-right: 1rem;
}

.toggle-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.3s ease;
  color: white;
}

/* Rotating plus icon colors for questions (repeats across types) */
.faq-type .faq-questions .faq-item:nth-child(1) .toggle-icon { background: blue; } /* Red */
.faq-type .faq-questions .faq-item:nth-child(2) .toggle-icon { background: #dc2626; } /* Green */
.faq-type .faq-questions .faq-item:nth-child(3) .toggle-icon { background: #d97706; } /* Amber */
.faq-type .faq-questions .faq-item:nth-child(4) .toggle-icon { background: #7c3aed; } /* Purple */
.faq-type .faq-questions .faq-item:nth-child(5) .toggle-icon { background: #0891b2; } /* Cyan */
.faq-type .faq-questions .faq-item:nth-child(6) .toggle-icon { background: #db2777; } /* Pink */

/* Hover effects on toggle */
.faq-question:hover .toggle-icon {
  transform: scale(1.1);
}

.faq-answer {
  padding: 0;
  background: white;
  display: none;
  animation: fadeIn 0.3s ease;
}

.faq-item.open .faq-answer {
  display: block;
  padding: 1rem 1.25rem 1.5rem;
  border-top: 1px solid rgba(0,0,0,0.05);
}

.faq-answer p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-gray);
}

.faq-answer p + p {
  margin-top: 0.75rem;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== RESPONSIVE DESIGN ===== */

/* Desktop: 2×5 grid */
@media (min-width: 1024px) {
  .faq-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns */
    gap: var(--space-xl);
  }
}

/* Tablet: Still 2 columns but adjusted spacing */
@media (min-width: 768px) and (max-width: 1023px) {
  .faq-section {
    padding: var(--space-2xl) var(--space-lg);
  }
  
  .faq-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }
  
  .faq-type {
    padding: var(--space-lg);
  }
  
  .section-header h2 {
    font-size: 2.2rem;
  }
  
  .section-header p {
    font-size: 1.1rem;
  }
  
  .type-title {
    font-size: 1.3rem;
  }
}

/* Mobile: 1 column stack */
@media (max-width: 767px) {
  .faq-section {
    padding: var(--space-lg) 0;
  }
  
  .section-header {
    margin-bottom: var(--space-xl);
  }
  
  .section-header h2 {
    font-size: 2rem;
  }
  
  .section-header p {
    font-size: 1.05rem;
  }
  
  .faq-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
  
  .faq-type {
    padding: 1rem var(--space-xs);
  }
  
  .type-header {
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
  }
  
  .type-icon {
    width: 48px;
    height: 48px;
  }
  
  .type-icon img {
    width: 28px;
    height: 28px;
  }
  
  .type-title {
    font-size: 1.2rem;
  }
  
  .faq-question {
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
  }
  
  .toggle-icon {
    width: 26px;
    height: 26px;
    font-size: 1.1rem;
  }
  
  .faq-item.open .faq-answer {
    padding: 0.875rem 1rem 1.25rem;
  }
  
  .faq-answer p {
    font-size: 0.9rem;
  }
}
