:root {
  /* Colors */
  --color-gold: #D4AF37;
  --color-gold-hover: #b5952f;

  /* Light Theme Default */
  --bg-primary: #FAFAFA;
  --bg-secondary: #FFFFFF;
  --text-primary: #1A1A1A;
  --text-secondary: #555555;
  --border-color: #E2E8F0;
  --header-bg: rgba(255, 255, 255, 0.85);

  /* Typography */
  --font-en: 'Outfit', sans-serif;
  --font-ar: 'Tajawal', sans-serif;

  /* Spacing */
  --section-padding: 5rem 2rem;
  --container-width: 1200px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

[data-theme="dark"] {
  --bg-primary: #0f0f0f;
  --bg-secondary: #1c1c1c;
  --text-primary: #f0f0f0;
  --text-secondary: #a0a0a0;
  --border-color: #333333;
  --header-bg: rgba(15, 15, 15, 0.85);
}

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

body {
  font-family: var(--font-en);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

[dir="rtl"] body {
  font-family: var(--font-ar);
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  width: 100%;
  padding: 0 1.5rem;
}

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

ul {
  list-style: none;
}

/* Typography styles */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.4rem, 3vw, 1.75rem);
}

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3 {
  line-height: 1.4;
}

p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.25rem 0;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: background var(--transition-normal), border var(--transition-normal);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--container-width);
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-gold);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  font-size: 1.05rem;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-gold);
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--color-gold);
  transition: width var(--transition-normal);
}

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

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

.controls {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.25rem;
  cursor: pointer;
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  color: var(--color-gold);
}

.mobile-menu-btn {
  display: none;
}

/* Button Component */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-align: center;
  border: none;
}

.btn-primary {
  background: var(--color-gold);
  color: #fff !important;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
  background: var(--color-gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-gold);
  color: var(--color-gold) !important;
}

.btn-outline:hover {
  background: var(--color-gold);
  color: #fff !important;
  transform: translateY(-2px);
}

/* Base Main */
main {
  padding-top: 80px;
  min-height: calc(100vh - 150px);
}

/* Sections */
section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header h2 {
  color: var(--color-gold);
}

/* Footer */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 2rem;
  text-align: center;
  margin-top: auto;
}

/* Floating Whatsapp */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #25d366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  z-index: 1000;
  transition: transform var(--transition-normal);
}

[dir="rtl"] .whatsapp-float {
  right: auto;
  left: 30px;
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

/* Hero Section */
.hero {
  position: relative;
  height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.8)), url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  color: white;
  text-align: center;
}

.hero .container {
  max-width: 800px;
  z-index: 2;
}

.hero h1 {
  color: white;
  margin-bottom: 1.5rem;
  animation: fadeUp 1s ease;
}

.hero p {
  color: #e0e0e0;
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  animation: fadeUp 1s ease 0.2s forwards;
  opacity: 0;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3rem;
  animation: fadeUp 1s ease 0.4s forwards;
  opacity: 0;
  flex-wrap: wrap;
}

.stat-item h3 {
  color: var(--color-gold);
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.stat-item p {
  color: white;
  font-size: 1rem;
  margin-bottom: 0;
}

.hero-btns {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  animation: fadeUp 1s ease 0.3s forwards;
  opacity: 0;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
}

.service-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem;
  text-align: center;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .service-card:hover {
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.02);
}

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

.price-tag {
  display: inline-block;
  background: rgba(212, 175, 55, 0.1);
  color: var(--color-gold);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-weight: 600;
  margin-top: 1rem;
}

/* Portfolio Grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.portfolio-item {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 4/3;
}

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

.portfolio-item:hover img {
  transform: scale(1.05);
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-overlay h3 {
  color: white;
  margin: 0;
}

/* Before After Slider */
.ba-slider {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto 3rem;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 16px;
}

.ba-slider img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ba-slider .img-after {
  z-index: 1;
}

.ba-slider .img-before {
  z-index: 2;
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}

.slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: var(--color-gold);
  z-index: 3;
  transform: translateX(-50%);
  cursor: ew-resize;
}

.slider-handle::after {
  content: '⟷';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: var(--color-gold);
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Contact Form */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 3rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.info-icon {
  width: 50px;
  height: 50px;
  background: rgba(212, 175, 55, 0.1);
  color: var(--color-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.info-text h4 {
  margin-bottom: 0.25rem;
}

.info-text p {
  margin-bottom: 0;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-gold);
}

.form-control::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.contact-note {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(212, 175, 55, 0.1);
  border-left: 4px solid var(--color-gold);
  border-radius: 4px;
}

[dir="rtl"] .contact-note {
  border-left: none;
  border-right: 4px solid var(--color-gold);
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

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

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

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: clip-path 0.4s ease;
  }

  .nav-links.active {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero-btns {
    flex-direction: column;
  }
}