/**
 * Qrole Legal AI - Judicial Light Theme Stylesheet (الوضع المضيء)
 * Authentic, prestigious, ultra-clean, high-contrast judicial aesthetic.
 */

:root {
  /* Judicial Navy Palette */
  --navy-primary: #0d3b66;
  --navy-dark: #082645;
  --navy-deep: #05192e;
  --navy-tint: rgba(13, 59, 102, 0.08);
  --navy-border: rgba(13, 59, 102, 0.15);

  /* Judicial Gold Palette */
  --gold-primary: #b48a28;
  --gold-dark: #8f6a15;
  --gold-hover: #c99e38;
  --gold-tint: rgba(180, 138, 40, 0.10);
  --gold-border: rgba(180, 138, 40, 0.30);
  --gold-glow: rgba(180, 138, 40, 0.20);

  /* Light Theme Surface Backgrounds */
  --bg-page: #f8fafc;
  --bg-section-alt: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-input: #f8fafc;

  /* High-Contrast Typography */
  --text-title: #0b2545;
  --text-body: #334e68;
  --text-muted: #627d98;
  --text-light: #ffffff;

  /* Borders & Shadows */
  --border-light: #e2e8f0;
  --border-subtle: #cbd5e1;
  --shadow-card: 0 4px 20px rgba(13, 59, 102, 0.06);
  --shadow-hover: 0 10px 30px rgba(13, 59, 102, 0.12);
  --shadow-btn: 0 4px 14px rgba(13, 59, 102, 0.20);

  /* Dimensions & Typography */
  --font-family: 'Cairo', system-ui, -apple-system, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-family);
  direction: rtl;
  text-align: right;
  scroll-behavior: smooth;
  background-color: var(--bg-page);
  color: var(--text-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background: radial-gradient(circle at 50% 0%, #ffffff 0%, var(--bg-page) 100%);
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   1. TOP ANNOUNCEMENT BAR (LIGHT JUDICIAL RIBBON)
   ========================================================================== */
.announcement-bar {
  background: #fdfaf2;
  border-bottom: 1px solid var(--gold-border);
  padding: 10px 0;
  font-size: 0.88rem;
  position: relative;
  z-index: 50;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

.announcement-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  text-align: center;
}

.announcement-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold-tint);
  border: 1px solid var(--gold-border);
  color: var(--gold-dark);
  padding: 3px 12px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.78rem;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-primary);
  box-shadow: 0 0 6px var(--gold-primary);
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.2); box-shadow: 0 0 10px var(--gold-hover); }
}

.announcement-text {
  color: #3b2d07;
  font-size: 0.88rem;
}

.announcement-text strong {
  color: var(--gold-dark);
  font-weight: 700;
}

.announcement-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--navy-primary);
  color: #ffffff;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.announcement-btn:hover {
  background: var(--navy-dark);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(13, 59, 102, 0.25);
}

/* ==========================================================================
   2. SITE HEADER
   ========================================================================== */
.site-header {
  padding: 18px 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-img {
  height: 38px;
  width: auto;
  display: block;
}

.header-tag {
  display: inline-block;
  font-size: 0.76rem;
  color: var(--navy-primary);
  background: var(--navy-tint);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--navy-border);
  font-weight: 600;
}

.header-cta {
  background: var(--navy-primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 9px 20px;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-btn);
}

.header-cta:hover {
  background: var(--navy-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(13, 59, 102, 0.25);
}

/* ==========================================================================
   3. HERO SECTION
   ========================================================================== */
.hero-section {
  padding: 60px 0 50px;
  text-align: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-dark);
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 0.3px;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-title);
  margin-bottom: 20px;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.hero-title .gold-gradient {
  color: var(--gold-dark);
  background: linear-gradient(135deg, var(--navy-primary) 0%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--text-body);
  max-width: 760px;
  margin: 0 auto 32px;
}

/* Hero Notice Card */
.exclusivity-notice-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-right: 4px solid var(--gold-primary);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  max-width: 680px;
  margin: 0 auto 36px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: right;
  box-shadow: var(--shadow-card);
}

.notice-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--gold-tint);
  border: 1px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-dark);
  flex-shrink: 0;
}

.notice-text h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-title);
  margin-bottom: 3px;
}

.notice-text p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--navy-primary) 0%, var(--navy-dark) 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-deep) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(13, 59, 102, 0.35);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-title);
  font-weight: 700;
  font-size: 1.02rem;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.btn-secondary:hover {
  background: var(--bg-section-alt);
  border-color: var(--navy-primary);
  color: var(--navy-primary);
  transform: translateY(-1px);
}

/* ==========================================================================
   4. FEATURES SECTION (LIGHT CARDS)
   ========================================================================== */
.features-section {
  padding: 60px 0;
  background: var(--bg-section-alt);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.section-head {
  text-align: center;
  margin-bottom: 40px;
}

.section-kicker {
  color: var(--gold-dark);
  font-weight: 700;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 8px;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-title);
  margin-bottom: 10px;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
}

.features-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 820px;
  margin: 0 auto;
}

.feature-point-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: var(--shadow-card);
  transition: all 0.25s ease;
}

.feature-point-card:hover {
  border-color: var(--gold-primary);
  transform: translateX(-4px);
  box-shadow: var(--shadow-hover);
}

.point-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--gold-tint);
  border: 1px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-dark);
  flex-shrink: 0;
}

.point-content {
  flex: 1;
}

.point-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-title);
  margin-bottom: 4px;
}

.point-desc {
  font-size: 0.92rem;
  color: var(--text-body);
  line-height: 1.55;
  margin: 0;
}

/* ==========================================================================
   5. HOW TO JOIN (3 STEPS)
   ========================================================================== */
.steps-section {
  padding: 60px 0;
  background: var(--bg-page);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-card);
  transition: all 0.25s ease;
}

.step-card:hover {
  border-color: var(--navy-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold-tint);
  border: 1px solid var(--gold-border);
  color: var(--gold-dark);
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.step-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-title);
  margin-bottom: 8px;
}

.step-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   6. INVITATION REQUEST FORM SECTION
   ========================================================================== */
.form-section {
  padding: 60px 0 80px;
  background: var(--bg-section-alt);
  border-top: 1px solid var(--border-light);
}

.form-box {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  max-width: 640px;
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(13, 59, 102, 0.08);
}

.form-box-head {
  text-align: center;
  margin-bottom: 26px;
}

.form-box-head h3 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-title);
  margin-bottom: 8px;
}

.form-box-head p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.qrole-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-body);
}

.form-group label .required {
  color: #d32f2f;
}

.form-control {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-title);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.94rem;
  transition: all 0.2s ease;
  text-align: right;
}

.form-control:focus {
  outline: none;
  border-color: var(--navy-primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(13, 59, 102, 0.12);
}

.form-control::placeholder {
  color: #94a3b8;
}

.field-error-highlight {
  border-color: #d32f2f !important;
  background: rgba(211, 47, 47, 0.05) !important;
}

.form-btn-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--navy-primary) 0%, var(--navy-dark) 100%);
  color: #ffffff;
  border: none;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  padding: 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s ease;
  margin-top: 6px;
  box-shadow: var(--shadow-btn);
}

.form-btn-submit:hover {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-deep) 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(13, 59, 102, 0.3);
}

.form-btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-disclaimer {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 10px;
}

/* Success Box */
.success-box {
  display: none;
  background: rgba(25, 135, 84, 0.08);
  border: 1px solid rgba(25, 135, 84, 0.35);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  color: #0f5132;
}

.success-box h4 {
  color: #0f5132;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.success-box p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #146c43;
  margin-bottom: 12px;
}

.request-ref-badge {
  display: inline-block;
  background: rgba(180, 138, 40, 0.15);
  border: 1px solid var(--gold-primary);
  color: var(--gold-dark);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  margin-top: 8px;
}

/* ==========================================================================
   7. SITE FOOTER
   ========================================================================== */
.site-footer {
  padding: 40px 0 30px;
  border-top: 1px solid var(--border-light);
  background: #ffffff;
  margin-top: auto;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
}

.footer-brand p {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--text-body);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--navy-primary);
  font-weight: 700;
}

.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding-top: 20px;
  text-align: center;
  font-size: 0.8rem;
  color: #94a3b8;
}

/* ==========================================================================
   8. TOAST NOTIFICATIONS & UTILITIES
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
}

.toast-item {
  background: #ffffff;
  border: 1px solid var(--navy-primary);
  color: var(--text-title);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: slideIn 0.3s ease;
}

.toast-item.toast-error {
  border-color: #d32f2f;
  background: #fff5f5;
  color: #b71c1c;
}

.toast-item.toast-success {
  border-color: #198754;
  background: #f0fdf4;
  color: #14532d;
}

.toast-close {
  background: none;
  border: none;
  color: #64748b;
  font-size: 1.2rem;
  cursor: pointer;
}

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

/* ==========================================================================
   9. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 768px) {
  .hero-title {
    font-size: 1.85rem;
    line-height: 1.4;
  }
  .hero-desc {
    font-size: 1.05rem;
  }
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .form-box {
    padding: 24px 18px;
  }
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  .footer-nav {
    justify-content: center;
  }
  .feature-point-card {
    padding: 14px 16px;
    gap: 14px;
  }
  .point-title {
    font-size: 1.02rem;
  }
  .point-desc {
    font-size: 0.88rem;
  }
  .exclusivity-notice-card {
    flex-direction: column;
    text-align: center;
    padding: 16px;
  }
}

/* ==========================================================================
   10. LEGAL DOCUMENT PAGES (LIGHT JUDICIAL STYLE)
   ========================================================================== */
.legal-doc-page {
  background: var(--bg-page);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.legal-hero {
  background: var(--bg-section-alt);
  border-bottom: 1px solid var(--border-light);
  padding: 48px 0 42px;
}

.legal-hero-inner {
  max-width: 900px;
  margin: 0 auto;
}

.back-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--navy-primary);
  font-weight: 700;
  margin-bottom: 16px;
  font-size: 0.92rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.back-nav-link:hover {
  color: var(--navy-dark);
  transform: translateX(-4px);
}

.legal-badge {
  display: inline-block;
  background: var(--gold-tint);
  border: 1px solid var(--gold-border);
  color: var(--gold-dark);
  padding: 3px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.legal-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-title);
  margin-bottom: 10px;
  line-height: 1.35;
}

.legal-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.legal-content-section {
  padding: 50px 0 70px;
  flex: 1;
}

.legal-paper {
  max-width: 900px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 48px 54px;
}

.legal-article {
  margin-bottom: 36px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 28px;
}

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

.article-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.article-num {
  color: var(--gold-dark);
  font-weight: 800;
}

.article-body {
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--text-body);
}

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

.article-body strong {
  color: var(--text-title);
}

.article-body ul {
  margin: 14px 28px 14px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.highlight-box {
  background: #fdfaf2;
  border: 1px solid rgba(180, 138, 40, 0.25);
  border-right: 4px solid var(--gold-primary);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin: 18px 0;
  font-size: 0.98rem;
  color: #3b2d07;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .legal-paper {
    padding: 26px 18px;
  }
  .legal-title {
    font-size: 1.65rem;
  }
  .legal-hero {
    padding: 36px 0 30px;
  }
  .article-title {
    font-size: 1.2rem;
  }
}
