@charset "utf-8";

@import url("../app/fontawesome/css/all.min.css");

:root {
  --color-primary: #103c78;
  --color-primary-bright: #0a74d2;
  --color-junior: #70142b;
  --color-gold: #e1ca78;
  --color-note-yellow: #fff9d6;
  --color-note-yellow-edge: #d7ad1d;
  --color-surface: #fff;
  --color-surface-muted: #f2f2f2;
  /*--color-surface-subtle: #f6f9fd;*/
  --color-surface-subtle: #f1f6fc;
  --color-junior-pale: #fef2f2;
  --color-text: #1a1a1a;
  --color-body: #404040;
  --color-muted: #626262;
  --color-pale: #f1f7fe;
  --color-divider: rgba(0, 0, 0, 0.15);
  --font-serif: "Shippori Mincho", "Yu Mincho", serif;
  --font-sans: "Noto Sans JP", "Yu Gothic", sans-serif;
  --font-latin: "Montserrat", "Arial", sans-serif;
  --font-round: "Zen Maru Gothic", "Yu Gothic", sans-serif;
  --font-size-base: 1rem;
  --transition: 0.2s ease;
  --container: 67.5rem;
  --container-reading: 50rem;
  --radius-card: 1.5rem;
  --shadow-card-soft: 0 1rem 3rem rgba(16, 60, 120, 0.1);
  --z-header: 50;
  --z-drawer: 100;
  --z-fixed-actions: 110;
  --header-side-padding: max(4rem, calc((100vw - 90rem) / 2 + 4rem));
  --header-brand-padding-left: max(6.6875rem, calc((100vw - 90rem) / 2 + 6.6875rem));
  --fixed-actions-size: 6rem;
  --fixed-actions-gap: 0.5rem;
  --fixed-actions-font-size: 0.9rem;
}

html {
  overflow-x: hidden;
  scrollbar-width: none;
  font-size: 16px;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  overflow-x: hidden;
  color: var(--color-body);
  background: #fff;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

html.is-menu-open,
body.is-menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.sp-only {
  display: none;
}

.pc-only {
  display: inline;
}

a,
button {
  transition:
    color var(--transition),
    background-color var(--transition),
    border-color var(--transition),
    opacity var(--transition),
    filter var(--transition);
}

a:hover,
button:hover {
  opacity: 0.72;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 0.125rem solid var(--color-primary-bright);
  outline-offset: 0.25rem;
}

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1000;
  padding: 0.75rem 1rem;
  color: #fff;
  background: var(--color-primary);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.breadcrumb {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: min(var(--container), calc(100% - 3rem));
  margin-inline: auto;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.8rem;
}

.breadcrumb li:not(:last-child)::after {
  margin-left: 0.5rem;
  content: "›";
}

.page-index-hero {
  position: relative;
  height: 500px;
  overflow: hidden;
  background: #fff;
  padding-top: 120px;
}

.page-index-hero::after {
  position: absolute;
  /*top: 350px;*/
  bottom: 0;
  left: 0;
  z-index: 2;
  /*
  width: 1920px;
  height: 200px;
  */
  width: 100vw;
  max-height: 140px;
  aspect-ratio: 1920 / 140;
  background: url("../images/page-index-hero-arch.svg") center top / 100% 100% no-repeat;
  content: "";
  transform: none;
}

.page-index-hero .breadcrumb {
  color: var(--color-primary);
}

.page-index-hero__inner {
  position: absolute;
  top: 0;
  left: 50%;
  display: grid;
  grid-template-columns: repeat(2, 50vw);
  width: 100%;
  height: 500px;
  transform: translateX(-50%);
}

.page-index-hero__title {
  position: relative;
  z-index: 1;
  padding: 13rem clamp(2rem, 4vw, 5rem) 0 max(3rem, calc(50vw - 432px));
  color: var(--color-primary);
  background: #fff url("../images/sub/about/content-title-l.png") center / 100% 688px no-repeat;
}

.page-index-hero__title h1 {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 500;
  line-height: 60px;
}

.page-index-hero__title p {
  margin-top: 16px;
  font-family: var(--font-latin);
  font-size: 24px;
  line-height: 24px;
}

.page-index-hero__image {
  width: 50vw;
  height: 500px;
  object-fit: cover;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-header);
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  width: 100%;
  height: 6.5rem;
  /*background: #fff;*/
  transition: background-color 0.35s ease;
}

.site-brand {
  display: flex;
  flex: 1 1 50%;
  min-width: 0;
  align-items: flex-end;
  gap: 0.75rem;
  height: 6.5rem;
  margin-left: 0;
  padding: 1.25rem 0 1.25rem var(--header-brand-padding-left);
  /*background: #fff;*/
}

.site-brand__crest {
  width: 5.5rem;
  height: 4rem;
}

.site-brand__title-image {
  width: 15.25rem;
  height: 3.25rem;
  margin-bottom: 0;
}

.site-header__right {
  display: flex;
  flex: 1 1 calc(50% + 1px);
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 1.125rem;
  padding: 0.5rem var(--header-side-padding) 0.5rem 2rem;
  position: relative;
}

.site-header__right::before {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  content: "";
  display: block;
}


.utility-nav {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  min-height: 1.75rem;
  position: relative;
  z-index: 1;
}

.utility-nav > ul {
  display: flex;
  align-items: center;
}

.utility-nav > ul > li {
  border-right: 0.0625rem solid var(--color-divider);
}

.utility-nav > a:not(.utility-nav__social),
.utility-nav > ul > li > a {  
  height: 1rem;
  padding: 0 clamp(0.25rem, 1.25vw, 1.25rem);
  color: var(--color-primary);
  font-size: 0.95rem;
  line-height: 1rem;
  white-space: nowrap;
}

.utility-nav > ul > li.utility-nav__social {
  margin-left: clamp(0.5rem, 1.5vw, 1.5rem);
  opacity: 0.5;
  border-right: none;
}

.utility-nav__social img {
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
}

.utility-nav > ul > li.utility-nav__social > a {
  padding: 0;
}

.global-nav {
  display: flex;
  align-items: flex-start;
  gap: 0 2.5vw;
  width: 100%;
  min-height: 2.375rem;
  position: relative;
  z-index: 1;
}

.global-nav__list {
  display: flex;
  align-items: flex-start;
  gap: 0 2.5vw;
  width: 100%;
}

.global-nav__item {
  position: relative;
  min-width: 0;
}

.global-nav > a,
.global-nav__item > a {
  position: relative;
  display: block;
  padding: 0 1rem 1.25rem 1rem;
  font-family: var(--font-serif);
  color: var(--color-text);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  transition: .3s all ease;
}

.global-nav > a:hover,
.global-nav__item > a:hover{
  color: var(--color-primary-bright);
  opacity: 1;
}

.global-nav > a::after,
.global-nav__item > a::after {
  position: absolute;
  bottom: 0;
  left: calc(50% - 0.5rem);
  width: 1rem;
  height: 1rem;
  background: url("../images/arr-down-gray.png") center / 1rem 1rem no-repeat;
  content: "";
}

.global-nav > a::before,
.global-nav__item > a::before {
  position: absolute;
  right: 0;
  bottom: -0.5rem;
  left: 0;
  height: 0.25rem;
  background: transparent;
  content: "";
}

.global-nav > a[aria-current="page"],
.global-nav > a.is-current-section,
.global-nav__item > a[aria-current="page"],
.global-nav__item > a.is-current-section,
.global-nav__item.is-current-section > a {
  color: var(--color-junior);
}

.global-nav > a[aria-current="page"]::before,
.global-nav > a.is-current-section::before,
.global-nav__item > a[aria-current="page"]::before,
.global-nav__item > a.is-current-section::before,
.global-nav__item.is-current-section > a::before {
  background: var(--color-junior);
}

.global-nav > a[aria-current="page"]::after,
.global-nav > a.is-current-section::after,
.global-nav__item > a[aria-current="page"]::after,
.global-nav__item > a.is-current-section::after,
.global-nav__item.is-current-section > a::after {
  background-image: url("../images/arr-down-red.png");
}

.global-nav__submenu {
  position: absolute;
  top: 100%;
  left: 50%;
  z-index: 1;
  display: grid;
  width: 14rem;
  padding: 1.0625rem 0.75rem 0.75rem;
  border-bottom: 0.1875rem solid var(--color-primary);
  background: #fff;
  box-shadow: 0 1rem 2rem rgba(16, 60, 120, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  transition:
    opacity var(--transition),
    visibility var(--transition);
  visibility: hidden;
}

.global-nav__item:first-child .global-nav__submenu {
  left: 0;
  transform: none;
}

.global-nav__item:last-child .global-nav__submenu {
  right: 0;
  left: auto;
  transform: none;
}

.global-nav__item:hover .global-nav__submenu,
.global-nav__item:focus-within .global-nav__submenu,
.global-nav__item.is-submenu-open .global-nav__submenu {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.global-nav__item.is-submenu-escape-closed .global-nav__submenu {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.global-nav__submenu > li {
  border-bottom: 0.0625rem solid var(--color-divider);
}

.global-nav__submenu > li:last-child {
  border-bottom: none;
}

.global-nav__submenu a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.625rem 0.75rem;
  color: var(--color-body);
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
}

.global-nav__submenu a:hover,
.global-nav__submenu a:focus-visible {
  color: var(--color-primary);
  background: var(--color-pale);
}

.global-nav__submenu a[href="#"] {
  pointer-events: none;
  padding-bottom: 0.5rem;
}

.global-nav__child-submenu{
  padding-left: 0.5rem;
}

  .global-nav__child-submenu a{
    position: relative;
    padding: 0.5rem 0.5rem 0.5rem 1.25rem;
    min-height: 2rem;
  }

  .global-nav__child-submenu a::before{
    display: inline-block;
    content: "";
    width: 0.625rem;
    aspect-ratio: 1 / 1;
    background-image: url("../images/arr-right-black-02.png");
    background-size: contain;
    position: absolute;
    top: 0.95rem;
    left: 0.25rem;
  }



.menu-toggle {
  display: none;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
  background: rgba(16, 60, 120, 0.55);
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu__panel {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(88vw, 25rem);
  padding: 5.5rem 2rem 2rem;
  color: #fff;
  background: var(--color-primary);
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
}

.mobile-menu nav a {
  padding: 1rem 0;
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.3);
  font-family: var(--font-serif);
  font-size: 1.15rem;
}

.mobile-menu a[href="#"] {
  pointer-events: none;
}

.link-list a {
  position: relative;
  display: block;
  padding: 2rem 2.5rem 2rem 0.5rem;
  border-bottom: 0.0625rem solid var(--color-divider);
  color: var(--color-body);
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
}

.link-list a[href="#"] {
  pointer-events: none;
  cursor: pointer;
}

.link-list a::after {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  width: 1rem;
  height: 1rem;
  background: url("../images/arr-right-black-02.png") center / contain no-repeat;
  content: "";
  transform: translateY(-50%);
}

.link-list > li{
  position: relative;
}

.sub-link-list{
  position: absolute;
  top: 0;
  right: -12rem;
  background: #fff;
  opacity: 0;
}

.link-list > li:hover .sub-link-list{
  opacity: 1;
}

.link-list .sub-link-list a{
  width: 12rem;
  font-size: 1.1rem;
  padding: 1rem;
}


.page-directory {
  position: relative;
  z-index: 3;
  width: min(calc(100% - 64px), 1280px);
  padding: 0.5rem 0 3rem;
  margin: 0 auto;
}

.page-directory__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 64px clamp(24px, 2.5vw, 48px);
}

.page-directory__group {
  display: flex;
  flex: 1 1 calc((100% - 144px) / 4);
  min-width: 0;
  flex-direction: column;
}

.page-directory__image-link {
  display: block;
  width: 100%;
  height: auto;
  flex: 0 0 auto;
  overflow: hidden;
  opacity: 1;
}

.page-directory__heading,
.page-directory__image {
  margin: 0;
}

.page-directory__image-link:hover {
  opacity: 1;
}

.page-directory__image-link > img {
  width: 100%;
  height: 9.25rem;
  /*height: 100%;*/
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.page-directory__group:hover .page-directory__image-link > img {
  transform: scale(1.035);
}

.page-directory__links {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}

.page-directory__title {
  display: flex;
  min-height: 4rem;
  align-items: center;
  justify-content: space-between;
  color: var(--color-primary);
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.3;
}


.page-directory__title::before {
  display: block;
  flex: 0 0 auto;
  order: 1;
  width: 1.75rem;
  height: 1.75rem;
  margin-left: auto;
  border-radius: 50%;
  content: "";
  background: var(--color-primary) url("../images/arr-right-white.png") center / 1rem auto no-repeat;
  transition: background-color var(--transition);
}

.page-directory__title:hover {
  color: var(--color-junior);
  opacity: 1;
}

.page-directory__title:hover::before {
  background-color: var(--color-junior);
}

.page-directory__title[href="#"] {
  pointer-events: none;
}

.page-directory__title[href="#"]::before {
  display: none;
}

.page-directory__links a {
  position: relative;
  display: flex;
  min-height: 4.25rem;
  align-items: center;
  padding: 1.25rem 2rem 1.25rem 0.5rem;
  border-bottom: 0.0625rem solid var(--color-divider);
  color: var(--color-body);
  font-size: clamp(0.9375rem, calc(0.5rem + 0.625vw), 1.25rem);
  line-height: 1.4;
}

.page-directory__links a:hover {
  color: var(--color-junior);
  opacity: 1;
}

.page-directory__links a::after {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  content: "";
  transform: translateY(-50%);
  background-image: url("../images/arr-right-black-01.png");
  width: 1rem;
  height: 1rem;
  background-position: center;
  background-size: 1rem auto;
  background-repeat: no-repeat;
  transition: transform var(--transition);
}

.page-directory__links a:hover::after {
  transform: translate(0.25rem, -50%);
}

.site-footer {
  position: relative;
  width: 100%;
  margin-inline: auto;
  content-visibility: auto;
  contain-intrinsic-size: auto 64.5rem;
}

.footer-audience-links {
  display: grid;
  grid-template-columns: repeat(4, 15rem);
  gap: 1rem;
  width: min(80rem, 100%);
  height: 14rem;
  padding: 3rem 8.5rem 1rem;
  margin: 0 auto 0.5rem;
  border-top: 0.0625rem solid rgba(0, 0, 0, 0.12);
}

.footer-audience-links li {
  min-width: 0;
}

.footer-audience-links a {
  position: relative;
  display: grid;
  place-items: center;
  height: 4.5rem;
  padding: 0.5rem;
  border: 1px solid var(--color-primary);
  border-radius: 0.5rem;
  color: var(--color-primary);
  background: #fff;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
}

.footer-audience-links a:hover {
  border-color: var(--color-junior);
  color: var(--color-junior);
  opacity: 1;
}

.footer-audience-links a[target="_blank"]::after {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 0.75rem;
  height: 0.75rem;
  background: url("../images/icon-link.png") center / contain no-repeat;
  content: "";
}

.footer-main {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 43rem;
  padding-top: 2.5rem;
  background:
    linear-gradient(to bottom, #fff 0%, rgba(255, 255, 255, 0.9) 24%, rgba(255, 255, 255, 0.15) 100%),
    url("../images/bg-footer-opt.webp") center bottom / 120rem 43rem no-repeat;
}

.footer-school {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-text);
}

.footer-school p {
  font-size: 0.95rem;
  line-height: 1;
}

.footer-nav {
  display: flex;
  margin-top: 2.5rem;
}

.footer-nav > ul {
  display: flex;
}

.footer-nav a {
  padding: 0 1.25rem;
  border-right: 0.0625rem solid var(--color-divider);
  color: var(--color-primary);
  font-weight: 700;
  line-height: 1;
}

.footer-nav a:last-child,
.footer-nav li:last-child a {
  border-right: none;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
  color: var(--color-text);
  font-size: 1.15rem;
  font-weight: 500;
}

.footer-social__label {
  color: var(--color-text);
}

.footer-social__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-social__corporate {
  margin-left: 2rem;
}

.footer-bottom {
  position: relative;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 7rem;
  padding: 2rem max(2rem, calc((100% - 67.5rem) / 2));
  color: #fff;
  background: var(--color-primary);
}

.bottom__links {
  display: flex;
  gap: 2.5rem;
}

.footer-bottom p {
  font-family: var(--font-latin);
  font-size: 0.95rem;
  font-weight: 500;
}

.fixed-actions {
  position: fixed;
  top: 21rem;
  right: 0;
  z-index: var(--z-fixed-actions);
  display: flex;
  flex-direction: column;
  width: var(--fixed-actions-size);
  transition: opacity 0.45s ease, visibility 0s linear;
}

.fixed-actions.is-scrolling {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.fixed-actions > ul {
  display: flex;
  flex-direction: column;
}

.fixed-actions > a,
.fixed-actions > button,
.fixed-actions > ul > li > a,
.fixed-actions > ul > li > button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--fixed-actions-gap);
  width: var(--fixed-actions-size);
  height: var(--fixed-actions-size);
  color: var(--color-text);
  background: #fff;
  font-size: var(--fixed-actions-font-size);
  cursor: pointer;
}

.fixed-actions > a:hover,
.fixed-actions > button:hover,
.fixed-actions > a:focus-visible,
.fixed-actions > button:focus-visible,
.fixed-actions > ul > li > a:hover,
.fixed-actions > ul > li > button:hover,
.fixed-actions > ul > li > a:focus-visible,
.fixed-actions > ul > li > button:focus-visible {
  opacity: 1;
  filter: brightness(1.12);
}

.fixed-actions__access {
  background: var(--color-gold) !important; /* デザイン上の固定色 */
}

.fixed-actions > .fixed-actions__request,
.fixed-actions > ul > li > .fixed-actions__request {
  background: var(--color-surface-muted);
}

.fixed-actions__reserve {
  color: #fff !important;
  background: #404040 !important; /* デザイン上の固定色 */
}

.fixed-actions__menu {
  color: #fff !important;
  background: var(--color-primary) !important; /* デザイン上の固定色 */
}

.fixed-actions__menu[aria-expanded="true"] .fixed-actions__menu-icon,
.fixed-actions__menu[aria-expanded="true"] > span:first-child {
  height: 1.25rem;
  border-color: transparent;
}

.fixed-actions__menu[aria-expanded="true"] {
  color: var(--color-primary) !important;
  background: var(--color-surface) !important;
}

.fixed-actions__menu[aria-expanded="true"] .fixed-actions__menu-icon::before,
.fixed-actions__menu[aria-expanded="true"] .fixed-actions__menu-icon::after,
.fixed-actions__menu[aria-expanded="true"] > span:first-child::before,
.fixed-actions__menu[aria-expanded="true"] > span:first-child::after {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  border-top: 0.125rem solid currentColor;
  content: "";
}

.fixed-actions__menu[aria-expanded="true"] .fixed-actions__menu-icon::before,
.fixed-actions__menu[aria-expanded="true"] > span:first-child::before {
  opacity: 1;
  transform: rotate(45deg);
}

.fixed-actions__menu[aria-expanded="true"] .fixed-actions__menu-icon::after,
.fixed-actions__menu[aria-expanded="true"] > span:first-child::after {
  transform: rotate(-45deg);
}

.fixed-actions__menu-icon,
.fixed-actions__menu > span:first-child {
  position: relative;
  width: 1.5rem;
  height: 1.25rem;
  border-top: 0.125rem solid currentColor;
  border-bottom: 0.125rem solid currentColor;
  transition: border-color 0.3s ease;
}

.fixed-actions__menu-icon::before,
.fixed-actions__menu > span:first-child::before,
.fixed-actions__menu-icon::after,
.fixed-actions__menu > span:first-child::after {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  border-top: 0.125rem solid currentColor;
  content: "";
  transform: translateY(-50%);
  transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.fixed-actions__menu-icon::before,
.fixed-actions__menu > span:first-child::before {
  opacity: 0;
}

.fixed-actions__menu-icon::after,
.fixed-actions__menu > span:first-child::after {
  left: 0.4375rem;
  width: 0.625rem;
}

.fixed-actions__menu-label,
.fixed-actions__menu > span:last-child {
  display: block;
  line-height: 1;
}


.lower-page .site-header {
  background: transparent;
  transition: background-color 0.35s ease;
}

.lower-page .site-brand {
  background: transparent;
}

.lower-page .site-brand__crest,
.lower-page .site-brand__title-image {
  filter: brightness(0) invert(1);
  transition: filter 0.35s ease;
}

.site-header.is-scrolled {
  background: #fff;
}

.lower-page .site-header.is-scrolled .site-brand__crest,
.lower-page .site-header.is-scrolled .site-brand__title-image {
  filter: none;
}

/* Pages with the illustrated page-index hero keep the original brand colors. */
.content-page--about .site-brand__crest,
.content-page--about .site-brand__title-image,
.content-page--school-life .site-brand__crest,
.content-page--school-life .site-brand__title-image,
.content-page--admissions .site-brand__crest,
.content-page--admissions .site-brand__title-image,
.content-page--contact .site-brand__crest,
.content-page--contact .site-brand__title-image {
  filter: none;
}





@media (min-width: 48.001rem) and (max-width: 100rem) {
  :root {
    --header-side-padding: calc(max(0px, (100vw - 90rem) / 2) + clamp(1.125rem, 3.3vw, 4rem));
    --header-brand-padding-left: calc(max(0px, (100vw - 90rem) / 2) + clamp(1.5rem, 5.5vw, 6.6875rem));
  }
}

@media (max-width: 75rem) {
  .page-directory__title {
    font-size: clamp(1.2rem, 1.75vw, 1.3rem);
  }
}

@media (max-width: 64rem) {
  .breadcrumb {
    width: calc(100% - 4rem);
    gap: 0.375rem;
    font-size: 0.75rem;
  }

  .breadcrumb li:not(:last-child)::after {
    margin-left: 0.375rem;
  }

  .page-index-hero {
    height: 216px;
    padding-top: 76px;
  }

  .page-index-hero__inner {
    grid-template-columns: repeat(2, 50vw);
    width: 100%;
    height: 216px;
  }

  .page-index-hero__title {
    padding: 6rem 1rem 0 1.5rem;
    background-size: auto 216px;
  }

  .page-index-hero__title h1 {
    font-size: 1.5rem;
    line-height: 1.5;
  }

  .page-index-hero__title p {
    margin-top: 0.25rem;
    font-size: 0.625rem;
    line-height: 1.4;
  }

  .page-index-hero__image {
    width: 50vw;
    height: 164px;
    margin-top: 52px;
  }

  .site-header {
    position: fixed;
    left: 0;
    display: flex;
    width: 100%;
    height: 3.75rem;
    transform: none;
  }

  .site-brand {
    align-items: center;
    gap: 0.375rem;
    width: 70%;
    height: 3.75rem;
    padding: 0.375rem 0.375rem 0.375rem 0.625rem;
    margin-left: 0;
  }

  .site-brand__crest {
    width: 2.75rem;
    height: auto;
  }

  .site-brand__title-image {
    width: min(10.875rem, calc(100vw - 7.75rem));
    height: auto;
  }

  .site-header__right {
    display: none;
  }

  .menu-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4375rem;
    width: 3.25rem;
    height: 3.25rem;
    margin-left: auto;
    color: #fff;
    background: var(--color-primary);
  }

  .menu-toggle__lines {
    position: relative;
    width: 1.25rem;
    height: 0.875rem;
    border-top: 0.0625rem solid currentColor;
    border-bottom: 0.0625rem solid currentColor;
    transition: border-color 0.25s ease;
  }

  .menu-toggle__lines::before,
  .menu-toggle__lines::after {
    position: absolute;
    top: 0.375rem;
    left: 0.3125rem;
    width: 0.625rem;
    border-top: 0.0625rem solid currentColor;
    content: "";
    transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .menu-toggle__lines::before {
    opacity: 0;
  }

  .menu-toggle[aria-expanded="true"] .menu-toggle__lines {
    border-color: transparent;
  }

  .menu-toggle[aria-expanded="true"] .menu-toggle__lines::before {
    left: 0;
    width: 1.25rem;
    opacity: 1;
    transform: rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] .menu-toggle__lines::after {
    left: 0;
    width: 1.25rem;
    transform: rotate(-45deg);
  }

  .menu-toggle__label {
    font-family: var(--font-latin);
    font-size: 0.65rem;
  }

  .fixed-actions {
    display: none;
  }

  .footer-audience-links {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    width: 100%;
    height: 13.25rem;
    padding: 2.5rem 2rem 1rem;
  }

  .footer-audience-links a {
    min-width: 0;
    font-size: 0.875rem;
  }

  .page-directory {
    width: calc(100% - 3rem);
    height: auto;
    padding: 2.25rem 0 3.25rem;
    margin: 0 auto;
  }

  .page-directory__grid {
    gap: 32px 12px;
  }

  .page-directory__group {
    flex-basis: calc((100% - 12px) / 2);
  }
 
  .page-directory__title {
    font-size: 1.16rem;
    font-weight: 700;
    min-height: 3rem;
  }

  .page-directory__title::before {
    width: 1.25rem;
    height: 1.25rem;
    background-size: 0.625rem auto;
  }

  .page-directory__image-link > img{
    height: 6rem;
  }

  .page-directory__links {
    margin-top: 10px;
  }

  .page-directory__links a {
    min-height: auto;
    min-height: initial;
    padding: 0.625rem 1.25rem 0.625rem 0.25rem;
    font-size: 1.05rem;
    line-height: 1.25rem;
  }

  .page-directory__links a::after {
    right: 0.25rem;
    width: 0.75rem;
    height: 0.75rem;
    background-size: 0.75rem auto;
  }
}

@media (min-width: 48.001rem) and (max-width: 64rem) {
  .footer-bottom {
    flex-direction: column;
    justify-content: center;
    gap: 1.25rem;
    min-height: 8rem;
    padding-block: 1.5rem;
    text-align: center;
  }

  .page-index-hero {
    height: 400px;
    padding-top: 76px;
  }

  .page-index-hero .breadcrumb {
    font-size: 0.75rem;
  }

  .page-index-hero__inner {
    height: 400px;
  }

  .page-index-hero__title {
    padding: 148px 24px 0 clamp(3rem, 7vw, 5rem);
    background-size: auto 400px;
  }

  .page-index-hero__title h1 {
    font-size: 2.25rem;
    line-height: 1.4;
  }

  .page-index-hero__title p {
    margin-top: 0.625rem;
    font-size: 1rem;
    line-height: 1.4;
  }

  .page-index-hero__image {
    height: 348px;
  }

  .page-directory {
    width: calc(100% - 64px);
    padding: 48px 0 72px;
  }

  .page-directory__grid {
    gap: 48px 32px;
  }

  .page-directory__group {
    flex-basis: calc((100% - 32px) / 2);
  }

  .page-directory__links a {
    min-height: 3.25rem;
    padding-block: 0.875rem;
    font-size: 0.9375rem;
  }
}

@media (min-width: 48.001rem) and (max-width: 94rem) {
  .page-directory {
    width: calc(100% - 10rem);
  }
}

@media (min-width: 64.001rem) and (max-width: 94rem) {
  .page-directory__group {
    flex-basis: calc((100% - 144px) / 4);
  }
}

@media (max-width: 48rem) {
  html{
    font-size: 3.6vw;
  }

  .mobile-menu--mega::before {
    background: linear-gradient(
      to bottom,
      rgb(16, 60, 120) 0%,
      rgb(16, 60, 120) 48%,
      rgba(16, 60, 120, 0.55) 100%
    );
  }

  .mobile-menu--mega::after {
    position: fixed;
    top: 0;
    right: 0;
    bottom: auto;
    left: 0;
    height: 100vh;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, transparent 48%, #000 86%, #000 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, transparent 48%, #000 86%, #000 100%);
  }

  .breadcrumb {
    width: calc(100% - 2.5rem);
    font-size: 0.625rem;
  }

  .page-index-hero {
    padding-top: 4rem;
    height: 14rem;
    overflow: initial;
  }

  .page-index-hero::after{
    left: 0;
    bottom: -2px;
    width: 100vw;
    max-width: none;
    transform: none;
  }

  .page-index-hero__inner{
    height: 14rem;
    overflow: hidden;
  }

  .page-index-hero__title{
    background-size: auto 14rem;
    padding: 7rem 0 0 2.5rem;
  }

  .page-directory{
    padding-top: 1rem;
  }

  .sp-only {
    display: inline;
  }

  .pc-only {
    display: none;
  }

  .site-header {
    position: fixed;
    left: 0;
    display: flex;
    width: 100%;
    height: 4rem;
    transform: none;
  }

  .site-brand {
    align-items: center;
    gap: 0.375rem;
    width: 70%;
    height: 3.75rem;
    padding: 0.75rem 0.375rem 0.375rem 0.625rem;
    margin-left: 0;
  }

  .site-brand__crest {
    width: 2.75rem;
    height: auto;
  }

  .site-brand__title-image {
    width: min(10.875rem, calc(100vw - 7.75rem));
    height: auto;
    margin-top: 0.25rem;
  }

  .site-header__right {
    display: none;
  }

  .menu-toggle {
    margin-top: 0.5rem;
    margin-right: 0.5rem;
    padding-top: 0.5rem;
    gap: 0.25rem;
  }

  .menu-toggle__lines {
    position: relative;
    width: 1.25rem;
    height: 1rem;
    border-top: 0.0625rem solid currentColor;
    border-bottom: 0.0625rem solid currentColor;
  }

  .menu-toggle__lines::after {
    position: absolute;
    top: 0.375rem;
    left: 0.3125rem;
    width: 0.625rem;sakini
    border-top: 0.0625rem solid currentColor;
    content: "";
  }

  .menu-toggle__label {
    font-family: var(--font-latin);
    font-size: 0.65rem;
  }

  .fixed-actions {
    display: none;
  }

  .site-footer {
    width: 100%;
    contain-intrinsic-size: auto 45.5rem;
  }

  .footer-audience-links {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    width: calc(100% - 1.6875rem);
    height: 13rem;
    padding: 1.75rem 0 0.5rem;
    margin-bottom: 0;
    margin-inline: auto;
  }

  .footer-audience-links a {
    height: 3.25rem;
    font-size: 0.85rem;
  }

  .footer-main {
    min-height: auto;
    min-height: initial;
    padding: 1.5rem 0.875rem 7rem;
    background:
      linear-gradient(to bottom, #fff 0%, rgba(255, 255, 255, 0.9) 30%, rgba(255, 255, 255, 0.15) 100%),
      url("../images/bg-footer-opt.webp") center bottom / auto 16.125rem no-repeat;
  }

  .footer-school {
    gap: 0.5rem;
    text-align: center;
  }

  .footer-school > img:first-child {
    width: 4.125rem;
    height: 3rem;
  }

  .footer-school > img:nth-child(2) {
    width: 11.25rem;
    height: 2.375rem;
  }

  .footer-school p {
    line-height: 1.4;
  }

  .footer-nav {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 1.125rem;
    margin-top: 2rem;
  }

  .footer-nav > ul {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 1.125rem;
  }

  .footer-nav a {
    padding: 0 0.9375rem;
    font-size: 0.85rem;
  }

  .footer-social {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    font-size: 0.875rem;
  }

  .footer-social__corporate {
    margin-left: 0.75rem;
  }

  .footer-bottom {
    left: 0;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    min-height: auto;
    min-height: initial;
    padding: 1.25rem 1.875rem;
    transform: none;
  }

  .bottom__links {
    gap: 1.1rem;
    font-size: 0.7125rem;
  }

  .footer-bottom p {
    font-size: 0.7125rem;
  }

  .page-index-hero__image{
    margin-top: 4rem;
    height: 12rem;
    object-position: top -5vw right -5vw;
  }


}

/* Shared mega menu */
.mobile-menu--mega {
  position: fixed;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: transparent;
  animation: mega-menu-backdrop-in 0.4s ease both;
}

.mobile-menu--mega::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgb(16, 60, 120) 0%,
    rgb(16, 60, 120) 55%,
    rgba(16, 60, 120, 0.72) 100%
  );
  content: "";
  opacity: 0.95;
  pointer-events: none;
}

.mobile-menu--mega::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  top: 66.6667%;
  z-index: 0;
  background: url("../images/bg-mega-menu.png") repeat;
  content: "";
  opacity: 0.90;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 28%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 28%, #000 100%);
}

.mobile-menu--mega > * {
  position: relative;
  z-index: 2;
}

.mobile-menu--mega .mega-menu {
  position: relative;
  inset: auto;
  width: min(calc(100% - 12rem), 90rem);
  min-height: 42rem;
  padding: 0;
  margin: 1.5rem auto 0;
  color: var(--color-body);
  background: transparent;
  animation: mega-menu-panel-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.mega-menu__surface {
  padding: 2.5rem 4rem 2rem;
  background: var(--color-surface);
}

.mega-menu__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: fit-content;
  margin: 0 0 0.75rem;
}

.mega-menu__brand img {
  filter: brightness(0) invert(1);
}

.mega-menu__brand img:first-child {
  width: 5.5rem;
  height: 4rem;
}

.mega-menu__brand img:last-child {
  width: 15.25rem;
  height: 3.25rem;
}

.mobile-menu--mega .mega-menu__nav {
  display: block;
}

.mobile-menu--mega .mega-menu__brand, .mobile-menu--mega .mega-menu__nav, .mobile-menu--mega .mega-menu__footer {
  animation: mega-menu-content-in 0.55s 0.12s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.mobile-menu--mega.is-closing {
  animation: mega-menu-backdrop-out 0.4s ease both;
}

.mobile-menu--mega.is-closing .mega-menu {
  animation: mega-menu-panel-out 0.45s cubic-bezier(0.55, 0, 1, 0.45) both;
}

.mobile-menu--mega.is-closing .mega-menu__brand, .mobile-menu--mega.is-closing .mega-menu__nav, .mobile-menu--mega.is-closing .mega-menu__footer {
  animation: mega-menu-content-out 0.25s ease both;
}

.mobile-menu--mega .mega-menu__nav a {
  padding: 0;
  border-bottom: 0;
  font-family: inherit;
  font-size: inherit;
}

.mega-menu__quick-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem 2vw;
  margin-bottom: 3.5rem;
}

@media (min-width: 64.001rem) and (max-width: 80rem) {
  .mega-menu__quick-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.mobile-menu--mega .mega-menu__quick-links a {
  position: relative;
  flex: 0 0 calc(50% - 0.75rem);
  padding-left: 1.6rem;
  color: var(--color-primary);
  font-size: 1.05rem;
  font-weight: 600;
  white-space: nowrap;
}

.mega-menu__quick-links a::before {
  position: absolute;
  top: 0.18rem;
  left: 0;
  display: block;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: var(--color-primary) url("../images/arr-right-white.png") center / 0.55rem auto no-repeat;
  content: "";
}

.mega-menu__groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4rem;
}

.mega-menu__group {
  padding-bottom: 2rem;
  border-bottom: 0.0625rem solid rgba(16, 60, 120, 0.35);
}

.mega-menu__group-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.5rem;
  gap: 1rem;
  min-height: 5rem;
  padding-bottom: 1rem;
}

.mega-menu__group-header > div {
  min-width: 0;
}

.mega-menu__group-header h2 {
  color: var(--color-primary);
  font-family: var(--font-sans);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: nowrap;
}

.mega-menu__group-header h2 a {
  color: inherit;
}

.mega-menu__group-links {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.15rem 0;
  margin: 0;
  color: var(--color-primary);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.4;
}

.mega-menu__group-links li:not(:last-child)::after {
  margin-inline: 0.75rem;
  content: "｜";
}

.mega-menu__arrow {
  display: grid !important;
  width: 3.5rem;
  height: 3.5rem;
  place-items: center;
  align-self: center;
  padding: 0 !important;
  overflow: hidden;
  border: 0.0625rem solid var(--color-primary) !important;
  border-radius: 50%;
  color: transparent;
  background: url("../images/arr-right-blue.png") center / 1rem auto no-repeat;
  font-size: 0 !important;
  line-height: 0;
  transition: background-color 0.2s ease, background-image 0.2s ease, opacity 0.2s ease;
}

.mega-menu__arrow:hover,
.mega-menu__arrow:focus-visible {
  opacity: 1;
  border-color: var(--color-primary) !important;
  background-color: var(--color-primary);
  background-image: url("../images/arr-right-white.png");
}

.mega-menu__category {
  margin-top: 1rem;
}

.mobile-menu--mega .mega-menu__category h3 a {
  position: relative;
  display: block;
  padding-left: 0;
  color: var(--color-primary);
  font-family: var(--font-sans);
  font-size: 1.2rem;
  font-weight: 700;
  white-space: nowrap;
}

.mega-menu__category h3 a::before {
  position: absolute;
  top: 0.2rem;
  left: 0;
  content: "＞";
  font-size: 1rem;
  font-weight: normal;
}

.mega-menu__category-links {
  display: flex;
  flex-direction: column;
  padding-left: 0;
  margin-top: 0.85rem;
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
  line-height: 1.25;
}

.mega-menu__category-links a{
  display: block;
  padding: 0.25rem 0 !important;
}

.mega-menu__category-links li::after {
  display: none;
}

.mega-menu__resources {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  margin-top: 2rem;
  color: var(--color-primary);
  /*font-size: 0.875rem;*/
  font-weight: 600;
}

.mega-menu__resources a[target="_blank"]::after {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  margin-left: 0.45rem;
  background: url("../images/icon-link.png") center / contain no-repeat;
  content: "";
}

.mega-menu__external {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  align-items: center;
  margin-top: -1.75rem;
  font-size: 0.875rem;
}

.mega-menu__external li, .mega-menu__external a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mega-menu__external img {
  opacity: 0.6;
}

.mega-menu__utility {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 2rem;
}

.mega-menu__utility .mega-menu__resources, .mega-menu__utility .mega-menu__external {
  margin-top: 0;
}

.mega-menu__footer {
  display: flex;
  gap: 3rem;
  width: 100%;
  padding: 1.5rem 5rem;
  color: var(--color-surface);
  background: transparent;
  font-size: 0.875rem;
}

.mega-menu__footer small {
  margin-left: auto;
  font-family: var(--font-latin);
}

@keyframes mega-menu-backdrop-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }

}

@keyframes mega-menu-panel-in {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }

}

@keyframes mega-menu-content-in {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }

}

@keyframes mega-menu-backdrop-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }

}

@keyframes mega-menu-panel-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(1rem);
  }

}

@keyframes mega-menu-content-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(0.375rem);
  }

}

@media (max-width: 75rem) and (min-width: 48.001rem) {
  .mega-menu__surface {
    padding-inline: 4rem;
  }

  .mega-menu__groups {
    gap: 2rem;
  }

  .mega-menu__footer {
    padding-inline: 4rem;
  }

}

@media (min-width: 48.001rem) and (max-width: 64rem) {
  html.is-menu-open .site-header {
    z-index: calc(var(--z-drawer) + 1);
    pointer-events: none;
  }

  html.is-menu-open .site-header .site-brand {
    visibility: hidden;
  }

  html.is-menu-open .site-header .menu-toggle {
    pointer-events: auto;
  }

  .mobile-menu--mega .mega-menu {
    width: calc(100% - 4rem);
  }

  .mega-menu__surface {
    padding-inline: 2.5rem;
  }

  .mega-menu__quick-links,
  .mega-menu__groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mega-menu__footer {
    flex-wrap: wrap;
    gap: 1rem 3rem;
    padding-inline: 2.5rem;
  }

  .mega-menu__footer small {
    flex-basis: 100%;
    margin-left: 0;
    text-align: right;
  }
}

@media (max-width: 48rem) {
  html.is-menu-open .site-header {
    z-index: calc(var(--z-drawer) + 1);
    background: transparent !important;
    box-shadow: none;
    pointer-events: none;
  }

  html.is-menu-open .site-header .site-brand {
    visibility: hidden;
  }

  html.is-menu-open .site-header .menu-toggle {
    color: var(--color-primary);
    background: var(--color-surface);
    pointer-events: auto;
  }

  html.is-menu-open .site-header .menu-toggle:hover {
    opacity: 1;
  }

  .mobile-menu--mega {
    padding: 0.5rem 0 0 1.375rem;
  }

  .mobile-menu--mega .mega-menu {
    width: 100%;
    min-height: auto;
    margin: 0;
  }

  .mega-menu__surface {
    padding: 1.5rem 1.75rem 0;
  }

  .mega-menu__brand {
    gap: 0.375rem;
    margin-bottom: 0.75rem;
  }

  .mega-menu__brand img:first-child {
    width: 2.75rem;
    height: auto;
  }

  .mega-menu__brand img:last-child {
    width: min(10.875rem, calc(100vw - 7.75rem));
    height: auto;
    margin-top: 0.25rem;
  }

  .mega-menu__quick-links {
    display: none;
  }

  .mega-menu__groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 1.5rem;
  }

  .mega-menu__group--about {
    grid-column: 1;
    grid-row: 1;
  }

  .mega-menu__group--admissions {
    grid-column: 2;
    grid-row: 1;
  }

  .mega-menu__group--life {
    grid-column: 1;
    grid-row: 2;
  }

  .mega-menu__group-header {
    grid-template-columns: minmax(0, 1fr) 2rem;
    min-height: 0;
  }

  .mega-menu__group-header h2 {
    overflow-wrap: normal;
    font-size: 1.18rem;
    word-break: keep-all;
  }

  .mega-menu__arrow {
    width: 2rem;
    height: 2rem;
    align-self: start;
    background-size: 0.75rem auto;
    font-size: 0 !important;
  }

  .mega-menu__category {
    margin-top: 0.5rem;
  }

  .mobile-menu--mega .mega-menu__category h3 a {
    padding-right: 1.1rem;
    padding-left: 0;
    font-size: 1.1rem;
    word-break: keep-all;
  }

  .mega-menu__category h3 a::before {
    top: 0.1rem;
    right: 0;
    left: auto;
  }

  .mega-menu__group-links a,
  .mega-menu__category-links a,
  .mega-menu__resources a,
  .mega-menu__external a,
  .mega-menu__footer a {
    overflow-wrap: normal;
    word-break: keep-all;
  }

  .mega-menu__resources {
    justify-content: center;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 0.0625rem solid var(--color-divider);
    text-align: center;
    font-size: 0.75rem;
  }

  .mega-menu__external {
    justify-content: center;
    margin-top: 2rem;
    font-size: 0.75rem;
  }

  .mega-menu__utility {
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-bottom: 1.5rem;
  }

  .mega-menu__utility .mega-menu__resources, .mega-menu__utility .mega-menu__external {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }

  .mega-menu__footer {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem 1rem;
    background: transparent;
    font-size: 0.75rem;
  }

  .mega-menu__footer small {
    flex-basis: 100%;
    margin-left: 0;
    text-align: center;
  }

}

@media (max-width: 31.25rem) {
  .mobile-menu--mega {
    padding-left: 1.25rem;
  }

  .mega-menu__surface {
    padding-inline: 1.125rem;
  }

  .mega-menu__groups {
    gap: 2rem 1.25rem;
  }

}

@media (prefers-reduced-motion: reduce) {
  .mobile-menu--mega,
  .mobile-menu--mega .mega-menu,
  .mobile-menu--mega .mega-menu__brand,
  .mobile-menu--mega .mega-menu__nav,
  .mobile-menu--mega .mega-menu__footer {
    animation: none;
  }

  .page-directory__image-link > img {
    transition: none;
  }

  .page-directory__group:hover .page-directory__image-link > img {
    transform: none;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Mega menu: base and mobile layout */
.mobile-menu--mega {
  --mega-panel-width: min(calc(100% - 8rem), 68rem);
  overflow: hidden auto;
  background: rgba(16, 60, 120, 0.58);
}

.mobile-menu--mega::before {
  display: none;
}

.mobile-menu--mega::after {
  top: auto;
  height: 10rem;
  background: url("../images/bg-mega-menu.png") repeat;
  opacity: 1;
  -webkit-mask-image: none;
  mask-image: none;
}

.mobile-menu--mega .mega-menu {
  width: var(--mega-panel-width);
  min-height: 0;
  margin: 6.5rem 6rem 0 auto;
  background: transparent;
}

.mega-menu__brand {
  position: absolute;
  top: -5.25rem;
  left: 0;
  margin: 0;
}

.mega-menu__surface {
  padding: 2.5rem 2.5rem 1.5rem;
  background: var(--color-surface);
}

.mobile-menu--mega .mega-menu__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 2.25rem 2.5rem;
}

.mega-menu__groups {
  display: flex;
  flex: 1 1 100%;
  gap: 2.25rem;
}

.mega-menu__group {
  flex: 1 1 0;
  min-width: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.mega-menu__group-header {
  display: flex;
  align-items: center;
  min-height: 3.5rem;
  padding-bottom: 0.75rem;
}

.mega-menu__group-header > div {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 1.5rem;
}

.mega-menu__group-header h2 a::before {
  display: inline-grid;
  width: 2.4rem;
  height: 2.4rem;
  margin-right: 1rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: url("../images/arr-right-blue.png") center / 1rem auto no-repeat;
  content: "";
  transition: background-color 0.2s ease, background-image 0.2s ease;
  vertical-align: middle;
}

.mega-menu__arrow {
  display: none !important;
}

.mega-menu__group {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 0 1rem;
}

.mega-menu__group-header {
  flex: 0 0 100%;
}

.mega-menu__category {
  flex: 1 1 calc(50% - 0.5rem);
  min-width: 0;
  min-height: 8.75rem;
  margin-top: 0;
  padding-top: 0.9rem;
}

.mega-menu__category:nth-last-child(-n + 2) {
  min-height: 3.8rem;
}

/* Desktop category links place the arrow on the trailing edge. */
@media (min-width: 48.001rem) {
  .mega-menu__category h3 a::before {
    right: 0;
    left: auto;
  }
}

.mega-menu__quick-links {
  display: flex;
  flex: 0 0 auto;
  width: calc(33.333% - 1.5rem);
  gap: 1.5rem;
  margin: 0 0 0 auto;
}

.mega-menu__quick-links > ul {
  display: flex;
  flex: 1 1 calc(50% - 0.75rem);
  flex-direction: column;
  gap: 1rem;
}

.mega-menu__quick-links > ul > li {
  flex: 0 0 auto;
}

.mega-menu__quick-links > ul {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  flex-direction: column;
  gap: 1rem;
}

.mega-menu__utility {
  flex: 0 0 100%;
  margin-top: 0;
  padding-top: 1.5rem;
  border-top: 0.0625rem solid var(--color-divider);
}

.mega-menu__footer {
  gap: 2.5rem;
  padding: 1.5rem 2.5rem;
  background: transparent;
}

@media (max-width: 48rem) {
  .mobile-menu--mega {
    --mega-brand-block-size: 3.75rem;
    --mega-footer-block-size: 4.5rem;
    --mega-panel-width: calc(100vw - 1rem);
    overflow: hidden;
    padding: 0 0.5rem;
    background: var(--color-primary);
  }

  .mobile-menu--mega::after {
    top: 54%;
    bottom: 0;
    height: auto;
    background:
      linear-gradient(to bottom, var(--color-primary), rgba(16, 60, 120, 0) 65%),
      url("../images/bg-mega-menu.png") repeat;
    opacity: 1;
  }

  .mobile-menu--mega .mega-menu {
    width: var(--mega-panel-width);
    margin: 3.75rem 0 0 auto;
  }

  .mega-menu__brand {
    top: -2.75rem;
    left: 0;
    gap: 0.35rem;
  }

  .mega-menu__brand img:first-child {
    width: 2.75rem;
  }

  .mega-menu__brand img:last-child {
    width: 9.5rem;
    margin-top: 0;
  }

  .mega-menu__surface {
    max-height: calc(100dvh - var(--mega-brand-block-size) - var(--mega-footer-block-size));
    padding: 1.5rem 1rem 1.25rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    width: 100%;
  }

  .mobile-menu--mega .mega-menu__nav {
    display: block;
  }

  .mega-menu__groups {
    display: block;
  }

  .mega-menu__group {
    display: flex;
    gap: 0 0.75rem;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-primary);
  }

  .mega-menu__group-header {
    min-height: 3.4rem;
    padding-bottom: 0.6rem;
  }

  .mega-menu__group-header > div {
    gap: 0.75rem;
    justify-content: space-between;
  }

  .mega-menu__group-header h2 {
    font-size: 1.25rem;
  }

  .mega-menu__group-header h2 a::before {
    width: 1.8rem;
    height: 1.8rem;
    margin-right: 0.55rem;
  }

  .mega-menu__group-links {
    flex: 0 0 auto;
    gap: 0.75em;
    width: 50%;
    justify-content: flex-start;
  }

  .mega-menu__group-links li:not(:last-child)::after {
    display: none;
  }

  .mega-menu__category {
    min-height: 0;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
  }

  .mega-menu__category:nth-last-child(-n + 2) {
    min-height: 0;
  }

  .mega-menu__category-links {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    line-height: 1.35;
  }

  .mega-menu__quick-links {
    display: flex;
    width: auto;
    gap: 0.75rem 0.5rem;
    margin: 0;
    padding: 0 0.05rem 1.25rem;
    border-bottom: 0.0625rem solid var(--color-divider);
  }

  .mega-menu__quick-links > ul {
    gap: 0.75rem;
  }

  .mobile-menu--mega .mega-menu__quick-links a {
    flex-basis: calc(50% - 0.25rem);
    padding-left: 1.1rem;
    font-size: 0.875rem;
  }

  .mega-menu__quick-links a::before {
    top: 0.2rem;
    width: 0.8rem;
    height: 0.8rem;
    background-size: 0.35rem auto;
  }

  .mega-menu__utility {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding-top: 1.25rem;
    border-top: 0;
  }

  .mega-menu__resources,
  .mega-menu__external {
    justify-content: center;
    margin: 0;
    font-size: 0.75rem;
  }

  .mega-menu__footer {
    min-height: var(--mega-footer-block-size);
    justify-content: center;
    gap: 0.8rem 1.25rem;
    padding: 1.2rem 0.75rem;
    font-size: 0.7rem;
  }

  .mega-menu__footer small {
    flex-basis: 100%;
    text-align: center;
  }

}

/* Mega menu: desktop layout (1280px comp) */
@media (min-width: 48.001rem) {
  .mobile-menu--mega {
    --mega-brand-block-size: 6.5rem;
    --mega-footer-block-size: 4.5rem;
    /*overflow-y: auto;*/
    overflow-y: hidden;
    background: var(--color-primary);
  }

  .mobile-menu--mega::before,
  .mobile-menu--mega::after {
    display: block;
  }

  .mobile-menu--mega::before {
    display: none;
  }

  .mobile-menu--mega::after {
    top: 54%;
    right: 0;
    bottom: 0;
    left: 0;
    height: auto;
    background:
      linear-gradient(to bottom, var(--color-primary), rgba(16, 60, 120, 0) 38%),
      url("../images/bg-mega-menu.png") repeat;
    opacity: 1;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .mobile-menu--mega .mega-menu {
    width: calc(100% - 2rem);
    max-width: 68.125rem;
    min-height: 0;
    margin: var(--mega-brand-block-size) auto 0;
  }

  .mega-menu__surface {
    padding: 2.5rem;
    max-height: calc(100dvh - var(--mega-brand-block-size) - var(--mega-footer-block-size));
    overflow-y: auto;
  }

  .mega-menu__footer {
    min-height: var(--mega-footer-block-size);
  }

  .mobile-menu--mega .mega-menu__nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "about admissions"
      "life quick"
      "utility utility";
    gap: 2.25rem 2.5rem;
  }

  .mega-menu__groups {
    display: contents;
  }

  .mega-menu__group,
  .mega-menu__quick-links {
    width: auto;
    margin: 0;
  }

  .mega-menu__group--about {
    grid-area: about;
  }

  .mega-menu__group--life {
    grid-area: life;
  }

  .mega-menu__group--admissions {
    grid-area: admissions;
  }

  .mega-menu__quick-links {
    grid-area: quick;
    align-self: start;
  }

  .mega-menu__utility {
    grid-area: utility;
    width: 100%;
    margin: 0;
  }

  .mega-menu__group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 1rem;
  }

  .mega-menu__group-header {
    grid-column: 1 / -1;
    border-bottom: 0;
  }

  .mega-menu__category,
  .mega-menu__category:nth-last-child(-n + 2) {
    min-height: 3.8rem;
    border-top: 2px solid rgba(16, 60, 120, 0.2);
    border-bottom: 0;
  }

  .mega-menu__category:has(.mega-menu__category-links:not([hidden])) {
    min-height: 8.75rem;
  }

}

.mega-menu__category--expandable h3 a::before {
  display: none;
}

.mega-menu__category--expandable {
  position: relative;
}

.mega-menu__category-toggle {
  position: absolute;
  top: 0.625rem;
  right: -0.5rem;
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  color: var(--color-primary);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.mega-menu__category-toggle:hover,
.mega-menu__category-toggle:focus-visible {
  color: var(--color-junior);
  opacity: 1;
}

.mega-menu__group-header h2 a:hover,
.mega-menu__group-header h2 a:focus-visible,
.mega-menu__group-links a:hover,
.mega-menu__group-links a:focus-visible,
.mobile-menu--mega .mega-menu__category h3 a:hover,
.mobile-menu--mega .mega-menu__category h3 a:focus-visible,
.mobile-menu--mega .mega-menu__quick-links a:hover,
.mobile-menu--mega .mega-menu__quick-links a:focus-visible,
.mega-menu__resources a:hover,
.mega-menu__resources a:focus-visible {
  color: var(--color-junior);
  opacity: 1;
}

.mega-menu__group-header h2 a:hover::before,
.mega-menu__group-header h2 a:focus-visible::before,
.mega-menu__quick-links a:hover::before,
.mega-menu__quick-links a:focus-visible::before {
  background-color: var(--color-junior);
  background-image: url("../images/arr-right-white.png");
}

.mega-menu__category h3 a:hover::before,
.mega-menu__category h3 a:focus-visible::before {
  filter: sepia(1) saturate(5) hue-rotate(300deg);
}

.mega-menu__category-links[hidden] {
  display: none;
}

.mega-menu__category-toggle::before,
.mega-menu__category-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.875rem;
  border-top: 0.125rem solid currentColor;
  transform: translate(-50%, -50%);
}

.mega-menu__category-toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.mega-menu__category-toggle[aria-expanded="true"]::after {
  transform: translate(-50%, -50%);
}

@media (max-width: 48rem) {
  .mega-menu__quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 0.5rem;
    padding: 0 0.05rem 1.25rem;
    border-bottom: 0.0625rem solid var(--color-divider);
  }

  .mega-menu__quick-links > ul {
    flex-basis: calc(50% - 0.25rem);
    gap: 0.5rem;
  }

  .mega-menu__quick-links > ul > li {
    flex-basis: auto;
  }

  .mobile-menu--mega .mega-menu__quick-links a {
    padding-left: 1.1rem;
    font-size: 0.875rem;
  }

  .mega-menu__quick-links a::before {
    top: 0.2rem;
    width: 1rem;
    height: 1rem;
    background-size: 0.5rem auto;
  }

  .mega-menu__category {
    border-top: 2px solid rgba(16, 60, 120, 0.2);
    border-bottom: 0;
  }

  .mega-menu__category-toggle {
    top: 0.3rem;
    right: -0.25rem;
  }
}

/* Smartphone landscape overrides */
@media (max-width: 64rem) and (orientation: landscape) {
  html {
    font-size: 1.8vw;
  } 
}
