/* =============================== */
/* ===== HEADER STYLES =====       */
/* =============================== */

.header-wrap {
    background: #fff;
    padding: 20px 0;
    position: relative;
    width: 100%;
    z-index: 9999;
    transition: all 0.5s ease;
    font-family: 'Poppins', sans-serif;
}
.header-wrap.sticky-class {
    background: #fbf9f6;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 10px 0;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}
.header-otr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}
.header-col1 { width: 20%; }
.header-col2 { width: 80%; display: flex; justify-content: flex-end; }
.header-logo img { max-width: 200px; transition: transform 0.3s ease; }
.header-logo img:hover { transform: scale(1.05); }

/* =============================== */
/* ===== DESKTOP VERSION =====     */
/* =============================== */

/* Desktop Menu */
.header-menu ul {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}
.header-menu ul li {
    position: relative;
    margin-left: 30px;
}
.header-menu ul li:first-child { margin-left: 0; }
.header-menu ul li a {
    text-decoration: none;
    color: #000;
    padding: 10px 0;
    display: inline-block;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}
.header-menu ul li a:hover,
.header-menu ul li.active > a { color: #22c7b8; border-bottom: 2px solid #22c7b8; }

/* Submenus */
.header-menu ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #22c7b8;
    min-width: 200px;
    padding: 10px 0;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    z-index: 999;
}
@media (min-width: 992px) {
    .header-menu ul li:hover > ul { display: block; }
}
.header-menu ul ul li { margin: 0; position: relative; }
.header-menu ul ul li a { padding: 8px 20px; color: #fff; font-weight: 400; display: block; }
.header-menu ul ul li a:hover { color: #000; background: rgba(255,255,255,0.2); border-radius: 4px; }

/* Submenu arrow */
@media (min-width: 992px) {
  .header-menu .hs-item-has-children > a {
    position: relative;
    padding-right: 22px;
  }
  .header-menu .hs-item-has-children > a::after {
    content: '';
    position: absolute;
    right: 2px;
    top: 100%;
    width: 10px;
    height: 2px;
    background: #000;
    border-radius: 2px;
    transform: translateY(-50%);
    opacity: 0.7;
    pointer-events: none;
  }
  .header-menu .hs-item-has-children > a::before {
    content: '';
    position: absolute;
    right: 2px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-right: 2px solid #000;
    border-bottom: 2px solid #000;
    transform: translate(4px, -2px) rotate(45deg);
    transition: transform 0.35s ease;
    opacity: 0.7;
    pointer-events: none;
  }
  .header-menu .hs-item-has-children:hover > a::before {
    transform: translate(4px, -2px) rotate(-135deg);
  }
}

/* Multi-level submenu */
.header-menu ul ul ul {
    top: 0;
    left: 100%;
    background: #1ab1a6;
}

/* BOOK A DEMO button */
.header-menu ul li.demo-btn a {
    background-color: #22c7b8;
    color: #fff;
    padding: 10px 20px;
    border-radius: 50px;
    transition: 0.3s;
}
.header-menu ul li.demo-btn a:hover {
    background-color: #4f6466;
    color: #fff;
}

/* =============================== */
/* ===== MOBILE VERSION =====      */
/* =============================== */

.header-mobmenu { display: none; position: relative; }
.header-mobmenu .headericon {
    display: block;
    width: 30px;
    height: 25px;
    cursor: pointer;
    position: relative;
}
.header-mobmenu .headericon span,
.header-mobmenu .headericon span::before,
.header-mobmenu .headericon span::after {
    content: "";
    position: absolute;
    height: 3px;
    background: #000;
    width: 100%;
    left: 0;
    transition: 0.3s;
}
.header-mobmenu .headericon span::before { top: -8px; }
.header-mobmenu .headericon span::after { top: 8px; }

.body-open .headericon span { background: transparent; }
.body-open .headericon span::before { transform: rotate(45deg) translate(5px,5px); }
.body-open .headericon span::after { transform: rotate(-45deg) translate(5px,-5px); }

.body-open .mob-menu { display: block; }

.mob-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    width: 100vw;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    background: #fff;
    padding: 20px 0;
    z-index: 9998;
    transition: all 0.3s ease;
}
.mob-menu ul { list-style: none; margin: 0; padding: 0; }
.mob-menu ul li { padding: 12px 20px; border-bottom: 1px solid #eee; position: relative; }
.mob-menu ul li a { text-decoration: none; color: #000; font-size: 16px; display: block; font-weight: 500; }
.mob-menu ul li.demo-btn a { background: #22c7b8; color: #fff; padding: 10px; border-radius: 50px; }
.mob-menu ul li .sub-toggle { float: right; cursor: pointer; font-size: 18px; transition: transform 0.3s ease; }

.mob-menu ul ul {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s ease;
    padding-left: 15px;
}
.mob-menu ul li.open > ul { max-height: 1000px; }
.mob-menu ul li.open > .sub-toggle { transform: rotate(45deg); }

/* Multi-level mobile submenu */
.mob-menu ul ul ul { padding-left: 20px; background: #f0f0f0; }

/* Mobile responsiveness */
@media (max-width: 991px){
    .header-otr { flex-wrap: nowrap; }
    .header-col1 { width: auto; }
    .header-col2 { display: none; }
    .header-mobmenu { display: flex; align-items: center; justify-content: flex-end; margin-left: auto; }
}

/* Mobile submenu arrow */
.sub-toggle {
    width: 18px;
    height: 18px;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}
.sub-toggle::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-right: 2px solid #000;
    border-bottom: 2px solid #000;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
}
.mob-menu li.open > .sub-toggle::before {
    transform: rotate(-135deg);
}
/* =============================== */
/* ===== MOBILE STICKY HEADER FIX (WIDTH ADJUSTED) ===== */
/* =============================== */
@media (max-width: 991px) {

  /* Sticky header */
  .header-wrap {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw; /* ensures it never overflows */
    max-width: 100vw; /* prevent horizontal scroll */
    height: 70px; /* adjust as needed */
    padding: 0 15px; /* horizontal padding */
    background: #fff;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    box-sizing: border-box; /* critical to prevent overflow */
  }

  /* Header inner wrapper */
  .header-otr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  /* Logo left */
  .header-col1 {
    flex: 0 0 auto;
  }
  .header-logo img {
    max-width: 140px;
    height: auto;
    display: block;
  }

  /* Hamburger right */
  .header-mobmenu {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
  }

  /* Hide desktop menu */
  .header-col2 {
    display: none;
  }

  /* Mobile menu */
  .mob-menu {
    position: fixed;
    top: 70px; /* below header */
    left: 0;
    right: 0;
    width: 100vw; /* fit viewport exactly */
    max-width: 100vw;
    height: calc(100vh - 70px);
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    background: #fff;
    z-index: 9999;
    display: none; /* shown with .body-open */
    transition: all 0.3s ease;
  }

  /* Prevent horizontal scroll when menu open */
  .body-open {
    overflow-x: hidden;
  }

  /* Push page down to prevent overlap */
  body {
    padding-top: 70px; /* match header height */
    overflow-x: hidden;
  }
}

/* =============================== */
/* ===== HEADER TEXT & LOGO ENHANCEMENTS ===== */
/* =============================== */

/* Header logo underline highlight */
.header-logo {
    position: relative;
    display: inline-block;
    transition: transform 0.3s ease;
}
.header-logo::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 3px;
    bottom: -5px;
    left: 0;
    background: #22c7b8;
    transition: width 0.3s ease;
}
.header-logo:hover::after {
    width: 100%;
}

/* Menu link underline highlight */
.header-menu ul li a {
    position: relative;
    transition: color 0.3s ease;
}
.header-menu ul li a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: 0;
    left: 0;
    background: #22c7b8;
    transition: width 0.3s ease;
}
.header-menu ul li a:hover::after,
.header-menu ul li.active a::after {
    width: 100%;
}

/* Submenu link highlight */
.header-menu ul ul li a {
    position: relative;
    transition: color 0.3s ease;
}
.header-menu ul ul li a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: 0;
    left: 0;
    background: #fff;
    transition: width 0.3s ease;
}
.header-menu ul ul li a:hover::after {
    width: 100%;
    color: #fff;
}

/* Demo button hover effect */
.header-menu ul li.demo-btn a {
    box-shadow: 0 4px 15px rgba(34, 199, 184, 0.3);
    transition: all 0.3s ease;
}
.header-menu ul li.demo-btn a:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 20px rgba(34, 199, 184, 0.4);
}

/* Header logo hover effect */
.header-logo img {
    transition: transform 0.3s ease, filter 0.3s ease;
}
.header-logo img:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}


/* =============================== */
/* ===== END Modernized Header CSS ===== */
/* =============================== */

