/* ===== CSS Variables ===== */
:root {
  --primary: #1a237e;
  --primary-light: #3949ab;
  --primary-dark: #0d1642;
  --accent: #e53935;
  --accent-light: #ff6f60;
  --bg: #f5f5f5;
  --bg-dark: #0a0e27;
  --text: #212121;
  --text-light: #757575;
  --text-white: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.85);
  --glass-bg: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.25);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.18);
  --radius: 16px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-main: 'Heebo', sans-serif;
  --font-accent: 'Rubik', sans-serif;
}

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

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

body {
  font-family: var(--font-main);
  color: var(--text);
  background: var(--bg);
  direction: rtl;
  line-height: 1.7;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: color var(--transition); }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1000;
  background: rgba(10, 14, 39, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: rgba(10, 14, 39, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-family: var(--font-accent);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
}

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.8);
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all var(--transition);
}

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

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.hamburger span {
  width: 28px;
  height: 3px;
  background: #fff;
  border-radius: 3px;
  transition: all var(--transition);
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* ===== Hero Section ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-home {
  background: url('_uploads/ai_2daaf66bed24fa4b.jpg') center center / cover no-repeat fixed;
}

.hero-faq {
  background: url('_uploads/ai_3563aa8166a4af6f.jpg') center center / cover no-repeat fixed;
  min-height: 60vh;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 14, 39, 0.7) 0%, rgba(10, 14, 39, 0.85) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--text-white);
  padding: 0 24px;
  max-width: 800px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 20px;
  background: rgba(229, 57, 53, 0.2);
  border: 1px solid rgba(229, 57, 53, 0.4);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-light);
  margin-bottom: 24px;
  animation: fadeInDown 0.8s ease;
}

.hero h1 {
  font-family: var(--font-accent);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 36px;
  line-height: 1.8;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.6s both;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 12px;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  box-shadow: 0 4px 15px rgba(229, 57, 53, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(229, 57, 53, 0.5);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.7);
  transform: translateY(-2px);
}

/* ===== Sections ===== */
.section {
  padding: 100px 0;
}

.section-dark {
  background: var(--bg-dark);
  color: var(--text-white);
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title h2 {
  font-family: var(--font-accent);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 16px;
  position: relative;
}

.section-title h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: 2px;
  margin: 16px auto 0;
}

.section-title p {
  color: var(--text-light);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.section-dark .section-title p {
  color: rgba(255, 255, 255, 0.7);
}

/* ===== Feature Cards ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.feature-card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius);
  padding: 40px 30px;
  text-align: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--primary-light));
  transform: scaleX(0);
  transition: transform var(--transition);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, rgba(26, 35, 126, 0.1), rgba(229, 57, 53, 0.1));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 20px;
}

.feature-card h3 {
  font-family: var(--font-accent);
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--primary-dark);
}

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

/* ===== Stats Section ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  text-align: center;
}

.stat-item {
  padding: 30px;
}

.stat-number {
  font-family: var(--font-accent);
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
}

/* ===== Categories ===== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.category-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 30px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.category-icon {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.category-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.category-card p {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* ===== CTA Section ===== */
.cta-section {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 80px 0;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(229, 57, 53, 0.15), transparent);
  top: -100px;
  left: -100px;
  border-radius: 50%;
}

.cta-section h2 {
  font-family: var(--font-accent);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin-bottom: 16px;
}

.cta-section p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 30px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== FAQ ===== */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: all var(--transition);
}

.faq-item:hover {
  box-shadow: var(--shadow);
}

.faq-question {
  padding: 24px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  gap: 16px;
  user-select: none;
  transition: all var(--transition);
}

.faq-question:hover {
  color: var(--accent);
}

.faq-arrow {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: rgba(26, 35, 126, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all var(--transition);
}

.faq-item.active .faq-arrow {
  transform: rotate(180deg);
  background: var(--accent);
  color: #fff;
}

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

.faq-answer-inner {
  padding: 0 30px 24px;
  color: var(--text-light);
  line-height: 1.8;
  font-size: 0.95rem;
}

.faq-item.active .faq-answer {
  max-height: 300px;
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 0 30px;
}

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

.footer-brand .logo {
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.95rem;
  line-height: 1.8;
  max-width: 350px;
}

.footer-links h4,
.footer-contact h4 {
  font-family: var(--font-accent);
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  transition: all var(--transition);
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--accent-light);
  padding-right: 8px;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

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

/* ===== Scroll Animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

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

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(10, 14, 39, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 100px 30px 30px;
    transition: right var(--transition);
    gap: 4px;
  }

  .nav-links.open { right: 0; }

  .nav-links a {
    width: 100%;
    padding: 14px 20px;
    font-size: 1.1rem;
  }

  .hero { background-attachment: scroll !important; }
  .hero-faq { min-height: 50vh; }

  .features-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .categories-grid { grid-template-columns: 1fr; }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand p { max-width: 100%; }
  .footer-contact-item { justify-content: center; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; }
  .stats-grid { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
}

/* ===== Form Messages ===== */
.form-message {
  padding: 14px 20px;
  border-radius: 10px;
  margin-top: 16px;
  font-weight: 500;
  display: none;
  animation: fadeInUp 0.4s ease;
}

.form-message.success {
  display: block;
  background: rgba(76, 175, 80, 0.12);
  color: #2e7d32;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.form-message.error {
  display: block;
  background: rgba(229, 57, 53, 0.12);
  color: #c62828;
  border: 1px solid rgba(229, 57, 53, 0.3);
}
