h1 span,
h2 span,
h3 span,
h4 span,
h5 span,
h6 span {
  font-weight: inherit;
  font-family: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6,
h1 > span,
h2 > span,
h3 > span,
h4 > span,
h5 > span,
h6 > span {
  /* Make the font feel more like "DM Sans 36pt" as per Heikki's request */
  letter-spacing: -1px !important;
}

h2.fl-callout-title,
h3.fl-callout-title,
h4.fl-callout-title,
h5.fl-callout-title,
h6.fl-callout-title {
  letter-spacing: 0px !important;
}

.header-slot {
  transform: translateY(70px);
  z-index: 10000;
  position: relative;
  margin-top: -60px;
}
@media (max-width: 1180px) {
  .header-slot {
    margin-top: 0;
    transform: translateY(0);
  }
}
.header-slot.header-slot--scrolled {
  position: fixed;
  z-index: 10000;
  top: 0;
  left: 0;
  right: 0;
  transform: none;
  margin-top: initial;
}

/* Reset list styles - Scoped to header */
.header-slot .header-slot--inner--nav--menu,
.header-slot .header-slot--inner--nav--menu ul {
  list-style: none;
}

/* Header layout */
.header-slot--inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  max-width: 1200px;
  margin: 4px auto 0;
  border-radius: 24px;
  transition:
    background 0.3s ease,
    box-shadow 0.3s ease,
    backdrop-filter 0.3s ease,
    margin-top 0.3s ease,
    padding 0.3s ease;
}

@media (max-width: 1180px) {
  .header-slot--inner {
    padding: 12px 16px;
    box-shadow: 0 0 16px rgba(0, 0, 0, 0.1);
  }
}

.header-slot--scrolled .header-slot--inner {
  padding: 5px 16px 6px;
  background: rgba(255, 255, 255, 0.9);
  transition:
    background 0.3s ease,
    box-shadow 0.3s ease,
    backdrop-filter 0.3s ease,
    margin-top 0.3s ease,
    padding 0.3s ease;
  box-shadow: 0 2px 8px rgba(61, 28, 128, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  margin-top: 6px;
}

@media screen and (max-width: 1180px) {
  .header-slot--scrolled .header-slot--inner,
  .header-slot .header-slot--inner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    margin-top: 0;
    background: #ccb0ff;
    border-radius: 0;
  }

  .header-slot--scrolled .header-slot--inner {
    padding: 12px 16px;
  }
}

.header-slot--inner--logo {
  width: 140px;
}

@media screen and (min-width: 1181px) {
  .header-slot--inner--logo img {
    display: block;
    width: 100%;
    height: auto;
    transition:
      width 0.3s ease,
      padding 0.3s ease;
  }

  .header-slot--scrolled .header-slot--inner--logo img {
    padding-top: 8px;
    padding-bottom: 8px;
    padding-left: 2px;
    width: 120px;
    transition:
      width 0.3s ease,
      padding 0.3s ease;
  }
}

.header-slot--inner--nav {
  width: calc(100% - 140px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Desktop Menu Styles - Scoped to header */
.header-slot .header-slot--inner--nav--menu {
  display: flex;
  margin-bottom: 0;
  padding-left: 64px;
}

.header-slot .header-slot--inner--nav--menu > li {
  position: relative;
  margin: 0;
  padding: 6px 16px;
}

.header-slot .header-slot--inner--nav--menu > li.button > a.nav-link {
  background: #b33c94;
  padding: 10px 20px;
  border-radius: 48px;
  font-weight: 700;
  color: #fff !important;
  text-decoration: none;
  margin-left: 56px;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .header-slot .header-slot--inner--nav--menu > li.button > a.nav-link {
    margin-left: 0;
  }
}

.header-slot .header-slot--inner--nav--menu > li.button {
  border-bottom: 0;
}

.header-slot .header-slot--inner--nav--menu > li.button > a.nav-link:hover {
  background: #e34ec8;
}

.header-slot .header-slot--inner--nav--menu > li.button > a.nav-link:active,
.header-slot .header-slot--inner--nav--menu > li.button > a.nav-link:focus {
  background: #e239c3;
}

.header-slot .header-slot--inner--nav--menu > li.menu-item-has-children {
  padding-right: 24px;
}

.header-slot .header-slot--inner--nav--menu > li.menu-item-has-children:after {
  content: "";
  background: url("/wp-content/themes/aivan-theme/img/caret-down.svg") no-repeat
    center center;
  background-size: contain;
  display: block;
  position: absolute;
  right: 8px;
  top: 52.5%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  font-size: 12px;
  border-radius: 50%;
}

.header-slot .header-slot--inner--nav--menu > li .nav-link {
  font-size: 13px;
  line-height: 1;
  color: #1b2441;
  font-weight: 500;
  /* zefort purple */
  outline-color: #6941c6;
}

/* Hover effect on main menu - Scoped to header */
.header-slot .header-slot--inner--nav--menu > li:hover > .nav-link {
  color: #000;
}

/* Desktop Submenu Styles - Scoped to header */
@media screen and (min-width: 1181px) {
  .header-slot .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border-radius: 16px;
    padding: 12px;
    min-width: 240px;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    transition:
      opacity 0.2s ease,
      transform 0.2s ease;
    display: block;
    max-height: none;
    overflow: visible;
  }

  .pll-parent-menu-item .sub-menu {
    min-width: 0;
  }

  .pll-parent-menu-item .sub-menu li a.nav-link {
    padding: 12px 8px;
  }

  .header-slot .header-slot--inner--nav--menu > li:hover > .sub-menu,
  .header-slot .header-slot--inner--nav--menu > li:focus-within > .sub-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .header-slot .sub-menu li {
    margin: 0;
    opacity: 1;
    transform: none;
  }

  .header-slot .sub-menu li a {
    padding: 12px 16px;
    font-size: 14px;
    white-space: nowrap;
    display: block;
    color: #1b2441;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    text-decoration: none;
  }

  .header-slot .sub-menu li a:hover {
    background: #f6f1ff;
  }

  .header-slot .sub-menu li a:active {
    background: #eadeff;
  }
}

/* Hamburger Button - Base Styles (Hidden by Default) */
.mobile-menu-toggle {
  display: none;
}

.header-slot .sub-menu li a.nav-link span.menu-item-title,
.header-slot .sub-menu li a.nav-link span.menu-item-small-text {
  display: block;
}

.header-slot .sub-menu li a.nav-link span.menu-item-title.has-small-text {
  margin-bottom: 6px;
}

.header-slot .sub-menu li a.nav-link span.menu-item-title .fas {
  margin-right: 7px;
  color: #ccb0ff;
}

.header-slot .sub-menu li a.nav-link span.menu-item-small-text {
  font-size: 12px;
  color: #666;
  display: block;
}

/* Mobile Menu Styles - Scoped to header */
@media screen and (max-width: 1180px) {
  .header-slot .header-slot--inner--nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: #fff;
    transition: right 0.3s ease;
    padding: 80px 24px 24px;
    overflow-y: auto;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
    z-index: 10002;
  }

  .mobile-menu-open .header-slot .header-slot--inner--nav {
    right: 0;
  }

  /* Hamburger Button */
  .header-slot .mobile-menu-toggle {
    display: block;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10003;
    width: 32px;
    height: 32px;
    background: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    cursor: pointer;
    padding: 0 !important;
    margin: 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 0 !important;
    max-height: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    text-decoration: none !important;
    color: inherit !important;
  }

  .header-slot .mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #1b2441;
    position: absolute;
    left: 4px;
    transition:
      transform 0.3s ease,
      opacity 0.3s ease;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    transform-origin: center !important;
  }

  .header-slot .mobile-menu-toggle span:nth-child(1) {
    top: 10px;
  }

  .header-slot .mobile-menu-toggle span:nth-child(2) {
    top: 15px;
  }

  .header-slot .mobile-menu-toggle span:nth-child(3) {
    top: 20px;
  }

  .mobile-menu-open .header-slot .mobile-menu-toggle span:nth-child(1) {
    transform: rotate(45deg);
    top: 15px;
  }

  .mobile-menu-open .header-slot .mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-open .header-slot .mobile-menu-toggle span:nth-child(3) {
    transform: rotate(-45deg);
    top: 15px;
  }

  .header-slot .header-slot--inner--nav--menu {
    flex-direction: column;
    width: 100%;
    padding: 48px 0 0;
    height: 100vh;
  }

  .header-slot .header-slot--inner--nav--menu > li {
    padding: 0;
    margin: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }

  .header-slot .header-slot--inner--nav--menu > li > a {
    padding: 16px 0;
    display: block;
    font-size: 16px;
    font-weight: 500;
  }

  .header-slot .header-slot--inner--nav--menu > li.menu-item-has-children {
    position: relative;
  }

  .header-slot .header-slot--inner--nav--menu > li.menu-item-has-children > a {
    padding-right: 40px;
  }

  .header-slot
    .header-slot--inner--nav--menu
    > li.menu-item-has-children:after {
    content: none;
  }

  .header-slot .submenu-toggle {
    position: absolute !important;
    right: 0 !important;
    top: 4px !important;
    width: 100% !important;
    height: 40px !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer !important;
    z-index: 1 !important;
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
  }

  .header-slot .submenu-toggle:before {
    content: "";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: url("/wp-content/themes/aivan-theme/img/caret-down.svg")
      no-repeat center center;
    background-size: contain;
    transition: transform 0.3s ease;
  }

  .header-slot .submenu-open > .submenu-toggle:before {
    transform: translateY(-50%) rotate(180deg);
  }

  .header-slot .sub-menu {
    position: static;
    opacity: 0;
    transform: translateY(-10px);
    box-shadow: none;
    background: #f6f1ff;
    margin: 0;
    padding: 0;
    display: block;
    pointer-events: none;
    max-height: 0;
    transition:
      opacity 0.3s ease,
      transform 0.3s ease,
      max-height 0.3s ease,
      padding 0.3s ease;
    position: relative;
    left: -24px;
    right: -48px;
    width: calc(100% + 72px);
    border-radius: 0;
  }

  .header-slot .submenu-open > .sub-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    max-height: 2000px;
    padding: 0 8px;
  }

  .header-slot .sub-menu li {
    margin: 0;
    padding: 0;
    line-height: 1.2;
  }

  .header-slot .sub-menu li a {
    padding: 16px;
    font-size: 14px;
    line-height: 1.2;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.025);
  }

  .header-slot .sub-menu li:last-child a {
    border-bottom: none;
  }

  .header-slot .sub-menu li a .menu-item-title {
    display: block;
    line-height: 1.2;
  }

  .header-slot .sub-menu li a .menu-item-small-text {
    font-size: 12px;
    color: #666;
    line-height: 1.2;
  }

  /* Language Switcher - Scoped to header */
  .header-slot .pll-parent-menu-item {
    margin-top: 16px !important;
    padding-top: 0 !important;
    border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
  }

  /* CTA Button - Scoped to header */
  .header-slot .header-slot--inner--nav--menu > li.button {
    margin-top: 24px;
  }

  .header-slot .header-slot--inner--nav--menu > li.button a {
    background: #6941c6;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    text-align: center;
  }
}

/* Keep these global since they affect the body */
body.mobile-menu-open {
  overflow: hidden;
}

/* Mobile Menu Overlay - Keep global since it's a full-screen overlay */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
  height: 100vh;
}

.mobile-menu-open .mobile-menu-overlay {
  display: block;
  opacity: 1;
}

.footer-logo img {
  filter: brightness(0) invert(1);
}

.fl-rich-text > table {
  border: 0;
  overflow: hidden;
  width: 100%;
  margin-bottom: 24px;
}

.fl-rich-text > table td,
.fl-rich-text > table th {
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  border-left: 1px solid rgba(0, 0, 0, 0.12);
  padding: 10px 16px 10px 20px;
  font-size: 17px !important;
  line-height: 1.2 !important;
}

.fl-rich-text > table tr td:first-child,
.fl-rich-text > table tr th:first-child {
  border-left: 0;
}

.fl-rich-text > table tr:first-child td,
.fl-rich-text > table tr:first-child th {
  padding-top: 14px;
}

.fl-rich-text > table tr:last-child td,
.fl-rich-text > table tr:last-child th {
  padding-bottom: 14px;
  border-bottom: 0;
}

@media (max-width: 767px) {
  .fl-rich-text > table td,
  .fl-rich-text > table th {
    font-size: 14px !important;
    line-height: 1.2 !important;
  }
}

/* Overrides
================================================== */

.fl-row .fl-module-fl-post-info span a {
  background: #3e1c80 !important;
  color: #fefeff !important;
  font-weight: 400 !important;
  display: inline-block !important;
  padding: 5px 12px !important;
  border-radius: 35px !important;
  font-size: 0.75rem !important;
}

.fl-builder-content .fl-module .fl-rich-text .well {
  background: #cbb8ff;
  color: inherit;
}

.hbspt-form input[type="submit"] {
  background: #e856cd !important;
  padding: 10px 20px !important;
  border-radius: 48px !important;
  font-weight: 700 !important;
  color: #fff !important;
  text-decoration: none !important;
}

.fl-row.blog-title-area .fl-col-content span.bsf-rt-reading-time {
  background: #d81869;
  color: #fff;
  font-weight: 700;
  padding: 0 0.2em;
  border-radius: 0.25em;
  font-size: 0.8em;
}

.fl-row .fl-module-post-grid .fl-post-grid article {
  border-radius: 24px !important;
  box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.1) !important;
  border: 0 !important;
}

.fl-page-content .fl-module-separator .fl-separator {
  background: #c6aeff !important;
}

div > a,
p > a,
li > a,
li > strong > a,
span.fl-icon > a,
p > span > a {
  color: #9264ff;
}

div > a:hover,
p > a:hover,
li > a:hover,
h2 > a:hover,
h3 > a:hover,
h4 > a:hover,
h5 > a:hover,
h6 > a:hover {
  color: #7a49d9;
}

article .fl-rich-text h2,
article .fl-rich-text h3,
article .fl-rich-text h4,
article .fl-rich-text h5,
article .fl-rich-text h6 {
  color: #333;
}

.single-support article h2 {
  color: #7a49d9;
  font-size: 2rem !important;
}

.single-support article h3 {
  font-size: 1.3rem !important;
}

.single-support article h4 {
  font-size: 1.1rem !important;
}

.single-support article h5 {
  font-size: 1rem !important;
}

.widget_wpcategorieswidget ul li.active-cat a {
  color: #623fa1 !important;
  font-weight: 900 !important;
}

ul li a:hover {
  color: #7a49d9 !important;
}

.widget_wpcategorieswidget ul li.active-cat span.post-count {
  color: #623fa1 !important;
  font-weight: 900 !important;
}

.no-hero .fl-page-content {
  padding-top: 80px !important;
}

.fl-pricing-table-column,
.fl-pricing-table-inner-wrap {
  border-radius: 24px !important;
}

.fl-row.comparison
  .fl-module-rich-text
  .fl-rich-text
  .table
  thead
  tr:first-child
  th {
  background-color: transparent !important;
}

@media (max-width: 767px) {
  .one-quote .fl-post-feed-post {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
  }
}

.fl-row
  .fl-module-post-grid
  .fl-post-grid
  article.integration
  .integration-content {
  padding: 16px 24px;
}

@media (max-width: 767px) {
  .fl-row
    .fl-module-post-grid
    .fl-post-grid
    article.integration
    .integration-content {
    padding: 28px 24px;
  }

  .fl-row
    .fl-module-post-grid
    .fl-post-grid
    article.integration
    .integration-content
    img {
    margin-bottom: 24px;
  }
}

.fl-row
  .fl-module-post-grid.insights
  .fl-post-grid
  .fl-post-column
  article
  .fl-post-image
  img {
  object-fit: contain !important;
  height: initial !important;
}

.fl-row
  .fl-module-post-grid.insights
  .fl-post-grid
  .fl-post-column
  article
  .fl-post-meta {
  background: #3d1c80 !important;
  border-radius: 8px !important;
  padding: 4px 8px !important;
}

@media (min-width: 767px) {
  .fl-row
    .fl-module-post-grid.insights:not(.equal-size)
    .fl-post-grid
    .fl-post-column:first-child
    article
    .fl-post-image
    img {
    max-height: initial !important;
  }

  .fl-row .fl-module-post-grid.insights .fl-post-grid .fl-post-column article {
    max-height: 450px;
  }

  .fl-row
    .fl-module-post-grid.insights
    .fl-post-grid
    .fl-post-column:first-of-type
    article {
    max-height: initial !important;
  }
}

.wp-singular .fl-row.blog-title-area .fl-col-content h1.fl-module.full-width {
  width: 88% !important;
}

.wp-singular h2 {
  font-size: 2.2rem !important;
  line-height: 1.2 !important;
}

.wp-singular h3 {
  font-size: 1.5rem !important;
  line-height: 1.2 !important;
}

.wp-singular h4 {
  font-size: 1.2rem !important;
  line-height: 1.2 !important;
}

/* Global Utility Classes
================================================== */

.position-relative {
  position: relative;
}

article.fl-post-column {
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0.5em;
  margin-bottom: 40px;
}
article.fl-post-column article {
  margin-bottom: 0 !important;
}

article.fl-post-column article h2,
.zefort-article-search h2,
.fl-post-grid-post h2 {
  font-size: 1.5rem !important;
}
.fl-row
  .fl-module-post-grid.insights:not(.equal-size)
  .fl-post-grid
  .fl-post-column:first-child
  article
  .fl-post-text
  h2 {
  font-size: 2.5rem !important;
}
@media (max-width: 768px) {
  .fl-row
    .fl-module-post-grid.insights:not(.equal-size)
    .fl-post-grid
    .fl-post-column:first-child
    article
    .fl-post-text
    h2 {
    font-size: 1.5rem !important;
  }
}
