:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --background-light: #f4f7f9;
  --text-dark: #2c3e50;
  --card-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  --hover-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

:root{
  --bg:#0b1020; --bg-soft:#121a33; --text:#eaf1ff; --muted:#9fb3d1; --card:#0f1730cc; --border:#243659;
  --accent1:#5b8cff; --accent2:#9b6bff; --accent3:#22d3ee; --shadow:rgba(0,0,0,.45);
}
.theme-light{
  --bg:#f6f8ff; --bg-soft:#fff; --text:#0b1020; --muted:#54688c; --card:#ffffffcc; --border:#dfe7ff; --shadow:rgba(3,18,51,.12);
}
.theme-dark{
  --bg:#0b1020; --bg-soft:#121a33; --text:#eaf1ff; --muted:#9fb3d1; --card:#0f1730cc; --border:#243659; --shadow:rgba(0,0,0,.45);
}

body {
  font-family: 'Tajawal', sans-serif;
  background-color: var(--background-light);
  color: var(--text-dark);
  margin: 0;
  line-height: 1.6;
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.brand {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--primary-color);
  text-decoration: none;
}

.brand-clean { color: var(--secondary-color); }
.brand-clear { color: var(--accent-color); }

.nav {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--secondary-color);
}

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

.theme-toggle{
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-dark);
  transition: color 0.3s ease;
}

.theme-toggle-btn:hover {
  color: var(--secondary-color);
}

/* Sections */
.hero-section {
  background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url(img/bg\ \(2\).jpg) no-repeat center center/cover;
  height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.hero-content .hero-desc {
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 700px;
  margin: 0 auto;
}

.companies-section, .about-section, .testimonials-section {
  padding: 4rem 0;
}

.companies-section h2, .about-section h2, .testimonials-section h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 2rem;
}

.filters {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.search-bar, .filter-select {
  border: 1px solid #ccc;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-family: 'Tajawal', sans-serif;
  font-size: 1rem;
  background-color: white;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.company-card {
  background-color: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: right;
  border: 1px solid #eee;
}

.company-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-shadow);
}

.company-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-body {
  padding: 1.5rem;
}

.card-body h5 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--secondary-color);
}

.card-body .rating {
  font-size: 1rem;
  color: #f1c40f;
  margin-bottom: 0.5rem;
}

.card-body p {
  font-size: 0.95rem;
  color: #666;
  margin: 0 0 1rem;
}

.card-body .contact-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: var(--accent-color);
}

/* About Section */
.about-section {
  background-color: #eaf1ff;
  border-top: 1px solid #d4e0ff;
  border-bottom: 1px solid #d4e0ff;
}

.about-text {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-text h2 {
  margin-bottom: 1.5rem;
}

/* Testimonials */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.testimonial-card {
  background-color: white;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 2rem;
  text-align: center;
}

.testimonial-card img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 2px solid var(--secondary-color);
}

.testimonial-card .quote {
  font-style: italic;
  color: #555;
  margin-bottom: 1rem;
}

.testimonial-card .name {
  font-weight: 700;
  color: var(--primary-color);
  margin: 0;
}

/* Floating Buttons */
.whatsapp {
  position: fixed;
  left: 20px;
  bottom: 20px;
  width: 50px;
  height: 50px;
  background-color: #25d366;
  color: white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  z-index: 100;
}

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

.to-top {
  position: fixed;
  left: 20px;
  bottom: 80px;
  width: 45px;
  height: 45px;
  background-color: white;
  border: 1px solid #ccc;
  color: var(--primary-color);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 99;
}

.to-top.show {
  opacity: 1;
  pointer-events: auto;
}

.to-top:hover {
  transform: translateY(-5px);
}

/* Footer */
.footer {
  background-color: var(--primary-color);
  color: white;
  padding: 2rem 0 1rem;
  text-align: center;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.footer .brand {
  color: white;
}

.footer .links {
  display: flex;
  gap: 1rem;
}

.footer .links a {
  color: white;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.footer .links a:hover {
  opacity: 0.8;
}

.footer .socials a {
  color: white;
  font-size: 1.25rem;
  margin: 0 0.5rem;
  transition: transform 0.3s ease;
}

.footer .socials a:hover {
  transform: translateY(-3px);
}

.copyright {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    text-align: center;
  }
  .nav {
    margin-top: 1rem;
  }
  .filters {
    flex-direction: column;
  }
  .footer-inner {
    flex-direction: column;
  }
}

/* Animations */
@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}
.typing-effect {
  overflow: hidden;
  white-space: nowrap;
  animation: typing 2.5s steps(40, end) forwards;
}