/* New, luxury-themed design (V2: Liquid Ether) for San Smart by Manus */
:root {
  --bg-dark: #1F160F; /* Deep brown for luxury dark theme aligned with app */
  --bg-light: #4A3728; /* App primary brown */
  --surface: rgba(255, 255, 255, 0.04); /* Glassmorphism surface */
  --surface-hover: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.14);
  --text-light: #F5F5F5; /* Light neutral text */
  --text-muted: #D0C4B8;
  --accent: #D4AF37; /* App accent gold */
  --accent-2: #F3D36B; /* Lighter gold for highlights */
  --primary: #8B6F47; /* App secondary brown */
  --radius: 18px;
  --radius-lg: 30px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  --container: 1200px;
  --font-main: 'Arial', sans-serif;
}

/* Global Reset and Typography */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg-dark);
  color: var(--text-light);
  font-family: var(--font-main);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: right; /* Default to RTL */
  overflow-x: hidden; /* Prevent horizontal scroll from animations */
}

/* LTR overrides when language is English */
[dir="ltr"] body {
  text-align: left;
}

[dir="ltr"] .hero__subtitle,
[dir="ltr"] .lead,
[dir="ltr"] .section-title {
  text-align: left;
}

[dir="ltr"] .hero__subtitle {
  margin-inline: 0 auto;
}

/* Animated Background Gradient */
.background-gradient {
  position: fixed;
  top: 0;
  left: 0;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 10% 10%, var(--primary) 0%, transparent 25%),
              radial-gradient(circle at 90% 90%, var(--accent) 0%, transparent 25%),
              linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-light) 100%);
  background-size: 200% 200%;
  animation: liquid-move 30s ease infinite alternate;
  z-index: -1;
  opacity: 0.7;
}

@keyframes liquid-move {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}

h1, h2, h3, .brand__name {
  font-family: var(--font-main);
  font-weight: 800;
  color: var(--text-light);
}

h1 { font-size: clamp(2.5rem, 7vw, 4.5rem); line-height: 1.1; }
h2 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 1rem; }

img { max-width: 100%; display: block; }
a { color: var(--accent-2); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent); }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.section-title { text-align: center; margin-bottom: 3rem; }
.lead { text-align: center; font-size: 1.2rem; color: var(--text-muted); max-width: 700px; margin: 0 auto 3rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .75rem; padding: 1rem 2rem; border-radius: 999px; font-weight: 700; border: 2px solid var(--line); background: transparent; color: var(--text-light); transition: all .3s cubic-bezier(0.25, 0.46, 0.45, 0.94); cursor: pointer; text-transform: uppercase; letter-spacing: 1px; }
.btn--accent { background: linear-gradient(45deg, var(--accent), var(--accent-2)); color: var(--bg-dark); border-color: var(--accent); box-shadow: 0 10px 25px rgba(255, 215, 0, 0.2); }
.btn--accent:hover { transform: translateY(-5px) scale(1.02); box-shadow: 0 15px 35px rgba(255, 215, 0, 0.3); }
.btn--ghost { border-color: var(--text-muted); color: var(--text-light); }
.btn--ghost:hover { background: var(--surface); transform: translateY(-3px); border-color: var(--accent); }

/* Appbar (Glassmorphism) */
.appbar { position: sticky; top: 0; z-index: 100; backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); background: rgba(26, 26, 46, 0.6); border-bottom: 1px solid var(--line); transition: all .4s ease; }
.appbar--scrolled { background: rgba(26, 26, 46, 0.8); box-shadow: 0 4px 20px rgba(0,0,0,.3); }
.appbar__inner { min-height: 80px; display: flex; align-items: center; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; font-weight: 800; font-size: 1.3rem; }
.brand__img { width: 40px; height: 40px; object-fit: contain; border-radius: 10px; box-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
.quicknav { display: none; gap: 1.5rem; margin-inline: auto; }
@media (min-width: 768px) { .quicknav { display: flex; } }
.quicknav a { padding: .5rem .8rem; border-radius: 8px; font-weight: 600; color: var(--text-muted); position: relative; transition: all .2s ease; }
.quicknav a:hover { color: var(--text-light); }
.quicknav a::after { content: ''; position: absolute; bottom: 0; right: 50%; width: 0; height: 2px; background: var(--accent); transition: width .3s ease, right .3s ease; }
.quicknav a:hover::after { width: 100%; right: 0; }

/* Morph Toggle (Language Switch) */
.morph-toggle { cursor: pointer; margin-inline-start: auto; }
.morph-toggle input { display: none; }
.morph-toggle .btn { width: 96px; height: 42px; background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.01)); border-radius: 999px; position: relative; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; font-family: var(--font-main); color: var(--text-muted); font-weight: 600; border: 1px solid var(--line); box-shadow: 0 4px 12px rgba(0,0,0,.35), inset 0 1px 2px rgba(255,255,255,.04); backdrop-filter: blur(12px); }
.morph-toggle .btn:hover { box-shadow: 0 6px 16px rgba(0,0,0,.45); }
.morph-toggle .ball { position: absolute; width: 34px; height: 34px; background: linear-gradient(135deg, var(--primary), #4A3728); border-radius: 50%; right: 4px; transition: 0.4s cubic-bezier(.68,-0.55,.27,1.55); box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.morph-toggle input:checked + .btn .ball { transform: translateX(-50px); background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.morph-toggle .en, .morph-toggle .ar { z-index: 2; font-size: 1rem; }

/* Hero Section */
.hero { padding: 120px 0 100px; text-align: center; min-height: 80vh; display: flex; align-items: center; }
@media (min-width: 768px) { .hero { text-align: right; } }
.hero__grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 768px) { .hero__grid { grid-template-columns: 1fr; } }
.hero__title { margin: 0 0 1rem; }
.hero__subtitle { margin: 0 0 3rem; color: var(--text-muted); font-size: 1.3rem; max-width: 600px; margin-inline: auto; }
@media (min-width: 768px) { .hero__subtitle { margin-inline: 0; } }
.hero__actions { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; }
@media (min-width: 768px) { .hero__actions { justify-content: flex-start; } }

.hero__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.8rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.hero__btn--primary {
  background: linear-gradient(45deg, var(--accent), var(--accent-2));
  color: var(--bg-dark);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.hero__btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.hero__btn--secondary {
  background: transparent;
  color: var(--text-light);
  border-color: var(--accent);
}

.hero__btn--secondary:hover {
  background: var(--surface);
  transform: translateY(-3px);
}

.hero__btn-icon {
  font-size: 1rem;
}

.hero__btn-label {
  white-space: nowrap;
}

/* Sections */
section { padding: 80px 0; position: relative; }
@media (min-width: 768px) { section { padding: 120px 0; } }

/* About Section */
.about__grid { display: grid; gap: 60px; align-items: center; }
@media (min-width: 992px) { .about__grid { grid-template-columns: 1fr 1fr; } }
.about__text { padding-right: 20px; }
.feature-list { list-style: none; padding: 0; margin: 2rem 0; }
.feature-list li { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; font-size: 1.1rem; font-weight: 600; color: var(--text-light); }
.feature-list i { color: var(--accent); font-size: 1.5rem; }

/* Card Stack Visual (Abstract Phone) */
.card-stack { position: relative; width: 300px; height: 500px; margin: 0 auto; }
.card-stack__item { position: absolute; width: 100%; height: 100%; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: var(--shadow); }
.card-stack__item--1 { top: 0; left: 0; z-index: 3; }
.card-stack__item--2 { top: 20px; left: 20px; z-index: 2; opacity: 0.7; }
.card-stack__item--3 { top: 40px; left: 40px; z-index: 1; opacity: 0.4; }

/* Promos Section */
.promo-cards { display: grid; gap: 30px; }
@media (min-width: 768px) { .promo-cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 2.5rem; box-shadow: var(--shadow); transition: all .4s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.card:hover { transform: translateY(-10px) scale(1.02); background: var(--surface-hover); box-shadow: 0 20px 40px rgba(0,0,0,.4); }
.card__icon { font-size: 3rem; color: var(--accent); margin-bottom: 1rem; }
.promo__badge { display: inline-block; padding: .4rem 1rem; background: var(--accent); color: var(--bg-dark); border-radius: 999px; font-size: .9rem; font-weight: 700; margin-bottom: 1rem; }
.promo h3 { margin: 0.5rem 0; font-size: 1.8rem; }
.promo p { margin: 0; color: var(--text-muted); }

/* Message Section */
.tags { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; margin-top: 3rem; }
.tag { display: flex; align-items: center; gap: .5rem; padding: 1rem 2rem; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); font-weight: 600; font-size: 1.1rem; transition: all .3s ease; }
.tag:hover { background: var(--surface-hover); transform: scale(1.05); }
.tag i { color: var(--accent); }

/* CTA */
.cta { padding: 100px 0; }
.cta__box { background: linear-gradient(135deg, var(--primary), #4A3728); color: #fff; border-radius: var(--radius-lg); padding: 4rem; text-align: center; position: relative; overflow: hidden; }
.cta__box::before { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.1' fill-rule='evenodd'%3E%3Cpath d='M5 0h1L0 6V5zm1 5v1H5z'/%3E%3C/g%3E%3C/svg%3E"); opacity: 0.5; }
.cta__text { position: relative; z-index: 1; }
.cta__box h2 { color: #fff; margin-bottom: 1rem; }
.cta__box p { color: rgba(255,255,255,.8); margin-bottom: 3rem; font-size: 1.2rem; }
.stores { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; }
.store { padding: 1rem 2rem; border-radius: 12px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); color: #fff; font-weight: 700; transition: background .3s ease; display: flex; align-items: center; gap: .75rem; }
.store:hover { background: rgba(255,255,255,.25); }
.store--soon { opacity: .7; cursor: not-allowed; }

/* Footer */
.footer { padding: 2rem 0; border-top: 1px solid var(--line); color: var(--text-muted); font-size: 0.9rem; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footnav { display: flex; gap: 1.5rem; }

/* Privacy Page Styling */
.privacy-content { padding: 80px 0 120px; text-align: right; }
.privacy-content .section-title { text-align: right; margin-bottom: 1rem; }
.privacy-content .lead { text-align: right; margin-inline: 0; }
.privacy-section { margin-top: 4rem; }
.privacy-section h2 { text-align: right; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 1rem; color: var(--accent); }
.privacy-section p { font-size: 1.1rem; color: var(--text-light); }
.privacy-section .feature-list { margin-top: 1rem; }
.privacy-section .feature-list li { color: var(--text-muted); }

/* Mobile Tweaks */
@media (max-width: 600px) {
  body {
    font-size: 0.95rem;
  }

  .container {
    padding-inline: 16px;
  }

  section {
    padding: 60px 0;
  }

  .hero {
    padding: 90px 0 70px;
    min-height: auto;
  }

  .hero__title {
    font-size: 2rem;
  }

  .hero__subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .btn {
    width: 100%;
    padding: 0.85rem 1.4rem;
    font-size: 0.85rem;
  }

  .about__grid {
    gap: 40px;
  }

  .about__text {
    padding-right: 0;
  }

  .card-stack {
    width: 240px;
    height: 400px;
  }

  .promo-cards {
    gap: 20px;
  }

  .card {
    padding: 1.8rem;
  }

  .promo h3 {
    font-size: 1.4rem;
  }

  .tags {
    gap: 1rem;
  }

  .tag {
    padding: 0.8rem 1.4rem;
    font-size: 0.95rem;
  }

  .cta__box {
    padding: 2.5rem 1.5rem;
  }

  .stores {
    flex-direction: column;
    align-items: stretch;
  }

  .store {
    justify-content: center;
  }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
