.header__container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 30px;
  box-sizing: border-box;
  position: relative;
}
.header__logo-container {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.header__logo img {
  max-width: 300px;
  height: auto;
  display: block;
}
.header__container .menu-buttons {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Primary nav */
.menu {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  position: relative;
}
.menu-item {
  position: relative;
}
.main-menu-item {
  display: flex;
  flex-flow: row;
  align-items: center;
  gap: 5px;
  color: var(--jencap-text);
  font-family: var(--jencap-heading) !important;
  font-size: 18px; !important;
  font-weight: 400!important;;
  text-decoration: none;
  padding: 15px 20px;
  white-space: nowrap;
  transition: color 0.2s;
}
.main-menu-item:hover {
  color: #00764f;
  text-decoration: none;
  font-family: var(--jencap-heading) !important;
  font-size: 18px;
  font-weight: 400!important;;
}

/* Dropdown arrow */
.arrow {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s;
  flex-shrink: 0;
}

/* Mega menu panels */
.mega-menu {
  position: fixed;
  left: 0;
  width: 100%;
  background-color: #efefee;
  display: none;
  z-index: 999;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
  padding: 40px 0;
}
.mega-menu-inner {
  margin: 0 auto;
  padding: 0 30px;
}
.mega-menu-columns {
  display: flex;
  gap: 0;
}

/* Mega menu columns */
.mega-menu-col {
  flex: 1;
  padding: 0 30px;
 /* border-right: 1px solid rgba(0, 0, 0, 0.08); */
}
.mega-menu-col:first-child {
  padding-left: 0;
}
.mega-menu-col:last-child {
  border-right: none;
}

/* areas of specialization */
#areas-column-one {
  background-image: linear-gradient(180deg, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .5) 100%), url('https://50259120.fs1.hubspotusercontent-na1.net/hubfs/50259120/jencap/backgrounds/menu-jencap-binding-authority.webp');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  border-radius: 0 0 5px 5px;
  overflow: hidden;
  padding-top: 50px;
  padding-right: 30px;
  padding-bottom: 50px;
  padding-left: 30px;
  color: #ffffff;
}

/* Wrapper holding the optional heading + the image/text card */
.mega-menu-col--card {
  padding: 0;   /* the card's own id-based padding handles inner spacing */
}
.image-text-card {
  display: block;
  text-decoration: none;
}
/* Insights mega menu — custom column proportions (scoped; other menus unaffected) */
.mega-menu--insights #insights-feed {
  flex: 0 1 350px;     /* RECENT INSIGHTS feed */
}
.mega-menu--insights .mega-menu-col--card {
  flex: 0 1 350px;     /* HOT TOPICS card column */
}
.mega-menu--insights .col-two {
  flex: 1 1 auto;      /* EXPLORE BY INDUSTRY TOPIC — takes the remaining width */
}

/* insights - blog feed */
#insights-feed {
  background-color: #e8e8e8;
  padding: 40px 28px 32px;   
  margin-right: 20px;
  margin-top: -40px;          
  max-width: 500px;
  border-radius: 0 0 5px 5px;
}
#insights-feed .insights-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}
#insights-feed .insights-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#insights-feed .insights-list li {
  margin: 0;
  padding: 0;
}
#insights-feed .insights-item {
  border: none;
}
#insights-feed .insights-link {
  display: flex;
  align-items: stretch;
  gap: 16px;
  text-decoration: none;
  color: inherit;
}
#insights-feed .insights-link:hover .insights-post-title {
  color: #29a9a9;
}
#insights-feed .insights-thumbnail {
 flex-shrink: 0;
  width: 110px;
  height: 90px;
  border-radius: 6px;
  overflow: hidden;
  background-color: #ccc;
}
#insights-feed .insights-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
#insights-feed .insights-thumbnail--placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #b0b0b0, #d8d8d8);
}
#insights-feed .insights-content {
  flex: 1;
}
#insights-feed .insights-post-title {
  margin: 0 0 8px;
  font-weight: 600;
  font-size: 18px;
  color: #393f3e;
  line-height: 1.2em;
  text-align: left;
  display: -webkit-box;
  -webkit-line-clamp: 3; 
  -webkit-box-orient: vertical;
  overflow: hidden;
}
#insights-feed .insights-date {
  color: #aeafae;
  text-transform: uppercase;
  margin-top: 5px;
  display: block;
  font-size: 12px;
}
#insights-feed .insights-more-btn {
  display: block;
  margin-top: 32px;
  padding: 16px 0;
  background-color: #3a3f44;
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 50px;
  transition: background-color 0.2s ease;
}
#insights-feed .insights-more-btn:hover {
  background-color: #29a9a9;
}
/* RECENT INSIGHTS heading */
#insights-feed .column-heading {
  color: #0098a2;
}

/* insights - hot topics */
#hot-topics {
  background-image: linear-gradient(220deg, rgba(0, 152, 162, .8) 0%, rgba(0, 118, 79, .8) 100%), url('https://50259120.fs1.hubspotusercontent-na1.net/hubfs/50259120/jencap/backgrounds/professional-liability-agents-guide.webp');
  border-radius: 5px;
  background-position: center center;   
  background-size: cover;               
  background-repeat: no-repeat;         
  overflow: hidden;
  padding: 35px;
  margin-top: 25px;
  max-width: 500px;
}
#hot-topics p,
#hot-topics a,
#hot-topics h3 {
  color: #ffffff;
}
.mega-menu-col--card .column-heading {
  color: #0098a2;
}

.column-heading {
  display: flex;
  align-items: center;
  gap: 12px;
 font-family: var(--jencap-heading) !important;
  font-size: 18.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #00764f;
  margin: 0 0 20px 0;
  padding-bottom: 0;
  border-bottom: none;
  white-space: nowrap;
}
.column-heading::before,
.column-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: #393f3e;
}

/* Mega menu link lists */
.mega-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  column-count: 2;
  column-gap: 20px;
  list-style-position: inside;
}
.mega-menu-list li {
  margin: 0;
}
.mega-menu-list a {
  font-family: var(--jencap-heading) !important;
  font-size: 18px!important;;
  font-weight: 400!important;;
  display: block;
  padding: 0 10px;
  color: #393f3e;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.mega-menu-list a:hover {
  color: #00764f;
 text-decoration: none;
}
.mega-menu-col.col-four .mega-menu-list {
  column-count: 1;
}
/* Column four — grey card with CTA anchored at the bottom */
.mega-menu-col.col-four {
  background-color: #e8e8e8;
  border-radius: 0 0 5px 5px;
  border-right: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin-top: -40px;          
  padding: 40px 0 0;     
}
.mega-menu-col.col-four .column-heading {
  padding: 0 24px;
}
.mega-menu-col.col-four .mega-menu-list {
  padding: 16px 24px 24px;
}
.mega-menu-col.col-four .mega-menu-cta {
  margin-top: auto;            
  border-radius: 0;            
}
/* CTA link at bottom of column */
.mega-menu-cta {
  padding: .5rem 1rem;
  background-color: #00764f;
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
}
.mega-menu-cta:hover {
  background-color: #393f3e;
}
.mega-menu-cta-link {
  display: block;
  color: #ffffff;
  letter-spacing: .5px;
  font-size: 18.5px;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  text-decoration: none;
}
.mega-menu-cta-link:hover {
  text-decoration: none;
  color: #ffffff;
  font-weight: 600;
}

/* HubSpot flyout menus (About Us / Contact Us) */
.menu-item--no-dropdown .main-menu-item::after {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 6px;
}
.menu-item--no-dropdown:hover .main-menu-item::after {
  transform: rotate(-135deg) translateY(-2px);
}
.menu-item--no-dropdown .hs_cos_wrapper {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 999;
}
.menu-item--no-dropdown:hover .hs_cos_wrapper {
  display: block;
}
.menu-item--no-dropdown .hs-menu-wrapper {
  min-width: 280px;
  background-color: #efefee;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
  padding: 20px 0;
}
.menu-item--no-dropdown .hs-menu-wrapper ul {
  list-style: none !important;
  list-style-type: none !important;
  margin: 0;
  padding: 0 12px;
}
.menu-item--no-dropdown .hs-menu-wrapper ul li {
  list-style: none !important;
  list-style-type: none !important;
  margin: 0;
  padding: 0;
}
.menu-item--no-dropdown .hs-menu-wrapper ul li::before,
.menu-item--no-dropdown .hs-menu-wrapper ul li::marker {
  content: none !important;
  display: none !important;
}
.menu-item--no-dropdown .hs-menu-item {
  margin: 0;
}
.menu-item--no-dropdown .hs-menu-wrapper a {
  display: block;
  padding: 12px 16px;
  color: #393f3e;
  font-size: 18px;
  text-decoration: none;
  border-radius: 4px;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}
.menu-item--no-dropdown .hs-menu-item + .hs-menu-item {
  margin-top: 4px;           
}
.menu-item--no-dropdown .hs-menu-wrapper a:hover {
  background-color: rgba(0, 118, 79, 0.08);
  color: #00764f;
}


.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px; 
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 4px;
  transition: background-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}
.hamburger:hover {
  background: none;
  border: none;
}
.hamburger:focus-visible {
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #393f3e;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  margin: 0 auto;
}

.hamburger.change span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.change span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.change span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Tablet / Mobile breakpoint */
@media screen and (max-width: 1024px) {
 /* #insights-feed, #hot-topics, #areas-column-one {
    display: none;
  }*/
  body.menu-open {
    overflow: hidden;
  }
  .header .header__container {
    flex-direction: column!important;
    align-items: stretch!important;
  }
  .header__logo-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    width: 100%;
    box-sizing: border-box;
  }
  body.menu-open .header__logo-container {
    background-color: #ffffff;
  }
  .hamburger {
    display: flex;
  }
  .menu {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding: 0;
    background: #ffffff;
    overflow-y: auto;
    max-height: calc(100vh - 80px);
  }
  .menu.active {
    display: flex;
  }
  .menu-item {
    border-bottom: 1px solid #eeeeee;
    width: 100%;
  }
  .main-menu-item {
    font-size: 18px;
    justify-content: space-between;
    width: 100%;
    padding: 16px 20px;
    box-sizing: border-box;
  }
  .mega-menu {
    position: relative;
    box-shadow: none;
    padding: 0 0 10px 0;
    overflow: visible;
    max-height: none;
    height: 100%;
  }
  .mega-menu-inner {
    padding: 0 20px;
  }
  .mega-menu-columns {
    flex-direction: column;
  }
  .mega-menu-col {
    padding: 16px 0;
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }
  .mega-menu-col:last-child {
    border-bottom: none;
  }
  .menu-buttons {
    padding: 16px 20px;
    width: 100%;
    box-sizing: border-box;
  }
  .menu-buttons .button {
    display: block;
    text-align: center;
  }

  .menu-item--no-dropdown .hs_cos_wrapper {
    display: none;
    position: static;
  }
  .menu-item--no-dropdown .hs-menu-wrapper {
    box-shadow: none;
    background-color: #ffffff;
    padding: 0 0 10px 0;
    margin: 0;
    min-width: unset;
  }
  .menu-item--no-dropdown .hs-menu-wrapper ul {
    padding: 0;
    margin: 0 0 0 15px;
  }

  .menu-item--no-dropdown .main-menu-item::after {
    display: inline-block !important;
    transition: transform 0.2s;
  }
  .menu-item--no-dropdown .main-menu-item.is-open::after {
    transform: rotate(-135deg) translateY(-2px);
  }
  .mega-menu-col.col-four {
    margin-top: 0;
    padding: 24px 0 0;
  }
  #insights-feed {
    margin-top: 0;
    padding-top: 24px;
  }
}

@media (min-width: 1025px) {
  .hamburger {
    display: none;
  }
}