:root {
  --bg-dark: #030712;
  --card-bg: rgba(15, 23, 42, 0.75);
  --primary: #06b6d4;
  --primary-glow: rgba(6, 182, 212, 0.35);
  --accent-gold: #fbbf24;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(6, 182, 212, 0.4);
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
}

.bg-glow {
  position: fixed;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 750px;
  height: 750px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

.text-center {
  text-align: center;
}

/* ==========================================
   Navbar & Navigation Header (Restructured)
   ========================================== */
.navbar {
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
  background-color: rgba(3, 7, 18, 0.92);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  width: 100%;
}

.logo {
  font-size: 24px;
  font-weight: 800;
  white-space: nowrap;
}

.logo span {
  color: var(--primary);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 20px;
  align-items: center;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  transition: 0.3s;
  font-weight: 500;
  font-size: 15px;
  white-space: nowrap;
}

nav a:hover {
  color: var(--primary);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.badge-germany {
  background: rgba(251, 191, 36, 0.08);
  color: var(--accent-gold);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  border: 1px solid rgba(251, 191, 36, 0.3);
  white-space: nowrap;
}

.lang-selector select {
  background: #0f172a;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  font-size: 13px;
}

/* Menu Toggle Button for Mobile */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 22px;
  cursor: pointer;
  padding: 5px;
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
  padding: 100px 0 60px;
  text-align: center;
}

.tag {
  background: rgba(15, 23, 42, 0.8);
  color: var(--primary);
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 14px;
  display: inline-block;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.highlight-gradient {
  background: linear-gradient(135deg, #22d3ee 0%, #06b6d4 50%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero h1 {
  font-size: 48px;
  margin: 20px 0;
  font-weight: 800;
  line-height: 1.25;
}

.hero p {
  color: var(--text-muted);
  max-width: 750px;
  margin: 0 auto 35px;
  font-size: 18px;
}

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

.btn {
  padding: 14px 28px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  transition: 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  color: #fff;
}

.btn-glow {
  box-shadow: 0 0 25px var(--primary-glow);
}

.btn-glow:hover {
  transform: translateY(-3px);
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

/* ==========================================
   Grid System & Cards
   ========================================== */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}

.stats-section {
  padding: 40px 0;
}

.stat-card {
  text-align: center;
  background: var(--card-bg);
  padding: 25px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
}

.stat-icon {
  font-size: 28px;
  color: var(--primary);
  margin-bottom: 10px;
}

.stat-card h2 {
  font-size: 38px;
  color: var(--primary);
  display: inline-block;
}

.stat-card span {
  font-size: 24px;
  color: var(--primary);
}

.stat-card p {
  color: var(--text-muted);
  font-size: 14px;
}

/* ==========================================
   Services Section
   ========================================== */
.services-section {
  padding: 80px 0;
}

.section-title {
  font-size: 34px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 10px;
}

.section-title i {
  color: var(--primary);
}

.section-subtitle {
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 45px;
}

.service-detail-card {
  background: var(--card-bg);
  padding: 35px;
  border-radius: 18px;
  border: 1px solid var(--border-color);
  transition: 0.3s;
}

.service-detail-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
}

.card-header-icon {
  width: 55px;
  height: 55px;
  background: rgba(6, 182, 212, 0.1);
  color: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}

.service-detail-card h3 {
  font-size: 22px;
  margin-bottom: 12px;
}

.service-detail-card p {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 20px;
}

.check-list {
  list-style: none;
}

.check-list li {
  color: var(--text-main);
  font-size: 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.check-list i {
  color: var(--primary);
}

/* ==========================================
   Portfolio Section
   ========================================== */
.portfolio {
  padding: 80px 0;
  text-align: center;
}

.portfolio-filter {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--card-bg);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 10px 22px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.project-card {
  background: var(--card-bg);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: 0.4s;
}

[dir="rtl"] .project-card {
  text-align: right;
}

[dir="ltr"] .project-card {
  text-align: left;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-hover);
}

.project-img {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-img img {
  transform: scale(1.08);
}

.project-overlay {
  position: absolute;
  top: 15px;
}

[dir="rtl"] .project-overlay {
  right: 15px;
}

[dir="ltr"] .project-overlay {
  left: 15px;
}

.badge {
  background: rgba(3, 7, 18, 0.85);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  border: 1px solid var(--primary);
}

.project-info {
  padding: 22px;
}

.project-info h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.project-info p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 15px;
}

.project-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.project-tags span {
  background: #0f172a;
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  border: 1px solid var(--border-color);
}

/* ==========================================
   Tech Stack & About
   ========================================== */
.about {
  text-align: center;
  padding: 60px 0;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.tag-glow {
  background: rgba(15, 23, 42, 0.6);
  padding: 10px 22px;
  border-radius: 30px;
  font-size: 14px;
  border: 1px solid var(--border-color);
  transition: 0.3s;
}

.tag-glow:hover {
  border-color: var(--primary);
  box-shadow: 0 0 18px var(--primary-glow);
  color: #fff;
}

/* ==========================================
   Contact & Footer
   ========================================== */
.contact-section {
  padding: 80px 0;
}

.contact-btns {
  display: flex;
  justify-content: center;
  margin-top: 25px;
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease-out;
}

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

footer {
  padding: 35px 0;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.legal-links a {
  color: var(--text-muted, #a0aec0);
  text-decoration: none;
  font-size: 0.9rem;
  margin: 0 8px;
  transition: color 0.3s ease;
}

.legal-links a:hover {
  color: #00f2fe;
  text-decoration: underline;
}

/* ==========================================
   Responsive Media Queries (Mobile Fixes)
   ========================================== */
@media (max-width: 992px) {
  .menu-toggle {
    display: block;
  }

  nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: rgba(3, 7, 18, 0.98);
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
    gap: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  }

  nav ul.active {
    display: flex;
  }

  .nav-left {
    gap: 10px;
  }

  .badge-germany {
    padding: 4px 8px;
    font-size: 11px;
  }
}

@media (max-width: 768px) {
  .container {
    width: 92%;
  }

  .hero {
    padding: 60px 0 40px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero p {
    font-size: 15px;
  }

  .hero-btns {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
  }

  .section-title {
    font-size: 26px;
  }

  .portfolio-grid,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .badge-germany {
    display: none; /* إخفاء الشعار الصغير في الموبايل لعدم الزحام */
  }
}
