/* Site-wide customizations. Prefer a class on the Divi section/module. */

:root {
  /* Example: --tc-accent: #5f4b8b; */
}

/* Example:
.tc-hero .et_pb_button { border-radius: 999px; }
*/
@media (min-width: 981px) {
  #top-menu li.menu-item-168.mega-menu > ul.sub-menu {
    width: 720px !important;
    max-width: 90vw;
    left: auto !important;
    right: 0 !important;
    box-sizing: border-box;
  }
}

@media (min-width: 981px) {
  #top-menu li.menu-item-168.mega-menu > ul.sub-menu a {
    font-size: 12px !important;
    line-height: 1.4;
  }
}

@media (min-width: 981px) {
  #top-menu li ul.sub-menu {
    background-color: rgba(255, 255, 255, 0.95) !important;
  }

/* Keep nested mega-menu columns from layering backgrounds */
  #top-menu li.mega-menu > ul.sub-menu ul.sub-menu {
    background-color: transparent !important;
  }
}

@media (min-width: 981px) {
  #top-menu ul.sub-menu li a:hover {
    color: #640257 !important;
  }
}

/* ShiftNav Toggle Adjustments */
@media (max-width: 980px) {
  #shiftnav-toggle-main .shiftnav-main-toggle-content {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 0;
  }

  #shiftnav-toggle-main .shiftnav-main-toggle-content img {
    display: block;
  }

  #shiftnav-toggle-main-button {
    padding-top: 13px !important;
    padding-bottom: 13px !important;
  }
}

@media (max-width: 980px) {
  /* Hide Divi’s duplicate mobile header */
  #main-header {
    display: none !important;
  }

  /* Reserve only the compact ShiftNav header height */
  #page-container {
    padding-top: 50px !important;
  }
}

.tess-footer-social a.icon[href*="tessclarkson.substack.com"]::before {
  content: "" !important;
  display: block;
  width: 100%;
  height: 100%;
  background: url("YOUR-SUBSTACK-LOGO-URL")
              center / 18px 18px no-repeat;
}

@media (min-width: 981px) {

  /* Services mega-menu: width and right alignment */
  .global-header-menu .et-menu > li.menu-item-168.mega-menu > ul.sub-menu {
    width: 720px !important;
    max-width: 90vw;
    left: auto !important;
    right: 0 !important;
    box-sizing: border-box;
  }

  /* Services mega-menu link sizing */
  .global-header-menu .et-menu > li.menu-item-168.mega-menu > ul.sub-menu a {
    font-size: 12px !important;
    line-height: 1.4;
  }

  /* Desktop dropdown backgrounds */
  .global-header-menu .et-menu li ul.sub-menu {
    background-color: rgba(255, 255, 255, 0.95) !important;
  }

  /* Prevent nested mega-menu columns layering backgrounds */
  .global-header-menu .et-menu > li.mega-menu > ul.sub-menu ul.sub-menu {
    background-color: transparent !important;
  }

  /* Desktop dropdown link hover color */
  .global-header-menu .et-menu ul.sub-menu li a:hover {
    color: #640257 !important;
  }
}