/* ==========================================================================
   چرا (Chra) App Website & Privacy Policy Styles
   Inspired directly by the app's emerald tonal theme & dark bento aesthetics
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Light Theme (App Default: Soft Tonal Warm Paper) */
  --bg-primary: #F5F2EA;
  --bg-secondary: #ECE8DC;
  --bg-card: #FFFFFF;
  --bg-card-glass: rgba(255, 255, 255, 0.85);
  --ink-primary: #1D2A24;
  --ink-secondary: #52635B;
  --ink-muted: #7E8C85;
  --line-color: #E1DCCD;
  --line-subtle: #ECE7D9;
  
  /* Accents (Emerald) */
  --accent-primary: #2F6B55;
  --accent-hover: #245543;
  --accent-soft: #DCE8DF;
  --accent-glow: rgba(47, 107, 85, 0.2);
  --accent-secondary: #E58A4F;
  --on-accent: #FFFFFF;
  
  /* Layout & Shadows */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 8px rgba(29, 42, 36, 0.04);
  --shadow-md: 0 8px 24px rgba(29, 42, 36, 0.08);
  --shadow-lg: 0 16px 40px rgba(29, 42, 36, 0.12);
  --shadow-glow: 0 0 35px rgba(47, 107, 85, 0.25);
  
  --font-arabic: 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-latin: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  /* Dark Theme (App: Deep Bento Glow) */
  --bg-primary: #101322;
  --bg-secondary: #171B30;
  --bg-card: #1B2039;
  --bg-card-glass: rgba(27, 32, 57, 0.7);
  --ink-primary: #FFFFFF;
  --ink-secondary: #C5CEE0;
  --ink-muted: #8F9BB3;
  --line-color: rgba(255, 255, 255, 0.10);
  --line-subtle: rgba(255, 255, 255, 0.05);
  
  --accent-primary: #5FCFA3;
  --accent-hover: #48BE90;
  --accent-soft: rgba(95, 207, 163, 0.15);
  --accent-glow: rgba(95, 207, 163, 0.25);
  --accent-secondary: #FF8F72;
  --on-accent: #101322;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 40px rgba(95, 207, 163, 0.3);
}

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

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

body {
  font-family: var(--font-arabic);
  background-color: var(--bg-primary);
  color: var(--ink-primary);
  line-height: 1.7;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  direction: rtl;
  text-align: right;
  min-height: 100vh;
}

body.lang-en {
  font-family: var(--font-latin);
  direction: ltr;
  text-align: left;
}

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

a:hover {
  opacity: 0.85;
}

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

/* Background Atmospheric Glows (Bento) */
.bg-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.bg-glow-1 {
  position: absolute;
  top: -10%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  filter: blur(80px);
}

.bg-glow-2 {
  position: absolute;
  bottom: -15%;
  left: -10%;
  width: 45vw;
  height: 45vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(229, 138, 79, 0.15) 0%, transparent 70%);
  filter: blur(90px);
}

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

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-card-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-subtle);
  transition: var(--transition);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--ink-primary);
  font-weight: 700;
  font-size: 1.35rem;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  object-fit: cover;
}

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

.nav-link {
  color: var(--ink-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: var(--on-accent);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  color: var(--on-accent);
}

.btn-secondary {
  background-color: var(--bg-secondary);
  color: var(--ink-primary);
  border-color: var(--line-color);
}

.btn-secondary:hover {
  background-color: var(--line-color);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--accent-primary);
  border: 1.5px solid var(--accent-primary);
}

.btn-outline:hover {
  background: var(--accent-soft);
  transform: translateY(-2px);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  color: var(--ink-primary);
  border: 1px solid var(--line-subtle);
  cursor: pointer;
  transition: var(--transition);
}

.icon-btn:hover {
  background: var(--line-color);
  color: var(--accent-primary);
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--ink-primary);
  cursor: pointer;
}

/* Hero Section */
.hero {
  padding: 4.5rem 0 3.5rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-soft);
  color: var(--accent-primary);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-primary);
}

.hero-title {
  font-size: 3.1rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink-primary);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero-title span {
  color: var(--accent-primary);
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--ink-secondary);
  margin-bottom: 2rem;
  line-height: 1.8;
  max-width: 580px;
}

.hero-cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.hero-badges-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: var(--ink-muted);
  font-size: 0.88rem;
}

.badge-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.badge-item svg {
  color: var(--accent-primary);
}

/* Device Mockup */
.mockup-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.phone-mockup {
  position: relative;
  width: 290px;
  height: 590px;
  background: #1A1E26;
  border: 10px solid #2B3240;
  border-radius: 46px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  overflow: hidden;
  transition: transform 0.4s ease;
}

.phone-mockup:hover {
  transform: translateY(-6px) scale(1.02);
}

.phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 18px;
  background: #11141B;
  border-radius: 12px;
  z-index: 10;
}

.phone-screen {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.mockup-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
  background: var(--bg-card);
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-subtle);
}

.mockup-pill {
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.mockup-pill.active {
  background: var(--accent-primary);
  color: var(--on-accent);
}

/* Bento Features Section */
.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--bg-secondary);
}

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

.section-tag {
  color: var(--accent-primary);
  font-weight: 700;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--ink-primary);
  margin-bottom: 0.75rem;
}

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

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--line-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.bento-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
}

.bento-card.span-2 {
  grid-column: span 2;
}

.card-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
}

.bento-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 0.65rem;
}

.bento-card p {
  font-size: 0.95rem;
  color: var(--ink-secondary);
  line-height: 1.7;
}

/* Gallery Carousel / Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.gallery-item {
  background: var(--bg-card);
  border: 1px solid var(--line-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-align: center;
  padding: 0.75rem;
}

.gallery-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-primary);
}

.gallery-img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}

.gallery-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-primary);
}

/* Privacy & Legal Content Box */
.privacy-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--line-color);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 3rem;
}

.privacy-header {
  border-bottom: 1px solid var(--line-color);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.privacy-meta {
  display: flex;
  gap: 1.5rem;
  color: var(--ink-muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.privacy-section {
  margin-bottom: 2.5rem;
}

.privacy-section h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.privacy-section h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink-primary);
  margin: 1.25rem 0 0.5rem;
}

.privacy-section p {
  color: var(--ink-secondary);
  font-size: 0.98rem;
  margin-bottom: 0.85rem;
  line-height: 1.8;
}

.privacy-section ul {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 1.25rem;
}

.privacy-section ul li {
  position: relative;
  padding-right: 1.5rem;
  margin-bottom: 0.65rem;
  color: var(--ink-secondary);
}

body.lang-en .privacy-section ul li {
  padding-right: 0;
  padding-left: 1.5rem;
}

.privacy-section ul li::before {
  content: "•";
  position: absolute;
  right: 0;
  color: var(--accent-primary);
  font-size: 1.4rem;
  line-height: 1;
}

body.lang-en .privacy-section ul li::before {
  right: auto;
  left: 0;
}

.table-responsive {
  overflow-x: auto;
  margin: 1.5rem 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.data-table th, .data-table td {
  padding: 0.85rem 1.2rem;
  border: 1px solid var(--line-color);
  text-align: right;
}

body.lang-en .data-table th, body.lang-en .data-table td {
  text-align: left;
}

.data-table th {
  background: var(--bg-secondary);
  color: var(--ink-primary);
  font-weight: 700;
}

.data-table tr:nth-child(even) {
  background: var(--bg-secondary);
}

.highlight-box {
  background: var(--accent-soft);
  border-right: 4px solid var(--accent-primary);
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  margin: 1.5rem 0;
}

body.lang-en .highlight-box {
  border-right: none;
  border-left: 4px solid var(--accent-primary);
}

.highlight-box p {
  margin: 0;
  color: var(--ink-primary);
  font-weight: 500;
}

/* Download Callout */
.cta-banner {
  background: linear-gradient(135deg, var(--accent-primary) 0%, #1A4736 100%);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2.5rem;
  color: #FFFFFF;
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.cta-banner h2 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
}

.cta-banner p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.cta-btns {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.btn-white {
  background: #FFFFFF;
  color: #1A4736;
  font-weight: 700;
}

.btn-white:hover {
  background: #F5F2EA;
  transform: translateY(-2px);
  color: #1A4736;
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--line-color);
  padding: 3.5rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer-brand {
  max-width: 340px;
}

.footer-brand-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 0.85rem;
  color: var(--ink-primary);
}

.footer-desc {
  font-size: 0.92rem;
  color: var(--ink-secondary);
  line-height: 1.7;
}

.footer-col h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 1.2rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.65rem;
}

.footer-links a {
  color: var(--ink-secondary);
  font-size: 0.92rem;
}

.footer-links a:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  border-top: 1px solid var(--line-color);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-muted);
  font-size: 0.88rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Responsive */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }
  
  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-cta {
    justify-content: center;
  }
  
  .hero-badges-info {
    justify-content: center;
  }
  
  .bento-grid {
    grid-template-columns: 1fr;
  }
  
  .bento-card.span-2 {
    grid-column: span 1;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: var(--bg-card);
    flex-direction: column;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid var(--line-color);
  }
  
  .nav-links.open {
    display: flex;
  }
  
  .mobile-nav-toggle {
    display: block;
  }
  
  .hero-title {
    font-size: 2.3rem;
  }
  
  .privacy-wrapper {
    padding: 1.5rem;
  }
}
