
@layer navarClass {
      .main-header .user-menu { z-index: 1050; }
      .main-header .user-dropdown-menu {
        display: none;
        right: 0;
        top: calc(100% + 8px);
        min-width: 180px;
      }
      .main-header .user-dropdown-menu.show {
        display: block;
      }

      .dropdown-toggle::after{
         border-top: .3em solid #ffffffff !important;
      }

      .navbar {
          background-color: #004d66 !important;
      }

      .navbar-container{
        display: flex;
        flex-wrap: inherit;
        align-items: center;
        justify-content: space-between;
        --bs-gutter-x: 1.5rem;
        --bs-gutter-y: 0;
        width: 100%;
        padding-right: calc(var(--bs-gutter-x) * .5);
        padding-left: calc(var(--bs-gutter-x) * .5);
        margin-right: auto;
        margin-left: auto;
      }

      .navbar-nav .nav-link.active{
         color: #004d66 !important;
      }

      .tab-content{
         color: #FFFFFF !important;
      }

      .navbar-brand img { height: 60px; }
      .mega-menu {
        position: absolute;
        left: 0; right: 0; top: 100%;
        background: #fff;
        background-color: #09546c;
        box-shadow: 0 8px 20px rgba(0,0,0,0.15);
        padding: 25px 0;
        display: none;
        z-index: 1000;
      }

      .mega-menu img{
        border-radius: 5%;
        height: 100px;
        object-fit: cover;
      }

      .nav-item.position-static:hover .mega-menu,
      .nav-item.position-static .mega-menu:hover {
        display: block;
      }

      .mega-menu .col img {
        max-width: 60px;
        margin-bottom: 10px;
      }

      .mega-menu a {
        text-decoration: solid;
        color: #ff7f50;
        transition: color 0.3s ease;
        background-color: #ffffff;
        border-color: #ff7f50;
      }

      .mega-menu a:hover {
        color: #FF7F50;
      }

      .mega-menu .btn-primary{
        height: 30px;
        margin-top: 5px;
      }

      .megaMenu-product-card {
          height: 200px;
          overflow: hidden;
          border: 1px solid #eee;
          border-radius: 10px;
      }

      .megaMenu-card-img-wrapper {
        height: 100px;
        font-size: 60px;
        justify-content: center !important;
        align-items: center;
        display: flex;
        background-color: #6a7caf !important;
      }

      .megaMenu-card-img-wrapper img {
        border-radius: 10px 10px 0 0;
      }

      .megaMenu-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.7) !important;
        display: flex;
        justify-content: center;
        align-items: center;
        opacity: 0;
        transition: all 0.3s ease;
      }

      /*.megaMenu-card-img-wrapper:hover .megaMenu-overlay {
        opacity: 1;
      }*/

      .megaMenu-product-card:hover .megaMenu-overlay {
          opacity: 1;
      }

      .megaMenu-overlay .megaMenu-icon {
        background: transparent !important; /* هیچ رنگی نداشته باشه */
        border: none;                       /* کادر هم نداشته باشه */
        padding: 0;                         /* فاصله داخلی حذف */
        color: white !important;
        font-size: 2rem;
      }

      .truck-icon {
          width: 64px;
          height: 64px;
          --tw-text-opacity: 1;
          color: rgb(147 51 234 / var(--tw-text-opacity, 1));
      }

      /*.card {
        border: none;
        transition: transform 0.3s, box-shadow 0.3s;
      }

      .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.15);
      }

      .card img {
        height: 220px;
        object-fit:contain;
      }

      .card .btn-outline-primary {
        border-color: #FF7F50;
        color: #FF7F50;
        transition: all 0.3s ease;
      }

      .brand-slide img {
        max-height: 80px;
        object-fit: contain;
        margin: auto;
      }*/

      #mainCarousel {
        margin: 0;
      }
      .carousel-inner img {
        height: 400px;
        object-fit:cover;
      }

      .navbar .nav-link {
        display: flex;
        align-items: center;
        gap: 6px;
        white-space: nowrap;
        color: #FFFFFF !important;
        transition: color 0.3s ease;
      }

      .navbar .nav-link:hover {
        color: #FF7F50 !important;
      }

      .navbar-brand span {
          color: #FF7F50;
      }

      .btn-primary {
        background-color: #FF6B00;
        border: none;
      }

      .btn-warning {
        background-color: #FFD23F;
        color: #1E1E1E;
        border: none;
      }

      .btn-warning:hover {
        background-color: #E6BC36;
      }

      .nav-link img {
        width: 24px;
        height: 24px;
        object-fit: contain;
        flex-shrink: 0;
      }

      /* Close menu when clicking nav links on mobile */
      @media (max-width: 991.98px) {
        .navbar-nav .nav-link {
          padding: 0.75rem 1rem;
        }

        .mega-menu {
            max-height: 70vh;   /* حداکثر ارتفاع 70% */
            overflow-y: auto;   /* اسکرول فعال */
        }
      }

      @media (max-width: 768px) {
        .carousel-img {
          height: 300px;
        }
      }

     /* Ensure navbar works properly on mobile */
    @media (max-width: 991.98px) {
      .navbar-collapse {
        background-color: #0f4252 !important;
        margin-top: 0.5rem;
        padding: 1rem;
        border-radius: 0.375rem;
        max-height: 70vh;   /* حداکثر ارتفاع 80% صفحه */
        overflow-y: auto;   /* اسکرول عمودی فعال بشه */
      }

      .navbar-collapse.show {
        display: block !important;
      }

      .navbar-collapse:not(.show) {
        display: none !important;
      }

      .navbar-toggler {
        border: 1px solid rgba(255,255,255,0.3);
        padding: 0.375rem 0.75rem;
        background-color: #b8ced6 !important;
      }

      .navbar-toggler:focus {
        box-shadow: 0 0 0 0.2rem rgba(255,255,255,0.25);
      }
    }
}
/* *********** navar ******************** */

/* **** user roles ***** */
.user-roles-section{
   padding-right: 40px;
   padding-left: 40px;
}

.user-roles-section .card {
   border-radius: 15px;
   box-shadow: 0 2px 15px 1px rgba(0, 0, 0, 0.15);
}

/* ارتفاع نوار بالای کارت */
.hover-role-card .top {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* حالت عادی */
.hover-role-card .role-card-default-content {
  background: linear-gradient(180deg, #66a6ff, #1e5bff);
  color: #fff;
}

/* لایه Hover */
.hover-role-card .hover-overlay {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 150px;
  background: #164766;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}

.hover-role-card:hover .hover-overlay {
  opacity: 1;
  visibility: visible;
}

// calculator css

.box-hover {
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.box-hover .overlay {
  border-radius: 10px;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(44, 131, 64, 0.85);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 10px;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  font-size: 1.5rem;
  font-weight: bold;
}

.box-hover:hover .overlay {
  opacity: 1;
}

.calculate-Box{
     margin-top: 7rem !important;
}


/*.user-roles-section {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    text-align: center;
    padding: 50px 20px;
    background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
    margin-top: 40px;
}

.user-roles-section .role-card {
    flex: 1 1 calc(33.333% - 40px);
    max-width: calc(33.333% - 40px);
}

.role-card {
    width: 33%;
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.35); *//* سایه قوی‌تر *//*
    transition: box-shadow 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.role-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.55); *//* سایه عمیق‌تر در هاور *//*
    transform: translateY(-5px); *//* کمی برجسته‌تر شدن *//*
}

.hover-role-card {
    position: relative;
}

.hover-role-card .top {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hover-role-card .role-card-default-content {
    background: linear-gradient(180deg, #66a6ff, #1e5bff);
    color: #fff;
    width: 100%;
    height: 100%;
}

.hover-role-card .hover-overlay {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 150px;
    background: #164766;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}

.hover-role-card:hover .hover-overlay {
    opacity: 1;
    visibility: visible;
}*/




/*.roles-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    justify-items: center;
}*/

/*.role-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 0 12px rgba(0,0,0,0.08);
    padding: 20px;
    width: 200px;
    text-align: center;
    transition: transform 0.2s;
}*/

/*.role-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 1rem;
    text-align: center;
}*/

/*.role-card:hover {
    transform: translateY(-5px);
}*/

/*.role-card .emoji {
    font-size: 2.2rem;
}*/

/*.role-card h4 {
    margin: 12px 0 8px;
    font-size: 1.2rem;
}*/

/*.role-card p {
    font-size: 0.95rem;
    color: #444;
    margin-bottom: 15px;
}

.role-card a {
    text-decoration: none;
    display: inline-block;
    color: inherit;
}

.role-card img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 8px;
    transition: transform 0.2s;
}

.role-card:hover img {
    transform: scale(1.05);
}*/

/*.card-link-text {
    font-size: 0.85rem;
    font-weight: bold;
    color: #007bff;
}*/
/*.roles-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 20px;
    padding: 20px 0;
    scroll-behavior: smooth;
}*/

/*.role-card {
    flex: 0 0 auto;
    min-width: 200px;
    max-width: 220px;
    background-color: #fff;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 2px 15px 1px rgba(0,0,0);
    text-align: center;
}*/

.emoji {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

/*.role-card h4 {
    margin-top: 5px;
    font-size: 18px;
    font-weight: 600;
}*/
/*.card-link-text {
    color: #007bff;
    font-weight: 500;
    margin-top: 8px;
}*/
.emoji {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}
/*.role-card h4 {
    margin-top: 5px;
    font-size: 18px;
    font-weight: 600;
}*/

.card-link-text {
    font-weight: 600;
    border: solid thin #eb730c;
    border-radius: 10px;
    width: 100%;              /* به جای 150% */
    display: inline-block;    /* تا اندازه درست بگیره */
    margin-top: 0.5rem;       /* فاصله از emoji */
    padding: 8px 12px;
    box-sizing: border-box;
    text-align: center;
    color: #eb730c;
    text-decoration: none;
}

.card-link-text:hover {
    background-color: rgba(235, 115, 12, 0.1); /* بک‌گراند روشن‌تر */
    cursor: pointer;
}

/* Banner Links */
.banner-links {
display: flex;
justify-content: center;
gap: 10px;
margin-top: 10px;
}

.banner-links a {
padding: 5px 10px;
background-color: #f1f1f1;
border-radius: 3px;
text-decoration: none;
font-weight: bold;
}

.banner-links a.green {
background-color: #28a745;
color: white;
}

.banner-links a.red {
background-color: #dc3545;
color: white;
}

.bg-custom-blue {
  background-color: #0026b3;
}
/* Hero Section */
.hero {
    background-color: #f9f9f9;
    padding: 60px 20px;
    text-align: left; /* Align all text to the left */
    background-image: url('{% static "images/hero-pattern.png" %}'); /* Optional background pattern */
    background: url("{% static 'images/hero-pattern.png' %}");
    background-size: cover;
    background-position: center;
    display: flex; /* Use flexbox for alignment */
    align-items: center; /* Vertically center content */
    justify-content: flex-start; /* Align content to the left */
}

/* Hero Content */
.hero-content {
    max-width: 800px;
    margin: 0;
    padding: 20px;
}

.hero h1 {
    font-size: 48px;
    font-weight: bold;
    color: #212121;
    margin-bottom: 10px;
}

.hero h2 {
    font-size: 36px;
    color: #ff5722;
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    color: #555;
    margin-bottom: 30px;
    line-height: 1.6;
}

.browse-button {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    color: #fff;
    background-color: #ff5722;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.browse-button:hover {
    background-color: #e64a19;
    transform: translateY(-2px);
}

.brands-section{margin:2rem 0}.brands-container{display:flex;gap:2rem;align-items:center}.brands-text p{font-weight:700;font-size:2rem;line-height:1.2}.brands-marquee{overflow:hidden;flex:1}.brands-list{display:flex;gap:2rem;animation:scroll 30s linear infinite}.brand-item img{height:40px;opacity:.9}
@keyframes scroll{0%{transform:translateX(0)}100%{transform:translateX(-50%)}}
.hero{padding:4rem 0;background:linear-gradient(180deg,#f7f7f7,transparent)}
.hero .browse-button{display:inline-block;margin-top:1rem}
/*.user-roles-section{padding:2rem 0;background-color: #b97474;}*/
/*.roles-grid{display:grid;grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));gap:1rem}
.role-card{background:#fff;border:1px solid #eee;border-radius:14px;padding:1rem;text-align:center}
.role-card .emoji{font-size:1.8rem}
.role-card img{width:56px;height:56px;border-radius:50%;margin:.5rem auto;display:block}*/
/*.card-link-text{font-weight:600}*/
.home-page{display:grid;grid-template-columns:1fr 320px;gap:1.5rem;margin:2rem 0}
.right-sidebar .card{border:1px solid #eee;border-radius:12px;padding:1rem;margin-bottom:1rem}

/* static/home/css/home.css */
.brands-section{margin:2rem 0}.brands-container{display:flex;gap:2rem;align-items:center}.brands-text p{font-weight:700;font-size:2rem;line-height:1.2}.brands-marquee{overflow:hidden;flex:1}.brands-list{display:flex;gap:2rem;animation:scroll 30s linear infinite}.brand-item img{height:40px;opacity:.9}
@keyframes scroll{0%{transform:translateX(0)}100%{transform:translateX(-50%)}}
.hero{padding:4rem 0;background:linear-gradient(180deg,#f7f7f7,transparent)}
.hero .browse-button{display:inline-block;margin-top:1rem}
/*.user-roles-section{padding:2rem 0}*/
/*.roles-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:1rem}
.role-card{background:#fff;border:1px solid #eee;border-radius:14px;padding:1rem;text-align:center}
.role-card .emoji{font-size:1.8rem}
.role-card img{width:56px;height:56px;border-radius:50%;margin:.5rem auto;display:block}*/
/*.card-link-text{font-weight:600}*/
.home-page{display:grid;grid-template-columns:1fr 320px;gap:1.5rem;margin:2rem 0}
.right-sidebar .card{border:1px solid #eee;border-radius:12px;padding:1rem;margin-bottom:1rem}


/* --- Additions to static/home/css/home.css (carousel) --- */
.main-carousel{margin:1rem 0 2rem}
.carousel{position:relative;overflow:hidden;background:#000}
.carousel-track{display:flex;transition:transform .6s ease}
.carousel-slide{position:relative;min-width:100%;height:44vh;max-height:520px}
.carousel-image{width:100%;height:100%;object-fit:cover;display:block;filter:brightness(.9)}
.carousel-caption{position:absolute;left:2rem;bottom:2rem;color:#fff;text-shadow:0 2px 8px rgba(0,0,0,.5)}
.carousel-btn{position:absolute;top:50%;transform:translateY(-50%);background:rgba(255,255,255,.85);border:none;border-radius:999px;width:38px;height:38px;cursor:pointer;display:grid;place-items:center}
.carousel-btn:hover{background:#fff}
.carousel-btn.prev{left:.5rem}.carousel-btn.next{right:.5rem}
.carousel-dots{position:absolute;left:0;right:0;bottom:.75rem;display:flex;gap:.5rem;justify-content:center}
.carousel-dots button{width:8px;height:8px;border-radius:50%;border:none;background:rgba(255,255,255,.5);cursor:pointer}
.carousel-dots button.is-active{background:#fff}
@media (max-width:768px){.carousel-slide{height:32vh}.carousel-caption{left:1rem;right:1rem;bottom:1rem}}
/* Brands Carousel */
.brand-slide img {
  max-height: 80px;   /* Adjust height as needed */
  max-width: 150px;   /* Prevent overly wide logos */
  object-fit: contain;
}

.brand-slide a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
}

    /* Brands: keep logos tidy */
  .brand-slide img{max-height:80px;max-width:160px;object-fit:contain;margin:auto;display:block;background-color:white}
  .brand-slide a{display:flex;align-items:center;justify-content:center;padding:6px;background-color:white}
  @media (max-width:768px){.brand-slide img{max-height:64px;max-width:120px}}