/* ===================== ROOT VARIABLES ===================== */
:root {
  --primary: #d4af37;
  --primary-dark: #b8932b;
  --primary-light: #f0d97a;
  --bg: #ffffff;
  --bg-alt: #f8f9fb;
  --card: #ffffff;
  --text: #1a1a2e;
  --text-muted: #666;
  --border: #e5e5e5;
  --shadow: 0 10px 40px rgba(0,0,0,0.08);
  --shadow-gold: 0 10px 40px rgba(212,175,55,0.25);
  --gradient: linear-gradient(135deg, #d4af37 0%, #f0d97a 50%, #b8932b 100%);
  --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-theme="dark"] {
  --bg: #0a0e1a;
  --bg-alt: #0f1524;
  --card: #141b2e;
  --text: #f0f0f0;
  --text-muted: #9aa0b0;
  --border: #1f2a44;
  --shadow: 0 10px 40px rgba(0,0,0,0.5);
  --shadow-gold: 0 10px 40px rgba(212,175,55,0.3);
}

/* ===================== RESET ===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Cairo', 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  transition: background 0.5s ease, color 0.5s ease;
  line-height: 1.7;
}

html[lang="en"] body {
  font-family: 'Poppins', 'Cairo', sans-serif;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

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

/* ===================== LOADER ===================== */
.loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-star {
  font-size: 80px;
  color: var(--primary);
  animation: spinStar 1.2s linear infinite;
  filter: drop-shadow(0 0 20px var(--primary));
}

@keyframes spinStar {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.3); }
  100% { transform: rotate(360deg) scale(1); }
}

/* ===================== NAVBAR ===================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 18px 0;
  transition: var(--transition);
  background: transparent;
}

.navbar.scrolled {
  background: var(--bg);
  box-shadow: var(--shadow);
  padding: 12px 0;
  backdrop-filter: blur(20px);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.logo img {
  width: 45px;
  height: 45px;
  object-fit: contain;
  border-radius: 50%;
  background: var(--gradient);
  padding: 3px;
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  color: var(--text);
  transition: var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: width 0.4s ease;
}

html[dir="ltr"] .nav-links a::after {
  right: auto;
  left: 0;
}

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

.nav-links a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: var(--transition);
  font-size: 0.85rem;
  font-weight: 700;
}

.icon-btn:hover {
  background: var(--gradient);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: var(--shadow-gold);
}

#langBtn {
  width: auto;
  padding: 0 12px;
  border-radius: 20px;
}

.hamburger {
  display: none;
}

/* ===================== HERO ===================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 120px 0 60px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(212,175,55,0.15) 0%, transparent 50%),
              radial-gradient(circle at 80% 70%, rgba(212,175,55,0.1) 0%, transparent 50%);
  z-index: 0;
}

.stars {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.stars::before,
.stars::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow:
    20vw 10vh 0 var(--primary),
    40vw 30vh 0 var(--primary-light),
    60vw 15vh 0 var(--primary),
    80vw 40vh 0 var(--primary-light),
    10vw 60vh 0 var(--primary),
    30vw 80vh 0 var(--primary-light),
    50vw 70vh 0 var(--primary),
    70vw 90vh 0 var(--primary-light),
    90vw 50vh 0 var(--primary);
  animation: twinkle 3s infinite alternate;
}

@keyframes twinkle {
  0% { opacity: 0.3; }
  100% { opacity: 1; }
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  margin-bottom: 15px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.hero-text h2 {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
  opacity: 0.9;
}

.hero-text p {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 35px;
  max-width: 550px;
}

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

.btn {
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 50px rgba(212,175,55,0.5);
}

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

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

/* Hero Logo */
.hero-logo {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-logo img {
  width: 100%;
  max-width: 400px;
  filter: drop-shadow(0 20px 60px rgba(212,175,55,0.4));
  animation: floatLogo 6s ease-in-out infinite;
  position: relative;
  z-index: 2;
}

.logo-glow {
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,0.4) 0%, transparent 70%);
  animation: pulseGlow 3s ease-in-out infinite;
  z-index: 1;
}

@keyframes floatLogo {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
}

/* Scroll Down */
.scroll-down {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 50px;
  border: 2px solid var(--primary);
  border-radius: 20px;
  z-index: 3;
}

.scroll-down span {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  animation: scrollDown 1.8s infinite;
}

@keyframes scrollDown {
  0% { top: 8px; opacity: 1; }
  100% { top: 30px; opacity: 0; }
}

/* ===================== SECTIONS ===================== */
.section {
  padding: 100px 0;
  position: relative;
}

.section:nth-child(even) {
  background: var(--bg-alt);
}

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

.section-title h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 900;
  color: var(--text);
  margin-bottom: 15px;
}

.section-title .line {
  width: 80px;
  height: 4px;
  background: var(--gradient);
  margin: 0 auto;
  border-radius: 4px;
}

/* ===================== ABOUT ===================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text h3 {
  font-size: 1.6rem;
  margin-bottom: 20px;
  color: var(--text);
  font-weight: 800;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 30px;
  font-size: 1.02rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

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

.stat:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-gold);
  border-color: var(--primary);
}

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

.stat span {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

.image-wrapper {
  aspect-ratio: 1;
  border-radius: 30px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-gold);
  position: relative;
  overflow: hidden;
}

.image-wrapper::before {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 25px;
  background: var(--bg);
}

.image-wrapper i {
  font-size: 10rem;
  color: var(--primary);
  position: relative;
  z-index: 2;
  animation: floatLogo 5s ease-in-out infinite;
}

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

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

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

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

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-gold);
  border-color: var(--primary);
}

.icon-box {
  width: 80px;
  height: 80px;
  margin: 0 auto 25px;
  background: var(--gradient);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-gold);
  transition: var(--transition);
}

.service-card:hover .icon-box {
  transform: rotate(10deg) scale(1.1);
}

.icon-box i {
  font-size: 2rem;
  color: #fff;
}

.service-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--text);
  font-weight: 700;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ===================== PRODUCTS ===================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
}

.product-card {
  background: var(--card);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-gold);
  border-color: var(--primary);
}

.product-img {
  height: 180px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.product-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.1);
}

.product-img i {
  font-size: 4rem;
  color: #fff;
  position: relative;
  z-index: 2;
  transition: var(--transition);
}

.product-card:hover .product-img i {
  transform: scale(1.2) rotate(-10deg);
}

.product-card h3 {
  padding: 20px;
  text-align: center;
  font-size: 1.05rem;
  color: var(--text);
  font-weight: 700;
}

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

.info-item {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  align-items: flex-start;
  padding: 20px;
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.info-item:hover {
  transform: translateX(-8px);
  border-color: var(--primary);
  box-shadow: var(--shadow-gold);
}

html[dir="ltr"] .info-item:hover {
  transform: translateX(8px);
}

.info-item i {
  font-size: 1.5rem;
  color: var(--primary);
  width: 50px;
  height: 50px;
  background: var(--gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.info-item h4 {
  font-size: 1rem;
  margin-bottom: 5px;
  color: var(--text);
}

.info-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--card);
  padding: 35px;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.contact-form input,
.contact-form textarea {
  padding: 15px 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(212,175,55,0.15);
}

.contact-form button {
  align-self: flex-start;
}

/* ===================== FOOTER ===================== */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 60px 0 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  padding-bottom: 40px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 15px;
  max-width: 600px;
}

.footer-logo img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 50%;
  background: var(--gradient);
  padding: 5px;
}

.footer-logo p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

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

.footer-social a {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--gradient);
  color: #fff;
  transform: translateY(-5px);
  box-shadow: var(--shadow-gold);
  border-color: transparent;
}

.footer-bottom {
  text-align: center;
  padding: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

html[dir="ltr"] .scroll-top {
  left: auto;
  right: 30px;
}

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

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

/* ===================== ANIMATIONS ===================== */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  animation: fadeUp 0.9s forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  animation: fadeIn 1.2s 0.5s forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ===================== RESPONSIVE ===================== */
@media (max-width: 992px) {
  .hero-content,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-btns {
    justify-content: center;
  }

  .hero-logo img {
    max-width: 300px;
    margin: 0 auto;
  }

  .info-item:hover,
  html[dir="ltr"] .info-item:hover {
    transform: translateY(-5px);
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--bg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    transition: right 0.5s ease;
    box-shadow: var(--shadow);
    border-left: 1px solid var(--border);
    z-index: 999;
  }

  html[dir="ltr"] .nav-links {
    right: auto;
    left: -100%;
    border-left: none;
    border-right: 1px solid var(--border);
    transition: left 0.5s ease;
  }

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

  html[dir="ltr"] .nav-links.active {
    left: 0;
  }

  .nav-links a {
    font-size: 1.2rem;
  }

  .hamburger {
    display: flex;
  }

  .section {
    padding: 70px 0;
  }

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

  .scroll-top {
    bottom: 20px;
    left: 20px;
    width: 45px;
    height: 45px;
  }

  html[dir="ltr"] .scroll-top {
    left: auto;
    right: 20px;
  }

  .contact-form {
    padding: 25px;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-logo {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .logo span {
    font-size: 0.9rem;
  }

  .logo img {
    width: 38px;
    height: 38px;
  }

  .icon-btn {
    width: 38px;
    height: 38px;
  }

  .section-title h2 {
    font-size: 1.6rem;
  }
}