:root,
[data-bs-theme=light] {
  --glass-body-bg: rgba(248, 249, 250, 0.6);
  --cursor-glow-color-strong: rgba(109, 196, 255, 0.8);
  --cursor-glow-color-soft: rgba(109, 196, 255, 0.24);
  --footer-panel-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.54));
  --footer-brand-bg: linear-gradient(135deg, rgba(1, 67, 124, 0.14), rgba(109, 196, 255, 0.12) 58%, rgba(255, 255, 255, 0.65));
  --footer-border-strong: rgba(1, 67, 124, 0.18);
  --footer-chip-bg: rgba(1, 67, 124, 0.08);
  --footer-card-bg: rgba(255, 255, 255, 0.36);
  --footer-card-hover-bg: rgba(255, 255, 255, 0.64);
  --footer-icon-bg: rgba(255, 255, 255, 0.68);
  --footer-muted: rgba(33, 37, 41, 0.72);
  --footer-divider: rgba(1, 67, 124, 0.12);
  --footer-shadow: 0 -18px 40px rgba(1, 67, 124, 0.08);
}

:root,
[data-bs-theme=dark] {
  --glass-body-bg: rgba(33, 37, 41, 0.6);
  --cursor-glow-color-strong: rgba(0, 111, 186, 0.68);
  --cursor-glow-color-soft: rgba(0, 111, 186, 0.34);
  --footer-panel-bg: linear-gradient(180deg, rgba(30, 35, 40, 0.78), rgba(20, 24, 28, 0.62));
  --footer-brand-bg: linear-gradient(135deg, rgba(0, 111, 186, 0.28), rgba(109, 196, 255, 0.14) 58%, rgba(26, 30, 35, 0.68));
  --footer-border-strong: rgba(109, 196, 255, 0.24);
  --footer-chip-bg: rgba(109, 196, 255, 0.12);
  --footer-card-bg: rgba(255, 255, 255, 0.04);
  --footer-card-hover-bg: rgba(255, 255, 255, 0.08);
  --footer-icon-bg: rgba(255, 255, 255, 0.08);
  --footer-muted: rgba(248, 249, 250, 0.74);
  --footer-divider: rgba(255, 255, 255, 0.12);
  --footer-shadow: 0 -18px 40px rgba(0, 0, 0, 0.28);
}

:root {
  --cursor-x: 50vw;
  --cursor-y: 50vh;
  --cursor-glow-size: clamp(52rem, 92vw, 92rem);

  --btn-bg: #01437c;
  --section-gap: clamp(2rem, 3vw, 3.5rem);
}

@media (min-width: 768px) {
  @supports (zoom: 1) {
    html {
      zoom: 1.25;
    }
  }
}

body {
  min-height: 100vh;
  font-family: 'HelveticaNeueCyr', 'Helvetica Neue', Arial, sans-serif;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

header {
  background: var(--glass-body-bg);
  backdrop-filter: blur(20px);
  z-index: 1030;
  transform: translateY(0);
  transition: transform 0.25s ease;
}

header .container > a {
  min-width: 0;
  flex: 1 1 auto;
}

header.header-hidden {
  transform: translateY(calc(-100% - 8px));
}

@media (prefers-reduced-motion: reduce) {
  header {
    transition: none;
  }
}

main {
  padding-top: 120px;
  flex: 1 0 auto;
}

main section {
  margin-bottom: 0 !important;
}

main section + section {
  margin-top: var(--section-gap) !important;
}

.contact-section .row {
  margin-bottom: 0 !important;
}

.contact-section .glass-card {
  margin-top: 0 !important;
}

.contact-section:last-child {
  margin-bottom: var(--section-gap) !important;
}

.related-news:last-child {
  margin-bottom: var(--section-gap) !important;
}

.offcanvas {
  background: var(--glass-body-bg);
  backdrop-filter: blur(18px);
}

.burger-btn {
  width: 52px;
  height: 52px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: none;
  border-radius: 14px;
  background: transparent;
  box-shadow: none;
  color: var(--bs-body-color);
  transition: color 0.2s ease;
  position: relative;
  z-index: 1060;
}

.burger-btn:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: 3px;
}

.burger-line {
  display: block;
  width: 100%;
  height: 3px;
  background: currentColor;
  border-radius: 999px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.burger-btn.active .burger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.burger-btn.active .burger-line:nth-child(2) {
  opacity: 0;
}

.burger-btn.active .burger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

#slider {
  width: 100%;
  max-width: 100%;
  height: 50vh;
  position: relative;
  overflow: hidden;
}

#slider img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

#slider img.active {
  opacity: 1;
}


a,
.nav-link {
  color: var(--bs-body-color);
  border-radius: var(--bs-border-radius-xxl) !important;
}

.nav-link:hover {
  color: var(--bs-nav-pills-link-active-color);
  background-color: var(--bs-nav-pills-link-active-bg);
}

h1,
h2,
h3,
h5,
.letter-space {
  letter-spacing: -1px;
  font-weight: 600;
}

.glass-card {
  background: var(--glass-body-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--bs-border-color);
  padding: 20px 20px 20px;
  border-radius: 2rem;
}

.banner {
  width: 100%;
  position: relative;
  --banner-lift: 25vh;
  padding-bottom: 2vh;
}

.banner-img {
  width: 100%;
  object-fit: cover;
  z-index: 1;
  height: 40vh;
}

.object-fit-cover {
  object-fit: cover;
}

.banner-text {
  position: relative;
  z-index: 2;
  max-width: 1000px;
  min-height: 120px;
  padding: 20px;
  margin-top: calc(-1 * var(--banner-lift));
}

.btn-primary {
  border-radius: 1.5rem;
}

.card-img-top {
  padding: 0;
}

.news-overview {
  max-width: 52rem;
  margin-bottom: 1.25rem;
  color: var(--footer-muted);
}

.news-card {
  height: 100%;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.news-card:hover {
  transform: translateY(-4px);
  border-color: var(--footer-border-strong);
  box-shadow: 0 18px 40px rgba(1, 67, 124, 0.12);
}

.news-card .card-img-top {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.news-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-left: 0;
  padding-right: 0;
}

.news-card-excerpt {
  color: var(--footer-muted);
}

.article-shell {
  width: 100%;
  max-width: none;
  margin: 0;
}

.article-back-link,
.article-link-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--footer-border-strong);
  background: var(--footer-card-bg);
  color: var(--bs-body-color);
  text-decoration: none;
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.article-back-link:hover,
.article-link-button:hover {
  background: var(--footer-card-hover-bg);
  border-color: var(--footer-border-strong);
  transform: translateY(-2px);
}

.article-card h1 {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.article-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin-bottom: 1.5rem;
}

.article-lead {
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.3rem);
  line-height: 1.75;
  color: var(--footer-muted);
  margin-bottom: 1.5rem;
}

.article-content {
  display: grid;
  gap: 1.15rem;
  font-size: 1.05rem;
  line-height: 1.8;
}

.article-content > * {
  margin-bottom: 0;
}

.article-content ul {
  padding-left: 1.2rem;
}

.article-content blockquote {
  margin: 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--bs-primary);
  border-radius: 1.5rem;
  background: var(--footer-card-bg);
  color: var(--bs-body-color);
}

.article-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.related-news .row {
  margin-bottom: 0;
}

@media (max-width: 767.98px) {
  .news-card:hover,
  .article-back-link:hover,
  .article-link-button:hover {
    transform: none;
  }
}

.copyright {
  margin: 0;
  max-width: 48rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--footer-muted);
}

.footer {
  position: relative;
  overflow: hidden;
  border: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-top: 1px solid var(--footer-border-strong);
  margin-top: auto;
  flex-shrink: 0;
  padding-top: clamp(2rem, 3vw, 3rem);
  padding-bottom: clamp(2rem, 3vw, 3rem);
  box-shadow: var(--footer-shadow);
}

.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(109, 196, 255, 0.12), transparent 30%),
    radial-gradient(circle at bottom left, rgba(1, 67, 124, 0.12), transparent 28%);
  pointer-events: none;
}

.footer .container {
  position: relative;
  z-index: 1;
}

.footer-brand,
.footer-panel {
  height: 100%;
  border: 1px solid var(--footer-border-strong);
  border-radius: 1.75rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: clamp(1.5rem, 3vw, 2rem);
  background: var(--footer-brand-bg);
}

.footer-brand-top {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-logo {
  height: clamp(56px, 7vw, 76px);
  object-fit: contain;
  flex-shrink: 0;
}

.footer-title {
  max-width: 22rem;
  line-height: 1.1;
}

.footer-description {
  max-width: 32rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--footer-muted);
}

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--footer-border-strong);
  background: var(--footer-chip-bg);
  font-weight: 500;
  line-height: 1.2;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.footer-panel {
  padding: 1.5rem;
  background: var(--footer-panel-bg);
  backdrop-filter: blur(20px);
}

.footer-label {
  display: block;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.footer-links {
  display: grid;
  gap: 0.8rem;
}

.footer-link-item {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  width: fit-content;
  text-decoration: none;
  font-weight: 500;
  color: inherit;
  transition: transform 0.2s ease, color 0.2s ease;
}

.footer-link-item:hover {
  color: var(--bs-primary);
  transform: translateX(4px);
}

.footer-contact-list {
  display: grid;
  gap: 0.85rem;
}

.footer-contact-card {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0.95rem 1rem;
  border: 1px solid transparent;
  border-radius: 1.25rem;
  text-decoration: none;
  color: inherit;
  background: var(--footer-card-bg);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.footer-contact-card:hover, .footer-badge:hover {
  transform: translateY(-2px);
  border-color: var(--footer-border-strong);
  background: var(--footer-card-hover-bg);
}

.footer-contact-card-static {
  cursor: default;
}

.footer-contact-card-static:hover {
  transform: none;
}

.footer-contact-icon {
  width: 2.65rem;
  height: 2.65rem;
  display: inline-flex;
  align-self: center;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: var(--footer-icon-bg);
  flex-shrink: 0;
}

.footer-contact-card strong,
.footer-contact-card small {
  display: block;
}

.footer-contact-card strong {
  margin-bottom: 0.2rem;
  font-size: 0.98rem;
}

.footer-contact-card small {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--footer-muted);
}

.footer-bottom {
  margin-top: clamp(1.5rem, 3vw, 2rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--footer-divider);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.footer-bottom-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-bottom-links a {
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  color: inherit;
  background: var(--footer-chip-bg);
  border: 1px solid transparent;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.footer-bottom-links a:hover {
  border-color: var(--footer-border-strong);
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .footer-link-item,
  .footer-contact-card,
  .footer-bottom-links a {
    transition: none;
  }
}

@media (max-width: 420.98px) {
  h1 {
    font-size: calc(1.2rem + 1.5vw);
  }
}

@media (min-width: 998.98px) {
  main {
    padding-top: 200px;
  }

  .banner-text {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    min-height: 120px;
    padding: 40px 60px 40px 45px;
    margin-top: calc(-1 * var(--banner-lift));
    margin-left: calc(10% - 45px);

  }

}

@media (max-width: 991.98px) {
  header .container {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    column-gap: 0.75rem;
    row-gap: 0;
  }

  header .container > a {
    display: flex;
    align-items: center;
    gap: 0.75rem !important;
    min-width: 0;
  }

  header .container > a > img {
    flex-shrink: 0;
  }

  header .container > a > span {
    display: block !important;
    flex: 1 1 0;
    max-width: 100%;
    min-width: 0;
    font-size: 1rem !important;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
    text-wrap: balance;
  }

  #theme-toggle {
    margin-left: 0 !important;
    justify-self: end;
  }

  header .container > .d-flex.d-xxl-none {
    gap: 0.5rem !important;
    justify-self: end;
  }

  footer {
    margin-bottom: 0;
  }
}

@media (max-width: 767.98px) {
  .footer-brand,
  .footer-panel {
    border-radius: 1.5rem;
  }

  .footer-brand-top {
    align-items: flex-start;
  }

  .footer-bottom {
    align-items: flex-start;
  }
}

@media (max-width: 575.98px) {
  header .container {
    column-gap: 0.45rem;
  }

  header .container > a {
    gap: 0.55rem !important;
  }

  header .container > a > span {
    font-size: clamp(0.76rem, 0.65vw + 0.62rem, 0.88rem) !important;
    line-height: 1.15;
  }

  #theme-toggle {
    padding: 0.35rem !important;
    font-size: 1.3rem !important;
  }

  header .container > .d-flex.d-xxl-none {
    gap: 0.25rem !important;
  }

  .burger-btn {
    width: 44px;
    height: 44px;
    gap: 6px;
    padding: 10px;
  }

  .burger-btn.active .burger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .burger-btn.active .burger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

@media (min-width: 992px) and (max-width: 1085.98px) {
  header .container {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    column-gap: 0.75rem;
    row-gap: 0;
  }

  header .container > a {
    display: flex;
    align-items: center;
    gap: 0.75rem !important;
    min-width: 0;
  }

  header .container > a > img {
    flex-shrink: 0;
  }

  header .container > a > span {
    display: block !important;
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
    font-size: 1rem !important;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
    text-wrap: balance;
  }

  #theme-toggle {
    margin-left: 0 !important;
    justify-self: end;
    padding: 0.4rem !important;
  }

  header .container > .d-flex.d-xxl-none {
    gap: 0.4rem !important;
    justify-self: end;
  }

  .burger-btn {
    width: 48px;
    height: 48px;
    gap: 7px;
    padding: 11px;
  }
}

@media (min-width: 992px) {
  #historyModal .modal-dialog,
  #alumniModal .modal-dialog {
    max-width: min(1140px, 92vw);
  }
}

.gradient-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.gradient-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: var(--cursor-glow-size);
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0.95;
  background: radial-gradient(circle,
      var(--cursor-glow-color-strong) 0%,
      var(--cursor-glow-color-soft) 38%,
      rgba(20, 10, 60, 0) 72%);
  transform: translate3d(var(--cursor-x), var(--cursor-y), 0) translate(-50%, -50%);
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .gradient-bg::before {
    opacity: 0;
  }
}

.form-control {
  border-radius: 1.5rem;
}

.modal-content {
  font-size: 1.05rem;
  line-height: 1.65;
}

.modal-content .h1,
.modal-content .h2,
.modal-content .h3,
.modal-content .h4,
.modal-content .h5,
.modal-content .h6,
.modal-content h1,
.modal-content h2,
.modal-content h3,
.modal-content h4,
.modal-content h5,
.modal-content h6 {
  font-size: clamp(1.25rem, 1.1rem + 0.35vw, 1.6rem);
  line-height: 1.35;
}

.modal-content .small {
  font-size: 1rem !important;
  line-height: 1.65;
}

#modalDescription img,
#historyModalText img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 0.85rem;
}

.btn[data-bs-toggle="modal"] {
  font-size: 1.05rem;
}

button.alumni-card,
button.timeline-card {
  font-size: 1.05rem;
}

@media (min-width: 992px) {
  .modal-content {
    font-size: 1.25rem;
    line-height: 1.8;
  }

  .modal-content .h1,
  .modal-content .h2,
  .modal-content .h3,
  .modal-content .h4,
  .modal-content .h5,
  .modal-content .h6,
  .modal-content h1,
  .modal-content h2,
  .modal-content h3,
  .modal-content h4,
  .modal-content h5,
  .modal-content h6 {
    font-size: clamp(1.65rem, 1.35rem + 0.55vw, 2.2rem);
  }

  .modal-content .small {
    font-size: 1.2rem !important;
    line-height: 1.8;
  }

  .btn[data-bs-toggle="modal"] {
    font-size: 1.2rem;
  }

  button.alumni-card,
  button.timeline-card {
    font-size: 1.2rem;
  }
}

.form-control,
.form-control:focus,
.form-label::after {
  background: none !important;
}

#comment {
  height: 150px;
}

.fa-solid {
  font-family: "Font Awesome 6 Free";
  text-align: center;
  width: 1.25em;
  font-weight: 900;
  cursor: pointer;
  font-style: normal;
  font-variant: normal;
}

.fa-arrow-up-a-z::before {
  content: "";
}

.fa-magnifying-glass::before {
  content: "";
  color: var(--bs-body-color);
}

.active .fa-magnifying-glass::before {
  color: var(--bs-body-white);
}

#carouselExpo img {
  max-height: 80vh;
}
