/* ==========================================================================
   Fity App (فيتي) - Landing Page & Legal Portal Design System
   ========================================================================== */

:root {
  --primary: #10B981;
  --primary-hover: #059669;
  --primary-light: #ECFDF5;
  --primary-glow: rgba(16, 185, 129, 0.25);
  
  --secondary: #0284C7;
  --secondary-light: #F0F9FF;
  
  --accent: #F59E0B;
  --accent-light: #FEF3C7;
  
  --danger: #EF4444;
  --danger-light: #FEF2F2;

  --bg-body: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: rgba(255, 255, 255, 0.92);
  --bg-dark: #0B0F19;
  --bg-dark-card: #131B2E;

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --text-light: #F8FAFC;

  --border-color: #E2E8F0;
  --border-focus: #10B981;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 35px -5px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 40px rgba(16, 185, 129, 0.25);

  --font-arabic: 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-latin: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-arabic);
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

html[lang="en"] body {
  font-family: var(--font-latin);
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 900px;
}

/* Header & Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-surface-elevated);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
}

.brand-logo img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.brand-logo .brand-badge {
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  position: relative;
  padding: 6px 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-danger {
  background: var(--danger-light);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: var(--danger);
  color: white;
}

.lang-switch {
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.lang-switch:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.lang-pill-container {
  display: inline-flex;
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  padding: 4px;
  border-radius: var(--radius-full);
  margin-bottom: 24px;
  gap: 4px;
}

.lang-pill {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lang-pill.active {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

/* Hero Section */
.hero {
  position: relative;
  padding: 80px 0 60px;
  background: radial-gradient(circle at 50% 10%, rgba(16, 185, 129, 0.08) 0%, transparent 60%);
  overflow: hidden;
}

.hero-content {
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--primary-light);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 24px;
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, #10B981 0%, #0284C7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 36px;
}

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

.app-store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: var(--bg-dark);
  color: white;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.25s ease;
}

.app-store-badge:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  background: #1e293b;
}

.app-store-badge svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.app-store-badge .badge-text {
  text-align: start;
}

.app-store-badge .badge-sub {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94A3B8;
  display: block;
}

.app-store-badge .badge-main {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
  display: block;
}

/* Feature Cards Grid */
.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 50px;
}

.section-tag {
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  display: block;
}

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

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(16, 185, 129, 0.3);
}

.feature-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Legal & Policy Pages Layout */
.legal-wrapper {
  padding: 60px 0 100px;
}

.legal-header {
  background: linear-gradient(135deg, #0B0F19 0%, #131B2E 100%);
  color: white;
  padding: 60px 0;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 40px;
}

.legal-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.legal-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.legal-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 48px;
  box-shadow: var(--shadow-md);
}

.legal-section {
  margin-bottom: 36px;
}

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

.legal-section h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.legal-section p, 
.legal-section li {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 12px;
}

.legal-section ul {
  padding-inline-start: 24px;
  margin-bottom: 16px;
}

.callout-box {
  background: var(--primary-light);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 20px 0;
}

.callout-box.warning {
  background: var(--accent-light);
  border-color: rgba(245, 158, 11, 0.3);
}

.callout-box.danger {
  background: var(--danger-light);
  border-color: rgba(239, 68, 68, 0.3);
}

.callout-box h4 {
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--bg-dark);
  color: #94A3B8;
  padding: 60px 0 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.footer-brand p {
  margin-top: 16px;
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-col h4 {
  color: white;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: #94A3B8;
  font-size: 0.92rem;
}

.footer-links a:hover {
  color: var(--primary);
  padding-inline-start: 4px;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  flex-wrap: wrap;
  gap: 16px;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-title {
    font-size: 2.4rem;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .nav-links {
    display: none;
  }
  .legal-card {
    padding: 24px;
  }
}

@media (max-width: 600px) {
  .hero-title {
    font-size: 2rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
