/********** Template CSS **********/
:root {
  --primary: #88b44e;
  --secondary: #fb9f38;
  --light: #f5f8f2;
  --dark: #252c30;
}

.back-to-top {
  position: fixed;
  display: none;
  right: 30px;
  bottom: 30px;
  z-index: 99;
}

.fw-medium {
  font-weight: 600;
}

.fw-bold {
  font-weight: 700;
}

.fw-black {
  font-weight: 900;
}

/*** Spinner ***/
#spinner {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-out, visibility 0s linear 0.5s;
  z-index: 99999;
}

#spinner.show {
  transition: opacity 0.5s ease-out, visibility 0s linear 0s;
  visibility: visible;
  opacity: 1;
}

/*** Button ***/
.btn {
  transition: 0.5s;
  font-weight: 500;
}

.btn-primary,
.btn-outline-primary:hover {
  color: var(--light);
}

.btn-secondary,
.btn-outline-secondary:hover {
  color: var(--dark);
}

.btn-square {
  width: 38px;
  height: 38px;
}

.btn-sm-square {
  width: 32px;
  height: 32px;
}

.btn-lg-square {
  width: 48px;
  height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: normal;
}

/*** Navbar ***/
.sticky-top {
  top: -150px;
  transition: 0.5s;
}

.navbar .navbar-brand {
  margin-inline-end: 35px;
  padding: 0;
  width: 50px;
  height: 50px;
}

.navbar .navbar-nav .nav-link {
  margin-inline-end: 35px;
  padding: 25px 0;
  color: var(--dark);
  font-weight: 600;
  text-transform: uppercase;
  outline: none;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
  color: var(--primary);
}

.navbar .dropdown-toggle::after {
  border: none;
  content: "\f107";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  vertical-align: middle;
  margin-left: 8px;
}

@media (max-width: 991.98px) {
  .navbar .navbar-brand {
    width: 126px;
    height: 100px;
  }

  .navbar .navbar-nav .nav-link {
    margin-right: 0;
    padding: 10px 0;
  }

  .navbar .navbar-nav {
    margin-top: 75px;
    border-top: 1px solid #eeeeee;
  }
}

@media (min-width: 992px) {
  .navbar .nav-item .dropdown-menu {
    display: block;
    border: none;
    margin-top: 0;
    top: 150%;
    opacity: 0;
    visibility: hidden;
    transition: 0.5s;
  }

  .navbar .nav-item:hover .dropdown-menu {
    top: 100%;
    visibility: visible;
    transition: 0.5s;
    opacity: 1;
  }
}

/*** Header ***/
.carousel-caption {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  background: rgba(136, 180, 78, 0.6);
  z-index: 1;
}

.carousel-control-prev,
.carousel-control-next {
  width: 15%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 3.5rem;
  background-color: var(--dark);
  border: 15px solid var(--dark);
}

@media (max-width: 768px) {
  #header-carousel .carousel-item {
    position: relative;
    min-height: 450px;
  }

  #header-carousel .carousel-item img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.page-header {
  background: linear-gradient(rgba(136, 180, 78, 0.7), rgba(136, 180, 78, 0.7)),
    url(../img/carousel-1.jpg) center center no-repeat;
  background-size: cover;
}

.page-header .breadcrumb-item+.breadcrumb-item::before {
  color: var(--light);
}

.page-header .breadcrumb-item,
.page-header .breadcrumb-item a {
  font-size: 18px;
  color: var(--light);
}

/*** Section Title ***/
.section-title {
  position: relative;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
}

.section-title::before {
  position: absolute;
  content: "";
  width: 50%;
  height: 2px;
  bottom: 0;
  left: 0;
  background: var(--primary);
}

.section-title::after {
  position: absolute;
  content: "";
  width: 28px;
  height: 28px;
  bottom: -13px;
  left: calc(25% - 13px);
  background: var(--dark);
  border: 10px solid #ffffff;
  border-radius: 28px;
}

.section-title.text-center::before {
  left: 25%;
}

.section-title.text-center::after {
  left: calc(50% - 13px);
}

/*** Products ***/
.product {
  background: linear-gradient(rgba(136, 180, 78, 0.1), rgba(136, 180, 78, 0.1)),
    url(../img/product-bg.png) left bottom no-repeat;
  background-size: auto;
}

.product-carousel .owl-nav {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.product-carousel .owl-nav .owl-prev,
.product-carousel .owl-nav .owl-next {
  margin: 0 10px;
  width: 55px;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--primary);
  border-radius: 55px;
  box-shadow: 0 0 45px rgba(0, 0, 0, 0.15);
  font-size: 25px;
  transition: 0.5s;
}

.product-carousel .owl-nav .owl-prev:hover,
.product-carousel .owl-nav .owl-next:hover {
  background: #ffffff;
  color: var(--primary);
}

/*** About ***/
.video {
  background: linear-gradient(rgba(136, 180, 78, 0.85),
      rgba(136, 180, 78, 0.85)),
    url(../img/video-bg.png) center center no-repeat;
  background-size: cover;
}

.btn-play {
  position: relative;
  display: block;
  box-sizing: content-box;
  width: 65px;
  height: 75px;
  border-radius: 100%;
  border: none;
  outline: none !important;
  padding: 28px 30px 30px 38px;
  background: #ffffff;
}

.btn-play:before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 50%;
  transform: translateX(-50%) translateY(-50%);
  display: block;
  width: 120px;
  height: 120px;
  background: #ffffff;
  border-radius: 100%;
  animation: pulse-border 1500ms ease-out infinite;
}

.btn-play:after {
  content: "";
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  transform: translateX(-50%) translateY(-50%);
  display: block;
  width: 120px;
  height: 120px;
  background: #ffffff;
  border-radius: 100%;
  transition: all 200ms;
}

.btn-play span {
  display: block;
  position: relative;
  z-index: 3;
  width: 0;
  height: 0;
  left: 13px;
  border-left: 40px solid var(--primary);
  border-top: 28px solid transparent;
  border-bottom: 28px solid transparent;
}

@keyframes pulse-border {
  0% {
    transform: translateX(-50%) translateY(-50%) translateZ(0) scale(1);
    opacity: 1;
  }

  100% {
    transform: translateX(-50%) translateY(-50%) translateZ(0) scale(2);
    opacity: 0;
  }
}

.modal-video .modal-dialog {
  position: relative;
  max-width: 800px;
  margin: 60px auto 0 auto;
}

.modal-video .modal-body {
  position: relative;
  padding: 0px;
}

.modal-video .close {
  position: absolute;
  width: 30px;
  height: 30px;
  right: 0px;
  top: -30px;
  z-index: 999;
  font-size: 30px;
  font-weight: normal;
  color: #ffffff;
  background: #000000;
  opacity: 1;
}

/*** Store ***/
.store-item .store-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(138, 180, 78, 0.3);
  opacity: 0;
  transition: 0.5s;
}

.store-item:hover .store-overlay {
  opacity: 1;
}

/*** Contact ***/
.contact .btn-square {
  width: 100px;
  height: 100px;
  border: 20px solid var(--light);
  background: var(--primary);
  border-radius: 50px;
}

/*** Testimonial ***/
.testimonial {
  background: linear-gradient(rgba(136, 180, 78, 0.85),
      rgba(136, 180, 78, 0.85)),
    url(../img/testimonial-bg.jpg) center center no-repeat;
  background-size: cover;
}

.testimonial-item {
  margin: 0 auto;
  max-width: 600px;
  text-align: center;
  background: #ffffff;
  border: 30px solid var(--primary);
}

.testimonial-item img {
  width: 60px !important;
  height: 60px !important;
  border-radius: 60px;
}

.testimonial-carousel .owl-dots {
  margin-top: 35px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.testimonial-carousel .owl-dot {
  position: relative;
  display: inline-block;
  margin: 0 5px;
  width: 15px;
  height: 15px;
  background: var(--primary);
  border-radius: 15px;
  transition: 0.5s;
}

.testimonial-carousel .owl-dot.active {
  width: 30px;
  background: var(--dark);
}

/*** Footer ***/
.footer {
  color: #b0b9ae;
}

.footer .btn.btn-link {
  display: block;
  margin-block-end: 5px;
  padding: 0;
  text-align: start;
  /* بدلاً من left */
  color: #b0b9ae;
  font-weight: normal;
  text-transform: capitalize;
  transition: 0.3s;
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  width: 100%;
}

/* دعم إضافي للاتجاهات */
.footer[dir="ltr"] .btn.btn-link {
  text-align: left;
}

.footer[dir="rtl"] .btn.btn-link {
  text-align: right;
}

.footer .btn.btn-link::before {
  position: relative;
  content: var(--arrow-icon, "\f105");
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  color: var(--primary);
  margin-inline-end: 10px;
  transition: all 0.3s ease;
}

[dir="rtl"] .footer .btn.btn-link::before {
  content: "\f104";
  /* left arrow */
}

.footer .btn.btn-link:hover {
  color: var(--light);
  letter-spacing: 2px;
  box-shadow: none;
}

.copyright {
  color: #b0b9ae;
}

.copyright {
  background: #252525;
}

.copyright a:hover {
  color: #ffffff !important;
}

.container-xxl {
  max-width: 100% !important;
}

.language-switcher {
  margin: 20px 0;
}

.language-switcher button {
  margin: 0 10px;
  padding: 8px 16px;
  border: 1px solid #ccc;
  background: white;
  cursor: pointer;
}

.language-switcher button.active {
  background: #88b44e;
  color: white;
}

/* للغة العربية */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] nav {
  direction: rtl;
}


/* الهيكل الأساسي */
.navbar-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: var(--transition);
}

.navbar-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 70px;
}

/* الجزء الأيسر */
.navbar-start {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 0.75rem;
  transition: var(--transition);
}

.logo-link:hover {
  transform: translateY(-2px);
}

.logo-image {
  height: 40px;
  width: auto;
  object-fit: contain;
  border-radius: var(--border-radius);
}

.company-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: -0.5px;
}

.start-slot {
  display: flex;
  align-items: center;
}

/* القائمة الرئيسية */
.navbar-menu {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link,
.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  border-radius: var(--border-radius);
  transition: var(--transition);
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.95rem;
}

.nav-link:hover,
.nav-dropdown-toggle:hover {
  background: rgba(52, 152, 219, 0.1);
  color: var(--secondary-color);
  transform: translateY(-1px);
}

.nav-icon {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* القوائم المنسدلة */
.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-light);
  min-width: 200px;
  box-shadow: var(--shadow);
  border-radius: var(--border-radius);
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  z-index: 1001;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--text-dark);
  transition: var(--transition);
  font-size: 0.9rem;
}

.dropdown-item:hover {
  background: rgba(52, 152, 219, 0.1);
  color: var(--secondary-color);
}

.dropdown-arrow {
  font-size: 0.7rem;
  transition: var(--transition);
}

.nav-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

/* الجزء الأيمن */
.navbar-end {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* محول اللغة */
.language-switcher {
  display: flex;
  background: #e7f5d6;
  border-radius: 25px;
  padding: 0.25rem;
}

.lang-btn {
  padding: 0.5rem 1rem;
  border: none;
  background: none;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.85rem;
}

.lang-btn.active {
  background: var(--secondary-color);
  color: var(--text-light);
}

/* شريط البحث */
.search-container {
  position: relative;
}

.search-toggle {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--text-dark);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: var(--transition);
}

.search-toggle:hover {
  background: rgba(52, 152, 219, 0.1);
  color: var(--secondary-color);
}

.search-box {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-light);
  box-shadow: var(--shadow);
  border-radius: var(--border-radius);
  padding: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
}

.search-container:hover .search-box {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.search-input {
  border: none;
  outline: none;
  padding: 0.5rem;
  border-radius: 4px;
  background: rgba(52, 152, 219, 0.1);
  min-width: 200px;
  font-size: 0.9rem;
}

.search-submit {
  background: var(--secondary-color);
  color: var(--text-light);
  border: none;
  padding: 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.search-submit:hover {
  background: #88b44e;
}

.end-slot {
  display: flex;
  align-items: center;
}

/* Mobile Controls */
.mobile-controls {
  display: none;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

/* Mobile Language Toggle */
.mobile-language-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  align-items: center;
  color: #000000;
  font-size: 1.2rem;
  transition: var(--transition);
  border-radius: 50%;
}

.mobile-language-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--primary);
}

.mobile-language-toggle:active {
  transform: scale(0.95);
}

/* Mobile Language Dropdown */
.mobile-language-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  min-width: 140px;
  padding: 0.5rem 0;
  z-index: 1002;
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-lang-item {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
  color: var(--text-dark);
  font-weight: 500;
}

.mobile-lang-item:hover {
  background: rgba(136, 180, 78, 0.1);
  color: var(--primary);
}

.mobile-lang-item.active {
  background: rgba(136, 180, 78, 0.15);
  color: var(--primary);
  font-weight: 600;
}

.language-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  z-index: 1001;
}

/* القائمة المتنقلة */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  gap: 0.25rem;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  align-items: center;
}

.mobile-menu-toggle:hover span {
  background: #333333;
}

.mobile-menu-toggle span {
  width: 20px;
  height: 2px;
  background: #000000;
  transition: var(--transition);
  display: block;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  backdrop-filter: blur(2px);
}

/* دعم RTL */
.navbar-header.rtl .dropdown-menu {
  left: auto;
  right: 0;
}

.navbar-header.rtl .logo-link {
  flex-direction: row;
}

.navbar-header.rtl .nav-link,
.navbar-header.rtl .dropdown-item {
  flex-direction: row;
}

@media (max-width: 968px) {
  .navbar-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 230px;
    height: 100vh;
    background: #ffffff;
    box-shadow: var(--shadow);
    transition: left 0.3s ease-in-out;
    z-index: 1000;
    padding-top: 90px;
    overflow-y: auto;
    flex-direction: column;
  }

  .navbar-menu.active {
    left: 0;
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .nav-link,
  .nav-dropdown-toggle {
    width: 100%;
    justify-content: flex-start;
    /* padding: 1rem 0; */
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: rgba(52, 152, 219, 0.05);
    margin: 0.5rem 0;
    width: 100%;
  }

  .mobile-controls {
    display: flex !important;
  }

  .mobile-language-toggle {
    display: flex !important;
  }

  .mobile-menu-toggle {
    display: flex !important;
    z-index: 1001;
  }

  .mobile-overlay {
    display: block;
  }

  .language-overlay {
    display: block;
  }

  /* Ensure menu is properly positioned on mobile */
  .navbar-menu {
    display: flex;
    flex-direction: column;
  }

  .navbar-header.rtl .navbar-menu {
    left: auto;
    right: -100%;
    transition: right 0.3s ease-in-out;
  }

  .navbar-header.rtl .navbar-menu.active {
    right: 0;
  }
}

@media (max-width: 768px) {
  .navbar-container {
    padding: 0 0.5rem;
  }

  /* .company-name {
    display: block;
  } */

  .language-switcher {
    display: none;
  }

  /* RTL support for mobile language dropdown */
  .navbar-header.rtl .mobile-language-dropdown {
    right: auto;
    left: 0;
  }

  .navbar-header.rtl .mobile-lang-item {
    text-align: right;
  }

  .search-box {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    border-radius: 0;
    padding: 1rem;
  }
}

/* تأثيرات خاصة */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.navbar-header {
  animation: slideIn 0.5s ease;
}

.me-fa {
  margin-inline-end: 1rem !important;
}

.p-ltr {
  direction: ltr !important;
}

/* Advanced Lazy Image Styles */
.advanced-lazy-image {
  border-radius: 12px;
}

.advanced-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #f6f6f6 25%, #e9e9e9 50%, #f6f6f6 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
}

.shimmer-effect {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer 2s infinite;
}

.loading-indicator {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #666;
  font-size: 14px;
}

.spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #ffd280;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 8px;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

/* تحسينات للأداء */
.advanced-lazy-image img {
  will-change: transform, opacity;
}

/* تأثيرات hover */
.advanced-lazy-image:hover img {
  transform: scale(1.05);
}


@media (min-width: 768px) {
  .col-md-6 {
    max-width: 100%;
  }
}