/* Legal Page Styles - Modern Clean Design */

/* Header section - Light clean design that contrasts with navbar */
.legal-header {
  background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
  padding: 180px 0 80px;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
}

/* Subtle background pattern */
.legal-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(61, 147, 218, 0.05) 1px, transparent 0);
  background-size: 30px 30px;
  z-index: 0;
}

/* Decorative gradient accent */
.legal-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2B7AC4, #3D93DA, #64B5F6, #3D93DA, #2B7AC4);
  background-size: 200% 100%;
  animation: gradientMove 3s ease infinite;
}

@keyframes gradientMove {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.legal-header-content {
  padding: 0;
  text-align: center;
  position: relative;
  z-index: 1;
}

.legal-header h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 15px;
  letter-spacing: -1px;
  color: #1a1a1a !important;
  background: linear-gradient(135deg, #2B7AC4, #3D93DA);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.legal-header h2 {
  font-weight: 500;
  font-size: 1.25rem;
  margin-bottom: 20px;
  color: #555 !important;
}

.legal-header p {
  font-size: 1rem;
  color: #777 !important;
}

/* Badge style for platform name */
.legal-header p[data-i18n-key="legal.platform"] {
  display: inline-block;
  padding: 8px 24px;
  background: rgba(61, 147, 218, 0.1);
  color: var(--primary, #3D93DA) !important;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

/* Main content area */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 20px 80px;
}

.legal-content h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: #1a1a1a;
}

.legal-content h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #1a1a1a;
}

.legal-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 50px;
  margin-bottom: 20px;
  color: #1a1a1a;
  padding: 15px 20px;
  background: linear-gradient(135deg, rgba(61, 147, 218, 0.08), rgba(100, 181, 246, 0.05));
  border-radius: 12px;
  border-left: 4px solid var(--primary, #3D93DA);
}

.legal-content p {
  margin-bottom: 18px;
  line-height: 1.9;
  color: #555;
  font-size: 1rem;
}

.legal-content ul {
  margin-bottom: 25px;
  padding-left: 0;
  list-style: none;
}

.legal-content ul li {
  margin-bottom: 15px;
  line-height: 1.8;
  color: #555;
  padding-left: 35px;
  position: relative;
}

.legal-content ul li::before {
  content: '\e5ca';
  font-family: 'icomoon';
  position: absolute;
  left: 0;
  top: 2px;
  width: 24px;
  height: 24px;
  background: rgba(61, 147, 218, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--primary, #3D93DA);
  padding-left: 4px;
  padding-top: 2px;
}

.legal-content .intro-text {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 40px;
  padding: 25px 30px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #eee;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  position: relative;
}

.legal-content .intro-text::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2B7AC4, #3D93DA, #64B5F6);
  border-radius: 16px 16px 0 0;
}

.legal-content .signature-section {
  margin-top: 60px;
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.legal-content .signature-box {
  flex: 1;
  min-width: 280px;
  padding: 30px;
  background: #f8f9fa;
  border-radius: 16px;
  border: 1px solid #eee;
}

.legal-content .signature-box h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 25px;
  color: var(--primary, #3D93DA);
}

.legal-content .signature-line {
  border-bottom: 1px dashed #bbb;
  margin-bottom: 18px;
  padding-bottom: 8px;
  color: #666;
}

/* ================================================
   RESPONSIVE STYLES
   ================================================ */

/* Tablet */
@media (max-width: 991.98px) {
  .legal-header {
    padding: 160px 0 60px;
  }

  .legal-header h1 {
    font-size: 2.5rem;
  }

  .legal-header h2 {
    font-size: 1.1rem;
  }

  .legal-content {
    padding: 40px 20px 60px;
  }

  .legal-content h3 {
    margin-top: 40px;
  }
}

/* Mobile */
@media (max-width: 767.98px) {
  .legal-header {
    padding: 130px 0 50px;
    text-align: center;
  }

  .legal-header h1 {
    font-size: 1.85rem;
    margin-bottom: 12px;
  }

  .legal-header h2 {
    font-size: 1rem;
    padding: 0 15px;
  }

  .legal-content {
    padding: 30px 15px 50px;
  }

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

  .legal-content h2 {
    font-size: 1.4rem;
  }

  .legal-content h3 {
    font-size: 1.1rem;
    margin-top: 35px;
    margin-bottom: 15px;
    padding: 12px 15px;
  }

  .legal-content p {
    font-size: 0.95rem;
    line-height: 1.8;
  }

  .legal-content ul li {
    padding-left: 30px;
    font-size: 0.95rem;
  }

  .legal-content ul li::before {
    width: 22px;
    height: 22px;
    font-size: 12px;
  }

  .legal-content .intro-text {
    font-size: 1rem;
    padding: 20px;
    text-align: center;
  }

  .legal-content .signature-section {
    gap: 20px;
  }

  .legal-content .signature-box {
    padding: 20px;
    min-width: 100%;
  }
}

/* Small Mobile */
@media (max-width: 575.98px) {
  .legal-header {
    padding: 110px 0 40px;
  }

  .legal-header h1 {
    font-size: 1.6rem;
  }

  .legal-header h2 {
    font-size: 0.9rem;
  }

  .legal-content {
    padding: 25px 12px 40px;
  }

  .legal-content h3 {
    font-size: 1rem;
    padding: 10px 12px;
  }

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

/* ================================================
   RTL Support for Arabic
   ================================================ */
body.lang-ar .legal-header,
body.lang-ar .legal-header-content,
body.lang-ar .legal-content {
  text-align: right;
  direction: rtl;
}

body.lang-ar .legal-content h1,
body.lang-ar .legal-content h2,
body.lang-ar .legal-content h3,
body.lang-ar .legal-content p,
body.lang-ar .legal-content li,
body.lang-ar .legal-header h1,
body.lang-ar .legal-header h2,
body.lang-ar .legal-header p {
  text-align: right;
}

body.lang-ar .legal-content h3 {
  border-left: none;
  border-right: 4px solid var(--primary, #3D93DA);
}

body.lang-ar .legal-content ul {
  padding-left: 0;
  padding-right: 0;
}

body.lang-ar .legal-content ul li {
  padding-left: 0;
  padding-right: 35px;
}

body.lang-ar .legal-content ul li::before {
  left: auto;
  right: 0;
}

/* RTL Mobile center alignment */
@media (max-width: 767.98px) {
  body.lang-ar .legal-header,
  body.lang-ar .legal-header-content {
    text-align: center;
  }

  body.lang-ar .legal-header h1,
  body.lang-ar .legal-header h2,
  body.lang-ar .legal-header p {
    text-align: center;
  }

  body.lang-ar .legal-content .intro-text {
    text-align: center;
  }
}
