/* ===== المتغيرات ===== */
:root {
  --color-primary: #2d6a4f;
  --color-primary-dark: #1b4332;
  --color-primary-light: #40916c;
  --color-accent: #52b788;
  --color-bg: #f8faf9;
  --color-bg-alt: #edf5f0;
  --color-white: #ffffff;
  --color-text: #1a2e23;
  --color-text-light: #5a7268;
  --color-border: #d8e8df;
  --shadow-sm: 0 2px 8px rgba(45, 106, 79, 0.08);
  --shadow-md: 0 8px 30px rgba(45, 106, 79, 0.12);
  --shadow-lg: 0 20px 60px rgba(45, 106, 79, 0.15);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s ease;
  --header-height: 72px;
}

/* ===== إعادة تعيين ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: 'Cairo', sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  overflow-x: hidden;
}

[dir="ltr"] body {
  font-family: 'Poppins', sans-serif;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== الأزرار ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn--outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn--full {
  width: 100%;
}

/* ===== شريط التنقل ===== */
.header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.header.scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 20px;
  position: relative;
}

.nav__menu {
  flex: 1;
  justify-content: center;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary);
}

.nav__logo-icon {
  font-size: 1.5rem;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-switcher {
  display: flex;
  background: var(--color-bg-alt);
  border-radius: 50px;
  padding: 3px;
  border: 1px solid var(--color-border);
}

.lang-btn {
  padding: 6px 14px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-light);
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn.active {
  background: var(--color-primary);
  color: var(--color-white);
}

.lang-btn:hover:not(.active) {
  color: var(--color-primary);
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__link {
  font-weight: 600;
  color: var(--color-text-light);
  position: relative;
  padding: 4px 0;
  transition: var(--transition);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  inset-inline-end: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: var(--transition);
}

.nav__link:hover,
.nav__link.active {
  color: var(--color-primary);
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 3px;
  transition: var(--transition);
}

.nav__toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.nav__toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav__toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* ===== قسم البانر ===== */
.banner {
  position: relative;
  margin-top: var(--header-height);
  height: 480px;
  overflow: hidden;
}

.banner__slider {
  position: relative;
  width: 100%;
  height: 100%;
}

.banner__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.banner__slide.active {
  opacity: 1;
  pointer-events: auto;
}

.banner__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(27, 67, 50, 0.85) 0%, rgba(27, 67, 50, 0.4) 50%, rgba(27, 67, 50, 0.2) 100%);
}

.banner__content {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  padding: 60px 20px;
  color: var(--color-white);
  z-index: 2;
}

[dir="ltr"] .banner__content {
  text-align: left;
}

[dir="rtl"] .banner__content {
  text-align: right;
}

.banner__title {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.3;
}

.banner__desc {
  font-size: clamp(1rem, 2vw, 1.2rem);
  opacity: 0.9;
  margin-bottom: 24px;
  max-width: 600px;
}

.banner__cta {
  background: var(--color-white);
  color: var(--color-primary);
}

.banner__cta:hover {
  background: var(--color-accent);
  color: var(--color-white);
}

.banner__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--color-white);
  font-size: 1.2rem;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner__arrow:hover {
  background: rgba(255, 255, 255, 0.35);
}

.banner__arrow--prev {
  inset-inline-start: 20px;
}

.banner__arrow--next {
  inset-inline-end: 20px;
}

.banner__dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.banner__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--color-white);
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}

.banner__dot.active,
.banner__dot:hover {
  background: var(--color-white);
}

/* ===== القسم الرئيسي ===== */
.hero {
  position: relative;
  min-height: auto;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-bg-alt) 50%, #d8f3dc 100%);
  z-index: -1;
}

.hero__bg::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(82, 183, 136, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.hero__container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 60px 20px;
}

.hero__badge {
  display: inline-block;
  background: rgba(45, 106, 79, 0.1);
  color: var(--color-primary);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero__title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 20px;
  color: var(--color-text);
}

.highlight {
  color: var(--color-primary);
  position: relative;
}

.hero__subtitle {
  font-size: 1.1rem;
  color: var(--color-text-light);
  margin-bottom: 32px;
  max-width: 520px;
}

.hero__stats {
  display: flex;
  gap: 40px;
  margin-bottom: 36px;
}

.hero__stat {
  display: flex;
  flex-direction: column;
}

.hero__stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
}

.hero__stat-plus {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary);
}

.hero__stat-label {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-top: 4px;
}

.hero__buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero__image-wrapper {
  position: relative;
}

.hero__image-frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.hero__image-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 3px solid var(--color-accent);
  border-radius: var(--radius);
  z-index: 1;
  pointer-events: none;
}

.hero__image {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.hero__floating-card {
  position: absolute;
  bottom: 30px;
  inset-inline-end: -20px;
  background: var(--color-white);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: float 3s ease-in-out infinite;
}

.hero__floating-icon {
  font-size: 1.8rem;
}

.hero__floating-card strong {
  display: block;
  font-size: 0.95rem;
  color: var(--color-text);
}

.hero__floating-card p {
  font-size: 0.8rem;
  color: var(--color-text-light);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ===== الأقسام العامة ===== */
.section {
  padding: 100px 0;
}

.section--alt {
  background: var(--color-bg-alt);
}

.section__header {
  text-align: center;
  margin-bottom: 60px;
}

.section__tag {
  display: inline-block;
  background: rgba(45, 106, 79, 0.1);
  color: var(--color-primary);
  padding: 6px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.section__title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.section__desc {
  color: var(--color-text-light);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ===== قسم من أنا ===== */
.about__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.about__card {
  background: var(--color-white);
  padding: 36px 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: var(--transition);
  border: 1px solid var(--color-border);
}

.about__card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.about__icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.about__card h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
  color: var(--color-primary-dark);
}

.about__card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

/* ===== قسم التخصصات ===== */
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service__card {
  background: var(--color-white);
  padding: 32px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

.service__card::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline-end: 0;
  width: 4px;
  height: 0;
  background: var(--color-primary);
  transition: var(--transition);
}

.service__card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.service__card:hover::before {
  height: 100%;
}

.service__icon {
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.service__card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--color-primary-dark);
}

.service__card p {
  color: var(--color-text-light);
  font-size: 0.9rem;
}

/* ===== معرض الصور ===== */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.gallery__item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 5 / 4;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(27, 67, 50, 0.85) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery__item:hover img {
  transform: scale(1.08);
}

.gallery__item:hover .gallery__overlay {
  opacity: 1;
}

.gallery__label {
  color: var(--color-white);
  font-weight: 600;
  font-size: 0.95rem;
}

.gallery__zoom {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.gallery__zoom:hover {
  background: var(--color-white);
  transform: scale(1.1);
}

/* ===== نافذة عرض الصور ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox__close {
  position: absolute;
  top: 20px;
  inset-inline-end: 20px;
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}

.lightbox__close:hover {
  color: var(--color-accent);
}

.lightbox__img {
  max-width: 90%;
  max-height: 75vh;
  border-radius: var(--radius);
  object-fit: contain;
}

.lightbox__caption {
  color: var(--color-white);
  margin-top: 16px;
  font-size: 1.1rem;
  text-align: center;
}

/* ===== قسم التواصل ===== */
.contact__wrapper {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: start;
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact__item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--color-white);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.contact__item-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.contact__item h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--color-primary-dark);
}

.contact__phone {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary);
  transition: var(--transition);
  direction: ltr;
  display: inline-block;
}

.contact__phone:hover {
  color: var(--color-primary-dark);
}

.contact__link {
  color: var(--color-primary);
  font-weight: 600;
  transition: var(--transition);
}

.contact__link:hover {
  color: var(--color-primary-dark);
}

.contact__item p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

.contact__form {
  background: var(--color-white);
  padding: 36px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.form__group {
  margin-bottom: 20px;
}

.form__group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form__group input,
.form__group textarea {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg);
  transition: var(--transition);
}

.form__group input:focus,
.form__group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--color-white);
}

.form__group textarea {
  resize: vertical;
  min-height: 120px;
}

.form__note {
  text-align: center;
  margin-top: 12px;
  font-size: 0.9rem;
  min-height: 24px;
}

.form__note.success {
  color: var(--color-primary);
}

.form__note.error {
  color: #c0392b;
}

/* ===== التذييل ===== */
.footer {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 40px 0;
}

.footer__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.footer__logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-white);
}

.footer__brand p {
  font-size: 0.9rem;
  opacity: 0.8;
}

.footer__contact a {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-accent);
  transition: var(--transition);
}

.footer__contact a:hover {
  color: var(--color-white);
}

.footer__copy {
  font-size: 0.85rem;
  opacity: 0.6;
  margin-top: 8px;
}

/* ===== زر واتساب عائم ===== */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  inset-inline-start: 24px;
  width: 58px;
  height: 58px;
  background: #25d366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: 999;
  transition: var(--transition);
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(37, 211, 102, 0.5);
}

/* ===== تأثير الظهور ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== التجاوب ===== */
@media (max-width: 992px) {
  .banner {
    height: 380px;
  }

  .gallery__grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .hero__container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .hero__subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__stats {
    justify-content: center;
  }

  .hero__buttons {
    justify-content: center;
  }

  .hero__image {
    height: 400px;
  }

  .hero__floating-card {
    inset-inline-end: 10px;
    bottom: 15px;
  }

  .about__grid,
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact__wrapper {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .banner {
    height: 320px;
  }

  .banner__arrow {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .banner__arrow--prev {
    inset-inline-start: 10px;
  }

  .banner__arrow--next {
    inset-inline-end: 10px;
  }

  .nav__toggle {
    display: flex;
  }

  .nav__menu {
    position: fixed;
    top: var(--header-height);
    inset-inline-end: -100%;
    width: 280px;
    height: calc(100vh - var(--header-height));
    background: var(--color-white);
    flex-direction: column;
    padding: 30px;
    gap: 0;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    flex: unset;
    justify-content: flex-start;
  }

  .nav__menu.active {
    inset-inline-end: 0;
  }

  .gallery__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .nav__menu li {
    width: 100%;
  }

  .nav__link {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
  }

  .about__grid,
  .services__grid {
    grid-template-columns: 1fr;
  }

  .hero__stats {
    gap: 24px;
  }

  .section {
    padding: 70px 0;
  }

  .contact__form {
    padding: 24px;
  }
}
