@import url("https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,800&display=swap");

.gh-canvas {
  position: relative;
}

.gh-content a {
  text-decoration: none;
}

.gh-toc {
  font-size: 1.5rem;
  color: var(--color-gray);
}

.gh-toc > .toc-list {
  position: relative;
  overflow: hidden;
  list-style: none;
}

.gh-toc .toc-list {
  padding-left: 28px;
}

.toc-list {
  list-style: none;
}

.toc-list-item>.toc-list{
  padding: 0;
  &>li {
    padding-left: 16px;
  }
}

.gh-toc :is(li + li, li :is(ul, ol)) {
  margin-top: 8px;
}

.gh-toc .is-active-link {
  font-weight: 600;
}

.gh-toc .is-active-link::before {
  text-decoration: none;
  background-color: var(--dfi-accent-color);
}

.gh-sidebar .close-button {
  position: absolute;
  top: 1rem;
  right: 0;
  cursor: pointer;
  width: 2.5rem;
  margin-right: 10px;
  color: black;
  text-align: right;
  display: none; /*Intially hidden*/
}

.gh-article-cite {
  font-size: 1.5rem;
  color: var(--color-darker-gray);
  margin-top: 3rem;
}

.menu-button-container {
  display: none;
  position: sticky;
  /* shifting up the top allows intersection observer to trigger when we
  scroll past the top of the button */
  top: -1px;
  margin-bottom: 30px;
}

.menu-button {
  display: flex;
  cursor: pointer;
  font-size: 1.5rem;
  border-radius: 0.3rem;
  background-color: var(--color-light-gray);
  color: var(--color-dark-gray);
  border: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: fit-content;
  margin: 0;
  font-weight: 500;
}

.menu-button svg {
  width: 1.4rem;
}

.menu-button svg path {
  stroke: var(--color-gray);
  stroke-width: 0.7rem;
}

.menu-button-container.sticky {
  justify-content: flex-end;
  padding: 1rem 0.5rem;
}

.menu-button-container.sticky .menu-button {
  box-shadow: var(--box-shadow);
  padding: 0.7rem;
}

.menu-button-container.sticky .menu-button-text {
  display: none;
}

.menu-button-container.sticky svg {
  width: 1.8rem;
}

.menu-button-container.sticky .menu-button.active {
  display: none;
}

/* Media Queries */
@media (min-width: 1300px) {
  .gh-sidebar {
    position: absolute;
    top: 0;
    bottom: 0;
    margin-right: 20px;
    grid-column: wide-start / main-start; /* Place the TOC to the left of the content */
  }

  .gh-sidebar .gh-toc {
    position: sticky; /* On larger screens, TOC will stay in the same spot on the page */
    top: 4vmin;
    text-align: left;
  }
}

@media (max-width: 1299px) {
  .gh-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    min-width: 35%;
    max-width: 85%;
    height: 100%;
    overflow-y: auto;
    z-index: 1002;
    background: white;
    padding: 20px;
    margin-top: 0px;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
  }

  .gh-sidebar.active {
    transform: translateX(0);
    background: white;
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
    box-shadow: var(--box-shadow);
  }

  .gh-sidebar .gh-toc {
    margin-top: 4rem;
  }

  .gh-sidebar.active .close-button {
    display: block;
  }

  .menu-button-container {
    display: flex;
  }
}

/* FOOTNOTE STYLING */

.footnotes {
  background: #f2fbf9;
  border-radius: 10px;
  padding: 2.5rem;
}

.footnotes ol {
  font-size: 1.35rem;
  color: var(--color-gray);
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

.footnotes ol.littlefoot--print {
  display: block;
}

.footnotes ol li.littlefoot--print {
  display: list-item;
}

.gh-content .littlefoot a.ftntref {
  cursor: pointer;
}

.gh-content .littlefoot {
  --popover-background-color: #e7f7f3;
  --popover-border: 1px solid #abd9ce;
  --popover-border-radius: 0.8rem;
  --popover-font-family: var(--font-sans);
  --popover-font-size: 1.35rem;
  --popover-line-height: 1.5;
  --popover-horizontal-padding: 1.6rem;
  --popover-vertical-padding: 1.2rem;
}

.social-icons {
  padding: 12px 0 0 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #000;

  svg {
    height: 14px;
    width: 14px;
    opacity: 0.9;
    cursor: pointer;
  }

  svg:hover path {
    fill: var(--dfi-accent-color);
  }

  i:hover {
    & svg {
      color: var(--dfi-accent-color);
    }
    & path {
      fill: none;
    }
  }
}

.gh-header.is-featured .gh-header-about {
  gap: 0;
  & > form {
    margin-top: 2.5rem;
  }
}

.newsletter-overlay {
  display: none;
  position: fixed;
  background: var(--dfi-transparent-gray);
  z-index: 10;
  height: 100vh;
  width: 100vw;
  top: 0;
  left: 0;
  justify-content: center;
  align-items: center;

  & > div {
    display: flex;
    flex-direction: column;
    align-content: center;
    justify-content: space-evenly;
    background: var(--color-white);
    padding: 1.2em 1em;
    height: auto;
    min-height: 200px;
    width: 510px;
    border-radius: 1.6rem;
    box-shadow: var(--box-shadow);
    gap: 4px;
    margin: 0 0.8em;

    & > div {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 4px;
      text-align: center;
    }

    & h1 {
      color: var(--color-darker-gray);
      font-size: 30px;
      margin: 0 0 12px 0;
    }

    & h2 {
      color: var(--color-darker-gray);
      margin: 0 0 4px 0;
    }

    & svg {
      height: 40px;
      width: 40px;
      color: var(--dfi-accent-color);
    }

    & div button {
      margin-top: 12px;
      padding: 0.5em 1em;
      background: transparent;
      color: var(--color-darker-gray);
      border: 1px solid rgb(0 0 0 / 0.5);

      &:hover {
        color: #fff;
        background-color: var(--ghost-accent-color);
      }
    }
  }
}

.subs-label {
  margin-top: 1em;
  padding: 1rem 0;

  & p {
    text-align: left;
  }

  width: 100%;
  display: flex;
  flex-direction: column;
  align-content: center;
  margin: 0 auto;
}

.gh-content > [id]:not(:first-child) {
  margin-top: 1em !important;
}

.gh-content > :is(hr, blockquote, iframe) + * {
  margin-top: 1.5em !important;
}

.gh-content > :is(hr, blockquote, iframe) {
  margin-top: 1.5em !important;
}

.gh-content > * + * {
  margin-top: calc(28px * var(--content-spacing-factor, 0.5));
}

.author-section {
  display: flex;
  justify-content: center;
  background-color: var(--dfi-header-color);
  margin: 0 24px 40px 0px;
  padding: 40px 20px;
  max-width: none;

  .gh-archive-inner {
    width: 100%;
    max-width: 980px;
    padding-bottom: 0;
    border-bottom: 0;
  }
}

main.author-main {
  padding: 0;

  & section.gh-outer {
    padding: 0 20px;
  }
}

.author-container {
  display: flex;
  justify-content: space-between;
  width: 100%;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;

  & .gh-article-title {
    font-size: 28px;
  }

  & img.gh-article-image {
    height: 150px;
    width: 150px;
    border-radius: 50%;
  }

  a:hover {
    text-decoration: underline;
  }

  footer {
    display: none;
  }
}

h2.gh-footer-signup-header.is-title {
  font-family: "DM Sans", serif;
  font-optical-sizing: auto;
  font-weight: 800;
  font-style: normal;
  letter-spacing: 1px;
}

form.gh-form {
  &.success + .newsletter-overlay {
    display: flex;
  }

  &.error + .newsletter-overlay + div[newsletter-overlay-error] {
    display: flex;
  }
}

.gh-card-link {
  justify-content: space-between;
}

/* ALL TAGS */
.all-tags-section {
  width: 100%;
  margin: 4em 0 -4em 0;

  & p {
    font-size: 14px;
  }

  & > div {
    padding: 40px 20px;
  }

  & > div:first-of-type {
    background: var(--dfi-header-color);
  }

  & div > div {
    max-width: 1200px;
    width: 100%;
    justify-self: center;
  }
}

.tag-list {
  padding-top: 0 !important;

  & .all-tags {
    margin-top: 1.4em;
    & a {
      &:hover {
        cursor: pointer;
        text-decoration: underline;
      }
    }
  }

  & > div {
    margin: 4em 1em;
    display: flex;
    align-items: center;
    gap: 14px 10px;
    flex-wrap: wrap;

    & div {
      font-size: 14px;
      width: max-content;
    }
  }
}

.dotspacer {
  &:last-of-type {
    display: none;
  }

  height: 4px;
  width: 4px !important;
  background: var(--color-secondary-text);
  border-radius: 50%;
}

.barspacer {
  &:first-of-type {
    display: none;
  }

  height: 12px;
  width: 1px !important;
  background: var(--color-secondary-text);
}
/* ALL TAGS END */

.gh-footer-copyright {
  justify-self: flex-end;
}

.footer-social-links {
  display: flex;
  gap: 16px;

  & svg {
    height: 18px;
    width: 18px;

    & path {
      fill: var(--color-primary-text);
    }
  }
}

.x-icon-scaled svg {
  transform: scale(0.9);
}

.post-cta {
  background: var(--dfi-header-color);
  margin: 0;
  margin-top: 60px;
  padding: 32px 20px;
}

.gh-footer-signup-header {
  font-size: calc(clamp(2.8rem, 1.36vw + 2.25rem, 4rem) * var(--factor, 0.8));
}

.post-template .gh-container {
  margin-top: 100px;
}

.gh-footer-signup-subhead {
  max-width: 560px;
}

.menu-button-container.sticky {
  z-index: 5;
}

@media (min-width: 768px){
  .littlefoot__wrapper {
    max-width: 372px !important;
  }
}

/* HOMEPAGE 1.1 */
.gh-footer {
  border-top: 1px solid var(--color-border);
  margin-top: 8vw;
}

.footer-left-section {
  max-width: 400px;
  overflow: hidden;
}

.footer-left-section>div {
  display: flex;
  flex-direction: column;
  gap: 2em;
  justify-content: space-between;
}

footer .gh-footer-signup {
  padding: 0;
  margin-top: 1em;
}

footer .gh-footer-signup .gh-form {
  margin: 0;
}

.gh-footer-bar {
  padding: 34px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gh-footer-menu {
  display: flex;
  gap: 4rem;
  place-items: flex-end;
}

.footer-left-section p {
  font-weight: lighter;
}

.gh-footer-menu h3 {
  color: var(--color-gray);
  text-align: left;
}

.gh-footer-menu ul {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.gh-footer-menu ul a {
  text-decoration: none;
}

.gh-footer-menu .nav {
  gap: 1em;
}

.nav-main {
  display: flex;
  padding: 1em 0;
  place-items: center;
  justify-content: space-between;
}

.nav-links ul {
  list-style: none;
  display: flex;
  width: 100%;
  place-content: center;
  gap: 2em;
  border-top: 0.5px solid var(--color-light-gray);
  border-bottom: 0.5px solid var(--color-light-gray);
  padding: 1em !important;
}

.search-box {
  display: flex;
  align-items: center;
  border: 0.5px solid var(--color-light-gray);
  border-radius: 1.1rem;
  padding: 5px 10px;
  max-width: 250px;
  position:relative;
  cursor: pointer;
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1.45rem;
  line-height: 1.4;
  font-family: var(--font-sans);
  font-weight: lighter;
  padding: 5px 10px;
}

.icon-button {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
}

.post-badge {
  display: inline-block;
  padding: 4px 8px;
  background-color: var(--dfi-accent-color);
  color: white;
  letter-spacing: 0.6px;
  text-transform: capitalize;
  font-size: 10px;
  font-weight: 500;
  border-radius: 10px;
  margin-left: 2px;
  vertical-align: middle;
  line-height: inherit;
  vertical-align: middle;
}
.featured-badge {
  font-size: 12px;
  border-radius: 12px;
}
.post-card-title h3 {
  display: inline;
  font-size: 20px;
}

.gh-header.is-featured .gh-header-inner {
  max-width: 1200px;
}

@media (min-width: 780px) {
  .gh-navigation-menu {
    display: none;
  }

  .socials-2 {
    display: none;
  }

  .mobile-nav-actions {
    display: none;
  }

  .search-icon-mobile {
    display: block;
  }
}

@media (max-width: 780px) {
  .nav-links {
    display: none;
  }

  .nav-search-toggle {
    display: none;
  }

  .mobile-nav-actions {
    display: flex;
  }

  .gh-footer-bar {
    gap: 4rem;
    padding-left: 20px;
    padding-right: 20px;
  }

  .socials-1 {
    display: none;
  }

  .footer-left-section div {
    align-items: center;
  }

  .footer-left-section p {
    text-align: center;
  }
}

.gh-navigation-menu {
  position: absolute !important;
  max-width: 100vw;
  overflow-x: hidden;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) !important;
}

.gh-footer-bar {
  border: none;
}

.gh-navigation {
  height: auto;
}