/* Responsive corrections for the legacy homepage layout. */
html {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  scroll-padding-top: 76px;
}

body {
  display: block;
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  place-items: initial;
}

main,
main > .container,
section,
footer {
  min-width: 0;
  max-width: 100%;
}

main {
  width: 100%;
}

main > .container {
  width: 100%;
  padding-inline: clamp(0.75rem, 3vw, 1.5rem);
}

.navbar.fixed-top {
  width: 100%;
  min-height: 64px;
  margin: 0;
  padding-top: max(0.55rem, env(safe-area-inset-top));
  padding-right: max(clamp(0.75rem, 3vw, 1.5rem), env(safe-area-inset-right));
  padding-bottom: 0.55rem;
  padding-left: max(clamp(0.75rem, 3vw, 1.5rem), env(safe-area-inset-left));
  border-radius: 0;
  cursor: default;
}

.navbar.menu {
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 211, 238, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(3, 12, 28, 0.96), rgba(9, 30, 58, 0.94)) !important;
  border-bottom: 1px solid rgba(103, 232, 249, 0.28);
  box-shadow: 0 12px 32px rgba(0, 5, 18, 0.34), inset 0 -1px rgba(255, 255, 255, 0.04);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
  backdrop-filter: blur(16px) saturate(135%);
}

.navbar.menu .navbar-brand,
.navbar.menu .nav-link {
  color: rgba(255, 255, 255, 0.94) !important;
  text-shadow: 0 1px 14px rgba(34, 211, 238, 0.15);
}

.navbar.menu .nav-link:hover,
.navbar.menu .nav-link:focus-visible {
  color: #67e8f9 !important;
}

.navbar.menu .navbar-toggler {
  border-color: rgba(103, 232, 249, 0.48);
  background: rgba(15, 39, 71, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.navbar.menu .navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(34, 211, 238, 0.2);
}

.navbar > .container-fluid {
  min-width: 0;
  padding: 0;
}

.navbar-brand {
  min-width: 0;
  margin-right: 0.75rem;
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  line-height: 1.25;
  white-space: normal;
}

.navbar-brand .brand-logo {
  width: clamp(38px, 8vw, 48px);
  height: auto;
  flex: 0 0 auto;
  object-fit: contain;
}

.navbar-toggler {
  min-width: 44px;
  min-height: 44px;
  padding: 0.45rem;
  flex: 0 0 auto;
}

.navbar-nav .nav-item {
  min-width: 0;
}

.section-banner {
  display: flex;
  min-height: clamp(420px, 70vh, 680px);
  align-items: center;
  padding-top: 7rem !important;
  padding-bottom: 3rem !important;
}

.section-banner > .row {
  width: 100%;
  margin-inline: 0;
}

.section-banner h1 {
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  line-height: 1.2;
}

.section-banner h2 {
  font-size: clamp(1.2rem, 3.2vw, 2rem);
  line-height: 1.45;
}

.section-banner h3 {
  font-size: clamp(0.95rem, 2vw, 1.25rem);
  line-height: 1.55;
}

.youtube-section,
.news-section,
.news-slider-section {
  width: 100%;
  overflow: hidden;
}

.youtube-container {
  width: 100%;
  padding: clamp(0.75rem, 3vw, 1.25rem);
}

.youtube-container iframe {
  max-width: 100%;
}

.news-card,
.news-slider-card {
  max-width: 100%;
}

.news-card img,
.news-slider-card img {
  display: block;
}

.news-slider-track {
  max-width: none;
  will-change: transform;
}

.section-footer {
  width: 100%;
  padding: clamp(2rem, 5vw, 4rem) 0 max(clamp(2rem, 5vw, 4rem), env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.5);
}

.section-footer p {
  overflow-wrap: anywhere;
}

.visitor-counter {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  margin-top: 0.65rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(64, 224, 255, 0.3);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(7, 24, 43, 0.74);
  box-shadow: inset 0 0 20px rgba(64, 224, 255, 0.05);
  backdrop-filter: blur(10px);
  font-size: 0.9rem;
}

.visitor-counter-icon {
  width: 0.62rem;
  height: 0.62rem;
  flex: 0 0 auto;
  border: 2px solid #40e0ff;
  border-radius: 50%;
  box-shadow: 0 0 9px rgba(64, 224, 255, 0.75);
}

.visitor-counter-value {
  color: #71e8ff;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

.visitor-counter-unit {
  color: rgba(255, 255, 255, 0.58);
}

.stats-footer-link {
  display: inline-flex;
  min-height: 44px;
  margin-top: 0.65rem;
  margin-left: 0.5rem;
  padding: 0.65rem 0.9rem;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.stats-footer-link:hover,
.stats-footer-link:focus-visible {
  color: #04111e;
  border-color: #40e0ff;
  background: #40e0ff;
}

@media (min-width: 1200px) {
  .navbar.menu > .container-fluid {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) auto minmax(170px, 1fr);
    align-items: center;
  }

  .navbar.menu .navbar-brand {
    grid-column: 1;
    justify-self: start;
  }

  .navbar-collapse {
    display: flex !important;
    grid-column: 2;
    justify-self: center;
  }

  .navbar.menu .navbar-nav {
    flex-wrap: nowrap;
    justify-content: center;
    margin-inline: 0 !important;
  }

  .navbar.menu .nav-link {
    padding-inline: clamp(0.3rem, 0.5vw, 0.6rem);
    font-size: clamp(0.76rem, 0.75vw, 0.94rem);
    white-space: nowrap;
  }

  .navbar.menu .navbar-toggler {
    grid-column: 3;
    justify-self: end;
  }
}

@media (max-width: 1199.98px) {
  .navbar-collapse {
    width: 100%;
    flex-basis: 100%;
  }

  .navbar-collapse:not(.show) {
    display: none !important;
  }

  .navbar-collapse.show,
  .navbar-collapse.collapsing {
    display: block !important;
    margin-top: 0.55rem;
    padding: 0.15rem 0.75rem 0.55rem;
    border: 1px solid rgba(103, 232, 249, 0.18);
    border-radius: 16px;
    background: rgba(4, 17, 36, 0.86);
    box-shadow: 0 16px 30px rgba(0, 4, 16, 0.32);
  }

  .navbar-nav {
    width: 100%;
    align-items: stretch;
    padding: 0.65rem 0 0.25rem;
  }

  .navbar-nav .nav-item {
    display: block;
    width: 100%;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .navbar-nav .nav-link {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 0.8rem 0.4rem;
    text-align: left;
  }
}

@media (max-width: 767.98px) {
  body {
    background-attachment: scroll;
    background-position: center top;
  }

  main > .container {
    padding-inline: 0.75rem;
  }

  .section-banner {
    min-height: 500px;
    padding-top: 6.5rem !important;
    padding-inline: 0.25rem;
  }

  .section-banner .row,
  .section-banner [class*="col-"] {
    margin-inline: 0;
    padding-inline: 0;
  }

  .virtual-tour-menu {
    width: calc(100% + 1.5rem);
    max-width: none;
    margin-inline: -0.75rem;
  }

  .youtube-section,
  .news-section,
  .news-slider-section {
    margin-top: 0;
    padding-block: 2.5rem !important;
  }

  .youtube-section h2,
  .news-section h2,
  .news-slider-section h3 {
    font-size: clamp(1.45rem, 7vw, 1.9rem);
  }

  .youtube-controls {
    gap: 0.65rem;
  }

  .youtube-controls .btn {
    width: 100%;
    max-width: none;
    min-height: 44px;
    margin-inline: 0 !important;
  }

  #newsContainer > [class*="col-"] {
    width: 100%;
    padding-inline: 0.75rem;
  }

  .news-card {
    height: auto;
    min-height: 0;
  }

  .news-card img {
    height: clamp(170px, 52vw, 240px);
  }

  .news-card-body {
    height: auto;
    min-height: 190px;
    padding: 1rem;
  }

  .news-slider-container {
    padding-inline: 2.75rem;
  }

  .news-slider-item {
    flex-basis: min(78vw, 280px);
    min-width: min(78vw, 280px);
  }

  .slider-nav-btn {
    width: 40px;
    height: 40px;
  }

  .slider-nav-btn.prev {
    left: 2px;
  }

  .slider-nav-btn.next {
    right: 2px;
  }

  .section-footer .row {
    gap: 1.5rem;
  }

  .section-footer .col-8,
  .section-footer .col-4 {
    width: 100%;
    flex: 0 0 100%;
  }

  .section-footer .h4 {
    font-size: 1rem;
    line-height: 1.6;
  }

  .section-footer .h5 {
    font-size: 1.05rem;
  }

  .visitor-counter {
    max-width: 100%;
    flex-wrap: wrap;
  }

  .stats-footer-link {
    margin-left: 0;
  }
}

@media (max-width: 479.98px) {
  .navbar.fixed-top {
    min-height: 60px;
    padding-inline: 0.65rem;
  }

  .navbar-brand {
    max-width: calc(100% - 58px);
    font-size: 0.9rem;
  }

  .navbar-brand .brand-logo {
    width: 38px;
    margin-right: 0.45rem !important;
  }

  .section-banner {
    min-height: 450px;
  }

  .section-banner h1 {
    font-size: 1.65rem;
  }

  .section-banner h2 {
    font-size: 1.08rem;
  }

  .section-banner h3 {
    font-size: 0.86rem;
  }

  .vt-stage {
    height: 465px;
  }

  .vt-card {
    width: calc(100vw - 42px);
    height: 430px;
    border-radius: 22px;
  }

  .vt-card-cover {
    height: 43%;
    min-height: 170px;
  }

  .vt-card-content {
    padding: 0.4rem 1rem 1rem;
  }

  .vt-card-content h3 {
    font-size: 1.08rem;
  }

  .vt-card-name-en {
    min-height: 2.4em;
    font-size: 0.65rem;
  }

  .vt-card-description {
    margin-block: 0.5rem 0.7rem;
    font-size: 0.77rem;
    line-height: 1.45;
  }

  .vt-controls {
    gap: 0.5rem;
  }

  .vt-nav-button {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .vt-dots {
    gap: 0.35rem;
  }

  .vt-dot {
    width: 7px;
    height: 7px;
  }

  .vt-dot.is-active {
    width: 20px;
  }

  .news-slider-container {
    padding-inline: 2.3rem;
  }

  .news-slider-item {
    flex-basis: calc(100vw - 5.5rem);
    min-width: calc(100vw - 5.5rem);
  }
}

@media (max-width: 319.98px) {
  .navbar-brand {
    font-size: 0.78rem;
  }

  .navbar-brand .brand-logo {
    width: 32px;
  }

  .vt-card {
    width: calc(100vw - 28px);
  }

  .vt-menu-heading {
    width: calc(100% - 1.25rem);
  }

  .vt-menu-heading h2 {
    font-size: 1.45rem;
  }

  .vt-nav-button {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .shooting-star,
  .star,
  .news-card {
    animation: none !important;
  }
}
