/* ======================================
   FAQ Page Styles - FIXED
   Answer Display + Mobile Responsiveness
====================================== */

* {
  box-sizing: border-box;
}

/* ===== Hero Section ===== */
.faq-hero {
  position: relative;
  background: linear-gradient(135deg, #062141, #0a4d4d);
  color: white;
  padding: 140px 25px 80px;
  text-align: center;
  overflow: hidden;
}

/* Animated Background Shapes */
.hero-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  animation: float 20s infinite ease-in-out;
}

.shape-1 {
  width: 300px;
  height: 300px;
  top: -100px;
  right: -50px;
  animation-delay: 0s;
}

.shape-2 {
  width: 200px;
  height: 200px;
  bottom: -50px;
  left: 10%;
  animation-delay: 5s;
}

.shape-3 {
  width: 150px;
  height: 150px;
  top: 50%;
  left: -30px;
  animation-delay: 10s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-30px) rotate(180deg);
    opacity: 0.6;
  }
}

.faq-inner {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  z-index: 1;
}

/* Hero Icon */
.hero-icon {
  font-size: 70px;
  margin-bottom: 20px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 15px;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 20px;
  line-height: 1.6;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== FAQ Section ===== */
.faq-section {
  padding: 80px 20px;
  background: #f8f9fa;
}

.faq-wrap {
  max-width: 1000px;
  margin: 0 auto;
}

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.faq-title {
  font-size: 36px;
  font-weight: 800;
  color: #062141;
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
}

.faq-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #062141, #0a3a5c);
  border-radius: 2px;
}

.faq-description {
  font-size: 16px;
  color: #666;
  margin-top: 20px;
}

/* ===== FAQ Categories Tabs ===== */
.faq-categories {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
  overflow-x: auto;
  padding-bottom: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.category-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Tajawal', sans-serif;
  white-space: nowrap;
}

.category-tab i {
  font-size: 16px;
}

.category-tab:hover {
  border-color: #062141;
  background: #f8f9fa;
  transform: translateY(-2px);
}

.category-tab.active {
  background: linear-gradient(135deg, #062141, #0a3a5c);
  color: white;
  border-color: #062141;
  box-shadow: 0 4px 15px rgba(6, 33, 65, 0.3);
}

/* ===== FAQ List ===== */
.faq-list {
  margin-top: 30px;
}

.faq-item {
  background: white;
  border-radius: 16px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
}

.faq-item:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}

.faq-item.hidden {
  display: none;
}

/* FAQ Toggle Button */
.faq-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  width: 100%;
  padding: 24px 28px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Tajawal', sans-serif;
}

.faq-toggle:hover {
  background: rgba(6, 33, 65, 0.03);
}

.faq-question {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 18px;
  font-weight: 700;
  color: #062141;
  text-align: right;
  flex: 1;
}

.faq-icon {
  font-size: 14px;
  color: #0a3a5c;
  transition: transform 0.3s ease;
}

.faq-toggle.active .faq-icon {
  transform: rotate(-90deg);
}

.faq-badge {
  padding: 6px 16px;
  background: linear-gradient(135deg, #e8f4f8, #d4e9f2);
  color: #062141;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* ===== FAQ Answer - FIXED ===== */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, padding 0.5s ease;
  background: #fafbfc;
}

.faq-answer.open {
  max-height: 1000px; /* Increased from 500px */
  padding: 0 28px 24px;
}

.answer-content {
  padding-top: 10px;
}

.answer-content p {
  font-size: 16px;
  line-height: 1.8;
  color: #555;
  margin-bottom: 12px;
}

.answer-content a {
  color: #0a4d4d;
  text-decoration: underline;
  font-weight: 600;
}

.answer-content a:hover {
  color: #062141;
}

.answer-content ul {
  margin: 15px 0;
  padding-right: 20px;
  list-style: none;
}

.answer-content ul li {
  font-size: 15px;
  line-height: 1.8;
  color: #666;
  margin-bottom: 8px;
  position: relative;
  padding-right: 20px;
}

.answer-content ul li::before {
  content: '◄';
  position: absolute;
  right: 0;
  color: #0a3a5c;
  font-size: 12px;
}

/* ===== No Results Message ===== */
.no-results {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.no-results i {
  font-size: 60px;
  color: #ddd;
  margin-bottom: 20px;
}

.no-results h3 {
  font-size: 24px;
  font-weight: 700;
  color: #062141;
  margin-bottom: 10px;
}

.no-results p {
  font-size: 16px;
  color: #999;
}

/* ===== Contact Card ===== */
.faq-contact {
  margin-top: 60px;
}

.contact-card {
  background: linear-gradient(135deg, #062141, #0a3a5c);
  color: white;
  padding: 50px 30px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(6, 33, 65, 0.2);
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: rotate 30s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.contact-icon {
  font-size: 50px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.contact-card h3 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.contact-card p {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 30px;
  position: relative;
  z-index: 1;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 35px;
  background: white;
  color: #062141;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.contact-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  gap: 15px;
}

/* ===== Responsive Design ===== */

/* Tablet */
@media (max-width: 992px) {
  .faq-hero {
    padding: 120px 20px 70px;
  }

  .hero-title {
    font-size: 40px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .faq-title {
    font-size: 32px;
  }

  .faq-categories {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .faq-hero {
    padding: 110px 20px 60px;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 15px;
  }

  .hero-icon {
    font-size: 50px;
  }

  .faq-section {
    padding: 60px 16px;
  }

  .faq-title {
    font-size: 28px;
  }

  .faq-categories {
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 10px;
  }

  .category-tab {
    font-size: 14px;
    padding: 10px 18px;
  }

  .faq-question {
    font-size: 16px;
  }

  .faq-toggle {
    padding: 20px 18px;
  }

  .faq-answer.open {
    padding: 0 18px 20px;
    max-height: 1500px; /* Extra height for mobile */
  }

  .answer-content p {
    font-size: 15px;
  }

  .answer-content ul li {
    font-size: 14px;
  }

  .contact-card {
    padding: 40px 20px;
  }

  .contact-card h3 {
    font-size: 24px;
  }

  .contact-btn {
    padding: 14px 30px;
    font-size: 15px;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .faq-hero {
    padding: 100px 16px 50px;
  }

  .hero-title {
    font-size: 26px;
  }

  .hero-subtitle {
    font-size: 14px;
  }

  .hero-icon {
    font-size: 45px;
  }

  .faq-section {
    padding: 50px 12px;
  }

  .faq-title {
    font-size: 24px;
  }

  .faq-question {
    font-size: 15px;
    gap: 10px;
  }

  .faq-toggle {
    padding: 16px 14px;
  }

  .faq-answer.open {
    padding: 0 14px 16px;
  }

  .answer-content p {
    font-size: 14px;
  }

  .answer-content ul li {
    font-size: 13px;
  }

  .contact-card {
    padding: 35px 18px;
  }

  .contact-card h3 {
    font-size: 22px;
  }

  .contact-icon {
    font-size: 40px;
  }
}