:root {
    --primary: #d32f2f;
    --secondary: #ee6c0a;
    --text: #333;
    --bg-light: #f9f9f9;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
}

body {
  font-family: "Poppins", sans-serif;
  margin: 0;
}

/* Header */
.site-header {
  background: #ffffff;
  border-bottom: 2px solid #d32f2f;
  position: relative;
  z-index: 100;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: auto;
  padding: 0 20px;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 74px;
}

/* Logo */
.navbar-logo img {
  display: block;
  height: 75px;
}

/* Menu */
.nav-menu {
  list-style: none;
  display: flex;
  gap: 34px;
}

.nav-item {
  position: relative;
}

/* .nav-link {
  text-decoration: none;
  color: #333;
  font-weight: 500;
} */

/* Hover */
.menu-item-link :hover {
  color: #d32f2f;
}

/* Active */
.nav-link.active {
  color: #d32f2f;
  font-weight: 600;
  border-bottom: 3px solid #d32f2f;
  padding-bottom: 22px;
}

/* Dropdown */
.submenu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 200px;
  background: #fff;
  list-style: none;
  border-top: 3px solid #d32f2f;
  opacity: 0;
  visibility: hidden;
  transition: .25s;
  padding-left: 0px;
  border-radius: 5px;
  z-index: 100;
}

.dropdown:hover .submenu {
  opacity: 1;
  visibility: visible;
}

.submenu a {
  display: block;
  padding: 12px 18px;
  color: #444;
  text-decoration: none;
}

.submenu a:hover {
  background: #fdf1f1;
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: #d32f2f;
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* Hamburger Animation */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(11px, -14px);
}

#navbar {
  position: sticky;
  top: 0;
  z-index: 9999;
}

.dropdown>.submenu {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
}

.dropdown:hover>.submenu {
  display: block;
}

/* MAIN DROPDOWN */
.nav-item.dropdown {
  position: relative;
}

.nav-item.dropdown > .submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #fff;
  display: none;
  z-index: 99999;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  /* max-height: 280px;
  overflow-y: auto;
  overflow-x: hidden; */
}

/* SHOW ON HOVER (DESKTOP) */
.nav-item.dropdown:hover > .submenu {
  display: block;
}

/* SUB-SUBMENU */
.submenu .dropdown {
  position: relative;
}

.submenu .dropdown>.submenu {
  top: 0;
  right: 100%;
  overflow-y: auto;
  max-height: 300px;
  -ms-overflow-style: none;
  scrollbar-width: thin;
  scrollbar-color: #ee6c0a #f1f1f1;
  /* scrollbar-width: none; */
}

.hero-slider,
.slide {
  position: relative;
}

/* Width / height */
.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

/* Track */
.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

/* Thumb */
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #ee6c0a, #f59e0b, #7c2d12);
  border-radius: 10px;
}

/* Hover effect */
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #f97316, #fb923c, #9a3412);
}

.submenu .dropdown.flip > .submenu {
  left: auto;
  right: 100%;
}

.nav-menu {
        list-style: none;
        display: flex;
        gap: 25px;
        margin: 0;
        padding: 0;
    }

    .nav-link {
        text-decoration: none;
        color: var(--text);
        /* font-weight: 600; */
        padding: 10px 5px;
        transition: 0.3s;
        font-size: 15px;
    }

    .nav-link:hover { color: var(--primary); }

    /* --- THE FIXED SUBMENU --- */
    .dropdown { position: relative; }

    .main-submenu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 280px;
        background: #fff;
        border-radius: 0 0 8px 8px;
        box-shadow: var(--shadow);
        display: none;
        padding: 10px 0;
        /* Fix: We use max-height + overflow here safely now */
        max-height: 450px;
        overflow-y: auto;
        border-top: 3px solid var(--primary);
    }

    .dropdown:hover > .main-submenu { display: block; }

    /* --- INNER ACCORDION STYLE --- */
    .menu-item { list-style: none; }
    
    .menu-item-link {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 20px;
        text-decoration: none;
        color: var(--text);
        font-size: 14px;
        transition: 0.2s;
    }

    .menu-item-link:hover { background: var(--bg-light); color: var(--primary); }

    /* The nested items (the fix for your overflow issue) */
    .inner-submenu {
        background: #fff;
        list-style: none;
        padding: 0;
        display: none; /* Hidden by default */
        border-left: 3px solid #eee;
        margin-left: 20px;
    }

    /* When hovering the parent, show the children below it (Vertical Accordion) */
    .has-children:hover .inner-submenu {
        display: block;
    }

    .inner-submenu li a {
        padding: 8px 20px;
        display: block;
        text-decoration: none;
        color: #666;
        font-size: 13px;
    }

    .inner-submenu li a:hover { color: var(--secondary); }

    /* Custom Scrollbar */
    .main-submenu::-webkit-scrollbar { width: 5px; }
    .main-submenu::-webkit-scrollbar-thumb { background: var(--secondary); border-radius: 10px; }

.nav-menu > .dropdown:last-child > .main-submenu {
  left: auto;
  right: 0;
}

/* Mobile Menu */
@media (max-width: 880px) {
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1001;
  }

  .nav-menu {
    position: fixed; /* Changed to fixed for better mobile stability */
    top: 74px; 
    left: 0;
    width: 100%;
    height: calc(100vh - 74px); /* Full screen height minus navbar */
    background: #ffffff;
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow-y: auto; /* Allow the whole menu to scroll, not just parts */
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    visibility: hidden;
  }

  .nav-menu.open {
    max-height: 100vh;
    visibility: visible;
    padding: 10px 0;
  }

  .nav-item {
    width: 100%;
    border-bottom: 1px solid #f0f0f0;
  }

  .nav-link, .menu-item-link {
    padding: 18px 25px;
    display: flex;
    justify-content: space-between; /* Space for the caret */
    align-items: center;
    font-size: 16px;
    color: #333;
    width: 100%;
    box-sizing: border-box;
  }


  .nav-link.caret{
    width: 35%;
  }

  .dropdown.open > .nav-link .caret {
    transform: rotate(180deg);
  }

  .main-submenu{
    position: static;
    width: 100%;
    border-top: none;
  }

  /* Animation */
  /* @keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  } */
}