.site-language-switcher {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 4px;
  min-height: 34px;
  margin-left: 16px;
  padding: 4px 8px;
  border: 1px solid rgba(47, 115, 184, 0.3);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(25, 62, 96, 0.12);
  font-family: Arial, "Noto Sans SC", sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.site-language-option {
  display: inline-grid;
  min-width: 25px;
  min-height: 25px;
  place-items: center;
  border-radius: 999px;
  color: #3e5366;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.site-language-option:hover,
.site-language-option:focus-visible {
  background: #eaf3fb;
  color: #23588e;
  outline: none;
}

.site-language-option.is-active {
  background: #2f73b8;
  color: #fff;
}

.site-language-divider {
  color: #8da0b1;
  font-weight: 500;
}

@media (max-width: 991px) {
  .site-language-switcher {
    width: max-content;
    margin: 12px 20px;
  }
}

/* Shared responsive improvements for the mirrored English and Chinese sites. */
html {
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  max-width: 100%;
  overflow-x: hidden;
}

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

p,
li,
h1,
h2,
h3,
h4,
h5,
h6,
a {
  overflow-wrap: break-word;
}

.navigation {
  position: sticky !important;
  top: 0;
  z-index: 1000;
}

.navigation-wrap {
  width: min(100%, 1440px);
  margin-right: auto;
  margin-left: auto;
}

.logo-image {
  height: auto;
  max-width: 100%;
}

@media (min-width: 1201px) {
  .logo-link {
    width: 170px;
    max-width: 170px;
    flex: 0 0 170px;
  }

  .logo-image {
    width: 170px !important;
  }

  .navigation-items > .navigation-item.w-nav-link {
    padding-right: 8px;
    padding-left: 8px;
    font-size: 13px;
  }

  .navigation-items > .dropdown > .w-dropdown-toggle {
    padding-right: 23px;
    padding-left: 7px;
  }

  .navigation-items
    > .dropdown
    > .w-dropdown-toggle
    > .nav-dropdown-item {
    font-size: 13px;
  }

  .navigation-items > .site-language-switcher {
    margin-left: 5px;
    padding-right: 3px;
    padding-left: 3px;
  }
}

@media screen and (min-width: 1201px) and (max-width: 1279px) {
  .logo-link {
    width: 160px;
    max-width: 160px;
    flex-basis: 160px;
  }

  .logo-image {
    width: 160px !important;
  }
}

@media screen and (min-width: 1280px) {
  .navigation-items > .navigation-item.w-nav-link {
    padding-right: 10px;
    padding-left: 10px;
  }

  .navigation-items > .dropdown > .w-dropdown-toggle {
    padding-right: 24px;
    padding-left: 8px;
  }

  .navigation-items > .site-language-switcher {
    margin-left: 6px;
    padding-right: 4px;
    padding-left: 4px;
  }
}

.button,
.w-button,
.w-nav-link,
.w-dropdown-toggle,
.w-dropdown-link {
  touch-action: manipulation;
}

.nav-dropdown-item.master-single-course-nav-link.w-dropdown-link {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(47, 115, 184, 0.2);
  line-height: 1.35;
  white-space: normal;
}

.master-single-course-side-link {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(47, 115, 184, 0.2);
}

/* Keep the three independently rendered curriculum columns on shared rows. */
.w-row:has(> .column-3) .heading-7,
.w-row:has(> .column-3) .heading-8,
.w-row:has(> .column-3) .heading-9 {
  display: flex;
  min-height: 64px;
  margin: 0;
  align-items: center;
}

/* Master's and doctoral curriculum pages mirror the certificate-program
   hierarchy while allowing full class schedules to wrap naturally. */
.hx-program-curriculum {
  width: 100%;
}

.hx-program-plan-year {
  margin-bottom: 8px;
}

.hx-program-term {
  margin: 0 0 24px;
  color: #5d6c79;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  text-align: center;
}

.hx-program-course-table-wrap {
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(47, 115, 184, 0.24);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(28, 58, 86, 0.08);
}

.hx-program-course-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  color: #354554;
  font-size: 15px;
  line-height: 1.65;
}

.hx-program-course-table th,
.hx-program-course-table td {
  padding: 18px 16px;
  border-right: 1px solid rgba(47, 115, 184, 0.16);
  border-bottom: 1px solid rgba(47, 115, 184, 0.16);
  text-align: left;
  vertical-align: top;
}

.hx-program-course-table th:last-child,
.hx-program-course-table td:last-child {
  border-right: 0;
}

.hx-program-course-table tbody tr:last-child td {
  border-bottom: 0;
}

.hx-program-course-table th {
  background: #edf4fa;
  color: #173c65;
  font-size: 15px;
  font-weight: 700;
}

.hx-program-course-table th:nth-child(1) {
  width: 52%;
}

.hx-program-course-table th:nth-child(2) {
  width: 20%;
}

.hx-program-course-table th:nth-child(3) {
  width: 28%;
}

.hx-program-course-title,
.hx-program-course-note,
.hx-program-course-type,
.hx-program-course-credits {
  display: block;
}

.hx-program-cell-content {
  min-width: 0;
}

.hx-program-course-title {
  color: #243f5b;
  font-size: 17px;
  line-height: 1.5;
}

.hx-program-course-note {
  margin-top: 8px;
  color: #667684;
  font-size: 13px;
  line-height: 1.6;
}

.hx-program-course-type {
  color: #2f73b8;
  font-weight: 700;
}

.hx-program-course-credits {
  margin-top: 4px;
  color: #586978;
}

.hx-program-schedule-notes {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.hx-program-schedule-notes p {
  margin: 0;
  padding: 14px 16px;
  border-left: 3px solid #2f73b8;
  background: #f4f8fb;
  color: #4e5f6f;
  font-size: 14px;
  line-height: 1.65;
}

@media (min-width: 992px) {
  .hx-program-course-table-wrap {
    width: calc(100% + 48px);
    margin-left: -24px;
  }
}

/* Keep the homepage carousel prominent without letting it consume the
   complete opening viewport. */
.slider-header {
  height: 480px !important;
  min-height: 0 !important;
}

.slider-header .w-slider-mask,
.slider-header .w-slide {
  height: 100% !important;
}

.slider-header .hero-slide-course {
  background-color: #071a33 !important;
  background-image: url("/announcements/chen-zuoren-theology-course.png") !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: contain !important;
}

.slider-header .left-arrow-headers.w-slider-arrow-left,
.slider-header .right-arrow-headers.w-slider-arrow-right {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  border: 0 !important;
}

.slider-header .slide-1 {
  background-color: #2fc4d3 !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: contain !important;
}

.slider-header .hero-slide-local {
  background-color: #0d1f3b !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
}

.slider-header .hero-slide-music {
  background-image: url("/events/graduation-group-2026.jpg") !important;
}

.slider-header .hero-slide-fellowship {
  background-image: url("/events/beach-baptism.jpg") !important;
}

/* Use opacity instead of an infinite translate loop so the last-to-first
   transition is as smooth as every other homepage slide. */
.slider-header.hero-crossfade {
  position: relative;
  overflow: hidden;
}

.slider-header.hero-crossfade .w-slider-mask {
  position: relative !important;
  overflow: hidden !important;
  transform: none !important;
}

.slider-header.hero-crossfade .w-slider-mask > .w-slide {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0 !important;
  transform: none !important;
  transition: opacity 550ms ease !important;
  pointer-events: none;
  will-change: opacity;
  z-index: 0;
}

.slider-header.hero-crossfade .w-slider-mask > .w-slide.hero-crossfade-active {
  opacity: 1 !important;
  pointer-events: auto;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .slider-header.hero-crossfade .w-slider-mask > .w-slide {
    transition-duration: 1ms !important;
  }
}

@media (min-width: 992px) and (max-width: 1200px) {
  .navigation-wrap {
    padding-right: 24px;
    padding-left: 24px;
  }

  .logo-link {
    width: 150px;
    max-width: 150px;
    flex: 0 0 150px;
  }

  .logo-image {
    width: 100% !important;
  }

  .navigation-items > .navigation-item.w-nav-link {
    padding-right: 6px;
    padding-left: 6px;
    font-size: 12px;
  }

  .navigation-items > .dropdown > .w-dropdown-toggle {
    padding-right: 22px;
    padding-left: 6px;
  }

  .navigation-items
    > .dropdown
    > .w-dropdown-toggle
    > .nav-dropdown-item {
    font-size: 12px;
  }

  .site-language-switcher {
    margin-left: 4px;
    padding-right: 3px;
    padding-left: 3px;
  }

  .button.cc-contact-us {
    padding-right: 12px;
    padding-left: 12px;
  }
}

@media (max-width: 991px) {
  .slider-header {
    height: 340px !important;
  }

  .navigation-wrap {
    width: 100%;
    min-height: 74px;
    padding-right: 16px;
    padding-left: 16px;
    gap: 8px;
  }

  .logo-link {
    width: min(48vw, 190px);
    min-width: 0;
    padding-left: 0;
  }

  .logo-image {
    width: 100% !important;
  }

  .menu {
    margin-left: auto;
  }

  .menu-button.w-nav-button {
    display: grid;
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    place-items: center;
    border-radius: 8px;
    background: #f3f6f8;
  }

  .menu-button.w-nav-button.w--open {
    background: #e8eef3;
  }

  .navigation-items.w-nav-menu {
    width: 100%;
    max-height: calc(100dvh - 74px);
    padding: 12px 16px 20px;
    overflow-y: auto;
    background: #fff;
    box-shadow: 0 16px 30px rgba(25, 42, 58, 0.14);
  }

  .navigation-item.w-nav-link {
    display: flex;
    min-height: 44px;
    padding: 12px 8px;
    align-items: center;
    white-space: normal;
  }

  .dropdown.w-dropdown {
    width: 100%;
  }

  .w-dropdown-toggle {
    display: flex;
    min-height: 44px;
    padding: 12px 38px 12px 8px;
    align-items: center;
  }

  .dropdown-list-4.w-dropdown-list {
    position: relative;
    width: 100%;
    background: #f6f8fa;
    box-shadow: none;
  }

  .nav-dropdown-item.w-dropdown-link {
    min-height: 44px;
    padding: 12px 16px;
    line-height: 1.45;
    white-space: normal;
  }

  .site-language-switcher {
    min-height: 44px;
    margin: 10px 8px 4px;
    padding: 6px 9px;
  }

  .site-language-option {
    min-width: 30px;
    min-height: 30px;
  }

  .button.cc-contact-us {
    min-width: 0;
    min-height: 44px;
    margin-left: 0;
    padding: 13px 14px;
    font-size: 13px;
  }

  [class^="intro-header"],
  [class*=" intro-header"] {
    height: 400px !important;
    min-height: 400px !important;
    padding-right: 28px;
    padding-left: 28px;
    background-position: center;
  }

  .heading-jumbo {
    font-size: clamp(38px, 7vw, 54px) !important;
    line-height: 1.12 !important;
  }

  .heading-jumbo-english {
    font-size: clamp(13px, 2.4vw, 17px) !important;
    line-height: 1.45 !important;
    letter-spacing: 0.12em;
  }

  .container,
  .container-footer,
  .w-container {
    width: 100%;
    max-width: 100%;
  }

  .contact-form-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  input,
  select,
  textarea,
  button {
    max-width: 100%;
  }
}

@media (max-width: 767px) {
  .hx-program-course-table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .hx-program-course-table,
  .hx-program-course-table tbody,
  .hx-program-course-table tr,
  .hx-program-course-table td {
    display: block;
    width: 100%;
  }

  .hx-program-course-table {
    table-layout: auto;
  }

  .hx-program-course-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  .hx-program-course-table tr {
    margin-bottom: 18px;
    overflow: hidden;
    border: 1px solid rgba(47, 115, 184, 0.24);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(28, 58, 86, 0.07);
  }

  .hx-program-course-table td,
  .hx-program-course-table tbody tr:last-child td {
    display: grid;
    grid-template-columns: minmax(94px, 30%) minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid rgba(47, 115, 184, 0.14);
  }

  .hx-program-course-table td:last-child,
  .hx-program-course-table tbody tr:last-child td:last-child {
    border-bottom: 0;
  }

  .hx-program-course-table td::before {
    content: attr(data-label);
    grid-column: 1;
    grid-row: 1;
    color: #173c65;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.55;
  }

  .hx-program-course-table td > .hx-program-cell-content {
    grid-column: 2;
    grid-row: 1;
  }

  .hx-program-schedule-notes {
    grid-template-columns: minmax(0, 1fr);
  }

  [class^="intro-header"],
  [class*=" intro-header"] {
    height: 340px !important;
    min-height: 340px !important;
    padding: 28px 20px;
  }

  .heading-jumbo {
    font-size: clamp(32px, 9vw, 42px) !important;
  }

  .heading-jumbo-english {
    font-size: 13px !important;
  }

  .section-heading,
  .work-heading,
  .contact-heading,
  .heading-application,
  .section-heading-wrap h2 {
    font-size: clamp(27px, 8vw, 34px) !important;
    line-height: 1.2 !important;
  }

  .heading,
  .heading-course,
  .heading-application-sub-title {
    line-height: 1.35 !important;
  }

  .paragraph-light,
  .paragraph-light-content,
  .paragraph-light-list,
  .paragraph-light-center,
  .paragraph-light-mid {
    font-size: 15px !important;
    line-height: 1.75 !important;
  }

  .about-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 28px !important;
    margin-bottom: 64px;
  }

  .about-grid > * {
    grid-column: 1 !important;
    grid-row: auto !important;
    min-width: 0;
  }

  .about-grid img,
  .div-img-decor img {
    width: 100%;
    height: auto;
  }

  .slider-header {
    height: clamp(220px, 68vw, 280px) !important;
  }

  .slider-header .w-slider-mask,
  .slider-header .w-slide {
    height: 100% !important;
  }

  .slider-header .slide-1 {
    background-color: #2fc4d3 !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
  }

  .slider-header .w-slider-arrow-left,
  .slider-header .w-slider-arrow-right {
    width: 48px !important;
  }

  .slider-header .w-slider-arrow-left {
    right: auto !important;
    left: 0 !important;
  }

  .slider-header .w-slider-arrow-right {
    right: 0 !important;
    left: auto !important;
  }

  .div-block-15.phone-v,
  .div-block-11 {
    width: auto !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
  }

  .collection-list.w-dyn-items {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 28px !important;
  }

  .collection-item-2.w-dyn-item {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
  }

  .collection-item-2 img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1;
    object-fit: cover !important;
  }

  .collection-item-2 > h4 {
    margin-top: 20px;
    margin-bottom: 8px;
    line-height: 1.3;
  }

  .collection-item-2 > h6 {
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.4;
  }

  .collection-item-2 > div {
    font-size: 14px;
    line-height: 1.6;
  }

  .section-heading-wrap > .w-row {
    display: block !important;
  }

  .section-heading-wrap .column-4 {
    width: 100% !important;
    margin-bottom: 36px;
  }

  .section-heading-wrap .w-col-9 {
    width: 100% !important;
  }

  .section-heading-wrap .column-4 > div {
    min-height: 52px;
  }

  .online-application {
    width: 100%;
    margin-bottom: 64px;
  }

  .apply-section {
    border-radius: 10px;
  }

  .apply-field input,
  .apply-field select,
  .apply-field textarea,
  .text-field {
    min-height: 48px;
    font-size: 16px !important;
  }

  input[type="file"] {
    width: 100%;
    overflow: hidden;
  }

  .w-row:has(.column-3) {
    display: grid !important;
    grid-template-columns: minmax(0, 1.8fr) minmax(76px, 0.85fr) minmax(52px, 0.48fr);
    align-items: stretch;
  }

  .w-row:has(.column-3)::before,
  .w-row:has(.column-3)::after {
    display: none !important;
    content: none !important;
  }

  .w-row:has(.column-3) > .w-col {
    width: auto !important;
    min-width: 0;
    padding-right: 4px;
    padding-left: 4px;
    float: none;
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .heading-4,
  .heading-5,
  .heading-6,
  .heading-7,
  .heading-8,
  .heading-9 {
    font-size: 11px !important;
    line-height: 1.35 !important;
  }

  .heading-4,
  .heading-5,
  .heading-6 {
    min-height: 44px;
    margin: 0;
  }

  .heading-7,
  .heading-8,
  .heading-9 {
    display: flex;
    min-height: 68px;
    margin: 0;
    align-items: center;
  }

  .section-slide {
    overflow: hidden;
  }

  .slider-4.w-slider {
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
  }

  .slider-4 .w-slider-mask {
    width: 100%;
    height: auto !important;
    padding: 0 0 10px 18px;
    overflow-x: auto !important;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .slider-4 .w-slide:first-child {
    width: max-content !important;
    height: auto !important;
  }

  .slider-4 .collection-list-6 {
    display: flex !important;
    width: max-content;
    padding: 0 18px 8px 0;
    gap: 16px;
  }

  .slider-4 .collection-item-6 {
    width: min(78vw, 280px) !important;
    flex: 0 0 min(78vw, 280px);
    scroll-snap-align: start;
  }

  .slider-4 .link-block-6 {
    width: 100% !important;
  }

  .slider-4 .div-block-18 {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
  }

  .slider-4 .div-block-18 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .slider-4 .w-slider-arrow-left,
  .slider-4 .w-slider-arrow-right {
    display: none !important;
  }

  .container-footer {
    padding-right: 18px;
    padding-left: 18px;
  }

  .container-footer .div-block-2 {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 32px !important;
  }

  .container-footer .div-block-3 {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px !important;
  }

  .container-footer .div-block-4,
  .container-footer .div-block-5 {
    width: auto !important;
    min-width: 0;
  }

  .container-footer .div-block-5 {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 20px !important;
  }

  .footer-col-list-item,
  .footer-col-list-item-children,
  .footer-col-list-item-nolink {
    line-height: 1.45 !important;
  }
}

@media (max-width: 420px) {
  .navigation-wrap {
    padding-right: 12px;
    padding-left: 12px;
  }

  .logo-link {
    width: min(44vw, 165px);
  }

  .button.cc-contact-us {
    padding-right: 11px;
    padding-left: 11px;
  }

}

@media (max-width: 340px) {
  .container-footer .div-block-3 {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Use the Chinese school name beside the seal throughout Chinese pages. */
html[lang^="zh"] .logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

html[lang^="zh"] .logo-link::after {
  content: "華夏福音神學院";
  color: #202124;
  font-family: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

html[lang^="zh"] .logo-link .logo-image {
  width: 70px !important;
  height: 70px !important;
  min-width: 70px;
  max-width: 70px;
  object-fit: cover;
  object-position: left center;
}

@media (max-width: 991px) {
  html[lang^="zh"] .logo-link {
    gap: 8px;
  }

  html[lang^="zh"] .logo-link::after {
    font-size: 14px;
    letter-spacing: 0.02em;
  }

  html[lang^="zh"] .logo-link .logo-image {
    width: 54px !important;
    height: 54px !important;
    min-width: 54px;
    max-width: 54px;
  }
}

@media (max-width: 420px) {
  html[lang^="zh"] .logo-link::after {
    font-size: 13px;
  }

  html[lang^="zh"] .logo-link .logo-image {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px;
    max-width: 46px;
  }
}

/* Local preview: bilingual campus and ministry photo gallery. */
.home-events-section {
  padding: 96px 24px 104px;
  background:
    radial-gradient(circle at 14% 12%, rgba(47, 115, 184, 0.1), transparent 34%),
    linear-gradient(180deg, #f7fafc 0%, #fff 100%);
}

.home-events-container {
  width: min(100%, 1180px);
  margin: 0 auto;
}

.home-events-heading {
  max-width: 720px;
  margin-bottom: 38px;
}

.home-events-eyebrow {
  margin-bottom: 12px;
  color: #2f73b8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.home-events-heading h2 {
  margin: 0 0 14px;
  color: #172b3f;
  font-size: clamp(36px, 5vw, 54px);
  font-weight: 500;
  line-height: 1.1;
}

.home-events-heading > p:not(.home-events-mobile-hint) {
  margin: 0;
  color: #5d6d7d;
  font-size: 17px;
  line-height: 1.75;
}

.home-events-mobile-hint {
  display: none;
}

.home-events-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 212px;
  gap: 14px;
}

.home-events-carousel-controls {
  display: none;
}

.home-events-card {
  position: relative;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: #d9e4ed;
  box-shadow: 0 12px 28px rgba(23, 43, 63, 0.12);
  color: #fff;
  cursor: zoom-in;
  text-align: left;
}

.home-events-card.is-featured {
  grid-column: span 2;
  grid-row: span 2;
}

.home-events-card:nth-child(6),
.home-events-card:nth-child(7) {
  grid-column: span 2;
}

.home-events-card::after {
  position: absolute;
  inset: 38% 0 0;
  background: linear-gradient(180deg, transparent, rgba(8, 24, 38, 0.78));
  content: "";
  pointer-events: none;
}

.home-events-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms ease;
}

.home-events-card:hover img,
.home-events-card:focus-visible img {
  transform: scale(1.035);
}

.home-events-card:focus-visible {
  outline: 3px solid #2f73b8;
  outline-offset: 4px;
}

.home-events-card-caption {
  position: absolute;
  right: 18px;
  bottom: 16px;
  left: 18px;
  z-index: 1;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.38);
}

.home-events-card.is-featured .home-events-card-caption {
  right: 24px;
  bottom: 22px;
  left: 24px;
  font-size: 21px;
}

.home-events-lightbox[hidden] {
  display: none !important;
}

.home-events-lightbox {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  padding: 28px;
  place-items: center;
  background: rgba(4, 14, 24, 0.9);
  backdrop-filter: blur(8px);
}

.home-events-lightbox-panel {
  position: relative;
  display: grid;
  width: min(100%, 1180px);
  height: min(88vh, 820px);
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  align-items: center;
}

.home-events-lightbox figure {
  display: grid;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  place-items: center;
}

.home-events-lightbox figure img {
  display: block;
  max-width: 100%;
  max-height: calc(min(88vh, 820px) - 58px);
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.home-events-lightbox figcaption {
  margin-top: 14px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}

.home-events-lightbox-close,
.home-events-lightbox-nav {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 34px;
  line-height: 1;
}

.home-events-lightbox-close:hover,
.home-events-lightbox-nav:hover,
.home-events-lightbox-close:focus-visible,
.home-events-lightbox-nav:focus-visible {
  background: rgba(255, 255, 255, 0.24);
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.home-events-lightbox-close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  font-size: 28px;
}

.home-events-lightbox-nav.is-previous {
  justify-self: start;
}

.home-events-lightbox-nav.is-next {
  justify-self: end;
}

body.home-events-open {
  overflow: hidden !important;
}

@media (max-width: 991px) {
  .home-events-section {
    padding: 78px 22px 84px;
  }

  .home-events-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 220px;
  }

  .home-events-card.is-featured {
    grid-row: span 2;
  }

  .home-events-card:nth-child(6),
  .home-events-card:nth-child(7) {
    grid-column: span 1;
  }
}

@media (max-width: 767px) {
  .home-events-section {
    padding: 64px 0 70px;
  }

  .home-events-heading {
    margin-bottom: 26px;
    padding: 0 20px;
  }

  .home-events-heading h2 {
    font-size: clamp(32px, 9vw, 42px);
  }

  .home-events-heading > p:not(.home-events-mobile-hint) {
    font-size: 15px;
  }

  .home-events-mobile-hint {
    display: block;
    margin: 14px 0 0;
    color: #2f73b8;
    font-size: 13px;
    font-weight: 700;
  }

  .home-events-grid {
    display: flex;
    padding: 0 20px 16px;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .home-events-grid::-webkit-scrollbar {
    display: none;
  }

  .home-events-carousel-controls {
    display: flex;
    margin-top: 12px;
    padding: 0 20px;
    align-items: center;
    justify-content: center;
    gap: 14px;
  }

  .home-events-carousel-controls button {
    display: grid;
    width: 46px;
    height: 46px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(47, 115, 184, 0.42);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 7px 18px rgba(25, 62, 96, 0.13);
    color: #2f73b8;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-size: 23px;
    font-weight: 700;
    line-height: 1;
    touch-action: manipulation;
  }

  .home-events-carousel-controls button:hover,
  .home-events-carousel-controls button:focus-visible {
    border-color: #2f73b8;
    background: #2f73b8;
    color: #fff;
    outline: none;
  }

  .home-events-carousel-controls button:active {
    transform: translateY(1px);
  }

  .home-events-carousel-progress {
    min-width: 52px;
    color: #536b80;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
  }

  .home-events-card,
  .home-events-card.is-featured,
  .home-events-card:nth-child(6),
  .home-events-card:nth-child(7) {
    width: min(82vw, 430px);
    height: auto;
    aspect-ratio: 4 / 3;
    flex: 0 0 min(82vw, 430px);
    scroll-snap-align: center;
  }

  .home-events-card.is-featured .home-events-card-caption,
  .home-events-card-caption {
    right: 16px;
    bottom: 14px;
    left: 16px;
    font-size: 16px;
  }

  .home-events-lightbox {
    padding: 16px;
  }

  .home-events-lightbox-panel {
    width: 100%;
    height: 90vh;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 50px;
    gap: 10px;
  }

  .home-events-lightbox figure {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .home-events-lightbox figure img {
    max-height: calc(90vh - 76px);
  }

  .home-events-lightbox-nav {
    grid-row: 2;
  }

  .home-events-lightbox-nav.is-previous {
    justify-self: end;
  }

  .home-events-lightbox-nav.is-next {
    justify-self: start;
  }
}

/* Certificate course fragments: one consistent card-by-card carousel. */
.course-carousel {
  position: relative;
  display: grid;
  grid-template-areas:
    "viewport viewport viewport viewport"
    ". previous next .";
  grid-template-columns: 1fr auto auto 1fr;
  column-gap: 12px;
  row-gap: 14px;
  width: min(100%, 1240px) !important;
  height: auto !important;
  margin: 0 auto !important;
  padding: 8px 24px 22px;
  overflow: hidden !important;
  background: transparent;
}

.course-carousel-viewport {
  grid-area: viewport;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.course-carousel-viewport::-webkit-scrollbar {
  display: none;
}

.course-carousel-content,
.course-carousel-content > .w-dyn-list {
  width: 100%;
}

.course-carousel .collection-list-6 {
  display: flex !important;
  width: auto !important;
  margin: 0 !important;
  padding: 8px 4px 16px !important;
  gap: 18px !important;
}

.course-carousel .collection-item-6 {
  width: auto !important;
  height: 270px;
  margin: 0 !important;
  flex: 0 0 calc((100% - 54px) / 4) !important;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.course-carousel-button {
  position: static;
  z-index: 3;
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(38, 70, 99, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #263e54;
  font: 400 32px/1 Arial, sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(18, 45, 69, 0.16);
}

.course-carousel-button:hover,
.course-carousel-button:focus-visible {
  background: #f1f6fa;
  outline: none;
}

.course-carousel-button:disabled {
  opacity: 0.28;
  cursor: default;
}

.course-carousel-prev {
  grid-area: previous;
  justify-self: end;
}

.course-carousel-next {
  grid-area: next;
  justify-self: start;
}

@media (max-width: 991px) {
  .course-carousel .collection-item-6 {
    flex-basis: calc((100% - 18px) / 2) !important;
  }
}

@media (max-width: 767px) {
  .course-carousel {
    padding: 8px 18px 20px;
  }

  .course-carousel-viewport {
    scroll-padding-left: 0;
  }

  .course-carousel .collection-list-6 {
    width: max-content !important;
    padding-right: 18px !important;
    gap: 16px !important;
  }

  .course-carousel .collection-item-6 {
    width: min(78vw, 280px) !important;
    flex: 0 0 min(78vw, 280px) !important;
  }

  .course-carousel-button {
    display: grid;
    width: 40px;
    height: 40px;
  }
}
