/* study-note: layout.css
 * 作用：全站页头、导航、搜索图标、移动抽屉、页脚、返回顶部。
 * 原则：layout.css 是所有页面共用骨架；首页具体栏目放在 pages/home.css。
 */
.site-header {
  position: relative;
  z-index: 30;
  background: var(--color-primary);
  color: #fff;
  box-shadow: none;
}

.masthead {
  position: relative;
}

.masthead-inner {
  min-height: var(--masthead-height);
  padding: var(--brand-logo-edge-y) 0;
  display: block;
  position: relative;
}

.brand {
  position: absolute;
  left: calc(var(--brand-anchor-x) + var(--header-logo-offset-x));
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: var(--brand-logo-width);
  height: var(--brand-logo-height);
  max-width: 100%;
  min-width: 0;
}

.brand-picture {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  /* contain 让 logo 完整显示，不裁左右边缘，也不因宽高约束被拉伸。 */
  object-fit: contain;
  object-position: left center;
}

.brand-mark {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-seal {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-wordmark {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.masthead-links {
  position: absolute;
  right: 0;
  top: var(--topbar-link-offset-y);
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
}

.topbar-links-list {
  display: block;
}

.topbar-menu {
  position: relative;
  flex: none;
}

.topbar-trigger {
  list-style: none;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.92);
  font-size: var(--font-size-toplink);
  line-height: 1.2;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: background var(--motion-fast), color var(--motion-fast), transform var(--motion-fast), box-shadow var(--motion-fast);
}

.topbar-trigger::-webkit-details-marker {
  display: none;
}

.topbar-trigger::marker {
  content: "";
}

.topbar-trigger:hover,
.topbar-trigger:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 8px 18px rgba(60, 10, 20, 0.14);
}

.topbar-trigger:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.72);
  outline-offset: 3px;
}

.topbar-menu[open] .topbar-trigger {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(60, 10, 20, 0.16);
}

.gate-icon {
  width: 25px;
  height: 25px;
  overflow: visible;
}

.gate-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gate-roof,
.gate-lintel,
.gate-base,
.gate-column,
.gate-door,
.gate-center,
.gate-chevron {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.26s ease, opacity 0.26s ease, stroke-width 0.26s ease;
}

.gate-roof {
  stroke-width: 2.35;
}

.gate-lintel,
.gate-base {
  opacity: 0.92;
}

.gate-column {
  opacity: 0.96;
}

.gate-door {
  opacity: 0.78;
}

.gate-center {
  opacity: 0.58;
}

.gate-chevron {
  opacity: 0.72;
  transform-origin: 24px 31px;
}

.topbar-menu[open] .gate-roof {
  transform: translateY(-1px);
}

.topbar-menu[open] .gate-lintel {
  transform: scaleX(0.92);
}

.topbar-menu[open] .gate-door-left {
  transform: translateX(-4px) rotate(-8deg);
}

.topbar-menu[open] .gate-door-right {
  transform: translateX(4px) rotate(8deg);
}

.topbar-menu[open] .gate-center {
  opacity: 0.22;
}

.topbar-menu[open] .gate-chevron {
  opacity: 1;
  transform: rotate(180deg);
}

.topbar-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 9px);
  z-index: 20;
  width: max-content;
  min-width: 122px;
  padding: 4px;
  display: none;
  gap: 2px;
  border-radius: var(--radius-sm);
  background: #fff;
  color: #2d2623;
  box-shadow: 0 18px 36px rgba(31, 39, 52, 0.22);
  transform-origin: top right;
  animation: topbarDropdownReveal 0.22s ease both;
}

.topbar-menu[open] .topbar-menu-list {
  display: grid;
}

.topbar-menu-list a {
  min-height: 36px;
  display: flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 3px;
  color: #2d2623;
  font-size: var(--font-size-toplink);
  line-height: 1.2;
  white-space: nowrap;
  transition: background var(--motion-fast), color var(--motion-fast), transform var(--motion-fast), box-shadow var(--motion-fast);
}

.topbar-menu-list a + a {
  border-top: 1px solid rgba(var(--color-primary-rgb), 0.08);
}

.topbar-menu-list a:hover,
.topbar-menu-list a:focus-visible {
  background: var(--color-hover-blue);
  color: #fff;
  transform: translateX(3px);
  box-shadow: 0 6px 14px rgba(31, 95, 159, 0.18);
}

.top-search-toggle {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  transition: background var(--motion-fast), transform var(--motion-fast), box-shadow var(--motion-fast);
}

.top-search-toggle:hover,
.top-search-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(60, 10, 20, 0.14);
}

.top-search-toggle svg {
  width: 20px;
  height: 20px;
}

@keyframes topbarDropdownReveal {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.site-search-popover {
  position: absolute;
  right: 0;
  top: calc(var(--topbar-link-offset-y) + 34px);
  width: min(380px, calc(100vw - 24px));
  padding: 14px;
  background: #fff;
  color: #2d2623;
  border-radius: var(--radius-sm);
  box-shadow: 0 22px 42px rgba(31, 39, 52, 0.2);
  z-index: 80;
}

.site-search-form {
  display: grid;
  gap: 10px;
}

.site-search-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
}

.site-search-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.site-search-field input {
  width: 100%;
  min-width: 0;
  height: 40px;
  border: 1px solid rgba(var(--color-primary-rgb), 0.18);
  border-radius: 999px;
  padding: 0 14px;
  font-size: 14px;
  color: #2d2623;
  background: #fff;
}

.site-search-field input:focus {
  outline: 2px solid rgba(var(--color-primary-rgb), 0.18);
  outline-offset: 1px;
}

.site-search-submit {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
}

.site-search-submit svg {
  width: 17px;
  height: 17px;
  stroke-width: 2;
}

.main-nav {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.main-nav .wrap {
  position: relative;
  display: flex;
  justify-content: center;
}

.nav-list {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  margin-right: 0;
  transform: translateX(var(--header-nav-offset-x));
}

.nav-item {
  position: relative;
  flex: 0 0 var(--nav-item-width);
  width: var(--nav-item-width);
  min-width: 0;
}

.nav-item > a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--line-nav);
  padding: 0 8px;
  font-size: var(--font-size-nav);
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  text-align: center;
  transition: background var(--motion-fast);
}

.nav-item > a:hover,
.nav-item > a:focus-visible,
.nav-item.is-open > a {
  background: rgba(255, 255, 255, 0.10);
}

.mega-menu {
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition:
    opacity var(--motion-fast),
    transform var(--motion-fast),
    visibility var(--motion-fast);
  z-index: 70;
}

.nav-item:hover .mega-menu,
.nav-item.is-open .mega-menu,
.nav-item:focus-within .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.mega-panel {
  width: 100%;
  background: var(--color-hover-blue);
  color: #fff;
  box-shadow: 0 16px 28px rgba(23, 74, 124, 0.20);
  border-top: 2px solid var(--color-hover-blue-dark);
  border-radius: 0 0 4px 4px;
}

.mega-column {
  display: flex;
  flex-direction: column;
  padding: 6px 0;
}

.mega-column a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--line-subnav);
  padding: 5px 8px;
  font-size: var(--font-size-subnav);
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  word-break: keep-all;
  transition: background var(--motion-fast), color var(--motion-fast);
}

.mega-column a:hover,
.mega-column a:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
}

/* 首页首屏：对标 lsnu.edu.cn 的透明叠加式页头。 */
.home-page .site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: transparent;
  box-shadow: none;
}

.home-page .site-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 200px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(15, 22, 34, 0.66) 0%, rgba(15, 22, 34, 0.36) 50%, rgba(15, 22, 34, 0) 100%);
}

.home-page .masthead-inner {
  --home-header-edge: clamp(16px, 1.35vw, 25px);
  width: 100%;
  max-width: none;
  min-height: 100px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(22px, 3.2vw, 58px);
  padding: 10px var(--home-header-edge) 0 var(--home-header-edge);
}

.home-page .brand {
  position: static;
  top: auto;
  left: auto;
  transform: none;
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  height: 80px;
  min-height: 0;
  color: #fff;
  text-decoration: none;
}

.home-page .brand-picture,
.home-page .brand-logo {
  width: auto;
  height: 100%;
  max-width: none;
}

.home-page .header-right {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  padding-top: 10px;
}

.home-page .masthead-links {
  position: static;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  transition: padding-right var(--motion-fast);
}

.home-page .topbar-menu-list {
  position: static;
  right: auto;
  top: auto;
  z-index: auto;
  width: auto;
  min-width: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  box-shadow: none;
  transform: none;
  transform-origin: center;
  animation: none;
}

.home-page .topbar-menu-list a {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.26);
  transition: color var(--motion-fast), opacity var(--motion-fast);
}

.home-page .topbar-menu-list a:first-child {
  padding-left: 0;
}

.home-page .topbar-menu-list a + a {
  border-top: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.32);
}

.home-page .topbar-menu-list a:hover,
.home-page .topbar-menu-list a:focus-visible {
  background: transparent;
  color: #fff;
  transform: none;
  box-shadow: none;
}

.home-page .top-search-toggle {
  width: 30px;
  height: 30px;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
}

.home-page .top-search-toggle:hover,
.home-page .top-search-toggle:focus-visible {
  background: transparent;
  color: #fff;
  transform: none;
  box-shadow: none;
}

.home-page .top-search-toggle svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.4;
}

.home-page .main-nav {
  width: 100%;
  border: 0;
}

.home-page .nav-list {
  --home-nav-gap: clamp(16px, 1.55vw, 32px);
  width: 100%;
  justify-content: flex-end;
  transform: none;
}

.home-page .nav-item {
  flex: 0 0 auto;
  width: auto;
}

.home-page .nav-item + .nav-item {
  margin-left: var(--home-nav-gap);
}

.home-page .nav-item + .nav-item::before {
  content: "";
  position: absolute;
  left: calc(var(--home-nav-gap) * -0.5);
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.home-page .nav-item > a {
  min-height: 34px;
  padding: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
  transition: color var(--motion-fast), opacity var(--motion-fast);
}

.home-page .nav-item > a:hover,
.home-page .nav-item > a:focus-visible,
.home-page .nav-item.is-open > a {
  background: transparent;
  color: #fff;
  opacity: 0.86;
}

.home-page .mega-menu {
  left: 50%;
  width: max-content;
  min-width: 132px;
  transform: translate(-50%, 6px);
}

.home-page .nav-item:hover .mega-menu,
.home-page .nav-item.is-open .mega-menu,
.home-page .nav-item:focus-within .mega-menu {
  transform: translate(-50%, 0);
}

.home-page .nav-item:last-child .mega-menu {
  left: auto;
  right: 0;
  transform: translate(0, 6px);
}

.home-page .nav-item:last-child:hover .mega-menu,
.home-page .nav-item:last-child.is-open .mega-menu,
.home-page .nav-item:last-child:focus-within .mega-menu {
  transform: translate(0, 0);
}

.home-page .mega-panel {
  background: rgba(10, 16, 24, 0.22);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-top-color: rgba(255, 255, 255, 0.44);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.home-page .mega-column {
  padding: 7px 0 8px;
}

.home-page .mega-column a {
  min-height: 36px;
  padding: 5px 18px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  white-space: nowrap;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.36);
}

.home-page .mega-column a:hover,
.home-page .mega-column a:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

@media (min-width: 921px) {
  .home-page .site-header.is-search-open .masthead-links {
    padding-right: calc(clamp(238px, 18vw, 300px) + 10px);
  }

  .home-page .site-header.is-search-open .top-search-toggle {
    opacity: 0;
    pointer-events: none;
  }

  .home-page .site-search-popover {
    top: 17px;
    right: var(--home-header-edge);
    z-index: 110;
    width: clamp(238px, 18vw, 300px);
    padding: 0;
    color: #2d2623;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    animation: homeSearchReveal 0.18s ease both;
  }

  .home-page .site-search-label {
    display: none;
  }

  .home-page .site-search-form,
  .home-page .site-search-field {
    display: block;
  }

  .home-page .site-search-field {
    position: relative;
  }

  .home-page .site-search-field input {
    height: 34px;
    border: 0;
    border-radius: 0;
    padding: 0 42px 0 15px;
    color: #2d2623;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
    font-size: 14px;
  }

  .home-page .site-search-field input::placeholder {
    color: rgba(45, 38, 35, 0.46);
  }

  .home-page .site-search-field input:focus {
    outline: 2px solid rgba(255, 255, 255, 0.42);
    outline-offset: 2px;
  }

  .home-page .site-search-submit {
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 34px;
    border-radius: 0;
    background: transparent;
    color: rgba(45, 38, 35, 0.72);
  }

  .home-page .site-search-submit:hover,
  .home-page .site-search-submit:focus-visible {
    color: #2d2623;
    background: rgba(45, 38, 35, 0.06);
  }

  .home-page .site-search-submit svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.2;
  }
}

@keyframes homeSearchReveal {
  from {
    opacity: 0;
    transform: translateX(8px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.site-footer {
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.9);
  padding: 36px 0 28px;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 12px 14px;
}

.footer-column h3 {
  margin-bottom: 8px;
  font-size: var(--font-size-footer-heading);
  line-height: 1.18;
  font-weight: 800;
  color: #fff;
}

.footer-column {
  text-align: center;
}

.footer-column h3 a {
  display: inline-block;
  padding: 0;
  font-size: inherit;
  line-height: inherit;
  font-weight: inherit;
  color: #fff;
}

.footer-column a {
  display: block;
  padding: 2px 0;
  font-size: var(--font-size-footer-link);
  line-height: var(--line-footer-link);
  color: rgba(255, 255, 255, 0.72);
  transition: color var(--motion-fast);
}

.footer-column h3 a,
.footer-column a {
  white-space: nowrap;
}

.footer-column a:hover,
.footer-column a:focus-visible {
  color: #fff;
}

.footer-divider {
  height: 1px;
  margin: 24px 0 22px;
  background: rgba(255, 255, 255, 0.18);
}

.footer-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 68px);
  align-items: center;
}

.footer-logo-block {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
}

.footer-logo {
  display: block;
  width: min(var(--footer-logo-width), 100%);
  height: auto;
  max-height: var(--footer-logo-max-height);
  object-fit: contain;
  object-position: left center;
  flex: none;
}

.footer-contact {
  min-width: 0;
  width: 100%;
  max-width: 520px;
  justify-self: center;
  text-align: center;
}

.footer-contact h3 {
  font-size: clamp(17px, 1.2vw, 21px);
  line-height: 1.35;
  margin-bottom: 10px;
  color: #fff;
  font-weight: 800;
}

.footer-contact p {
  font-size: clamp(13px, 0.9vw, 15px);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.84);
}

.footer-copyright {
  margin-top: 6px;
  font-size: clamp(12px, 0.84vw, 14px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.86);
}

.footer-socials {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  justify-self: end;
}

.footer-social-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 72px;
  color: #fff;
  text-align: center;
}

.footer-social-card:hover,
.footer-social-card:focus-visible {
  color: #fff;
}

.footer-social-icon {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
  transition: transform var(--motion-fast), opacity var(--motion-fast);
}

.footer-social-card:hover .footer-social-icon,
.footer-social-card:focus-visible .footer-social-icon {
  transform: translateY(-2px);
  opacity: 0.92;
}

.footer-social-card span {
  display: block;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(var(--color-primary-rgb), 0.95);
  color: #fff;
  box-shadow: 0 10px 24px rgba(55, 20, 20, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  z-index: 50;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top svg {
  width: 22px;
  height: 22px;
  margin: 0 auto;
  fill: currentColor;
}

.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.mobile-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 18, 18, 0.55);
}

.mobile-drawer-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: min(84vw, 360px);
  height: 100%;
  background: #fff;
  color: var(--color-text);
  transform: translateX(-100%);
  transition: transform 0.26s ease;
  overflow-y: auto;
}

.mobile-drawer.is-open .mobile-drawer-panel {
  transform: translateX(0);
}

.mobile-drawer-head {
  height: 64px;
  padding: 0 18px 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-primary);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}

.drawer-close {
  color: #fff;
}

.mobile-utility-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 18px 16px 10px;
  background: #f8f7f5;
}

.mobile-utility-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--color-primary);
  background: #fff;
}

.mobile-nav {
  padding: 10px 16px 20px;
}

.mobile-nav details {
  border-bottom: 1px solid #ece7e2;
}

.mobile-nav summary {
  list-style: none;
  cursor: pointer;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 700;
  color: #2e2927;
}

.mobile-nav summary::-webkit-details-marker {
  display: none;
}

.mobile-nav summary::after {
  content: '+';
  font-size: 20px;
  color: var(--color-primary);
}

.mobile-nav details[open] summary::after {
  content: '\2212';
}

.mobile-submenu {
  padding: 0 0 14px;
  display: grid;
  gap: 8px;
}

.mobile-submenu a,
.mobile-nav-link {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  color: #5c5450;
}

.mobile-nav-link {
  padding-top: 12px;
  font-weight: 700;
  color: var(--color-primary);
}

@media (max-width: 1180px) {
  .footer-bottom {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px) minmax(0, 1fr);
    gap: clamp(18px, 3vw, 36px);
  }

  .footer-logo {
    width: min(var(--footer-logo-width), 100%);
    max-height: var(--footer-logo-max-height);
  }

  .footer-social-icon {
    width: 40px;
    height: 40px;
  }
}

@media (min-width: 768px) {
  .footer-bottom {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px) minmax(0, 1fr);
    gap: clamp(16px, 2vw, 28px);
  }

  .footer-contact {
    justify-self: center;
    width: 100%;
    text-align: center;
  }

  .footer-socials {
    justify-self: end;
    justify-content: flex-end;
  }
}

@media (max-width: 920px) {
  .masthead-inner {
    min-height: var(--masthead-height);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
  }

  .brand {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    width: var(--brand-logo-width);
    max-width: 100%;
  }

  .topbar-links-list {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
  }

  .masthead-links {
    position: static;
    grid-column: 3;
    grid-row: 1;
  }

  .top-search-toggle {
    width: 36px;
    height: 36px;
  }

  .site-search-popover {
    left: 12px;
    right: 12px;
    width: auto;
  }

  .main-nav {
    display: none;
  }
}

@media (max-width: 767px) {
  .site-footer {
    padding: 26px 0 22px;
  }

  .masthead-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto;
    gap: 0 4px;
    min-height: 0;
    align-items: start;
    padding: 0;
  }

  .brand {
    grid-row: 1;
    align-self: start;
    margin: var(--brand-logo-edge-y) 0;
  }

  .brand-picture,
  .brand-logo {
    height: auto;
  }

  .nav-toggle,
  .top-search-toggle {
    width: var(--mobile-header-action-size);
    height: var(--mobile-header-action-size);
  }

  .nav-toggle {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
  }

  .top-search-toggle svg,
  .nav-toggle svg {
    width: clamp(17px, 3.2vw, 20px);
    height: clamp(17px, 3.2vw, 20px);
  }

  .masthead-links {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-self: start;
    justify-self: end;
    transform: translateY(calc(var(--mobile-header-action-size) + var(--mobile-header-action-gap)));
  }

  .footer-columns {
    display: none;
  }

  .footer-divider {
    display: none;
  }

  .footer-bottom {
    grid-template-columns: 1fr;
    gap: 14px;
    justify-items: center;
    text-align: center;
  }

  .footer-logo-block {
    justify-content: center;
  }

  .footer-logo {
    width: min(var(--footer-logo-mobile-width), 100%);
    max-height: var(--footer-logo-mobile-max-height);
  }

  .footer-contact {
    text-align: center;
  }

  .footer-contact h3 {
    margin-bottom: 6px;
    font-size: 16px;
  }

  .footer-contact p {
    font-size: 12px;
    line-height: 1.5;
  }

  .footer-copyright {
    margin-top: 4px;
    font-size: 12px;
  }

  .footer-socials {
    justify-content: center;
    justify-self: center;
    gap: 18px;
  }

  .footer-social-card {
    min-width: 58px;
    gap: 5px;
  }

  .footer-social-icon {
    width: 34px;
    height: 34px;
  }

  .footer-social-card span {
    font-size: 12px;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
    width: 44px;
    height: 44px;
  }
}

@media (min-width: 1600px) {
  .home-page .brand {
    height: 80px;
  }

  .home-page .nav-list {
    --home-nav-gap: clamp(22px, 1.75vw, 34px);
  }

  .home-page .nav-item > a {
    font-size: 18px;
  }
}

@media (max-width: 1360px) {
  .home-page .brand {
    height: 72px;
  }

  .home-page .nav-list {
    --home-nav-gap: clamp(14px, 1.35vw, 20px);
  }

  .home-page .nav-item > a {
    font-size: 15px;
  }

  .home-page .topbar-menu-list a {
    padding: 0 10px;
    font-size: 13px;
  }
}

@media (max-width: 1080px) {
  .home-page .brand {
    height: 62px;
  }

  .home-page .nav-list {
    --home-nav-gap: 14px;
  }

  .home-page .nav-item > a {
    font-size: 13px;
  }
}

@media (max-width: 920px) {
  .home-page .site-header::before {
    height: 116px;
    background: linear-gradient(180deg, rgba(15, 22, 34, 0.66) 0%, rgba(15, 22, 34, 0.32) 58%, rgba(15, 22, 34, 0) 100%);
  }

  .home-page .masthead-inner {
    min-height: var(--masthead-height);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
    padding: var(--brand-logo-edge-y) 0;
    width: min(var(--container), calc(100% - (var(--page-side-space) * 2)));
    max-width: var(--container);
  }

  .home-page .brand {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    align-self: center;
    width: auto;
    max-width: calc(100vw - 112px);
    height: 54px;
  }

  .home-page .header-right {
    display: contents;
  }

  .home-page .topbar-menu-list {
    display: none;
  }

  .home-page .nav-toggle {
    display: inline-flex;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
  }

  .home-page .masthead-links {
    grid-column: 3;
    grid-row: 1;
    position: static;
  }

  .home-page .top-search-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
  }

  .home-page .main-nav {
    display: none;
  }
}

@media (max-width: 767px) {
  .home-page {
    --mobile-red-header-height: 0px;
  }

  .home-page .site-header {
    position: relative;
    min-height: var(--mobile-red-header-height);
    background: var(--color-primary);
    overflow: visible;
  }

  .home-page .site-header::before {
    height: 100%;
    background: linear-gradient(180deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  }

  .home-page .masthead-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto;
    gap: 0 4px;
    align-items: start;
    min-height: 0;
    padding: 0;
  }

  .home-page .brand {
    grid-row: 1;
    align-self: start;
    margin: var(--brand-logo-edge-y) 0;
    width: var(--brand-logo-width);
    max-width: 100%;
    height: auto;
  }

  .home-page .brand-picture,
  .home-page .brand-logo {
    width: 100%;
    height: auto;
    max-width: 100%;
  }

  .home-page .nav-toggle {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
  }

  .home-page .masthead-links {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: start;
    transform: translateY(calc(var(--mobile-header-action-size) + var(--mobile-header-action-gap)));
  }

  .home-page .nav-toggle,
  .home-page .top-search-toggle {
    width: var(--mobile-header-action-size);
    height: var(--mobile-header-action-size);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
  }
}
