/*
 * Global Styles for Wassini landing page
 * This stylesheet defines variables, resets, typography and responsive
 * layouts for both English (LTR) and Arabic (RTL) languages. It uses
 * modern CSS features such as flexbox and media queries to ensure
 * readability on phones, tablets and desktops.
 */

/* CSS Variables */
:root {
  --color-primary: #e66f3c;
  /* warm orange to echo the app artwork */
  --color-secondary: #35495e;
  /* dark blue for contrast */
  --color-accent: #f4a261;
  --color-light: #ffffff;
  --color-dark: #1a1a1a;
  --font-en: 'Poppins', sans-serif;
  --font-ar: 'Tajawal', sans-serif;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-en);
  line-height: 1.6;
  color: var(--color-dark);
  background-color: #fdfdfd;
  overflow-x: hidden;
}

/* hero section */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  background: url('assets/Wassini_Feature_Graphic_1024x500.png') center/cover no-repeat;
  color: var(--color-light);
  text-align: center;
}

.hero .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom right, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  padding: 2rem;
}

.hero .logo {
  width: 120px;
  height: 120px;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.hero .subtitle {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.cta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.15s ease-in-out;
}

.cta.play-store {
  background-color: #1e88e5;
  color: var(--color-light);
}

.cta.app-store {
  background-color: #0a0a23;
  color: var(--color-light);
}

.cta:hover {
  transform: translateY(-2px);
}

/* Intro section */
.intro {
  max-width: 900px;
  margin: 3rem auto;
  text-align: center;
  padding: 0 1rem;
}

.intro h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--color-primary);
  font-weight: 700;
}

.intro p {
  font-size: 1.125rem;
  color: var(--color-secondary);
  line-height: 1.7;
}

/* Features section */
.features {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.feature {
  display: flex;
  align-items: center;
  margin-bottom: 4rem;
}

.feature.reverse {
  flex-direction: row-reverse;
}

.feature-text {
  flex: 1;
  padding: 1rem;
}

.feature-text h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--color-primary);
  font-weight: 600;
}

.feature-text ul {
  list-style: none;
  padding-left: 0;
}

.feature-text li {
  display: flex;
  align-items: flex-start;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.feature-text li::before {
  /* Use a simple checkmark instead of relying on external webfonts */
  content: "\2714";
  font-family: inherit;
  margin-right: 0.5rem;
  color: var(--color-secondary);
}

.feature-img {
  flex: 1;
  text-align: center;
}

.feature-img img {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* CTA section */
.cta-section {
  background-color: var(--color-secondary);
  color: var(--color-light);
  padding: 3rem 1rem;
  text-align: center;
}

.cta-section h2 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.cta-section p {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.cta-section .cta-buttons {
  justify-content: center;
}

.cta-section .cta.play-store {
  background-color: #43a047;
}

.cta-section .cta.app-store {
  background-color: #444b5a;
}

/* Footer */
.footer {
  background-color: var(--color-dark);
  color: var(--color-light);
  padding: 2rem 1rem;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.footer-logo img {
  width: 40px;
  height: 40px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.9rem;
}

.footer-nav a {
  color: var(--color-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.footer-copy {
  font-size: 0.8rem;
}

/* Responsive design */
@media (max-width: 992px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero .subtitle {
    font-size: 1rem;
  }

  .feature {
    flex-direction: column;
    text-align: center;
  }

  .feature.reverse {
    flex-direction: column;
  }

  .feature-text {
    padding: 1rem 0;
  }

  .feature-img {
    margin-top: 1rem;
  }

  .cta-buttons {
    flex-direction: column;
    gap: 0.75rem;
  }
}

@media (max-width: 600px) {
  .hero {
    min-height: 60vh;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .intro h2 {
    font-size: 1.5rem;
  }

  .intro p,
  .cta-section p {
    font-size: 1rem;
  }

  .feature-text h3 {
    font-size: 1.25rem;
  }

  .feature-text li {
    font-size: 0.95rem;
  }

  .cta-section h2 {
    font-size: 1.5rem;
  }
}

/* RTL support */
[dir="rtl"] body {
  font-family: var(--font-ar);
}

[dir="rtl"] .hero {
  text-align: center;
}

[dir="rtl"] .feature {
  direction: rtl;
}

[dir="rtl"] .feature.reverse {
  flex-direction: column;
}

[dir="rtl"] .feature-text li::before {
  margin-left: 0.5rem;
  margin-right: 0;
}

[dir="rtl"] .footer-nav {
  direction: rtl;
}

[dir="rtl"] .cta {
  direction: rtl;
}

/* Utility to hide the alternate language links to avoid duplicate anchor confusion */
link[hreflang] {
  display: none;
}

/* Language switcher */
.lang-switch {
  position: fixed;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 9999;
  display: flex;
  gap: 0.25rem;
}

.lang-btn {
  background-color: var(--color-secondary);
  color: var(--color-light);
  border: none;
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-family: inherit;
}

.lang-btn.active,
.lang-btn:hover {
  background-color: var(--color-primary);
}

/* Language toggle classes */
.en {
  display: inline;
}

.ar {
  display: none;
}

html[lang="ar"] .en {
  display: none !important;
}

html[lang="ar"] .ar {
  display: inline !important;
}