/* Legal pages shared styles */

/* Layout wrapper under fixed header */
.legal-page {
  margin-top: 80px; /* compensate fixed header like hero */
  padding: var(--section-padding) 0;
  background: var(--bg-color);
  min-height: 100vh;
  min-height: 100dvh; /* modern browsers */
}

/* Content container (narrower for readability) */
.legal-container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-inline: auto;
  padding-inline: 20px;
}

/* Header intro */
.legal-header {
  text-align: center;
  margin-bottom: 60px;
}

.legal-header h1 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  color: var(--primary-color);
  margin-bottom: 20px;
  font-weight: 700;
}

.legal-header p {
  font-size: 1.1rem;
  color: var(--gray-600);
  line-height: 1.6;
}

/* Card-like content area */
.legal-content {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: clamp(24px, 3.5vw, 40px);
  box-shadow: var(--shadow);
}

.legal-content h2 {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin: 30px 0 15px 0;
  font-weight: 600;
}

.legal-content h3 {
  color: var(--secondary-color);
  font-size: 1.2rem;
  margin: 25px 0 10px 0;
  font-weight: 500;
}

.legal-content p {
  line-height: 1.7;
  margin-bottom: 15px;
  color: var(--text-color);
}

.legal-content ul {
  margin: 15px 0;
  padding-inline-start: 20px;
}

.legal-content li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* Utility boxes used across legal pages */
.highlight-box {
  background: var(--gray-100);
  padding: 20px;
  border-radius: 10px;
  margin: 30px 0;
  border-inline-start: 4px solid var(--accent-color);
  border-left: 4px solid var(--accent-color); /* fallback */
}

.contact-info {
  background: var(--gray-100);
  padding: 20px;
  border-radius: 10px;
  margin: 30px 0;
  border-inline-start: 4px solid var(--accent-color);
  border-left: 4px solid var(--accent-color); /* fallback */
}

/* Mentions légales specific helpers included for reuse */
.company-info {
  background: var(--gray-100);
  padding: 25px;
  border-radius: 15px;
  margin: 30px 0;
  border-inline-start: 5px solid var(--primary-color);
  border-left: 5px solid var(--primary-color); /* fallback */
}

.contact-section {
  background: var(--gray-100);
  padding: 20px;
  border-radius: 10px;
  margin: 30px 0;
  border-inline-start: 4px solid var(--accent-color);
  border-left: 4px solid var(--accent-color); /* fallback */
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.info-item {
  background: #f8fafc;
  padding: 15px;
  border-radius: 8px;
  border-inline-start: 3px solid var(--secondary-color);
  border-left: 3px solid var(--secondary-color); /* fallback */
}

.info-item strong {
  color: var(--primary-color);
  display: block;
  margin-bottom: 5px;
}

/* Last updated */
.last-updated {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
  color: var(--gray-600);
  font-style: italic;
}

/* RTL adjustments when language toggles to Arabic (fallbacks for old browsers) */
html[dir="rtl"] .highlight-box,
html[dir="rtl"] .contact-info,
html[dir="rtl"] .contact-section {
  border-right: 4px solid var(--accent-color);
  border-left: none;
}

html[dir="rtl"] .company-info {
  border-right: 5px solid var(--primary-color);
  border-left: none;
}

html[dir="rtl"] .info-item {
  border-right: 3px solid var(--secondary-color);
  border-left: none;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .legal-header h1 {
    font-size: 2rem;
  }
  .info-grid {
    grid-template-columns: 1fr;
  }
}

/* Ensure consistent mobile spacing like other sections */
@media (max-width: 768px) {
  .legal-page {
    padding: var(--section-padding-mobile) 0;
  }
}
