/* ============================================
   WIDDX - Main Stylesheet
   ============================================ */

/* ----- CSS Custom Properties / Theming ----- */
:root {
  /* Colors - Light Theme */
  --primary: #667eea;
  --primary-dark: #5a6fd6;
  --secondary: #764ba2;
  --accent: #f093fb;
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9ff;
  --bg-card: #ffffff;
  --bg-nav: rgba(255, 255, 255, 0.9);
  --text-primary: #1a1a2e;
  --text-secondary: #555577;
  --text-muted: #9999b3;
  --border: rgba(0, 0, 0, 0.08);
  --shadow: rgba(102, 126, 234, 0.15);
  --shadow-card: rgba(0, 0, 0, 0.06);
  --gradient-bg: linear-gradient(135deg, #f5f7fa 0%, #e8ecf8 100%);
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --hero-overlay: rgba(255, 255, 255, 0.92);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.3);
  --footer-bg: #1a1a2e;
  --footer-text: #b8b8d0;
  --code-bg: #f0f0f5;
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
}

/* Dark Theme */
[data-theme="dark"] {
  --bg-primary: #0f0c29;
  --bg-secondary: #1a1a3e;
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-nav: rgba(15, 12, 41, 0.95);
  --text-primary: #f0f0ff;
  --text-secondary: #b8b8d0;
  --text-muted: #7777aa;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: rgba(102, 126, 234, 0.2);
  --shadow-card: rgba(0, 0, 0, 0.3);
  --gradient-bg: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  --hero-overlay: rgba(15, 12, 41, 0.85);
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --footer-bg: #07070f;
  --footer-text: #8888aa;
  --code-bg: #1e1e3a;
}

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

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

body {
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
  line-height: 1.7;
}

/* ----- Typography ----- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
}

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

a:hover {
  color: var(--secondary);
}

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

/* ----- Utility Classes ----- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 100px 0;
  position: relative;
}

.section-bg {
  background: var(--bg-secondary);
  transition: background 0.4s ease;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 15px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.15rem;
  max-width: 650px;
  margin: 0 auto 60px;
  font-weight: 300;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-family: 'Cairo', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 8px 25px var(--shadow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px var(--shadow);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-3px);
}

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

.btn-outline:hover {
  background: var(--gradient-primary);
  color: #fff;
  border-color: transparent;
  transform: translateY(-3px);
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.4s ease, border-color 0.4s ease;
}

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

.navbar-logo {
  font-size: 1.8rem;
  font-weight: 900;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

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

.navbar-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 5px 0;
  text-decoration: none;
  transition: color 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--primary);
}

.navbar-links a:hover::after,
.navbar-links a.active::after {
  width: 100%;
}

/* Nav controls (theme + language toggles) */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-control-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.9rem;
  font-family: 'Cairo', sans-serif;
  transition: all 0.3s ease;
}

.nav-control-btn:hover {
  background: var(--gradient-primary);
  color: #fff;
  border-color: transparent;
}

.lang-btn {
  width: auto;
  padding: 0 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  gap: 5px;
}

/* Hamburger */
.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: none;
  border: none;
  padding: 5px;
  color: var(--text-primary);
  font-size: 1.4rem;
  width: 38px;
  height: 38px;
}

.hamburger i {
  pointer-events: none;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 70px;
  background: var(--gradient-bg);
  transition: background 0.4s ease;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
  z-index: 1;
}

.hero-bg-animation {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.hero-bg-animation span {
  position: absolute;
  width: 20px;
  height: 20px;
  background: rgba(102, 126, 234, 0.08);
  border-radius: 50%;
  animation: float 25s infinite linear;
  bottom: -150px;
}

.hero-bg-animation span:nth-child(1) { left: 10%; width: 80px; height: 80px; animation-delay: 0s; }
.hero-bg-animation span:nth-child(2) { left: 20%; width: 40px; height: 40px; animation-delay: 2s; }
.hero-bg-animation span:nth-child(3) { left: 35%; width: 60px; height: 60px; animation-delay: 4s; }
.hero-bg-animation span:nth-child(4) { left: 50%; width: 90px; height: 90px; animation-delay: 0s; }
.hero-bg-animation span:nth-child(5) { left: 65%; width: 50px; height: 50px; animation-delay: 3s; }
.hero-bg-animation span:nth-child(6) { left: 75%; width: 70px; height: 70px; animation-delay: 5s; }
.hero-bg-animation span:nth-child(7) { left: 85%; width: 100px; height: 100px; animation-delay: 7s; }
.hero-bg-animation span:nth-child(8) { left: 45%; width: 35px; height: 35px; animation-delay: 10s; }
.hero-bg-animation span:nth-child(9) { left: 55%; width: 55px; height: 55px; animation-delay: 6s; }
.hero-bg-animation span:nth-child(10) { left: 30%; width: 45px; height: 45px; animation-delay: 8s; }

@keyframes float {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(-1000px) rotate(720deg); opacity: 0; }
}

.hero .container {
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-content {
  max-width: 850px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 8px 20px;
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 30px;
}

.hero-title {
  font-size: 3.8rem;
  font-weight: 900;
  margin-bottom: 25px;
  line-height: 1.2;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  font-weight: 300;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Stats Bar */
.stats-bar {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  margin-top: -50px;
  position: relative;
  z-index: 3;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  transition: background 0.4s ease;
}

.stat-item {
  text-align: center;
  padding: 10px;
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 900;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 5px;
}

/* ============================================
   SERVICES CARDS (Home)
   ============================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  cursor: default;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.05), transparent);
  transition: left 0.6s ease;
}

.service-card:hover::before {
  left: 100%;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px var(--shadow);
  border-color: rgba(102, 126, 234, 0.3);
}

.service-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  display: block;
}

.service-card h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--text-primary);
}

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

/* ============================================
   WHY US
   ============================================ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
}

.why-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 35px 25px;
  text-align: center;
  transition: all 0.3s ease;
}

.why-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px var(--shadow);
}

.why-card .icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.why-card h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

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

/* ============================================
   TESTIMONIALS
   ============================================ */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 35px 30px;
  position: relative;
  transition: all 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px var(--shadow);
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 15px;
  left: 25px;
  font-size: 4rem;
  line-height: 1;
  color: var(--primary);
  opacity: 0.2;
  font-weight: 900;
}

[dir="rtl"] .testimonial-card::before {
  left: auto;
  right: 25px;
}

.testimonial-text {
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.8;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
}

.testimonial-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.testimonial-role {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
  background: var(--gradient-primary);
  border-radius: 30px;
  padding: 80px 40px;
  text-align: center;
  color: #fff;
  margin: 0 20px;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 50%);
}

.cta-section h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  position: relative;
  -webkit-text-fill-color: #fff;
}

.cta-section p {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 35px;
  position: relative;
}

.cta-section .btn {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  position: relative;
}

.cta-section .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

/* ============================================
   PAGE HERO (inner pages)
   ============================================ */
.page-hero {
  padding: 160px 0 80px;
  text-align: center;
  background: var(--gradient-bg);
  position: relative;
  overflow: hidden;
  transition: background 0.4s ease;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
  z-index: 1;
}

.page-hero .container {
  position: relative;
  z-index: 2;
}

.page-hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto;
}

/* ============================================
   ABOUT PAGE
   ============================================ */
.about-story {
  max-width: 800px;
  margin: 0 auto;
}

.about-story p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.9;
  margin-bottom: 25px;
}

.about-mission-vision {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.mission-card,
.vision-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 30px;
  transition: all 0.3s ease;
}

.mission-card:hover,
.vision-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px var(--shadow);
}

.mission-card .icon,
.vision-card .icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.mission-card h3,
.vision-card h3 {
  font-size: 1.4rem;
  margin-bottom: 15px;
}

.mission-card p,
.vision-card p {
  color: var(--text-secondary);
  line-height: 1.8;
}

/* Values */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 25px;
}

.value-card {
  text-align: center;
  padding: 30px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.3s ease;
}

.value-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px var(--shadow);
}

.value-number {
  font-size: 2rem;
  font-weight: 900;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}

.value-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.value-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 25px;
  text-align: center;
  transition: all 0.3s ease;
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px var(--shadow);
}

.team-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2rem;
  color: #fff;
  font-weight: 700;
}

.team-card h3 {
  font-size: 1.15rem;
  margin-bottom: 5px;
}

.team-role {
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.team-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ============================================
   SERVICES PAGE (Detailed)
   ============================================ */
.service-detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 50px 40px;
  margin-bottom: 30px;
  transition: all 0.3s ease;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 30px;
  align-items: start;
}

.service-detail-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px var(--shadow);
  border-color: rgba(102, 126, 234, 0.2);
}

.service-detail-icon {
  font-size: 3.5rem;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: 20px;
  flex-shrink: 0;
}

.service-detail-content h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.service-detail-content p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
}

.service-features {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.service-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.service-features li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  align-items: start;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px 30px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
}

.pricing-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px var(--shadow);
}

.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: 0 10px 30px var(--shadow);
  transform: scale(1.05);
}

.pricing-card.featured:hover {
  transform: scale(1.05) translateY(-5px);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-primary);
  color: #fff;
  padding: 5px 20px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

.pricing-name {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.pricing-price {
  font-size: 2rem;
  font-weight: 900;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}

.pricing-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 25px;
}

.pricing-features {
  list-style: none;
  text-align: start;
  margin-bottom: 30px;
}

.pricing-features li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pricing-features li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
}

/* FAQ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: rgba(102, 126, 234, 0.3);
}

.faq-question {
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
  user-select: none;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: 300;
  transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
  content: '−';
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding: 0 25px 20px;
}

.faq-answer p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.95rem;
}

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
}

.contact-form h3 {
  font-size: 1.5rem;
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Cairo', sans-serif;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-textarea {
  min-height: 130px;
  resize: vertical;
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666eea' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 15px center;
  padding-left: 40px;
}

[dir="rtl"] .form-select {
  background-position: right 15px center;
  padding-left: 18px;
  padding-right: 40px;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

/* Contact Info Cards */
.contact-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
}

.contact-info-card h3 {
  font-size: 1.5rem;
  margin-bottom: 30px;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 25px;
}

.contact-info-icon {
  width: 50px;
  height: 50px;
  background: var(--bg-secondary);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.contact-info-item h4 {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 3px;
}

.contact-info-item p {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Social section in contact */
.social-section {
  margin-top: 30px;
}

.social-section h4 {
  margin-bottom: 15px;
  color: var(--text-muted);
  font-weight: 400;
}

.social-icons {
  display: flex;
  gap: 12px;
}

.social-icon {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 700;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: var(--gradient-primary);
  border-color: transparent;
  color: #fff;
  transform: translateY(-3px);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 80px 0 30px;
  margin-top: 100px;
}

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

.footer-brand h3 {
  font-size: 2rem;
  font-weight: 900;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 15px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.8;
  opacity: 0.7;
}

.footer h4 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.footer-links li i {
  width: 20px;
  margin-left: 6px;
  color: var(--primary);
  opacity: 0.8;
}

[dir="rtl"] .footer-links li i {
  margin-left: 0;
  margin-right: 6px;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--footer-text);
  font-size: 0.9rem;
  transition: all 0.3s ease;
  opacity: 0.7;
  text-decoration: none;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--primary);
  padding-right: 5px;
}

[dir="rtl"] .footer-links a:hover {
  padding-right: 0;
  padding-left: 5px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 30px;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.5;
}

.footer-bottom i {
  margin-left: 4px;
}

[dir="rtl"] .footer-bottom i {
  margin-left: 0;
  margin-right: 4px;
}

/* ============================================
   404 PAGE
   ============================================ */
.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

.error-code {
  font-size: 10rem;
  font-weight: 900;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 20px;
}

.error-title {
  font-size: 2rem;
  margin-bottom: 10px;
}

.error-subtitle {
  color: var(--text-secondary);
  margin-bottom: 30px;
  font-size: 1.1rem;
}

/* ============================================
   SCROLL TO TOP
   ============================================ */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 20px var(--shadow);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  transform: translateY(-5px);
}

/* ============================================
   ANIMATIONS
   ============================================ */
.animate-fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RTL SPECIFIC OVERRIDES
   ============================================ */
[dir="rtl"] .navbar-links {
  /* All flex items work naturally with row direction in RTL */
}

[dir="rtl"] .service-features {
  /* Grid works with RTL naturally */
}

[dir="rtl"] .pricing-features li::before {
  margin-left: 10px;
  margin-right: 0;
}

[dir="rtl"] .service-features li::before {
  margin-left: 8px;
  margin-right: 0;
}

[dir="rtl"] .form-select {
  background-position: right 15px center;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablets */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .service-detail-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .service-detail-icon {
    margin: 0 auto;
  }

  .service-features {
    grid-template-columns: 1fr;
    text-align: start;
  }
}

/* Mobile */
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  .section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .section-subtitle {
    font-size: 1rem;
    margin-bottom: 40px;
  }

  /* Nav */
  .hamburger {
    display: flex;
  }

  .navbar-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-nav);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 20px;
    gap: 15px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s ease;
  }

  .navbar-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-controls {
    margin-left: auto;
    margin-right: 15px;
  }

  /* Hero */
  .hero-title {
    font-size: 2.2rem;
  }

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

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    padding: 25px;
    margin-top: -30px;
  }

  .stat-number {
    font-size: 1.6rem;
  }

  /* About */
  .about-mission-vision {
    grid-template-columns: 1fr;
  }

  /* Pricing */
  .pricing-card.featured {
    transform: none;
  }

  .pricing-card.featured:hover {
    transform: translateY(-5px);
  }

  /* CTA */
  .cta-section {
    padding: 50px 25px;
  }

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

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer {
    padding: 50px 0 20px;
  }

  /* Page hero */
  .page-hero {
    padding: 120px 0 50px;
  }

  .page-hero h1 {
    font-size: 2rem;
  }

  /* Service detail card */
  .service-detail-card {
    padding: 30px 20px;
  }

  /* Contact */
  .contact-form,
  .contact-info-card {
    padding: 25px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  /* Testimonials */
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  /* Scroll top */
  .scroll-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 20px;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .error-code {
    font-size: 6rem;
  }
}
