/* ===== VARIABLES & RESETS ===== */
:root {
  /* High Contrast & Rich Palette */
  --primary: #4338ca;
  /* Indigo-700: Deep Violet-Blue (High Contrast) */
  --primary-dark: #312e81;
  /* Indigo-900: Very Deep */
  --primary-light: #e0e7ff;
  /* Indigo-100: Soft background */

  --secondary: #0284c7;
  /* Sky-600: Vivid Blue (High Contrast Accent) */
  --secondary-dark: #075985;
  /* Sky-800 */

  --accent: #d97706;
  /* Amber-600: Darker Gold for visibility */

  --success: #059669;
  /* Emerald-600 */
  --danger: #dc2626;
  /* Red-600 */
  --warning: #d97706;

  --bg-body: #f1f5f9;
  /* Slate-100: Slightly darker white for eye comfort */
  --bg-white: #ffffff;
  --bg-gradient: linear-gradient(135deg, #eef2ff 0%, #e0f2fe 100%);

  --text-main: #020617;
  /* Slate-950: Almost Black */
  --text-muted: #334155;
  /* Slate-700: Dark Grey (Much clearer) */
  --text-light: #64748b;
  /* Slate-500 */

  --border: #cbd5e1;
  /* Slate-300 */
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;

  /* Shadows using Indigo tint */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(67, 56, 202, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(67, 56, 202, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(67, 56, 202, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  --container-width: 1200px;
  --header-height: 70px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  /* Prevent horizontal scroll */
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ===== UTILITIES ===== */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
  position: relative;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--text-main);
  line-height: 1.2;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 10px;
}

/* ===== HEADER & NAVBAR ===== */
.header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-muted);
  transition: color 0.3s;
  padding: 5px 0;
  position: relative;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0px;
  right: 0;
  background-color: var(--primary);
  transition: width 0.3s;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Mobile Nav Toggle (You might need JS to toggle a class for a real menu, 
   but for now we'll make it scroll horizontally or wrap elegantly) */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    /* Hidden by default on mobile for this simplified version, 
                      or could be a bottom bar. Let's make it a bottom bar or simple hide 
                      if too complex without JS change. 
                      Actually, better to keep it simple: hide, OR simplify. */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    justify-content: space-around;
    padding: 15px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    display: flex;
    /* Show as bottom bar */
  }

  .header {
    height: 60px;
  }

  .section {
    padding: 50px 0;
  }

  .nav-links a {
    font-size: 0.9rem;
  }

  .nav-links a::after {
    display: none;
  }
}


/* ===== HERO SECTION ===== */
.hero {
  background: var(--bg-gradient);
  min-height: 100vh;
  /* Full viewport height */
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-height) + 40px);
  padding-bottom: 100px;
}

.hero-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero-brand-logo {
  width: 120px;
  height: 120px;
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-15px);
  }
}

.hero-brand {
  font-size: 3rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.hero-brand .version {
  background: var(--accent);
  color: white;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 1rem;
  vertical-align: middle;
  transform: rotate(-5deg);
  display: inline-block;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.stat {
  background: white;
  padding: 20px 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 180px;
  border: 1px solid var(--border);
  transition: transform 0.3s;
}

.stat:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.stat-number {
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 5px;
}

.hero-ctas {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 36px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 10px 20px rgba(67, 56, 202, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(67, 56, 202, 0.4);
}

.btn-secondary {
  background: white;
  color: var(--primary);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.btn-large {
  font-size: 1.2rem;
  padding: 18px 48px;
}

/* Mobile Hero Tweaks */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-brand {
    font-size: 2.5rem;
  }

  .stat {
    width: 100%;
    min-width: unset;
    margin-bottom: 10px;
  }

  .hero-stats {
    gap: 10px;
  }

  .hero-ctas {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
  }
}

/* ===== FEATURES SECTION ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.feature-item {
  background: white;
  padding: 40px 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-light);
}

.feature-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.feature-item:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  display: inline-block;
  background: var(--primary-light);
  width: 70px;
  height: 70px;
  line-height: 70px;
  text-align: center;
  border-radius: 20px;
}

.feature-item h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.feature-list li {
  margin-bottom: 10px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ===== CUSTOMIZATION SECTION ===== */
.customization {
  background: white;
}

.customization-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

@media (max-width: 450px) {
  .customization-grid {
    grid-template-columns: 1fr;
    /* Stack vertically on very small screens */
  }
}

.customization-card {
  background: var(--bg-body);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform 0.3s;
}

.customization-card:hover {
  transform: translateY(-5px);
}

.customization-card h3 {
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 10px;
}

.custom-item {
  background: white;
  padding: 15px;
  border-radius: var(--radius-sm);
  margin-bottom: 15px;
  box-shadow: var(--shadow-sm);
}

.custom-label {
  display: block;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 5px;
  font-size: 0.95rem;
}

.custom-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ===== ADMIN SECTION ===== */
.admin {
  background: var(--primary);
  color: white;
  padding: 100px 0;
}

.admin .section-title,
.admin .section-subtitle {
  color: white;
}

.admin .section-subtitle {
  color: rgba(255, 255, 255, 0.8);
}

.admin-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.admin-tab {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 30px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: background 0.3s;
}

.admin-tab:hover {
  background: rgba(255, 255, 255, 0.2);
}

.admin-tab h3 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--accent);
}

.admin-list li {
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
}

.admin-list strong {
  color: white;
  display: block;
  margin-bottom: 4px;
}

/* ===== PERFORMANCE SECTION ===== */
.performance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}

.performance-item {
  background: white;
  padding: 30px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  border: 1px solid var(--border);
  transition: transform 0.3s;
}

.performance-item:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
}

.perf-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.performance-item strong {
  display: block;
  font-size: 1.5rem;
  color: var(--primary);
  margin: 10px 0;
}

/* ===== DEMO/GALLERY ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
  cursor: pointer;
  background: white;
}

.gallery-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.5s;
}

.gallery-item:hover .gallery-image {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(14, 165, 233, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-item h4 {
  padding: 15px;
  font-size: 1.1rem;
  background: white;
  color: var(--text-main);
  text-align: center;
  margin: 0;
  position: relative;
  z-index: 2;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  color: white;
  font-size: 2rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  padding: 10px;
  cursor: pointer;
  border-radius: 50%;
}

.lightbox-prev {
  left: -60px;
}

.lightbox-next {
  right: -60px;
}

@media (max-width: 768px) {

  .lightbox-prev,
  .lightbox-next {
    display: none;
  }

  /* Hide heavy nav on mobile, maybe just tap to close */
}

/* ===== PRICING ===== */
.price-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 50px 30px;
  box-shadow: var(--shadow-xl);
  max-width: 450px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 2px solid var(--primary);
}

.price-card::before {
  content: none;
}

.price-value {
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--primary);
  display: block;
  line-height: 1;
}

.price-tag.alt {
  color: var(--text-muted);
  text-decoration: none;
  opacity: 1;
  font-weight: 700;
  margin-top: -10px;
  font-size: 1.2rem;
}

.includes-list {
  text-align: right;
  margin: 30px 0;
}

.includes-list li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  color: var(--text-muted);
}

.includes-list li:last-child {
  border: none;
}

/* ===== PRICING ADDONS ===== */
.pricing-addons {
  margin-top: 60px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.pricing-addons h3 {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 30px;
  color: var(--text-main);
}

.addons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.addon {
  background: white;
  padding: 25px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.3s ease;
}

.addon:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
}

.addon h4 {
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 10px;
}

.addon p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 15px;
}

.addon-price {
  font-weight: 700;
  color: var(--secondary);
  font-size: 1.1rem;
  margin-top: auto;
  background: var(--bg-body);
  padding: 8px 20px;
  border-radius: 20px;
}

/* ===== PRICING FAQ ===== */
.pricing-faq {
  margin-top: 80px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.pricing-faq h3 {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 40px;
  color: var(--text-main);
}

.faq-items {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.faq-item {
  background: white;
  padding: 25px;
  border-radius: var(--radius);
  border-left: 5px solid var(--primary-light);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-left-color: var(--primary);
  transform: translateX(-5px);
  box-shadow: var(--shadow);
}

.faq-item h4 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--text-main);
  font-weight: 700;
}

.faq-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}


/* ===== CONTACT SECTION ===== */
.contact {
  background: white;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  justify-content: center;
}

.contact-item {
  background: white;
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  z-index: 1;
}

.contact-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  opacity: 0;
  z-index: -1;
  transition: opacity 0.4s ease;
}

.contact-item:hover {
  transform: translateY(-10px);
  border-color: transparent;
}

.contact-item:hover::before {
  opacity: 1;
}

.contact-item:hover h3,
.contact-item:hover p,
.contact-item:hover a {
  color: white;
}

.contact-item h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--text-main);
  transition: color 0.4s;
}

.contact-item a {
  display: inline-block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
  direction: ltr;
  /* Ensure email/phone display correctly */
  transition: color 0.4s;
}

.contact-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color 0.4s;
}

/* ===== RESPONSIVE GLOBAL ===== */
@media (max-width: 600px) {
  .section-title {
    font-size: 2rem;
  }

  .container {
    padding: 0 15px;
  }

  .price-card {
    padding: 30px 20px;
  }

  .price-value {
    font-size: 2.5rem;
  }
}

/* ===== FOOTER ===== */
.footer {
  background: var(--text-main);
  color: white;
  padding: 15px 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer p {
  opacity: 0.6;
  font-size: 0.8rem;
  margin: 0;
}