/* Text-and-image pages built with the block editor */
body { overflow-x: clip; }
.page-banner img { width: 100%; height: auto; display: block; }
.entry.wrap { max-width: 1000px; margin: 0 auto; padding: 56px 20px 80px; color: #2c2c2c; line-height: 1.75; }
.entry.wrap > * { margin-top: 0; margin-bottom: 1.1em; }
.entry h2, .entry h3, .entry h4, .entry h5 { font-family: "El Messiri", serif; color: #1f3828; font-weight: 500; line-height: 1.25; margin: 2.2em 0 .6em; }
.entry h2 { font-size: 2rem; }
.entry h3 { font-size: 1.6rem; }
.entry h4 { font-size: 1.35rem; }
.entry h5 { font-size: 1.15rem; letter-spacing: .02em; }
.entry > h2:first-child, .entry > h3:first-child { margin-top: 0; }
.entry p { margin: 0 0 1em; }
.entry ol, .entry ul { margin: 0 0 1.2em 1.4em; padding: 0; }
.entry li { margin-bottom: .35em; }
.entry .alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.entry .alignfull img, .entry .wp-block-image img { width: 100%; height: auto; display: block; }
.entry .ml-narrow { max-width: 720px; margin-left: auto; margin-right: auto; }
.entry .wp-block-media-text { display: grid; grid-template-columns: 50% 1fr; gap: 0 36px; align-items: center; margin: 2.5em 0; }
.entry .wp-block-media-text.has-media-on-the-right .wp-block-media-text__media { order: 2; }
.entry .wp-block-media-text__media img { width: 100%; height: auto; display: block; }
.entry .wp-block-media-text__content h3, .entry .wp-block-media-text__content h4 { margin-top: 0; }
@media (max-width: 700px) {
  .entry.wrap { padding: 32px 16px 56px; }
  .entry .wp-block-media-text { grid-template-columns: 1fr !important; gap: 16px; }
  .entry .wp-block-media-text.has-media-on-the-right .wp-block-media-text__media { order: 0; }
}

/* columns, galleries, awards, logos, buttons */
.entry .wp-block-columns { display: flex; gap: 40px; margin: 2.5em 0; }
.entry .wp-block-column { flex: 1 1 0; min-width: 0; }
.entry .wp-block-column.is-vertically-aligned-center { align-self: center; }
.entry .wp-block-column.is-vertically-aligned-top { align-self: flex-start; }
.entry .wp-block-gallery { display: grid; gap: 16px; margin: 1.5em 0; padding: 0; list-style: none; }
.entry .wp-block-gallery.columns-1 { grid-template-columns: 1fr; }
.entry .wp-block-gallery.columns-2 { grid-template-columns: repeat(2, 1fr); }
.entry .wp-block-gallery.columns-3 { grid-template-columns: repeat(3, 1fr); }
.entry .wp-block-gallery.columns-4 { grid-template-columns: repeat(4, 1fr); }
.entry .wp-block-gallery.columns-5 { grid-template-columns: repeat(5, 1fr); }
.entry .wp-block-gallery .wp-block-image { margin: 0; }
.entry .wp-block-gallery img { width: 100%; height: auto; display: block; }
.entry .ml-logos { gap: 20px; }
.entry .ml-logos .wp-block-image { background: #fff; border: 1px solid #eee; padding: 14px; display: flex; align-items: center; justify-content: center; }
.entry .ml-logos img { object-fit: contain; max-height: 110px; }
.entry .ml-award { padding: 2em 0; border-bottom: 1px solid #eee; margin: 0; }
.entry .ml-eyebrow { color: #16b14b; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .85rem; margin: 0 0 .4em; }
.entry .ml-award h3 { margin-top: 0; }
.entry .has-text-align-center { text-align: center; }
.entry .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.2em 0; }
.entry .wp-block-button__link { display: inline-block; padding: 10px 26px; background: #16b14b; color: #fff; border: 2px solid #16b14b; text-decoration: none; font-weight: 700; letter-spacing: .04em; }
.entry .wp-block-button__link:hover { background: #1f3828; border-color: #1f3828; color: #fff; }
.entry .is-style-outline .wp-block-button__link { background: transparent; color: #16b14b; }
.entry .is-style-outline .wp-block-button__link:hover { background: #16b14b; border-color: #16b14b; color: #fff; }
@media (max-width: 700px) {
  .entry .wp-block-columns { flex-direction: column; gap: 20px; }
  .entry .wp-block-gallery.columns-3, .entry .wp-block-gallery.columns-4 { grid-template-columns: repeat(2, 1fr); }
  .entry .wp-block-gallery.columns-5 { grid-template-columns: repeat(3, 1fr); }
  .entry .ml-award .wp-block-column:last-child { order: 0; }
}

/* gallery fix: beat the WordPress core gallery CSS */
.entry figure.wp-block-gallery.has-nested-images { display: grid !important; gap: 16px; align-items: stretch; }
.entry figure.wp-block-gallery.has-nested-images.columns-1 { grid-template-columns: 1fr !important; }
.entry figure.wp-block-gallery.has-nested-images.columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.entry figure.wp-block-gallery.has-nested-images.columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.entry figure.wp-block-gallery.has-nested-images.columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.entry figure.wp-block-gallery.has-nested-images.columns-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
.entry figure.wp-block-gallery.has-nested-images figure.wp-block-image { display: block !important; width: 100% !important; max-width: none !important; margin: 0 !important; flex: none !important; }
.entry figure.wp-block-gallery.has-nested-images figure.wp-block-image img { width: 100% !important; height: auto !important; display: block; }
.entry figure.wp-block-gallery.ml-logos figure.wp-block-image { padding: 14px; border: 1px solid #eee; background: #fff; }
.entry figure.wp-block-gallery.ml-logos figure.wp-block-image img { object-fit: contain; aspect-ratio: 1 / 1; }

/* connect with us, legal pages */
.entry .ml-contact-box { background: #f4f4f4; padding: 40px 28px; text-align: center; }
.entry .ml-contact-box p { margin-bottom: .8em; }
.entry .ml-contact-top { align-items: stretch; }
.entry hr.wp-block-separator { border: 0; border-top: 1px solid #ddd; margin: 3em 0; }
.entry .wp-block-list { margin-bottom: 1.2em; }
.entry ol[type="a"] { list-style-type: lower-alpha; }
.entry ol[type="i"] { list-style-type: lower-roman; }

/* posts: cards and single post */
.entry .ml-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin: 1.5em 0 3em; }
.entry .ml-card { display: block; text-decoration: none; color: inherit; }
.entry .ml-card__img { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #eee; }
.entry .ml-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.entry .ml-card:hover .ml-card__img img { transform: scale(1.04); }
.entry .ml-card__title { display: block; margin-top: 12px; font-size: 1.05rem; line-height: 1.4; }
.entry .ml-card:hover .ml-card__title { color: #16b14b; }
.entry .ml-year { margin-top: 2em; padding-bottom: .3em; border-bottom: 1px solid #ddd; }
.ml-post { max-width: 860px; }
.ml-post__title { font-size: 2rem; line-height: 1.25; }
.ml-post__img { margin: 0 0 1.5em; }
.ml-post__img img { width: 100%; height: auto; display: block; }
.ml-post__back { margin-top: 2.5em; }
.ml-post__back a { color: #16b14b; text-decoration: none; font-weight: 700; }
@media (max-width: 900px) { .entry .ml-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .entry .ml-cards { grid-template-columns: 1fr; } }

/* events: newest post large, the rest as a list */
.entry .ml-ev { margin: 0 0 4em; }
.entry .ml-ev .ml-year { font-size: 1.4rem; font-weight: 400; border: 0; margin: 0 0 .8em; padding: 0; }
.entry .ml-ev__grid { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 0; align-items: start; }
.entry .ml-ev__main { display: block; text-decoration: none; color: inherit; padding-right: 40px; }
.entry .ml-ev__img { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: #eee; }
.entry .ml-ev__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.entry .ml-ev__main .ml-ev__title { display: block; font-size: 1.4rem; line-height: 1.4; margin-top: 18px; }
.entry .ml-ev__main .ml-ev__zh { display: block; margin-top: 10px; font-size: .95rem; color: #555; }
.entry .ml-ev__side { border-left: 1px solid #e5e5e5; padding-left: 40px; }
.entry .ml-ev__label { margin: 0 0 18px; }
.entry .ml-ev__item { display: flex; gap: 16px; align-items: center; text-decoration: none; color: inherit; margin-bottom: 26px; }
.entry .ml-ev__thumb { flex: 0 0 144px; aspect-ratio: 3 / 2; overflow: hidden; background: #eee; }
.entry .ml-ev__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.entry .ml-ev__text { display: block; min-width: 0; }
.entry .ml-ev__item .ml-ev__title { display: block; font-size: .95rem; line-height: 1.45; }
.entry .ml-ev__item .ml-ev__zh { display: block; margin-top: 10px; font-size: .85rem; color: #555; }
.entry a.ml-ev__main:hover .ml-ev__title, .entry a.ml-ev__item:hover .ml-ev__title { color: #16b14b; }
@media (max-width: 800px) {
  .entry .ml-ev__grid { grid-template-columns: 1fr; }
  .entry .ml-ev__main { padding-right: 0; margin-bottom: 28px; }
  .entry .ml-ev__side { border-left: 0; padding-left: 0; }
}

/* news tabs */
.entry .ml-tabs__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 44px; margin: 0 0 36px; }
.entry .ml-tabs__btn { background: none; border: 0; border-bottom: 2px solid transparent; padding: 6px 2px; font: inherit; font-size: 1.05rem; color: #666; cursor: pointer; }
.entry .ml-tabs__btn:hover { color: #111; }
.entry .ml-tabs__btn.is-active { color: #111; font-size: 1.15rem; border-bottom-color: #111; }
.entry .ml-tabs__panel { display: none; grid-template-columns: minmax(0, 45%) minmax(0, 55%); background: #f6f6f6; height: 500px; }
.entry .ml-tabs__panel.is-active { display: grid; }
.entry .ml-tabs__img { height: 100%; overflow: hidden; }
.entry .ml-tabs__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.entry .ml-tabs__body { padding: 30px 32px; overflow-y: auto; min-height: 0; line-height: 1.7; }
.entry .ml-tabs__body h3 { font-size: 1.9rem; line-height: 1.25; font-weight: 700; margin: 0 0 .7em; }
.entry .ml-tabs__body h3 + p { margin-top: 0; }
.entry .ml-tabs__body .wp-block-heading { font-size: 1rem; font-weight: 700; margin: 1.4em 0 .3em; }
@media (max-width: 800px) {
  .entry .ml-tabs__panel.is-active { display: block; height: auto; }
  .entry .ml-tabs__img { height: auto; }
  .entry .ml-tabs__body { overflow: visible; padding: 22px 18px; }
  .entry .ml-tabs__body h3 { font-size: 1.4rem; }
}

/* wide layout for News and Events */
body.ml-wide .entry.wrap { max-width: 1240px; }
.entry .ml-tabs__nav { gap: 12px 40px; }
.entry .ml-tabs__btn { white-space: nowrap; }
.entry .ml-tabs__body h3 { font-family: "Poppins", "Helvetica Neue", Arial, sans-serif; color: #111; }
@media (max-width: 800px) { .entry .ml-tabs__btn { white-space: normal; } }

/* effects: banner fade-in, scroll reveal, tab cross-fade */
@keyframes mlFade { from { opacity: 0; } to { opacity: 1; } }
.page-banner img { animation: mlFade 1.1s ease both; }
.entry .ml-reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s ease; }
.entry .ml-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .page-banner img, .entry .ml-tabs__panel.is-active .ml-tabs__img img, .entry .ml-tabs__panel.is-active .ml-tabs__body > * { animation: none; }
  .entry .ml-reveal { opacity: 1; transform: none; transition: none; }
}

/* news tabs: the image slides in from the left, the text rises from below */
@keyframes mlFromLeft { from { opacity: 0; transform: translateX(-70px); } to { opacity: 1; transform: none; } }
@keyframes mlRise { from { opacity: 0; transform: translateY(34px); } to { opacity: 1; transform: none; } }
.entry .ml-tabs__panel.is-active .ml-tabs__img img { animation: mlFromLeft .75s cubic-bezier(.22,.61,.36,1) both; }
.entry .ml-tabs__panel.is-active .ml-tabs__body > * { animation: mlRise .8s cubic-bezier(.22,.61,.36,1) both; }
.entry .ml-tabs__panel.is-active .ml-tabs__body > *:nth-child(1) { animation-delay: .25s; }
.entry .ml-tabs__panel.is-active .ml-tabs__body > *:nth-child(2) { animation-delay: .33s; }
.entry .ml-tabs__panel.is-active .ml-tabs__body > *:nth-child(3) { animation-delay: .41s; }
.entry .ml-tabs__panel.is-active .ml-tabs__body > *:nth-child(n+4) { animation-delay: .49s; }

/* founders pages */
.entry .ml-founder-btn .wp-block-button__link { background: #5b5b5b; border-color: #5b5b5b; color: #fff; font-weight: 600; letter-spacing: 0; padding: 12px 28px; }
.entry .ml-founder-btn .wp-block-button__link:hover { background: #1f3828; border-color: #1f3828; }
.entry .ml-founder .wp-block-image img { animation: mlFade 1.6s ease both; }
.entry .ml-founder .ml-reveal, .entry .ml-founder-text .ml-reveal { transform: none; }
.entry .ml-founder .wp-block-column:first-child { text-align: left; }

/* awards: sliders */
.entry .ml-slider-wrap { position: relative; min-width: 0; }
.entry figure.wp-block-gallery.has-nested-images.ml-slider { display: flex !important; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 0; margin: 0; }
.entry figure.wp-block-gallery.has-nested-images.ml-slider::-webkit-scrollbar { display: none; }
.entry figure.wp-block-gallery.has-nested-images.ml-slider figure.wp-block-image { flex: 0 0 100% !important; width: 100% !important; scroll-snap-align: start; aspect-ratio: 1 / 1; }
.entry figure.wp-block-gallery.has-nested-images.ml-slider figure.wp-block-image img { height: 100% !important; object-fit: cover; }
.entry .ml-slider-dots { display: flex; gap: 8px; margin-top: 14px; }
.entry .ml-slider-dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 4px; background: #d5d5d5; cursor: pointer; transition: width .25s, background .25s; }
.entry .ml-slider-dots button.is-active { width: 26px; background: #111; }
.entry figure.wp-block-gallery.has-nested-images.ml-slider--arrows { gap: 34px; padding: 0 2px; }
.entry figure.wp-block-gallery.has-nested-images.ml-slider--arrows figure.wp-block-image { flex: 0 0 calc((100% - 102px) / 4) !important; width: calc((100% - 102px) / 4) !important; }
.entry .ml-slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 1px solid #ddd; background: #fff; color: #111; display: grid; place-items: center; cursor: pointer; z-index: 2; }
.entry .ml-slider-arrow--prev { left: -20px; }
.entry .ml-slider-arrow--next { right: -20px; }
.entry .ml-slider-arrow:hover { border-color: #111; }
.entry .ml-award .wp-block-image { margin: 0; }
@media (max-width: 800px) {
  .entry figure.wp-block-gallery.has-nested-images.ml-slider--arrows figure.wp-block-image { flex-basis: calc((100% - 34px) / 2) !important; width: calc((100% - 34px) / 2) !important; }
  .entry .ml-slider-arrow--prev { left: -8px; }
  .entry .ml-slider-arrow--next { right: -8px; }
}

/* sliders: stop the core gallery from wrapping the images */
.entry figure.wp-block-gallery.has-nested-images.ml-slider { flex-wrap: nowrap !important; align-items: stretch; }
.entry figure.wp-block-gallery.has-nested-images.ml-slider figure.wp-block-image { flex-shrink: 0 !important; flex-grow: 0 !important; }
.entry .ml-slider-arrow:disabled { opacity: .35; cursor: default; }
.entry .ml-slider-arrow:disabled:hover { border-color: #ddd; }

/* inline sliders (Foundation, Business Ecosystem): equal-size images, arrows on top of the images */
.entry figure.wp-block-gallery.has-nested-images.ml-slider--inline { gap: 22px; margin: 1.5em 0; }
.entry figure.wp-block-gallery.has-nested-images.ml-slider--inline figure.wp-block-image {
  flex: 0 0 calc((100% - (var(--ml-per, 2) - 1) * 22px) / var(--ml-per, 2)) !important;
  width: calc((100% - (var(--ml-per, 2) - 1) * 22px) / var(--ml-per, 2)) !important;
  aspect-ratio: 4 / 3;
}
.entry .ml-slider-arrow.is-inline { width: 44px; height: 44px; border: 0; box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.entry .ml-slider-arrow.is-inline.ml-slider-arrow--prev { left: 10px; }
.entry .ml-slider-arrow.is-inline.ml-slider-arrow--next { right: 10px; }
@media (max-width: 800px) {
  .entry figure.wp-block-gallery.has-nested-images.ml-slider--inline figure.wp-block-image { flex-basis: 100% !important; width: 100% !important; }
}
