
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}

/********** Template CSS **********/
:root {
    /* =====================================================
       ALKOTBAN B2B palette v2.0
       Contrast ratios noted per token are measured against
       the surface each token is actually used on. All text
       pairings meet WCAG 2.1 AA (4.5:1 body, 3:1 large).
       ===================================================== */

    /* --- Brand greens --- */
    --color-primary: #2D5016;        /* dark professional green — 8.85:1 on page bg */
    --color-primary-dark: #1F3A0F;   /* deepest green — dark section surfaces */
    --color-primary-light: #3E6B20;  /* hover / raised state */
    --color-accent: #4A7C59;         /* CTA green — 4.86:1 with white text */
    --color-accent-dark: #3B6547;    /* CTA hover */

    /* --- Warm earth --- */
    --color-brown: #8B6F47;          /* decorative brown: rules, borders, icon fills */
    --color-brown-text: #7A6035;     /* small text on light — 5.66:1 (plain #8B6F47 is 4.50:1, too thin) */
    --color-sand: #D4BE90;           /* warm light — text/icons/CTA on dark green (5.10:1 on primary, 6.93:1 on primary-dark) */
    --color-sand-dark: #C0A87A;      /* sand hover — 5.46:1 with deep-green text */

    /* --- Neutral surfaces --- */
    --color-background: #FAFAF8;     /* page — warm white */
    --color-surface: #FFFFFF;        /* cards raised off the page */
    --color-background-alt: #F1EFE8; /* alternating section tint — separates sections */
    --color-border: #E2DFD5;         /* hairline dividers on light */
    --color-border-strong: #C9C4B4;  /* form field borders */

    /* --- Text --- */
    --color-text: #2C2C2C;           /* headings — 13.4:1 on page bg */
    --color-text-body: #4F4A42;      /* body copy, warm dark gray — 8.4:1 */
    --color-text-muted: #5A5A52;     /* labels / captions — 6.7:1 */
    --color-on-dark: #F5F3EE;        /* text on dark green surfaces — 11.7:1 */
    --color-white: #FFFFFF;

    /* --- Status --- */
    --color-hazard: #B23A2E;
    --color-info: #3D6B8C;
    --color-success-highlight: #4A7C59;

    /* --- Product categories: one brand family, no rainbow --- */
    --color-category-fertilizers: #2D5016;
    --color-category-seeds: #4A7C59;
    --color-category-pesticides: #8B6F47;

    /* --- Typography --- */
    --font-family-arabic: "Cairo", sans-serif;
    --font-family-english: "Cairo", sans-serif;
    --line-height-rtl: 1.8;
    --line-height-ltr: 1.6;
    --transition: 0.25s ease;

    /* =====================================================
       Legacy aliases — kept so existing rules keep working.
       `--primary` was #ffffff, which rendered white text on
       white backgrounds across the CTA, network and card
       sections. It now resolves to the brand green.
       ===================================================== */
    --primary: var(--color-primary);
    --light: var(--color-on-dark);
    --dark: var(--color-primary-dark);
    --secondary: var(--color-sand);        /* used almost exclusively on dark surfaces */
    --secondary-dark: var(--color-sand-dark);
    --ivory: var(--color-background-alt);
    --ivory-dark: var(--color-border);     /* was #FFFFFF — invisible section borders */
    --charcoal: var(--color-text);
    --earth: var(--color-text-body);
    --earth-light: var(--color-accent);
    --gold-muted: var(--color-brown-text); /* text-safe brown on light surfaces */
    --pine-900: var(--color-primary-dark);
    --text-dark: var(--color-text);        /* was referenced but never defined */
}

body {
    font-family: var(--font-family-english);
    line-height: var(--line-height-ltr);
    color: var(--color-text);
    background-color: var(--color-background);
}

/* للغة العربية */
[lang="ar"] {
    font-family: var(--font-family-arabic);
    line-height: var(--line-height-rtl);
}

.ff-secondary {
    font-family: "Cairo", sans-serif;
}

.fw-medium {
    font-weight: 600 !important;
}

.fw-semi-bold {
    font-weight: 700 !important;
}

.back-to-top {
    position: fixed;
    display: none;
    left: 45px;
    bottom: 45px;
    z-index: 99;
}

/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}

/*** Button ***/
.btn {
    font-family: "Cairo", sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    transition: .5s;
}

.btn.btn-primary,
.btn.btn-secondary {
    color: #FFFFFF;
}

.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;
    border-radius: 2px;
}

/*** Navbar ***/
.navbar-dark .navbar-nav .nav-link {
    position: relative;
    margin-left: 25px;
    padding: 35px 0;
    font-size: 15px;
    color: var(--light) !important;
    text-transform: uppercase;
    font-weight: 500;
    outline: none;
    transition: .5s;
}
.navbar {
    justify-content: space-between;;
}
.sticky-top.navbar-dark .navbar-nav .nav-link {
    padding: 20px 0;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: var(--secondary) !important;
}

.navbar-dark .navbar-brand img {
    max-height: 60px;
    transition: .5s;
}

.sticky-top.navbar-dark .navbar-brand img {
    max-height: 45px;
}

@media (max-width: 991.98px) {
    .sticky-top.navbar-dark {
        position: relative;
    }

    .navbar-dark .navbar-collapse {
        margin-top: 15px;
        border-top: 1px solid rgba(255, 255, 255, .1)
    }

    .navbar-dark .navbar-nav .nav-link,
    .sticky-top.navbar-dark .navbar-nav .nav-link {
        padding: 10px 0;
        margin-left: 0;
    }

    .navbar-dark .navbar-brand img {
        max-height: 45px;
    }
}

@media (min-width: 992px) {
    .navbar-dark {
        position: absolute;
        width: 100%;
        top: 0;
        left: 0;
        z-index: 999;
        background: transparent !important;
    }

    .sticky-top.navbar-dark {
        position: fixed;
        background: var(--primary) !important;
    }
}

/*** Hero Header ***/
.hero-header {
    background: linear-gradient(rgba(74, 84, 38, 0.8), rgba(74, 84, 38, 0.5)), url(../img/hero-bg.png);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

.hero-header img {
    animation: imgRotate 50s linear infinite;
}

@keyframes imgRotate {
    100% {
        transform: rotate(360deg);
    }
}

.breadcrumb-item+.breadcrumb-item::before {
    color: rgba(255, 255, 255, .5);
}

/*** Section Title ***/
.section-title {
    position: relative;
    display: inline-block;
}

.section-title::before {
    position: absolute;
    content: "";
    width: 45px;
    height: 2px;
    top: 50%;
    left: -55px;
    margin-top: -1px;
    background: var(--color-brown);
}

.section-title::after {
    position: absolute;
    content: "";
    width: 45px;
    height: 2px;
    top: 50%;
    right: -55px;
    margin-top: -1px;
    background: var(--color-brown);
}

/* On dark green surfaces the brown rule disappears — use sand instead */
.footer .section-title::before,
.footer .section-title::after,
.network-section .section-title::before,
.network-section .section-title::after {
    background: var(--color-sand);
}

.section-title.text-start::before,
.section-title.text-end::after {
    display: none;
}

/*** Service ***/
.service-item {
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
    transition: .5s;
    border-radius: 12px;
}

.service-item:hover {
    background: var(--primary);
}

.service-item * {
    transition: .5s;
}

.service-item:hover * {
    color: var(--light) !important;
}

.service-item-inner {
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.service-item-icon {
    margin-bottom: 0.75rem !important;
}

.service-item-title {
    font-size: 1rem;
    margin: 0;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 0;
    padding: 0;
}

.contact-details-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px 20px;
}

.contact-details-icon {
    font-size: 2rem;
}

.contact-details-label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.contact-details-link {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
}

.contact-details-link:hover {
    color: var(--secondary);
}

/*** Food Menu ***/
.nav-pills .nav-item .active {
    border-bottom: 2px solid var(--primary);
}

/*** Youtube Video ***/
.video {
    position: relative;
    height: 100%;
    min-height: 500px;
    background: linear-gradient(rgba(15, 23, 43, .1), rgba(15, 23, 43, .1)), url(../img/hero-bg.png);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

.video .btn-play {
    position: absolute;
    z-index: 3;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    box-sizing: content-box;
    display: block;
    width: 32px;
    height: 44px;
    border-radius: 50%;
    border: none;
    outline: none;
    padding: 18px 20px 18px 28px;
}

.video .btn-play:before {
    content: "";
    position: absolute;
    z-index: 0;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    display: block;
    width: 100px;
    height: 100px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse-border 1500ms ease-out infinite;
}

.video .btn-play:after {
    content: "";
    position: absolute;
    z-index: 1;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    display: block;
    width: 100px;
    height: 100px;
    background: var(--primary);
    border-radius: 50%;
    transition: all 200ms;
}

.video .btn-play img {
    position: relative;
    z-index: 3;
    max-width: 100%;
    width: auto;
    height: auto;
}

.video .btn-play span {
    display: block;
    position: relative;
    z-index: 3;
    width: 0;
    height: 0;
    border-left: 32px solid var(--dark);
    border-top: 22px solid transparent;
    border-bottom: 22px 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(1.5);
        opacity: 0;
    }
}

#videoModal {
    z-index: 99999;
}

#videoModal .modal-dialog {
    position: relative;
    max-width: 800px;
    margin: 60px auto 0 auto;
}

#videoModal .modal-body {
    position: relative;
    padding: 0px;
}

#videoModal .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;
}

/*** Team ***/
.team-item {
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
    height: 100%;
    padding-bottom: 3vh;
    transition: .5s;
}

.team-item img {
    transition: .5s;
}

.team-item:hover img {
    transform: scale(1.1);
}

.team-item .btn {
    border-radius: 38px 38px 0 0;
}

/*** Testimonial ***/
.testimonial-carousel .owl-item .testimonial-item,
.testimonial-carousel .owl-item.center .testimonial-item * {
    transition: .5s;
}

.testimonial-carousel .owl-item.center .testimonial-item {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}

.testimonial-carousel .owl-item.center .testimonial-item * {
    color: var(--light) !important;
}

.testimonial-carousel .owl-dots {
    margin-top: 24px;
    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;
    border: 1px solid #CCCCCC;
    border-radius: 15px;
    transition: .5s;
}

.testimonial-carousel .owl-dot.active {
    background: var(--primary);
    border-color: var(--primary);
}

/*** Footer ***/
.footer .btn.btn-social {
    margin-right: 5px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    border: 1px solid #FFFFFF;
    border-radius: 35px;
    transition: .3s;
}

.footer .btn.btn-social:hover {
    color: var(--color-sand);
    border-color: var(--color-sand);
}

.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: #FFFFFF;
    font-size: 15px;
    font-weight: normal;
    text-transform: capitalize;
    transition: .3s;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    letter-spacing: 1px;
    box-shadow: none;
}

.footer .copyright {
    padding: 25px 0;
    font-size: 15px;
    border-top: 1px solid rgba(256, 256, 256, .1);
}

.footer .copyright a {
    color: var(--light);
}

.footer .footer-menu a {
    margin-right: 15px;
    padding-right: 15px;
    border-right: 1px solid rgba(255, 255, 255, .1);
}

.footer .footer-menu a:last-child {
    margin-right: 0;
    padding-right: 0;
    border-right: none;
}

/*** دعم متعدد اللغات RTL/LTR ***/

/* إعدادات أساسية للغات RTL */
[dir="rtl"] {
    text-align: right;
    direction: rtl;
}

[dir="rtl"] nav {
    direction: rtl;
}

/* Classes مساعدة للاتجاه */
.text-direction-rtl {
    direction: rtl;
    text-align: right;
}
.me-fa {
  margin-inline-end: 1rem !important;
}
.text-direction-ltr {
    direction: ltr;
    text-align: left;
}

.p-ltr {
    direction: ltr !important;
    text-align: left !important;
}

.p-rtl {
    direction: rtl !important;
    text-align: right !important;
}

/* تحسينات للغة العربية واللغات RTL */
[dir="rtl"] .section-title::before {
    right: -55px;
    left: auto;
}

[dir="rtl"] .section-title::after {
    left: -55px;
    right: auto;
}

[dir="rtl"] .breadcrumb-item+.breadcrumb-item::before {
    float: right;
    padding-left: 0.5rem;
    padding-right: 0;
}

[dir="rtl"] .contact-details-item {
    text-align: right;
}

[dir="rtl"] .footer .btn.btn-link {
    text-align: right;
}

[dir="rtl"] .footer .btn.btn-link::before {
    margin-right: 0;
    margin-left: 10px;
    content: "\f104"; /* سهم لليسار */
}

[dir="rtl"] .footer .footer-menu a {
    margin-right: 0;
    margin-left: 15px;
    padding-right: 0;
    padding-left: 15px;
    border-right: none;
    border-left: 1px solid rgba(255, 255, 255, .1);
}

/* تحسين responsive design للغات المختلفة */
@media (max-width: 991.98px) {
    [dir="rtl"] .navbar-dark .navbar-nav .nav-link {
        text-align: right;
    }
    
    [dir="rtl"] .contact-details-item {
        flex-direction: row-reverse;
    }
        .nav-e{
        display: none !important;
    }
    .language-e{
        display: flex !important;
    } .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;
  }
}

/* تحسين الحقول والنماذج للغات RTL */
[dir="rtl"] .form-control {
    text-align: right;
}

[dir="rtl"] .input-group .form-control {
    border-radius: 0 0.375rem 0.375rem 0;
}

[dir="rtl"] .input-group-text {
    border-radius: 0.375rem 0 0 0.375rem;
}

/* تحسين الفيديوهات والعناصر التفاعلية للغات RTL */
[dir="rtl"] #videoModal .close {
    right: auto;
    left: 0px;
}

/* تحسين carousel للغات RTL */
[dir="rtl"] .testimonial-carousel .owl-dots {
    flex-direction: row-reverse;
}

/* تحسينات للطباعة */
@media print {
    [dir="rtl"] {
        text-align: right;
    }
    
    [dir="ltr"] {
        text-align: left;
    }
    
    .no-print {
        display: none !important;
    }
}

/* تحسينات إضافية للتصفح على الأجهزة المختلفة */
@media (max-width: 768px) {
    [dir="rtl"] .service-item-inner {
        text-align: center;
    }
    
    [dir="rtl"] .contact-details-item {
        flex-direction: column;
        text-align: center;
    }
    .nav-e{
        display: none !important;
    }
    .language-e{
        display: flex !important;
    } .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;
  }

}

/* تحسينات للأرقام والعناوين في السياقات متعددة اللغات */
[dir="rtl"] .numbers {
    direction: ltr;
    text-align: left;
    display: inline-block;
}

[dir="ltr"] .numbers {
    direction: ltr;
    text-align: left;
}
.navbar-collapse{
    flex-grow: 0 !important;
}

/* 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: var(--color-on-dark);
  font-size: 1.2rem;
  transition: var(--transition);
  border-radius: 50%;
}

.mobile-language-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--color-sand);
}

.mobile-language-toggle:active {
  transform: scale(0.95);
}

/* Mobile Language Dropdown */
.mobile-language-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--color-surface);
  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(45, 80, 22, 0.08);
  color: var(--color-primary);
}

.mobile-lang-item.active {
  background: rgba(45, 80, 22, 0.12);
  color: var(--color-primary);
  font-weight: 600;
}

.language-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  z-index: 1001;
}
.filters_menu {
  padding: 0;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  list-style-type: none;
  margin: 45px 0 20px 0;
}

.filters_menu li {
  padding: 7px 25px;
  cursor: pointer;
  border-radius: 25px;
}

.filters_menu li.active {
  background-color: var(--primary) !important;
  color: var(--secondary) !important;
}

.about-section{
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.justify-items-center{
    justify-items: center !important;
}
