/* by Creasant */

@media only screen and (max-width: 767px) { 
  body {
    background-image: unset !important;
  }
  
  h2 {
    font-size: 1.5em;
  }
  
  .mtpc-pageTitle-block .mtpc_pagetitle_container {
    aspect-ratio: 1000 / 504;
  }
  .mtpc-pageTitle-block .mtpc_pagetitle_container .mtpc_pagetitle_wrapper {
    min-height: 0;
    height: 100%;
  }

  /* Default CSS */
  /* Layout */
  .mobile-margin-right-0 { 
    margin-right: 0; 
  }
  
  /* Tables */
  .field.field--name-field-mod-sections table.tbl-bg td { 
    padding: 10px; 
  }
  
  /* Table Rows */
  tr.tr-style-1 td { 
    white-space: nowrap; 
  }
  
  tr.tr-style-2 td { 
    white-space: nowrap; 
  }
  
  tr.tr-style-3 td { 
    white-space: nowrap; 
  }
  
  /* Tabs */
  ul:has(a.tab), 
  ul:has(a.active-tab) { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
  }
  
  /* Price */
  p.price { 
    flex-direction: column; 
  }
  
  p.price a { 
    margin-top: 10px; 
  }
  
  /* Page Title */
  .mtpc-pageTitle-block .mtpc_pagetitle_container .mtpc_pagetitle_wrapper { 
    max-width: 100%; 
  }
  
  .mtpc-pageTitle-block .mtpc_pagetitle_container .mtpc_pagetitle_wrapper .pagetitle h1 { 
    display: flex; 
    align-items: center; 
    font-size: 1.6em; 
  }
  
  /* Columns */
  .mtpc-2col-section .mtpc-2col-section-wrapper { 
    flex-direction: column;
    gap: 40px; 
  }
  
  .mtpc-2col-section .mtpc-2col-section-wrapper:has(.photo-with-text-block) { 
    flex-direction: column;
  }
  
  .mtpc-2col-section .mtpc-2col-section-wrapper>.mtpc-2col-item { 
    width: 100%; 
  }
  
  .mtpc-2col-section.l70_30 .mtpc-2col-section-wrapper>.mtpc-2col-item.mtpc-2col-item--1, 
  .mtpc-2col-section.l70_30 .mtpc-2col-section-wrapper>.mtpc-2col-item.mtpc-2col-item--2 { 
    width: 100%; 
  }
  
  .mtpc-2col-section.l70_30 .mtpc-2col-section-wrapper>.mtpc-2col-item.mtpc-2col-item--1 { 
    margin-bottom: 48px; 
  }
  
  .mtpc-2col-section.l70_30 .mtpc-2col-section-wrapper>.mtpc-2col-item.mtpc-2col-item--2 { 
    margin-left: 0; 
    padding: 20px 0; 
  }
  
  .mtpc-2col-section .mtpc-2col-section-wrapper>.mtpc-2col-item--2 { 
    margin-left: 0; 
  }
  
  .mtpc-2col-section .mtpc-2col-section-wrapper>.mtpc-2col-item--2:has(.photo-with-text-block) { 
    margin-left: 0; 
  }
  
  /* Header */
  /* Header title scaled down further (derived: no mobile frame in Figma) */
  header .mtpc_header .header .wrapper .logos .logos_left .logo_two.text_logo a.field-group-link {
    font-size: 16px;
  }
  
  /* the platform caps the title column at 310px on mobile; let it use the row (one line when it fits) and keep 20px clear of the menu icon */
  header .mtpc_header .header .wrapper .logos .logos_container .logos_left {
    max-width: none;
    margin-right: 20px;
  }
  
  header .mtpc_header .header .wrapper .logos .logos_right { 
    top: 0; 
    right: 0; 
    position: absolute; 
  }
  
  /* Welcome Message */
  .field--name-field-mtpc-profile-listing-item .field--name-field-media-image { 
    margin-inline: 0; 
  }
  
  /* Profiles */
  .speakers .field.field--name-field-mtpc-profile-listing-item { 
    grid-template-columns: repeat(2, 1fr); 
  }
  
  .field--name-field-mtpc-profile-listing-item .field--name-field-media-image { 
    margin-inline: auto; 
  }
  
  .speakers .field--name-field-mtpc-profile-listing-item .field__item:has(> .mtpc_pl_item_container) { 
    max-width: calc((100vw - 50px) / 2); 
  }
  
  .mtpc_pd_item_container { 
    margin-top: 80px;
  }
  
  .mtpc_pl_item_wrapper .mtpc_pl_texts .mtpc_profile_name_container>a { 
    display: flex; 
  }
  
  /* Album */
  .view-id-mtpc_albums .view-header {
    padding-inline: 0; 
  }
  
  .mtpc_pagetitle.mtpc_gallery h1 { 
    display: flex; 
    align-items: center; 
    font-size: 1.6em;
  }
  
  .view-id-mtpc_albums .view-content .album_grid_items { 
    padding-top: 70px; 
    padding-bottom: 70px; 
  }
  
  article.mtpc-single-album .mtpc_album_description { 
    padding: 0 0 70px; 
  }
  
  /* Search */
  body.path-hkust-search .region-content { 
    padding: 0; 
  }
  
  /* Additional CSS */
  /* side padding follows the platform section padding (15px on mobile) */
  #block-icec-second-footer-block .block-body {
    padding: 30px 15px;
  }
  
  #block-icec-second-footer-block .field--name-field-organizers {
    gap: 20px;
  }
  
  #block-icec-second-footer-block .field--name-field-organizers-heading,
  #block-icec-second-footer-block .field--name-field-contact-heading {
    font-size: 22px;
  }
  
  #block-icec-second-footer-block .field--name-field-contact-email a {
    font-size: 20px;
  }
  
  /* Accommodation */
  .photo-with-text-block { 
    min-height: unset; 
  }
  
  /* Album Banner */
  #block-mtpc-albumbanner .field.field--name-field-background-desktop { 
    display: none; 
  }
  
  #block-mtpc-albumbanner .field.field--name-field-background-mobile { 
    display: block; 
  }
  
  #block-mtpc-albumbanner h1 { 
    display: flex;
    align-items: center;
    font-size: 1.6em;
  }
  
  #block-mtpc-albumbanner .clearfix.text-formatted.field.field--name-body { 
    padding-inline: 15px; 
  }
}

/* Small Mobile */
@media only screen and (max-width: 600px) { 
  /* Welcome Message */
  .field.field--name-field-mtpc-profile-listing-item { 
    grid-template-columns: 1fr; 
    gap: 50px;
  }
  
  .field--name-field-mtpc-profile-listing-item .field--name-field-media-image { 
    margin-inline: auto; 
  }
}

@media only screen and (max-width: 580px) { 
  .field.field--name-field-mod-sections table.tbl-noborder-3 tr td:first-child {
    width: 250px;
  }
}

@media only screen and (max-width: 500px) { 
  /* Layout */
  /* Buttons */
  ul:has(> li > a.orange-button), 
  ul:has(> li > a.cyan-button), 
  ul:has(> li > a.darkblue-button) { 
    display: grid; 
    grid-template-columns: 1fr; 
  }
  
  a.orange-button, 
  a.cyan-button, 
  a.darkblue-button { 
    /*width: 100%; */
    display: block; 
    padding-inline: 10px; 
  }
  
  /* Tabs */
  ul:has(a.tab), 
  ul:has(a.active-tab) { 
    grid-template-columns: 1fr; 
  }
  
  /* Header */
  header .mtpc_header .header .wrapper .logos .logos_left .logo_two.text_logo a.field-group-link { 
    font-size: 11px; 
  }
  
  /* Welcome Message */
  .field.field--name-field-mtpc-profile-listing-item { 
    grid-template-columns: 1fr; 
  }
  
  .field--name-field-mtpc-profile-listing-item .field--name-field-media-image img { 
    max-width: unset; 
  }
  
  .field--name-field-mtpc-profile-listing-item .field--name-field-media-image { 
    margin-inline: auto; 
  }
  
  /* Profiles */
  .speakers .field.field--name-field-mtpc-profile-listing-item { 
    grid-template-columns: 1fr; 
  }
  
  .speakers .field--name-field-mtpc-profile-listing-item .field__item:has(> .mtpc_pl_item_container) { 
    max-width: 100%; 
  }
  
  .mtpc_pd_item_container > .mtpc_pd_item_wrapper { 
    /* padding: 0 52px 52px; */
    padding: 0 26px 26px; 
  }
  
  .mtpc_pd_item_wrapper .mtpc_pd_picture { 
    gap: 20px; 
  }
  
  .field.field--name-field-mtpc-pd-img-desc:after { 
    margin-bottom: 15px; 
  }
}

