.mtpc-well:not(.mtpc-1col-section):not(.mtpc-2col-section):not(.mtpc-3col-section):not(.mtpc-4col-section) {
    background-color: rgba(0, 0, 0, 0.7) !important;
    border: 0 !important;
}

.view-id-mtpc_albums {
    padding: 0px 15px;
}

div.mtpc-1col-item.mtpc-1col-item--1 table.tbl-line tbody tr td {
  border-bottom: 1px solid #000;
  border-top: 1px solid #ccc;
}

/* For 35a hkust logo */
body header .mtpc_header .header .wrapper .logos .logos_left .logo_one img{
 width:100%; 
}

/* by Creasant */
body {
  background-color: linear-gradient(180deg, #FFFFFF 10%, #F3F5F6 70%, #EAEDF0 90%);
}

.w-100,
.w-100 img {
  width: 100% !important;
}

.mtpc-2col-section.l10_90 .mtpc-2col-section-wrapper>.mtpc-2col-item--1 {
    -lh-property: 0;
    width: -webkit-calc(10% - 10px);
    width: -moz-calc(10% - 10px);
    width: calc(10% - 10px);
    min-width: 120px;
}

.mtpc-2col-section.l10_90 .mtpc-2col-section-wrapper>.mtpc-2col-item--2 {
    -lh-property: 0;
    width: -webkit-calc(90% - 10px);
    width: -moz-calc(90% - 10px);
    width: calc(90% - 10px);
}

.img-rounded-corner img {
  border-radius: 20px;
}

.circle-img img {
  border-radius: 50%;
}

.flex-gap-30 .mtpc-2col-section-wrapper {
  gap: 30px;
}

.flex-gap-50 .mtpc-2col-section-wrapper {
  gap: 50px;
}


#block-mtpc-copyright {
  text-align: center;
  background: #009071;
  padding-top: 1.1em;
}

#block-mtpc-copyright p {
  color: #FFF;
  font-size: 16px;
}

#block-mtpc-secondfooter {
  background: #FFF;
  padding-top: 20px;
  padding-bottom: 20px;
}

#block-mtpc-secondfooter .mtpc-1col-section .mtpc-1col-section-wrapper {
  max-width: 1500px;
}

#block-mtpc-secondfooter h3 {
  color: #009071;
  font-size: 20px;
  font-weight: 700;
}

#block-mtpc-secondfooter .mtpc-profile-list-title {
  border: none;
  margin-bottom: 10px;
}

#block-mtpc-secondfooter .mtpc_profile_name {
  display: none;
}

#block-mtpc-secondfooter .mtpc_pl_item_container {
  margin-bottom: 0;
}

#block-mtpc-secondfooter .mtpc_pl_item_container .mtpc_pl_texts {
  display: none;
}

#block-mtpc-secondfooter .mtpc_pl_item_container .mtpc_pl_item_wrapper {
  display: block;
}

#block-mtpc-secondfooter .mtpc_pl_item_container .mtpc_pl_pic {
  width: 100%;
}

#block-mtpc-secondfooter .field--name-field-mtpc-profile-listing-item {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 50px;
  align-items: center;
  justify-items: center
}

#block-mtpc-secondfooter .field--name-field-mtpc-profile-listing-item .field--type-image {
  width: 100%;
}

#block-mtpc-secondfooter .collaborating_universities_wrapper .field--name-field-mtpc-profile-listing-item {
  grid-template-columns: repeat(7, 1fr);
  gap: 40px;
}

#block-mtpc-secondfooter .mtpc-1col-section .mtpc-1col-section-wrapper .field--name-field-mod-1-col-container > .field__item+.field__item {
  padding-top: 40px;
  margin-top: 40px;
  border-top: 1px solid #D9D9D9;
}



.info-wrapper .mtpc-3col-section-wrapper {
  align-items: stretch !important;
}

.info-wrapper .mtpc-3col-item {
  display: flex;
  flex-direction: column;
  flex-basis: calc(33.3% - 10px) !important;
  margin-right: 10px !important;
  margin-bottom: unset !important;
}

.info-wrapper .mtpc-3col-item > .field,
.info-wrapper .mtpc-3col-item > .field > .field__items,
.info-wrapper .mtpc-3col-item > .field > .field__items > .field__item {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.info-wrapper .mtpc-3col-item .paragraph.mtpc-block {
  flex: 1;
}

.info-wrapper .mtpc-3col-item .paragraph {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  flex: 1 1 auto;
  box-sizing: border-box;
  min-height: 137px;
  padding: 20px 16px;
}

.info-wrapper .mtpc-3col-item .paragraph > .field,
.info-wrapper .mtpc-3col-item .paragraph > .field > .field__item {
  width: 100%;
}

.info-wrapper .mtpc-3col-item .paragraph > .field > .field__item > div {
  display: none !important;
}

.info-wrapper .mtpc-3col-item .paragraph .field__item > p {
  margin-top: 5px;
  margin-bottom: 0 !important;
  font-size: 20px;
  font-weight: 600;
}

.info-wrapper .mtpc-3col-section-wrapper .mtpc-3col-item .mtpc-block-textarea-block {
  border-radius: 18px;
}

.info-wrapper .mtpc-3col-section-wrapper .mtpc-3col-item .mtpc-block-textarea-block.info-bg-blue {
  background: linear-gradient(
    90deg,
    #5cbdd6 0%,
    rgba(92, 189, 214, 0.6) 50%,
    #5cbdd6 100%
  );
}

.info-wrapper .mtpc-3col-section-wrapper .mtpc-3col-item .mtpc-block-textarea-block.info-bg-yellow {
  background: linear-gradient(
    90deg,
    #e9d149 0%,
    rgba(239, 213, 67, 0.5) 50%,
    #e9d149 100%
  );
}

.info-wrapper .mtpc-3col-section-wrapper .mtpc-3col-item .mtpc-block-textarea-block.info-bg-green {
  background: linear-gradient(
    90deg,
    rgba(0, 144, 113, 0.6) 0%,
    rgba(0, 144, 113, 0.3) 50%,
    rgba(0, 144, 113, 0.6) 100%
  );
}

.info-wrapper .mtpc-3col-section-wrapper .mtpc-3col-item img {
  width: auto;
  height: 60px;
}

.intro-section {
  color: #FFF;
  background: linear-gradient(90deg, #009071 0%, #317FC4 100%);
  padding: 45px 60px;
  border-radius: 25px;
}

.intro-section h3 {
  margin-bottom: 25px;
}

.point-section .mtpc-image-grid-block-item:nth-child(even) {
  margin-top: 160px !important;
}

.point-section .mtpc-image-grid-block-item .grid_main_image {
  width: 90%;
  margin: 0 auto;
}

.point-section .mtpc-image-grid-block-item .mtpc-image-caption {
  text-align: center;
  font-size: 20px;
  color: #003366;
  font-weight: 700;
  line-height: 24px;
}

.pavilion-marketplace-wrapper .mtpc-2col-section-wrapper {
  gap: 20px;
}

.pavilion-marketplace-wrapper p {
  line-height: 33px;
}

.transportation-wrapper .mtpc-2col-section-wrapper {
  gap: 20px;
}

.transportation-wrapper .mtpc-block-textarea-block {
  padding-bottom: 40px;
  border-bottom: 1px solid #009071;
}

.resources-section {
  width: 50%;
  margin: 0 auto !important;
  min-width: 900px;
  max-width: 1000px;
}

.resources-section .mtpc-2col-section-wrapper {
  align-items: center !important;
  gap: 100px;
}

.resources-section img {
  width: 100% !important;
  margin-bottom: 40px;
  border: 1px solid #009071;
}

/* ===== Speaker wrapper ===== */
.speaker-wrapper {
  padding: 40px 0 36px;
}

/* Stack the English / Chinese names and hide the empty one */
.speaker-wrapper .mtpc_profile_name_container .mtpc_profile_name { display: block; }
.speaker-wrapper .mtpc_profile_name_container .mtpc_profile_name:empty { display: none; }

/* Flex container: wraps, and centres any incomplete last row */
.speaker-wrapper > .field__items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;           /* equal height per row, so MORE lines up */
  row-gap: 60px;
}

/* Default = 3 per row (covers 3 and 5 → 3 + 2 centred) */
.speaker-wrapper > .field__items > .field__item {
  position: relative;
  display: flex;
  box-sizing: border-box;
  flex: 0 0 33.3333%;
  max-width: 33.3333%;
  padding: 0 20px 8px;
}

/* JS sets data-count on the wrapper */
.speaker-wrapper[data-count="4"] > .field__items > .field__item { flex-basis: 25%;  max-width: 25%; }
.speaker-wrapper[data-count="2"] > .field__items > .field__item { flex-basis: 50%;  max-width: 50%; }
.speaker-wrapper[data-count="1"] > .field__items > .field__item { flex-basis: 100%; max-width: 100%; }

/* Vertical teal divider that fades at top and bottom */
.speaker-wrapper > .field__items > .field__item::before {
  content: "";
  position: absolute;
  left: 0; top: 4%; bottom: 4%;
  width: 1px;
  background: linear-gradient(180deg, rgba(26,158,138,0) 0%, #1a9e8a 25%, #1a9e8a 75%, rgba(26,158,138,0) 100%);
}
/* No divider on the first card of each row */
.speaker-wrapper > .field__items > .field__item:nth-child(3n+1)::before,
.speaker-wrapper > .field__items > .field__item:first-child::before { display: none; }
/* 4 speakers = a single row, so only the very first card has no divider */
.speaker-wrapper[data-count="4"] > .field__items > .field__item:nth-child(3n+1):not(:first-child)::before { display: block; }

/* Card inner layout */
.speaker-wrapper .mtpc_pl_item_container { flex: 1 1 auto; width: 100%; }
.speaker-wrapper .mtpc_pl_item_wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  text-align: center;
}

/* Circular photo (grey placeholder shows when there is no image) */
.speaker-wrapper .mtpc_pl_pic { width: 100% !important; float: none; margin: 0 0 20px !important; }
.speaker-wrapper .mtpc_pl_pic > a {
  display: block;
  box-sizing: border-box;
  width: min(78%, 210px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border: 5px solid #fff;
  border-radius: 50%;
  overflow: hidden;
  background: #d9d9d9;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
.speaker-wrapper .mtpc_pl_pic .field,
.speaker-wrapper .mtpc_pl_pic .field__item { height: 100%; }
.speaker-wrapper .mtpc_pl_pic img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Text */
.speaker-wrapper .mtpc_pl_texts {
  flex: 1 1 auto;                 /* fills the card so MORE can sit at the bottom */
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 80% !important;
  padding: 0;
}
.speaker-wrapper .mtpc_profile_name_container { font-size: 18px; font-weight: 700; line-height: 1.3; margin-bottom: 6px; }
.speaker-wrapper .mtpc_profile_name_container a .mtpc_profile_name { color: #0b3a73; text-decoration: none; font-weight: 700 !important;font-size: 20px !important; }
.speaker-wrapper .mtpc_profile_name_container a:hover { text-decoration: underline; }
.speaker-wrapper .mtpc-profile-deatils,
.speaker-wrapper .mtpc-profile-deatils p { margin: 0; font-size: 16px; line-height: 1.45; color: #4a4f57; }
.speaker-wrapper .is-moderator .mtpc-profile-deatils,
.speaker-wrapper .is-moderator .mtpc-profile-deatils p { color: #0f9a6c; }   /* "Moderator" in green */

.speaker-wrapper .speaker-more {
  margin-top: auto;
  padding-top: 20px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #2c8ed0;
  text-decoration: none;
}
.speaker-wrapper .speaker-more:hover,
.speaker-wrapper .speaker-more:focus { text-decoration: underline; }

/* ===== Speaker detail page: .speaker-section ===== */

/* The card (the wrapper holds both columns) */
.speaker-section .mtpc-2col-section-wrapper {
  box-sizing: border-box;
  align-items: stretch;
  background: #fff;
  border: 1px solid #3bb7a0;
  border-radius: 28px;
  padding: 58px 50px 50px;
}
.speaker-section .mtpc-2col-item { box-sizing: border-box; margin: 0; }

/* Left column: photo, name, position */
.speaker-section .mtpc-2col-item--1 {
  flex: 0 0 30%;
  max-width: 30%;
  width: auto;
  padding: 0 40px 0 0;
  text-align: center;                 /* border-right removed: the divider lives on --2 */
}
.speaker-section .mtpc-2col-item--1 .field__item { float: none; width: 100%; text-align: center; }
.speaker-section .mtpc-2col-item--1 img {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 22px;
}
.speaker-section .speaker-name { margin: 0 0 4px; text-align: center; }
.speaker-section .speaker-position { margin: 0; line-height: 1.5; text-align: center; }

/* Right column: biography + fading teal divider */
.speaker-section .mtpc-2col-item--2 {
  flex: 1 1 0;
  max-width: none;
  width: auto;
  padding: 12px 0 0 40px;
  line-height: 1.75;
  color: #444;
  align-self: stretch;
  border-left: 1px solid #1a9e8a;
  border-image: linear-gradient(180deg,
      rgba(26,158,138,0) 0%,
      #1a9e8a 25%,
      #1a9e8a 75%,
      rgba(26,158,138,0) 100%) 1;
}
.speaker-section .mtpc-2col-item--2 p { margin: 0 0 28px; font-size: 18px; }
.speaker-section .mtpc-2col-item--2 p:last-child { margin-bottom: 0; }   /* BACK */
.speaker-section .mtpc-2col-item--2 a { text-decoration: none; }
.speaker-section .mtpc-2col-item--2 a:hover { text-decoration: underline; }

/* ===== Prev / next arrows beside the speaker card ===== */
.speaker-section .mtpc-2col-section-wrapper { position: relative; }

.speaker-section .next-previous-wrapper {
  position: absolute;
  top: 50%;
  left: -61px;                      /* sits in the page margin either side of the card */
  right: -61px;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;             /* only the arrows themselves are clickable */
  z-index: 2;
}
.speaker-section .next-previous-wrapper .previous_link,
.speaker-section .next-previous-wrapper .next_link { width: auto; height: auto; margin: 0; padding: 0; }

.speaker-section .next-previous-wrapper .np_btn {
  display: block;
  width: 28px;
  height: 56px;
  font-size: 0;
  line-height: 0;
  color: transparent;
  text-decoration: none;
  overflow: hidden;
  background: center / contain no-repeat;
  pointer-events: auto;
}

.speaker-section .next-previous-wrapper .p_ptn {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 56'%3E%3Cpolygon points='27,1 20,1 1,28 20,55 27,55 8,28' fill='%232c8ed0'/%3E%3C/svg%3E");
}
.speaker-section .next-previous-wrapper .n_ptn {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 56'%3E%3Cpolygon points='1,1 8,1 27,28 8,55 1,55 20,28' fill='%232c8ed0'/%3E%3C/svg%3E");
}

.theme-wrapper.mtpc-4col-section .mtpc-4col-section-wrapper { align-items: stretch; }

.theme-wrapper.mtpc-4col-section .mtpc-4col-item { display: flex; flex-direction: column; margin-bottom:0 !important; }

.theme-wrapper.mtpc-4col-section .mtpc-4col-item .field,
.theme-wrapper.mtpc-4col-section .mtpc-4col-item .field__items,
.theme-wrapper.mtpc-4col-section .mtpc-4col-item .field__item,
.theme-wrapper.mtpc-4col-section .mtpc-4col-item .paragraph { display: contents; }

.theme-wrapper.mtpc-4col-section .theme-desc { flex: 1 1 auto; }

.trs-table table.tbl-bg.tbl-bg thead tr th:first-child {
  font-weight: 500;
  line-height: 23px;
  font-size: 18px;
}

.trs-table table.tbl-bg.tbl-bg thead tr th:first-of-type, 
.trs-table table.tbl-bg.tbl-bg tbody tr td:first-child {
  width: 80px;
}

.trs-table table.tbl-bg.tbl-bg tbody tr td[rowspan] + td {
  border-left: 1px solid var(--tbl-line);
}


/* =========================================================
   CRF / RIF table
========================================================= */

.crf-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  color: #333;
  border: 1px solid #18a88b;
  margin-bottom: 0;
  max-width: 1760px;
  margin: 0 auto;
}

.crf-table th,
.crf-table td {
  padding: 12px 10px;
  vertical-align: top;
  border: 0;
}


/* =========================================================
   Time column
========================================================= */

.crf-table th:first-child,
.crf-table td:first-child {
  width: 58px;
}

.crf-table tbody td[rowspan] {
  white-space: nowrap;
  border-right: 1px solid #009071;
}


/* =========================================================
   Main title row
   Only appears once
========================================================= */

.crf-table thead > tr:first-child > th {
  font-weight: 600;
  font-size: 20px;
  text-align: center;
  vertical-align: middle;
}


/* =========================================================
   CKEditor class: venue-row
   tr.venue-row|CRF & RIF - Table Row (Venue)
========================================================= */

.crf-table .venue-row > th,
.crf-table .venue-row > td {
  font-weight: 600;
  vertical-align: middle;
  padding-top: 8px;
  padding-bottom: 8px;
}

.crf-table .venue-row > :first-child {
  font-weight: 400;
  line-height: 18px;
}


/* =========================================================
   CKEditor class: category-row
   tr.category-row|CRF & RIF - Table Row (Category)
========================================================= */

.crf-table .category-row > th,
.crf-table .category-row > td {
  color: #003b70;
  font-weight: 700;
  vertical-align: middle;
  padding-top: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #009071;
}


/* Light-blue category cells use white separators */
.crf-table .category-row > .cell-bg-light-blue {
  border-left: 1px solid #fff;
  border-bottom: 1px solid #009071;
}


/* =========================================================
   CKEditor class: project-row
   tr.project-row|CRF & RIF - Table Row (Project)
========================================================= */

.crf-table .project-row > td {
  line-height: 1.25;
}


/*
   Draw a separator whenever one project row follows
   another project row.

   This works automatically for any number of project rows.
*/
.crf-table .project-row + .project-row > td {
  border-top: 1px solid #009071;
}


/* White separator inside light-blue cells */
.crf-table .project-row + .project-row > .cell-bg-light-blue {
  border-top-color: #009071;
}


/* White divider on light-blue cells */
.crf-table .cell-bg-light-blue {
  border-left: none;
}


/* =========================================================
   Project codes
========================================================= */

.crf-table .project-row td strong {
  display: block;
  color: #009b7c;
  font-weight: 700;
  margin-bottom: 5px;
}


/* RIF / light-blue project codes */
.crf-table .project-row .cell-bg-light-blue strong {
  color: #2f8bd7;
}


/* =========================================================
   Project descriptions
========================================================= */

.crf-table .project-row td p {
  margin: 0;
  line-height: 1.25;
}


/* Multiple projects in the same table cell */
.crf-table .project-row p + strong {
  margin-top: 18px;
}


/* =========================================================
   Coffee break
========================================================= */

.crf-table .tbl-break > td {
  vertical-align: middle;
  border-top: 1px solid #18a88b;
  border-bottom: 1px solid #18a88b;
}

.crf-table .tbl-break > td[colspan] {
  text-align: center;
}


/* Header retract: let CSS drive the logo row so it stays in sync with the nav */
header .mtpc_header .desktop .logos_container {
  display: flex !important;      /* jQuery ends with inline display:none, which would snap the layout */
  overflow: hidden !important;
  height: 60px !important;       /* ignore jQuery's frame-by-frame inline height */
  opacity: 1;
  transition: height 0.3s ease, opacity 0.15s ease !important;
}

/* the module adds .fixed_position to .second_layer at the same moment it calls slideUp */
header .mtpc_header .desktop .logos:has(> .second_layer.fixed_position) > .logos_container {
  height: 0 !important;
  opacity: 0;                    /* logos fade out first, so nothing looks cropped */
}

.venue-bar {
  border-left: 12px solid #000;
  padding-left: 35px;
  padding-right: 10px;
  margin-bottom: 30px;
}

.venue-bar.color-purple { border-color: #684B9F; }
.venue-bar.color-light-blue { border-color: #00B5F5; }
.venue-bar.color-green { border-color: #00a783; }
.venue-bar.color-yellow { border-color: #FACE00; }
.venue-bar.color-pink { border-color: #F30480; }

.venue-bar ul {
  margin-left: 7px;
  line-height: 26px;
  margin-top: 5px;
}

.venue-bar p {
  margin-bottom: 0;
  margin-top: 20px;
}

/* Venue table: add the missing right-hand divider beside the Time column */
.venue-tbl table.tbl-bg.tbl-bg tbody tr td:first-child:nth-last-child(4) {
  border-right: 1px solid var(--tbl-line);
}

/* Venue table: wider Time col, narrower Code col, keep time on one line */
.venue-tbl table.tbl-bg.tbl-bg thead tr th:first-of-type {
  width: 140px;               /* Time (was 110px) */
}
.venue-tbl table.tbl-bg.tbl-bg thead tr th:nth-of-type(2) {
  width: 80px;                /* Code (was auto, ~326px) */
}
.venue-tbl table.tbl-bg.tbl-bg tbody tr td:first-child:nth-last-child(4) {
  white-space: nowrap;        /* Time cells only */
}
.venue-tbl table.tbl-bg.tbl-bg tbody tr td:first-child:nth-last-child(4) br {
  display: none;              /* ignore the hard <br> after the dash */
}