/* ====== CSS Variables & Base ====== */
:root {
  --bg-dark: #030305;
  --card-bg: rgba(15, 15, 20, 0.6);
  --card-border: rgba(255, 255, 255, 0.08);

  --neon-blue: #2196f3;
  --primary-color: #2196f3;
  --secondary-color: #1976d2;
  --neon-purple: #8a2be2;
  --neon-pink: #ff007f;

  --text-main: #ffffff;
  --text-muted: #a0a5b5;
  --text-darker: #7a7f95;

  --glass-blur: blur(24px);
  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Tajawal", sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ====== Background Animations ====== */
.background-effects {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  background: radial-gradient(circle at center, #0a0a12 0%, #030305 100%);
}

.grid-overlay {
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: perspective(600px) rotateX(60deg) translateY(-100px)
    translateZ(-200px);
  animation: gridAnimation 20s linear infinite;
  opacity: 0.6;
}

@keyframes gridAnimation {
  0% {
    transform: perspective(600px) rotateX(60deg) translateY(0)
      translateZ(-200px);
  }
  100% {
    transform: perspective(600px) rotateX(60deg) translateY(60px)
      translateZ(-200px);
  }
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  animation: orbFloat 10s ease-in-out infinite alternate;
}

.orb-primary {
  width: 500px;
  height: 500px;
  background: var(--neon-blue);
  top: -10%;
  right: -10%;
}

.orb-secondary {
  width: 600px;
  height: 600px;
  background: var(--neon-purple);
  bottom: -20%;
  left: -10%;
  animation-delay: -3s;
}

.orb-tertiary {
  width: 300px;
  height: 300px;
  background: var(--neon-pink);
  top: 40%;
  left: 30%;
  opacity: 0.2;
  animation-delay: -7s;
}

@keyframes orbFloat {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(30px, -50px) scale(1.1);
  }
  100% {
    transform: translate(-30px, 30px) scale(0.9);
  }
}

/* ====== Hamburger Menu ====== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px;
  transition: var(--transition-smooth);
  z-index: 200;
}

.hamburger:hover {
  background: rgba(0, 240, 255, 0.1);
  border-color: rgba(0, 240, 255, 0.3);
}

.hamburger .bar {
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 4px;
  transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform-origin: center;
}

/* Hamburger Open Animation */
.hamburger.open .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: var(--neon-blue);
}
.hamburger.open .bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.open .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: var(--neon-blue);
}

/* Mobile Overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 149;
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-overlay.show {
  display: block;
  opacity: 1;
}

/* ====== Navbar ====== */
.navbar {
  width: 100%;
  padding: 18px 5%;
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
  align-items: center;
  background: rgba(3, 3, 5, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  position: fixed;
  top: 0;
  z-index: 150;
}

.nav-brand {
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 2px;
  text-decoration: none;
  white-space: nowrap;
}
.nav-brand span {
  color: var(--neon-blue);
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 10px;
}

.nav-links li a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 1.05rem;
  padding: 8px 16px;
  border-radius: 8px;
  transition: var(--transition-smooth);
}

.nav-links li a:hover,
.nav-links li a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-links li a.active {
  color: var(--neon-blue);
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.15);
}

/* ====== Layout ====== */
.page-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 20px 60px; /* offset for navbar */
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
}

/* ====== Hero Section ====== */
.hero-section {
  text-align: center;
  margin-bottom: 60px;
  max-width: 800px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 900;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #b0b5c9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ====== Shared Card Styles ====== */
.glass-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 3px;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform-style: preserve-3d;
  transition: var(--transition-smooth);
  width: 100%;
}

.glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 2px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0) 50%,
    rgba(255, 255, 255, 0.05) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.card-inner {
  background: rgba(10, 10, 15, 0.7);
  border-radius: 21px;
  padding: 45px 40px;
  height: 100%;
}

.card-glow-border {
  position: absolute;
  top: 0;
  left: 20%;
  width: 60%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--neon-blue),
    var(--neon-purple),
    transparent
  );
  opacity: 0.8;
  box-shadow: 0 0 20px var(--neon-blue);
}

/* ====== Home Pricing Card ====== */
.home-card {
  max-width: 900px; /* Wider for 2 columns */
}

.home-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(0, 240, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.badge-wrapper {
  margin-bottom: 20px;
  text-align: center;
}

.premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(138, 43, 226, 0.15);
  border: 1px solid rgba(138, 43, 226, 0.3);
  color: #e0b0ff;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 0 15px rgba(138, 43, 226, 0.2);
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 40px 0;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  transition: var(--transition-smooth);
}

.feature-item:hover {
  transform: translateX(-5px);
}

.icon-check {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--neon-blue);
  font-size: 0.8rem;
  flex-shrink: 0;
  margin-top: 4px;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
}

.feature-text strong {
  color: #fff;
  display: block;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.feature-text p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ====== CTA Button ====== */
.cta-btn {
  position: relative;
  width: 100%;
  padding: 20px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  transition: var(--transition-smooth);
  box-shadow:
    0 10px 30px rgba(138, 43, 226, 0.3),
    inset 0 2px 0 rgba(255, 255, 255, 0.2);
  text-decoration: none;
}

.btn-glow {
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.cta-btn:hover {
  box-shadow:
    0 15px 40px rgba(0, 240, 255, 0.5),
    inset 0 2px 0 rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.cta-btn:hover .btn-glow {
  left: 200%;
}

.btn-icon {
  transition: var(--transition-smooth);
}

.cta-btn:hover .btn-icon {
  transform: translateX(-6px);
}

/* ====== Services Grid ====== */
.services-header {
  text-align: center;
  margin-bottom: 50px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  width: 100%;
}

.service-card {
  text-align: center;
  padding: 40px 30px;
  transition: var(--transition-smooth);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(0, 240, 255, 0.1);
}

.service-icon {
  font-size: 3rem;
  color: var(--neon-blue);
  margin-bottom: 20px;
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: #fff;
}

.service-card p {
  color: var(--text-muted);
  line-height: 1.6;
}

/* ====== Pricing Page ====== */
.pricing-page-card {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.pricing-amounts {
  margin: 40px 0;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  margin-bottom: 15px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.price-label {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.price-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--neon-blue);
}

.price-row.monthly {
  background: linear-gradient(
    90deg,
    rgba(138, 43, 226, 0.1),
    rgba(0, 240, 255, 0.1)
  );
  border-color: rgba(0, 240, 255, 0.2);
}

.price-row.monthly .price-value {
  font-size: 2.2rem;
  text-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.persuasive-text {
  margin-top: 30px;
  padding: 20px;
  background: rgba(0, 240, 255, 0.05);
  border-right: 4px solid var(--neon-blue); /* Changed to border-right for RTL */
  border-radius: 8px 0 0 8px; /* Changed for RTL */
  text-align: right;
  font-size: 1.05rem;
  color: #e2e8f0;
  line-height: 1.7;
}

/* ====== Contact Page ====== */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 40px;
  width: 100%;
  max-width: 1000px;
  margin-top: 20px;
}

.contact-info-card,
.contact-form-card {
  padding: 40px;
}

.contact-info-item {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.contact-info-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(138, 43, 226, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  color: var(--neon-purple);
  border: 1px solid rgba(138, 43, 226, 0.3);
  box-shadow: 0 0 15px rgba(138, 43, 226, 0.2);
}

.contact-info-text h4 {
  color: #fff;
  margin-bottom: 5px;
  font-size: 1.1rem;
}

.contact-info-text p {
  color: var(--text-muted);
}

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

.form-control {
  width: 100%;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #fff;
  font-size: 1rem;
  transition: var(--transition-smooth);
}

.form-control:focus {
  outline: none;
  border-color: var(--neon-blue);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}

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

/* ====== GitHub Button ====== */
.github-container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  margin-top: 25px;
}

.github-bar-button {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #333333;
  color: #ffffff !important;
  padding: 12px 30px;
  text-decoration: none !important;
  border-radius: 50px;
  font-weight: 700;
  transition: all 0.3s ease;
  gap: 12px;
  box-shadow: 0 4px 10px rgba(51, 51, 51, 0.2);
}

.github-bar-button:hover {
  background-color: #24292e;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(51, 51, 51, 0.4);
}

/* ====== Responsive ====== */
@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* Show hamburger */
  .hamburger {
    display: flex;
  }

  /* Hide desktop nav links */
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 75vw;
    max-width: 300px;
    height: 100vh;
    background: rgba(8, 8, 14, 0.97);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 100px 25px 40px;
    z-index: 160;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
  }

  .nav-links.open {
    display: flex;
    transform: translateX(0);
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links li a {
    display: block;
    width: 100%;
    padding: 14px 18px;
    font-size: 1.15rem;
    border-radius: 12px;
  }

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

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

  .card-inner {
    padding: 30px 20px;
  }

  .service-card,
  .contact-info-card,
  .contact-form-card {
    padding: 30px 20px;
  }

  .page-container {
    padding-top: 100px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.9rem;
  }

  .nav-brand {
    font-size: 1.3rem;
  }

  .features-grid {
    gap: 14px;
  }

  .price-row {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}
