/* Base Styles */
:root {
  --primary-color: #0f172a;
  --accent-color: #38bdf8;
  --white: #ffffff;
  --gray-light: #f8fafc;
  --gray: #94a3b8;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Cairo", sans-serif;
  background-color: var(--white);
  color: var(--primary-color);
  line-height: 1.6;
  overflow-x: hidden;
  direction: rtl;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 60px 0;
}

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

/* Loader */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--primary-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  text-align: center;
}

.loader-logo {
  color: var(--white);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.loader-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top-color: var(--accent-color);
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-color) 0%, #1e293b 100%);
  color: var(--white);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.particles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  background: linear-gradient(90deg, var(--white) 0%, var(--accent-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .subtitle {
  font-size: 1.5rem;
  margin-bottom: 30px;
  color: var(--gray-light);
}

.cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: linear-gradient(90deg, var(--accent-color) 0%, #0ea5e9 100%);
  color: var(--white);
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 10px 20px rgba(56, 189, 248, 0.3);
  margin-top: 20px;
}

.cta-button:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 25px rgba(56, 189, 248, 0.4);
}

/* Countdown */
.countdown-container {
  margin: 30px 0;
}

.countdown-label {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--gray-light);
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.countdown-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px;
  min-width: 80px;
  text-align: center;
}

.countdown-item span:first-child {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-color);
  display: block;
}

.countdown-item .countdown-label {
  font-size: 0.9rem;
  color: var(--gray);
  margin: 0;
}

/* Offer Section */
.offer {
  background-color: var(--white);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.feature {
  text-align: center;
  padding: 30px;
  border-radius: 10px;
  background-color: var(--gray-light);
  transition: var(--transition);
}

.feature:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
}

.feature-icon {
  margin-bottom: 20px;
  color: var(--accent-color);
}

.feature h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
}

.offer-details {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  border-radius: 10px;
  background-color: var(--gray-light);
  font-size: 1.1rem;
}

/* Portfolio Section */
.portfolio {
  background-color: var(--primary-color);
  color: var(--white);
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 50px;
  position: relative;
  padding-bottom: 15px;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--accent-color);
  border-radius: 2px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.portfolio-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  height: 250px;
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-item:hover img {
  transform: scale(1.1);
}

.portfolio-overlay h3 {
  color: var(--white);
  font-size: 1.3rem;
  text-align: center;
  padding: 0 15px;
}

/* Testimonials Section */
.testimonials {
  background-color: var(--gray-light);
}

.testimonials-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.testimonial {
  background-color: var(--white);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(15, 23, 42, 0.05);
  transition: var(--transition);
}

.testimonial:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(15, 23, 42, 0.1);
}

.testimonial-content {
  margin-bottom: 20px;
  font-size: 1.1rem;
  line-height: 1.7;
}

.testimonial-author {
  display: flex;
  align-items: center;
}

.testimonial-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  margin-left: 15px;
}

.testimonial-name {
  font-weight: 600;
  font-size: 1.1rem;
}

/* WhatsApp Button */
.whatsapp-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--white);
  box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
  z-index: 100;
  transition: var(--transition);
}

.whatsapp-button:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.whatsapp-tooltip {
  position: absolute;
  right: 70px;
  background-color: var(--primary-color);
  color: var(--white);
  padding: 5px 15px;
  border-radius: 5px;
  font-size: 0.9rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  white-space: nowrap;
}

.whatsapp-button:hover .whatsapp-tooltip {
  opacity: 1;
  visibility: visible;
}

/* Footer */
.footer {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 30px 0;
  text-align: center;
}

.footer-logo {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 15px;
  background: linear-gradient(90deg, var(--white) 0%, var(--accent-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.footer-copyright {
  margin-bottom: 15px;
  color: var(--gray);
}

.footer-links a {
  color: var(--accent-color);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--white);
}

/* Animation Classes */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.active {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.2rem;
  }

  .hero .subtitle {
    font-size: 1.2rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .countdown {
    flex-wrap: wrap;
  }

  .countdown-item {
    min-width: 70px;
  }

  .whatsapp-button {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
  }
}

@media (max-width: 480px) {
  section {
    padding: 40px 0;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero .subtitle {
    font-size: 1rem;
  }

  .cta-button {
    padding: 12px 30px;
    font-size: 1rem;
  }

  .section-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
  }

  .feature {
    padding: 20px;
  }

  .portfolio-item {
    height: 200px;
  }
}
