/* Shared responsive rules loaded after the legacy theme styles. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 320px;
  overflow-wrap: break-word;
}

main,
section,
.container,
.row,
[class*="col-"] {
  min-width: 0;
}

img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
}

a,
.student-email,
.detail_top-address a,
.professor_top-address a,
.footer-widget__contact-list a {
  overflow-wrap: anywhere;
}

table {
  width: 100%;
}

.iframe-container,
.bili_iframe {
  display: block;
  width: 100%;
  border: 0;
}

.page-header__inner h2,
.section-title__title {
  overflow-wrap: anywhere;
}

.main-slider-two .swiper-slide {
  min-height: 620px;
  height: 100svh;
}

.main-slider-two .container {
  padding-inline: 24px;
}

.main-slider-two .main-slider__content,
.main-slider-two .main-slider__content2 {
  max-width: 1040px;
}

.main-slider-two h2 {
  font-size: clamp(3.5rem, 6vw, 5rem);
  line-height: 1.12;
}

.main-slider-two p {
  max-width: 960px;
  font-size: clamp(1.05rem, 1.7vw, 1.375rem);
  line-height: 1.7;
}

.main-slider button.learn-more {
  width: max(9.5rem, max-content);
  min-height: 3rem;
  padding-right: 0.75rem;
}

.main-slider button.learn-more .button-text {
  white-space: nowrap;
}

.professor-card,
.small-card,
.picture-card-left,
.picture-card-right,
.gallery-item,
.gallery-card,
.article,
.publication-year {
  max-width: 100%;
}

.small-card-right,
.picture-card-content,
.detail-card-topright {
  min-width: 0;
}

.publication .article-link,
.publication .pub-infor {
  overflow-wrap: anywhere;
  word-break: normal;
}

@media (min-width: 1200px) {
  /* Match the publication navigation's initial JS state before the script runs.
     This prevents a visible flash at the top of the page. */
  #pub-content {
    opacity: 0;
    pointer-events: none;
  }
}

@media (max-width: 991.98px) {
  .page-header__inner h2,
  .section-title__title {
    font-size: clamp(2rem, 7vw, 3rem);
    line-height: 1.2;
  }

  .professor-card-left,
  .professor-card-right {
    max-width: 680px;
  }

  #pub-content,
  #pub-detail {
    width: 100%;
  }

}

@media (max-width: 767.98px) {
  body {
    font-size: 16px;
  }

  .container {
    padding-inline: 16px;
  }

  .main-slider-two .swiper-slide {
    min-height: 600px;
    height: 100svh;
  }

  .main-slider-two .container {
    padding: 112px 20px 72px;
  }

  .main-slider-two .container .row {
    top: 50%;
  }

  .main-slider-two h2 {
    margin-bottom: 20px;
    font-size: clamp(2rem, 10vw, 3.25rem);
    line-height: 1.12;
  }

  .main-slider-two p {
    font-size: 1rem;
    line-height: 1.6;
  }

  #main-slider-pagination {
    bottom: 18px;
    padding-inline: 20px;
  }

  .professor-card {
    margin-block: 28px;
    padding: 14px;
  }

  .professor-card-left,
  .professor-card-right {
    width: 100%;
  }

  .professor-card-left {
    max-width: 320px;
  }

  .professor__top-name {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
    line-height: 1.2;
  }

  .professor__top-text {
    font-size: 1rem;
    line-height: 1.65;
  }

  .small-card {
    align-items: flex-start;
    min-height: 0;
  }

  .small-card-right {
    height: auto;
    min-height: 110px;
  }

  .small-card-right p,
  .small-card-right a {
    font-size: 0.875rem;
    line-height: 1.35;
  }

  .publication {
    padding-inline: 0;
  }

  .pub-category {
    padding: 29px 15px 15px;
  }

  .pub-category .year-sidebar-title {
    margin-left: 15px;
  }

  .publication-year {
    margin-block: 20px;
    padding: 18px 4px 8px;
  }

  .publication .article {
    margin-block: 8px;
    padding: 14px;
  }

  .publication .article p,
  .publication .article-link {
    font-size: 1rem;
    line-height: 1.6;
  }

  .publication .year-title {
    margin-left: 12px;
    font-size: 2rem;
  }

  .picture-card-right .picture-card-background,
  .picture-card-left .picture-card-background {
    padding-inline: 20px;
  }

  .gallery-item-body p,
  .gallery-card__body h3,
  .picture-card-content h3,
  .picture-card-content h4 {
    overflow-wrap: anywhere;
  }

  .contact-details__info li {
    align-items: flex-start;
  }

  .contact-details__info li .text,
  .detail_top-address .text,
  .professor_top-address .text {
    min-width: 0;
  }

  .iframe-container,
  .bili_iframe {
    min-height: 240px;
    height: 56.25vw;
  }
}

@media (max-width: 399.98px) {
  .container {
    padding-inline: 12px;
  }

  .main-slider-two .container {
    padding-inline: 16px;
  }

  .small-card-left,
  .student-img {
    width: 76px;
    height: 76px;
  }

  .small-card-right {
    width: calc(100% - 86px);
  }

  .gallery-viewer__header h2 {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
