/* style.css */
:root {
  /* Colors */
  --primary: #800080;
  /* Purple from logo */
  --primary-light: #f3e8ff;
  --primary-dark: #581c87;
  --secondary: #D4AF37;
  /* Gold from logo */
  --secondary-light: #fdf6e3;
  --gold: #D4AF37;
  --purple: #800080;
  --text-muted: #64748b;
  --bg-light: #f8fafc;
  --white: #ffffff;
  --danger: #ef4444;
  --success: #22c55e;

  /* Typography */
  --font-en: 'Inter', sans-serif;
  --font-ar: 'Cairo', sans-serif;

  /* Shadow */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  /* Border Radius */
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition: all 0.3s ease-in-out;
}

[dir="rtl"] {
  --font-main: var(--font-ar);
}

[dir="ltr"] {
  --font-main: var(--font-en);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-main);
  color: var(--text-dark);
}

body {
  background-color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.bg-light {
  background-color: var(--bg-light);
}

/* Preloader */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--white);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
}

.loader {
  width: 50px;
  height: 50px;
  border: 5px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Typography & Titles */
.section-title {
  margin-bottom: 3rem;
}

.section-title.center {
  text-align: center;
}

.section-title .subtitle {
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.875rem;
  display: block;
  margin-bottom: 0.5rem;
}

.section-title h2 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.section-title p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-align: center;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 14px 0 rgba(2, 132, 199, 0.39);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.23);
  color: var(--white);
}

.btn-secondary {
  background-color: var(--primary-light);
  color: var(--primary-dark);
}

.btn-secondary:hover {
  background-color: #bae6fd;
  transform: translateY(-2px);
}

.btn-block {
  display: block;
  width: 100%;
}

/* Navbar */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: var(--transition);
  padding: 1rem 0;
}

#navbar.scrolled {
  padding: 0.75rem 0;
  box-shadow: var(--shadow-md);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-dark);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: var(--transition);
}

[dir="rtl"] .nav-links a::after {
  left: auto;
  right: 0;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-lang {
  background: none;
  border: 1px solid var(--text-muted);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-dark);
  transition: var(--transition);
}

.btn-lang:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-dark);
  cursor: pointer;
}

/* Hero Section */
.hero {
  padding-top: 8rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-image {
  position: relative;
  z-index: 1;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content h3 {
  color: var(--secondary);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

.hero-content p {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
}

.hero-social {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
}

.hero-social a {
  font-size: 1.5rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.hero-social a:hover {
  color: var(--primary);
  transform: translateY(-3px);
}

.hero-blob {
  position: relative;
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1;
  background-color: var(--primary-light);
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  animation: blob-float 8s ease-in-out infinite;
  overflow: hidden;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}

@keyframes blob-float {

  0%,
  100% {
    transform: translateY(0) scale(1);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }

  50% {
    transform: translateY(-20px) scale(1.02);
    border-radius: 40% 60% 70% 30% / 50% 60% 30% 60%;
  }
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.1);
  transition: opacity 1.5s ease-in-out, transform 6s ease-in-out;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.experience-badge {
  position: absolute;
  bottom: -2rem;
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 1rem;
}

[dir="ltr"] .experience-badge {
  left: -2rem;
}

[dir="rtl"] .experience-badge {
  right: -2rem;
}

.experience-badge .number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.experience-badge .text {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* New About Section Styles */
.about-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: flex-start;
}

.about-content h2 {
  color: var(--purple);
  margin-bottom: 1.5rem;
}

.experience-counter {
  margin: 2rem 0;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.counter-number {
  font-size: 4rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}

.counter-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-muted);
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.expertise-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
  text-align: center;
  transition: var(--transition);
}

.expertise-card:hover {
  border-color: var(--purple);
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.expertise-card i {
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 1rem;
  display: block;
}

.expertise-card h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0;
}

@media (max-width: 992px) {
  .about-container {
    grid-template-columns: 1fr;
  }
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--white);
  padding: 2.5rem 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 1px solid transparent;
}

.service-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-lg);
}

.service-card .icon-box {
  width: 70px;
  height: 70px;
  background-color: var(--primary-light);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.service-card:hover .icon-box {
  background-color: var(--primary);
  color: var(--white);
}

.service-card .icon-box i {
  font-size: 1.75rem;
  color: var(--primary);
  transition: var(--transition);
}

.service-card:hover .icon-box i {
  color: var(--white);
}

.service-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.service-card p {
  color: var(--text-muted);
}

/* Clinic Gallery */
.clinic-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.gallery-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: var(--transition);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.info-card {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.info-card .icon {
  width: 50px;
  height: 50px;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.info-card h4 {
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}

.info-card p {
  color: var(--text-muted);
}

.social-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.social-btn {
  width: 55px;
  height: 55px;
  background-color: var(--white);
  color: var(--purple);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid #f1f5f9;
}

.social-btn:hover {
  background-color: var(--purple);
  color: var(--white);
  transform: translateY(-8px) scale(1.1);
  box-shadow: 0 10px 25px rgba(128, 0, 128, 0.2);
}

.contact-form-container {
  background: var(--white);
  padding: 3rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.contact-form-container h3 {
  margin-bottom: 2rem;
  font-size: 1.5rem;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  font-weight: 700;
  transition: var(--transition);
  border: 1px solid transparent;
  flex: 1;
  min-width: 180px;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.btn-call {
  background: var(--white);
  color: #0f172a;
  border-color: #e2e8f0;
}

.btn-whatsapp {
  background: var(--white);
  color: #0f172a;
  border-color: #e2e8f0;
}

.btn-save {
  background: var(--primary);
  color: var(--white);
}

.action-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.action-btn i {
  font-size: 1.2rem;
}

[dir="rtl"] .action-btn i {
  order: 1;
}

[dir="rtl"] .action-btn span {
  order: 2;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  font-family: inherit;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.error-msg {
  color: var(--danger);
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: none;
}

.success-msg {
  background-color: #dcfce7;
  color: #166534;
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-top: 1.5rem;
  text-align: center;
  display: none;
}

.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* Footer */
.footer {
  background-color: #0f172a;
  color: #e2e8f0;
  padding-top: 5rem;
}

.footer-container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.footer-col h4 {
  color: var(--white);
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.footer-col p {
  color: #94a3b8;
}

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col ul li a {
  color: #94a3b8;
}

.footer-col ul li a:hover {
  color: var(--primary);
}

[dir="ltr"] .footer-col ul li a:hover {
  padding-left: 0.5rem;
}

[dir="rtl"] .footer-col ul li a:hover {
  padding-right: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding: 1.5rem 0;
  text-align: center;
  color: #94a3b8;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  width: 45px;
  height: 45px;
  background-color: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
}

[dir="ltr"] .back-to-top {
  right: 2rem;
}

[dir="rtl"] .back-to-top {
  left: 2rem;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.fade-left {
  transform: translateX(50px);
}

[dir="rtl"] .fade-left {
  transform: translateX(-50px);
}

.fade-right {
  transform: translateX(-50px);
}

[dir="rtl"] .fade-right {
  transform: translateX(50px);
}

.fade-up {
  transform: translateY(50px);
}

.reveal.fade-left.active,
.reveal.fade-right.active,
.reveal.fade-up.active {
  transform: translate(0, 0);
}

/* Responsive */
@media (max-width: 992px) {

  .hero-container,
  .about-container,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-image {
    order: -1;
  }

  .experience-badge {
    bottom: -1rem;
  }

  [dir="ltr"] .experience-badge {
    left: 1rem;
  }

  [dir="rtl"] .experience-badge {
    right: 1rem;
  }

  .clinic-gallery {
    grid-template-columns: 1fr;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero {
    padding-top: 6rem;
  }

  .hero-content {
    text-align: center;
  }

  .hero-buttons,
  .hero-social {
    justify-content: center;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: var(--white);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transition: var(--transition);
  }

  [dir="ltr"] .nav-links {
    left: -100%;
  }

  [dir="rtl"] .nav-links {
    right: -100%;
  }

  [dir="ltr"] .nav-links.active {
    left: 0;
  }

  [dir="rtl"] .nav-links.active {
    right: 0;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .contact-form-container {
    padding: 2rem;
  }

  .action-btn {
    min-width: 100%;
  }

  #navbar {
    padding: 0.5rem 0;
  }

  .logo {
    font-size: 1rem;
    gap: 0.3rem;
    white-space: nowrap;
  }

  .logo-img {
    height: 32px;
  }

  .nav-actions {
    gap: 0.5rem;
  }

  .btn-lang {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
  }

  .nav-links {
    top: 60px;
    height: calc(100vh - 60px);
  }
}