/* ================================
   QUEST4YOU - Legal Pages CSS
   Termos, Privacidade, Contacto
   ================================ */

/* Container */
.legal-container {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--spacing-2xl) var(--spacing-lg);
  min-height: calc(100vh - 200px);
}

.legal-content {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--spacing-2xl);
  box-shadow: var(--shadow-lg);
}

.legal-content h1 {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: var(--spacing-sm);
  text-align: center;
}

.last-updated {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: var(--spacing-2xl);
  font-size: 0.9rem;
}

/* Sections */
.legal-section {
  margin-bottom: var(--spacing-2xl);
  padding-bottom: var(--spacing-xl);
  border-bottom: 1px solid var(--border);
}

.legal-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.legal-section h2 {
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-left: 4px solid var(--primary);
  padding-left: var(--spacing-md);
}

.legal-section h3 {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-sm);
}

.legal-section p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--spacing-md);
}

.legal-section ul {
  margin-left: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
}

.legal-section ul li {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--spacing-sm);
}

.legal-section a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.legal-section a:hover {
  text-decoration: underline;
}

/* Privacy Intro */
.privacy-intro {
  background: linear-gradient(135deg, rgba(229, 57, 53, 0.1), rgba(194, 24, 91, 0.1));
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-2xl);
  border-left: 4px solid var(--primary);
}

.privacy-intro p {
  margin: 0;
  font-size: 1.1rem;
}

/* ================================
   CONTACT PAGE
   ================================ */
.contact-page .legal-content h1 {
  margin-bottom: var(--spacing-lg);
}

.contact-intro {
  text-align: center;
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-2xl);
}

/* Contact Grid */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-2xl);
}

.contact-card {
  background: linear-gradient(135deg, #f8f9fa, #ffffff);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  text-align: center;
  transition: all 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.contact-icon {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
}

.contact-card h3 {
  font-size: 1.2rem;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

.contact-card p {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-md);
  font-size: 0.95rem;
}

.contact-link {
  color: var(--primary);
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-md);
  background: rgba(229, 57, 53, 0.1);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.contact-link:hover {
  background: var(--primary);
  color: white;
}

.contact-highlight {
  display: inline-block;
  background: var(--gradient-primary);
  color: white;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-sm);
  font-weight: 600;
}

/* FAQ Section */
.faq-section {
  margin-top: var(--spacing-2xl);
  padding-top: var(--spacing-2xl);
  border-top: 2px solid var(--border);
}

.faq-section h2 {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.faq-item {
  background: #f8f9fa;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

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

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-lg);
  cursor: pointer;
  font-weight: 600;
  color: var(--text-primary);
  transition: background 0.2s;
}

.faq-question:hover {
  background: rgba(229, 57, 53, 0.05);
}

.faq-toggle {
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: 700;
  transition: transform 0.3s;
}

.faq-item.open .faq-toggle {
  transform: rotate(45deg);
}

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

.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 var(--spacing-lg) var(--spacing-lg);
}

.faq-answer p {
  color: var(--text-secondary);
  line-height: 1.7;
}

.faq-answer a {
  color: var(--primary);
  text-decoration: none;
}

.faq-answer a:hover {
  text-decoration: underline;
}

/* Contact Form */
.contact-form-section {
  margin-top: var(--spacing-2xl);
  padding-top: var(--spacing-2xl);
  border-top: 2px solid var(--border);
}

.contact-form-section h2 {
  text-align: center;
  margin-bottom: var(--spacing-sm);
}

.contact-form-section > p {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xl);
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
}

.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-group label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-weight: 500;
  color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s;
  background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Form Success */
.form-success {
  text-align: center;
  padding: var(--spacing-2xl);
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.success-icon {
  font-size: 4rem;
  margin-bottom: var(--spacing-md);
}

.form-success h3 {
  color: var(--success);
  margin-bottom: var(--spacing-sm);
}

.form-success p {
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
  .legal-content {
    padding: var(--spacing-lg);
  }

  .legal-content h1 {
    font-size: 1.8rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}
