/* ══════════════════════════════════════════
   Legal Pages — Premium Warm Design
   ══════════════════════════════════════════ */

/* ── Hero Banner ── */
.legal-hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
  padding: 60px 0 50px;
  position: relative;
  overflow: hidden;
}

.legal-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 80% 50%, rgba(220, 53, 69, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 20% 80%, rgba(13, 110, 253, 0.14) 0%, transparent 60%);
  pointer-events: none;
}

.legal-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent-red), var(--color-accent-blue), transparent);
  opacity: 0.6;
}

.legal-hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.legal-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  padding: 6px 18px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 20px;
  backdrop-filter: blur(8px);
}

.legal-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent-red);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.75); }
}

.legal-hero-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 14px;
  line-height: 1.25;
  letter-spacing: -0.5px;
}

.legal-hero-title span {
  background: linear-gradient(135deg, var(--color-accent-red), #ff6b6b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.legal-hero-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.55);
  max-width: 520px;
  margin: 0 auto 28px;
  line-height: 1.8;
}

.legal-last-updated {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 5px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── Language Tabs ── */
.legal-lang-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 20px 0 0;
  flex-wrap: wrap;
}

.lang-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 25px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
}

.lang-tab:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
  transform: translateY(-1px);
}

.lang-tab.active {
  background: var(--color-accent-red);
  border-color: var(--color-accent-red);
  color: #fff;
  box-shadow: 0 4px 16px rgba(220, 53, 69, 0.4);
}

.lang-tab .flag {
  font-size: 1.1rem;
}

/* ── Main Content Area ── */
.legal-content {
  padding: 50px 0 80px;
  background: var(--color-bg-body);
}

.legal-wrapper {
  max-width: 860px;
  margin: 0 auto;
}

/* ── Language Section Panels ── */
.legal-panel {
  display: none;
  animation: fadeIn 0.35s ease;
}

.legal-panel.active {
  display: block;
}

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

/* ── Section Cards ── */
.legal-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.03);
  padding: 32px 36px;
  margin-bottom: 24px;
  border: 1px solid rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.legal-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.10);
  transform: translateY(-2px);
}

.legal-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--color-accent-red), var(--color-accent-blue));
  border-radius: 0 16px 16px 0;
}

.legal-panel.ltr .legal-card::before {
  right: auto;
  left: 0;
  border-radius: 16px 0 0 16px;
}

/* ── Card Header ── */
.legal-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.legal-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(220,53,69,0.10), rgba(220,53,69,0.05));
  border: 1px solid rgba(220,53,69,0.12);
}

.legal-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-text-primary);
  margin: 0;
}

/* ── Card Body Text ── */
.legal-card-body {
  color: var(--color-text-secondary);
  line-height: 2;
  font-size: 0.97rem;
}

.legal-card-body p {
  margin-bottom: 14px;
}

.legal-card-body p:last-child {
  margin-bottom: 0;
}

.legal-card-body ul {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-card-body ul li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.legal-card-body ul li::before {
  content: '✦';
  color: var(--color-accent-red);
  font-size: 0.65rem;
  margin-top: 6px;
  flex-shrink: 0;
}

.legal-panel.ltr .legal-card-body ul li {
  flex-direction: row;
}

/* ── Highlight box ── */
.legal-highlight {
  background: linear-gradient(135deg, rgba(13,110,253,0.06), rgba(13,110,253,0.02));
  border: 1px solid rgba(13,110,253,0.12);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 16px 0;
  font-size: 0.9rem;
  color: #0a58ca;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.legal-highlight::before {
  content: 'ℹ️';
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Contact Card ── */
.legal-contact-card {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
  border-radius: 16px;
  padding: 32px 36px;
  margin-bottom: 24px;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.legal-contact-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 50% 50%, rgba(220,53,69,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.legal-contact-card-inner {
  position: relative;
  z-index: 1;
}

.legal-contact-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.legal-contact-card p {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 20px;
  line-height: 1.8;
}

.legal-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-accent-red);
  color: #fff !important;
  padding: 10px 24px;
  border-radius: 25px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none !important;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(220,53,69,0.35);
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.legal-contact-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(220,53,69,0.5);
  background: var(--color-accent-red-dark);
}

/* ── RTL Adjustments ── */
[dir="rtl"] .legal-card::before {
  right: 0;
  left: auto;
  border-radius: 0 16px 16px 0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .legal-hero {
    padding: 40px 0 36px;
  }

  .legal-card {
    padding: 22px 20px;
  }

  .legal-hero-title {
    font-size: 1.6rem;
  }

  .legal-lang-tabs {
    gap: 8px;
  }

  .lang-tab {
    padding: 6px 14px;
    font-size: 0.8rem;
  }

  .legal-contact-card {
    padding: 24px 20px;
  }
}
