@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;900&display=swap');

:root {
  --primary-color: #d4af37; /* Gold */
  --secondary-color: #8c7326;
  --bg-color: #0d0d0d;
  --bg-surface: #1a1a1a;
  --text-primary: #f5f5f5;
  --text-secondary: #aaaaaa;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  direction: rtl;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(212, 175, 55, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: opacity, transform;
  backface-visibility: hidden;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
  padding: 0 20px;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  /* Removed filter: brightness() for better scrolling performance */
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), rgba(13, 13, 13, 0.9));
  z-index: -1;
}

.logo {
  width: 80%;
  max-width: 300px;
  margin-bottom: 2rem;
  animation: fadeIn 1s ease-out;
  filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.3));
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--primary-color);
  animation: fadeIn 1s ease-out 0.3s both;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  animation: fadeIn 1s ease-out 0.6s both;
}

/* Features Section */
.features {
  padding: 5rem 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 3rem;
  position: relative;
  display: block;
  width: 100%;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: 60px;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 2rem;
}

.feature-card {
  background-color: var(--bg-surface);
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
  border: 1px solid rgba(212, 175, 55, 0.1);
  position: relative;
  overflow: hidden;
  z-index: 1;
  will-change: transform;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), transparent);
  z-index: -1;
  opacity: 0;
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.feature-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

/* Gallery Section */
.gallery {
  padding: 5rem 20px;
  background-color: #111;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 15px;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  height: 300px;
  cursor: pointer;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: transform;
}

.gallery-item:hover .gallery-img {
  transform: scale(1.1);
}

/* Branches Section */
.branches {
  padding: 5rem 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.branches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 1.5rem;
}

.branch-card {
  background-color: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
  text-decoration: none;
  display: block;
}

.branch-card:hover {
  background-color: #222;
  border-color: var(--primary-color);
  transform: translateY(-5px);
}

.branch-icon {
  font-size: 2rem;
  color: #ea4335;
  margin-bottom: 1rem;
}

.branch-name {
  color: var(--text-primary);
  font-size: 1.2rem;
  font-weight: 500;
}

/* Contact/CTA Section */
.cta {
  padding: 5rem 20px;
  background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
  text-align: center;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.cta-title {
  font-size: 2rem;
  margin-bottom: 2rem;
}

.contact-buttons {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 40px;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: bold;
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.btn-whatsapp {
  background-color: #25d366;
  color: white;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  background-color: #1ebe57;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

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

.btn-call:hover {
  background-color: var(--primary-color);
  color: var(--bg-color);
  animation: pulse 1s infinite;
}

footer {
  text-align: center;
  padding: 2rem;
  background-color: #000;
  border-top: 1px solid #222;
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    padding: 0 10px;
  }
  
  .section-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
  }
  
  .features, .gallery, .branches, .cta {
    padding: 3rem 15px;
  }
  
  .feature-card {
    padding: 1.5rem;
  }
  
  .feature-icon {
    font-size: 2.5rem;
  }
  
  .feature-title {
    font-size: 1.3rem;
  }
  
  .contact-buttons {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
    font-size: 1.1rem;
    padding: 12px 20px;
  }
}

@media (max-width: 400px) {
  .hero-title {
    font-size: 1.7rem;
  }
  
  .logo {
    margin-bottom: 1rem;
  }
}
