/* Base theme overrides for the MC site. */

:root {
  --i2-color-text: #1f2933;
  --i2-color-muted: #5f6b7a;
  --i2-color-border: #d1d1d1;
  --i2-color-surface: #ffffff;
  --i2-color-accent: #1f6feb;
  --mc-green: #007440;
  --mc-green2: #CDE1B8;
  --mc-green3: #00866E;
  --mc-orange: #CF4625;
  --mc-orange-hover: #cf6818;
}

body {
  color: var(--i2-color-text);
}

a {
  color: var(--i2-color-accent);
}



.site-footer:not(:has(.mc-footer)) {
  background: var(--i2-color-surface);
}

.mc-header {
  background: var(--i2-color-surface);
  color: var(--i2-color-text);
  position: sticky;
  top: 0;
  z-index: 20;
  a {
    /* color: inherit; */
    text-decoration: none;
  }

  .mc-header__bar {
    border-bottom: 1px solid var(--i2-color-border);
    box-shadow: 0px 4px 6px 0px #0000000D;
  }

  .mc-header__inner {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding-block: 1.25rem;
    padding-inline: 5rem;
    max-width: 100%;
  }

  .mc-header__brand {
    display: flex;
    align-items: center;
    flex: 0 0 auto;

    img {
      display: block;
      width: auto;
      height: auto;
      max-height: 70px;
      max-width: min(100%, 18rem);
      object-fit: contain;
    }
  }

  .mc-header__nav {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    gap: 0.8rem;
  }

  .mc-header__utility {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    font-size: 0.875rem;
    line-height: 1.2;
  }

  .mc-header__utility-items {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem 1.25rem;
    a{
      font-size: 18px;
    }
  }

  .function-accessibility {
    a {
      color: #137C68;
    }
  }

  .mc-header__utility-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--i2-color-text);
    white-space: nowrap;

    &:hover,
    &:focus {
      color: var(--mc-green);
    }
  }

  .mc-header__utility--mobile {
    /* display: none; */
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--i2-color-border);
  }

  .mc-header__utility-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }

  .mc-header__chevron {
    width: 0.85rem;
    height: 0.85rem;
    fill: currentColor;
    opacity: 0.75;
  }

  .mc-header__sep {
    color: var(--i2-color-muted);
    user-select: none;
    border-left: 1px solid #A4A4A4;
    height: 25px;
  }
  .mc-header__social {
    display: inline-flex;
    align-items: center;
    gap: 14px;
  
    .mc-header__social-link {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 2rem;
      height: 2rem;
      border-radius: 50%;
      background: var(--mc-green2);
      color: var(--mc-green);
      transition: background-color 0.15s ease;
  
      &:hover,
      &:focus {
        background: var(--mc-green);
        color: #ffffff;
      }
  
      svg {
        width: 22px;
        height: 22px;
        fill: currentColor;
      }
    }
  }
  
  .mc-header__main {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2.5rem;
    .mc-header__menu-list {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: flex-end;
      gap: 0.35rem 2.5rem;
      list-style: none;
      margin: 0;
      padding: 0;
      .mc-header__menu-link {
        display: inline-block;
        padding: 0.15rem 0;
        color: var(--i2-color-text);
        font-size: 1.125rem !important;
        font-weight: 500;
        line-height: 1.3;
        white-space: nowrap;
        &:hover, &:focus, &.is-active{
        color: var(--mc-green);
        }
      }

      .nav-item.dropdown {
        position: relative;

        > .dropdown-toggle {
          display: inline-flex;
          align-items: center;
          gap: 0.4rem;

          &::after {
            content: "";
            display: inline-block;
            width: 10px;
            height: 7px;
            margin: 0;
            vertical-align: middle;
            border: 0;
            background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7' fill='none'><path d='M1 1L5 5L9 1' stroke='%23B9B9B9' stroke-width='2' stroke-linecap='round'/></svg>") no-repeat center / contain;
            transition: transform 0.2s ease;
          }
        }

        &:hover > .dropdown-toggle::after,
        &:focus-within > .dropdown-toggle::after {
	  /*
           *transform: rotate(180deg);
	   */
        }

        > .dropdown-menu {
          display: none;
          position: absolute;
          top: 100%;
          left: 0;
          min-width: 12rem;
          margin: 0;
          padding: 0.5rem 0;
          list-style: none;
          background: #fff;
          border: 1px solid var(--i2-color-border, #e5e7eb);
          border-radius: 0.5rem;
          box-shadow: 0 0.5rem 1.25rem rgba(31, 41, 51, 0.12);
          z-index: 40;
        }

        &:hover > .dropdown-menu,
        &:focus-within > .dropdown-menu {
          display: block;
        }

        .dropdown-item {
          display: block;
          padding: 0.5rem 1rem;
          color: var(--i2-color-text);
          white-space: nowrap;
          text-decoration: none;

          &:hover, &:focus {
            color: var(--mc-green);
            background: rgba(0, 127, 83, 0.05);
          }
        }
      }
    }
  }
  .mc-header__donate {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 10px 20px;
    height: 46px;
    border-radius: 999px;
    background: var(--mc-orange);
    color: #ffffff;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    transition: background-color 0.15s ease;
  }
  
  .mc-header__donate:hover,
  .mc-header__donate:focus {
    background: var(--mc-orange-hover);
    color: #ffffff;
  }
  
  .mc-header__donate-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
  }
}



.mc-header__toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.28rem;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.45rem;
  border: 1px solid var(--i2-color-border);
  border-radius: 0.35rem;
  background: transparent;
}

.mc-header__toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--i2-color-text);
}

.mc-header__offcanvas {
  .mc-header__menu-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
    li a{
      color: var(--i2-color-text);
    }
  }
  .block {
    margin: 0;
  }
  .links, .language-switcher-language-url{
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;  
  }
  .mc-header__donate{
    margin-top: 20px;
  }
}

.mc-header__lang {
  display: flex;
  position: relative;
}

.mc-header__lang-current a,
.mc-header__lang-current span {
  color: inherit;
  text-decoration: none;
}

.mc-header__lang-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 30;
  display: none;
  min-width: 9rem;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: var(--i2-color-surface);
  border: 1px solid var(--i2-color-border);
  border-radius: 0.35rem;
  box-shadow: 0 0.5rem 1.25rem rgba(31, 41, 51, 0.12);
}

.mc-header__lang-menu li {
  margin: 0;
}

.mc-header__lang-menu a,
.mc-header__lang-menu span {
  display: block;
  padding: 0.45rem 0.85rem;
  color: var(--i2-color-text);
  text-decoration: none;
  white-space: nowrap;
}

/* for mobile header lang button hover */
.mc-header__lang-menu a:hover,
.mc-header__lang-menu a:focus,
.mc-header__lang-menu a.is-active {
  color: var(--mc-green);
  background: rgba(0, 116, 64, 0.08);
}

.mc-header__lang:hover .mc-header__lang-menu,
.mc-header__lang:focus-within .mc-header__lang-menu {
  display: block;
}

/* mobile style */
@media (max-width: 1024px) {
  .mc-header__inner {
    align-items: center;
    gap: 1rem;
  }

  .mc-header__brand img {
    max-height: 3rem;
    max-width: min(100%, 12rem);
  }

  .mc-header__nav {
    flex: 0 0 auto;
    margin-left: auto;
  }

  .mc-header__utility:not(.mc-header__utility--mobile) {
    display: none;
  }

  .mc-header__utility--mobile {
    display: flex;
    justify-content: flex-start;
  }

  .mc-header__utility--mobile .mc-header__utility-items {
    justify-content: flex-start;
  }
}

footer{
  background: #137C68;
  color: #fff;
  padding-top: 50px;
  padding-bottom: 0;
  a{
    color: #fff;
    font-size: 18px;
  }
  ul{
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    svg{
      width: 24px;   
      height: 24px;   
      fill: #fff;
      &.not-fill{
        fill: none;
      }
    }
    li{
      display: flex;
      gap: 8px;
    }
  }
  h2{
    font-size: 20px;
    margin-bottom: 24px;
    font-weight: 700;
  }
  .container{
    max-width: 100%;
    padding: 20px 80px 0;
  }
  .mc-footer__main{
    padding-bottom: 40px;
  }
  .mc-footer__bottom{
    border-top: 1px solid #37B69D;
    display: flex;
    justify-content: space-between;
    padding-top: 18px;
  }
  .mc-footer__brand{
    display: flex;
  }
  .mc-footer__brand-text{
    display: flex;
    flex-direction: column;
    padding-left: 5px;
    .mc-footer__brand-zh{
      border-bottom: 1px solid #fff;
      font-size: 30px;
    }
    .mc-footer__brand-en{
      font-size: 25px;
    }
  }
  .mc-footer__logo{
    height: auto;
    width: 80px;
  }
}
