/* ==================================================
   M3ALEMI — Legal & Info Pages Stylesheet
   Shared styles for Privacy, Terms, FAQ pages
   ================================================== */

/* ---------- PAGE HERO (mini header) ---------- */
.page-hero {
  padding: 140px 0 60px;
  background: linear-gradient(165deg, #f0f5ff 0%, #dbeafe 50%, #bfdbfe 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -150px;
  right: -150px;
  width: 400px;
  height: 400px;
  background: var(--blue-300);
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.3;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 300px;
  height: 300px;
  background: var(--blue-400);
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.2;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  color: var(--primary);
}

.page-hero-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.025em;
}

.page-hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

.page-hero-meta {
  margin-top: 16px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Wave */
.page-hero-wave {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  z-index: 2;
}

.page-hero-wave svg {
  width: 100%;
  height: 50px;
  display: block;
}

/* ---------- CONTENT BODY ---------- */
.page-content {
  padding: 80px 0 100px;
  background: var(--bg-white);
}

.page-content .container {
  max-width: 820px;
}

/* ---------- LEGAL CONTENT ---------- */
.legal-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 48px 0 16px;
  letter-spacing: -0.02em;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--blue-50);
}

.legal-content h2:first-of-type {
  margin-top: 0;
}

.legal-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 28px 0 10px;
}

.legal-content p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.legal-content ul,
.legal-content ol {
  margin: 12px 0 20px 24px;
  color: var(--text-secondary);
}

.legal-content li {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 8px;
  padding-left: 4px;
}

.legal-content li::marker {
  color: var(--primary);
  font-weight: 600;
}

.legal-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.legal-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: var(--transition-fast);
}

.legal-content a:hover {
  color: var(--primary-dark);
}

.legal-content .highlight-box {
  padding: 20px 24px;
  background: var(--blue-50);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 24px 0;
}

.legal-content .highlight-box p {
  margin-bottom: 0;
  color: var(--gray-700);
}

/* ---------- FAQ SECTION ---------- */
.faq-categories {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 48px;
}

.faq-category-btn {
  padding: 10px 22px;
  font-family: var(--font-family);
  font-size: 0.9375rem;
  font-weight: 500;
  background: var(--bg-white);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.faq-category-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.faq-category-btn.active {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-blue);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover {
  border-color: var(--blue-200);
  box-shadow: var(--shadow-sm);
}

.faq-item.active {
  border-color: var(--blue-200);
  box-shadow: var(--shadow-md);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: var(--transition-fast);
}

.faq-question:hover {
  color: var(--primary);
}

.faq-question-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-50);
  color: var(--primary);
  border-radius: 50%;
  transition: var(--transition);
}

.faq-item.active .faq-question-icon {
  background: var(--primary);
  color: white;
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer-inner {
  padding: 0 24px 20px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.faq-answer-inner a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- CONTACT BOX (bottom of FAQ) ---------- */
.contact-box {
  margin-top: 64px;
  padding: 40px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-800));
  border-radius: var(--radius-xl);
  text-align: center;
  color: white;
}

.contact-box h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.contact-box p {
  font-size: 1rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 24px;
}

.contact-methods {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-method {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 500;
  color: white;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}

.contact-method:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-2px);
}

/* ---------- BACK TO HOME LINK ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 32px;
  transition: var(--transition-fast);
}

.back-link:hover {
  gap: 10px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .page-hero {
    padding: 110px 0 44px;
  }

  .page-hero-title {
    font-size: 1.75rem;
  }

  .page-hero-subtitle {
    font-size: 1rem;
  }

  .page-hero-icon {
    width: 52px;
    height: 52px;
  }

  .page-content {
    padding: 56px 0 72px;
  }

  .legal-content h2 {
    font-size: 1.25rem;
    margin: 36px 0 12px;
  }

  .legal-content h3 {
    font-size: 1rem;
  }

  .legal-content p {
    font-size: 0.9375rem;
    line-height: 1.75;
  }

  .legal-content li {
    font-size: 0.9375rem;
  }

  .legal-content .highlight-box {
    padding: 16px 20px;
  }

  .faq-categories {
    gap: 8px;
  }

  .faq-category-btn {
    padding: 8px 16px;
    font-size: 0.8125rem;
  }

  .faq-question {
    padding: 16px 20px;
    font-size: 0.9375rem;
  }

  .faq-answer-inner {
    padding: 0 20px 16px;
    font-size: 0.875rem;
  }

  .contact-box {
    padding: 28px 20px;
  }

  .contact-box h3 {
    font-size: 1.25rem;
  }

  .contact-box p {
    font-size: 0.9375rem;
  }

  .contact-methods {
    flex-direction: column;
    align-items: center;
  }

  .contact-method {
    width: 100%;
    max-width: 300px;
    justify-content: center;
    font-size: 0.875rem;
    padding: 10px 20px;
  }

  .back-link {
    font-size: 0.875rem;
    margin-bottom: 24px;
  }
}

@media (max-width: 480px) {
  .page-hero {
    padding: 96px 0 36px;
  }

  .page-hero-title {
    font-size: 1.5rem;
  }

  .page-hero-subtitle {
    font-size: 0.9375rem;
  }

  .page-hero-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 16px;
  }

  .page-content {
    padding: 40px 0 56px;
  }

  .page-content .container {
    padding: 0 16px;
  }

  .legal-content h2 {
    font-size: 1.125rem;
    margin: 28px 0 10px;
  }

  .legal-content p,
  .legal-content li {
    font-size: 0.875rem;
  }

  .faq-categories {
    gap: 6px;
    margin-bottom: 32px;
  }

  .faq-category-btn {
    padding: 7px 14px;
    font-size: 0.75rem;
  }

  .faq-question {
    padding: 14px 16px;
    font-size: 0.875rem;
    gap: 12px;
  }

  .faq-question-icon {
    width: 24px;
    height: 24px;
  }

  .faq-answer-inner {
    padding: 0 16px 14px;
    font-size: 0.8125rem;
  }

  .contact-box {
    padding: 24px 16px;
    margin-top: 40px;
  }

  .contact-box h3 {
    font-size: 1.125rem;
  }

  .contact-box p {
    font-size: 0.875rem;
    margin-bottom: 20px;
  }
}
