/* ══════════════════════════════════════════════════════════════
   NOMO Legal Pages Stylesheet (legal.css)
   Clean, modern, and accessible design system for NOMO
   ══════════════════════════════════════════════════════════════ */

:root {
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --primary-light: #EEF2FF;
  --primary-subtle: rgba(79, 70, 229, 0.08);
  --primary-border: rgba(79, 70, 229, 0.2);
  
  --secondary: #F59E0B;
  --secondary-light: #FEF3C7;
  --blue-letter: #2563EB;
  
  --text-main: #0F172A;
  --text-body: #334155;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  
  --bg-page: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-alt: #F1F5F9;
  
  --border: #E2E8F0;
  --border-focus: #CBD5E1;
  
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 16px 36px rgba(15, 23, 42, 0.08);
  
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: 'Cairo', sans-serif;
  line-height: 1.8;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

body.lang-en,
body.lang-fr,
body.lang-tr,
body.lang-ja {
  font-family: 'Inter', sans-serif;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── HEADER & NAV ───────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

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

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-badge {
  font-size: 22px;
  font-weight: 900;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nomo-logo-text {
  display: inline-flex;
  direction: ltr;
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.nomo-logo-text .b { color: var(--blue-letter); }
.nomo-logo-text .y { color: var(--secondary); }

.header-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link {
  color: var(--text-body);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav-link:hover {
  color: var(--primary);
  background: var(--primary-light);
  text-decoration: none;
}

.nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
  font-weight: 700;
}

/* ── LANGUAGE SWITCHER BAR ──────────────────────── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 3px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 3px;
  border-radius: 30px;
  box-shadow: var(--shadow-sm);
}

.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  transition: all var(--transition);
  font-family: inherit;
}

.lang-btn:hover {
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.05);
}

.lang-btn.active {
  background: var(--primary);
  color: #FFFFFF;
}

/* ── HERO BANNER ────────────────────────────────── */
.legal-hero {
  background: linear-gradient(135deg, #0F172A 0%, #1E1B4B 60%, #312E81 100%);
  color: #FFFFFF;
  padding: 60px 0 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.legal-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #FCD34D;
}

.hero-title {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 14px;
}

.hero-title .highlight {
  color: #FCD34D;
}

.hero-subtitle {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 680px;
  margin: 0 auto 16px;
  line-height: 1.7;
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  flex-wrap: wrap;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ── MEDICAL & CRITICAL ALERTS ──────────────────── */
.alert-box {
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin: 24px 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.alert-medical {
  background: #FFFBEB;
  border: 1.5px solid #FCD34D;
  color: #92400E;
}

.alert-medical .alert-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.alert-medical strong {
  color: #78350F;
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
}

.alert-kids {
  background: #EFF6FF;
  border: 1.5px solid #93C5FD;
  color: #1E40AF;
}

.alert-kids .alert-icon {
  font-size: 24px;
  flex-shrink: 0;
}

/* ── MAIN CONTENT ───────────────────────────────── */
.legal-content {
  padding: 40px 0 70px;
}

/* ── TABLE OF CONTENTS CARD ─────────────────────── */
.toc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-sm);
}

.toc-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px 24px;
  list-style: none;
}

.toc-list li a {
  color: var(--text-body);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}

.toc-list li a:hover {
  color: var(--primary);
  transform: translateX(-3px);
  text-decoration: none;
}

[dir="ltr"] .toc-list li a:hover {
  transform: translateX(3px);
}

/* ── SECTIONS ───────────────────────────────────── */
.legal-section {
  display: flex;
  gap: 20px;
  margin-bottom: 32px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.legal-section:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-border);
}

.section-number {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--blue-letter));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.section-body {
  flex: 1;
  min-width: 0;
}

.section-body h2 {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 12px;
  line-height: 1.4;
}

.section-body p {
  color: var(--text-body);
  margin-bottom: 14px;
  font-size: 14.5px;
}

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

.section-body ul, .section-body ol {
  padding-right: 20px;
  margin-bottom: 14px;
  color: var(--text-body);
}

[dir="ltr"] .section-body ul, [dir="ltr"] .section-body ol {
  padding-right: 0;
  padding-left: 20px;
}

.section-body li {
  margin-bottom: 8px;
  font-size: 14px;
}

/* ── CARDS & GRIDS INSIDE SECTIONS ──────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.info-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  transition: transform var(--transition), border-color var(--transition);
}

.info-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-border);
}

.info-card-icon {
  font-size: 24px;
  margin-bottom: 8px;
  display: block;
}

.info-card h4 {
  font-size: 14.5px;
  font-weight: 750;
  color: var(--text-main);
  margin-bottom: 6px;
}

.info-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ── THIRD PARTY SERVICES LIST ──────────────────── */
.tp-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}

.tp-item {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
}

.tp-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.tp-text strong {
  display: block;
  font-size: 14px;
  color: var(--text-main);
  margin-bottom: 2px;
}

.tp-text p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

/* ── STEPS LIST ─────────────────────────────────── */
.steps-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}

.step-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
}

.step-badge {
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

.step-text {
  font-size: 13.5px;
  color: var(--text-body);
}

/* ── CONTACT CARD ───────────────────────────────── */
.contact-card {
  background: linear-gradient(135deg, var(--primary-light), #FEF3C7);
  border: 1.5px solid var(--primary-border);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14.5px;
  flex-wrap: wrap;
}

.contact-icon {
  font-size: 20px;
}

.contact-item a {
  font-weight: 700;
  color: var(--primary);
}

.contact-label {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── FOOTER ─────────────────────────────────────── */
.site-footer {
  background: #0F172A;
  color: rgba(255, 255, 255, 0.75);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 45px 0 30px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}

.footer-brand h4 {
  font-size: 18px;
  font-weight: 900;
  color: #FFFFFF;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-brand p {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.65);
  max-width: 320px;
  line-height: 1.7;
}

.footer-column h5 {
  font-size: 14px;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 14px;
}

.footer-column ul {
  list-style: none;
}

.footer-column li {
  margin-bottom: 8px;
}

.footer-column a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 13.5px;
}

.footer-column a:hover {
  color: #FCD34D;
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

.hidden {
  display: none !important;
}

/* ── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .header-nav {
    justify-content: space-between;
    flex-wrap: wrap;
  }
  
  .legal-section {
    flex-direction: column;
    gap: 14px;
    padding: 20px;
  }
  
  .section-number {
    width: 38px;
    height: 38px;
    font-size: 14px;
  }
  
  .footer-top {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}
