* {
  box-sizing: border-box;
}

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

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

img {
  height: auto;
}

@media (max-width: 768px) {
  body {
    font-size: 16px;
  }

  .navbar {
    width: 100%;
    height: 112px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .logo {
    flex: none;
    align-self: flex-start;
    width: auto;
    max-width: 120px;
    max-height: 40px;
  }

  .navbar-collapse,
  .navbar-right {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
  }

  .navbar-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, 1fr);
    align-items: center;
    justify-items: center;
    width: 100%;
    gap: 0;
    margin: 0;
    padding: 0;
  }

  .nav-item,
  .footer-navbar .nav-item {
    margin: 0;
  }

  .nav-link {
    display: inline-block;
    padding: 3px 2px;
    font-size: 13px;
    white-space: nowrap;
  }

  .mainSwiper {
    width: 100%;
    height: auto;
    margin-top: 124px;
  }

  main {
    padding-top: 124px;
  }

  .lock-content > header + .hero {
    margin-top: 124px;
  }

  .mainSwiper .swiper-slide img,
  .hero-image {
    display: block;
    width: 100%;
    height: auto;
  }

  .thumbSwiper,
  .thumbSwiper .swiper-slide img {
    width: 100%;
  }

  .thumbSwiper .swiper-slide img {
    height: auto;
  }

  .container,
  .main_container,
  .company-info,
  main {
    width: 100%;
    max-width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }

  .company-info {
    margin-top: 124px;
  }

  .company-info > div {
    display: block;
    margin-bottom: 24px;
  }

  .company-info > div h2 {
    width: auto;
    margin: 0 0 4px;
  }

  .company-info > div p,
  .company-info > div ul {
    margin: 0;
  }

  .artist-grid {
    display: block;
  }

  .image-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 12px 8px;
  }

  .image-grid:has(> .image-item:nth-child(5):last-child),
  .image-grid:has(> .image-item:nth-child(6):last-child),
  .image-grid:has(> .image-item:nth-child(7):last-child),
  .image-grid:has(> .image-item:nth-child(8):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .image-grid .image-item {
    grid-column: auto !important;
    min-width: 0;
  }

  .image-item img {
    display: block;
    width: 100%;
    height: auto !important;
    aspect-ratio: auto;
    object-fit: contain;
  }

  .image-name,
  .image-caption {
    overflow-wrap: anywhere;
    font-size: 14px;
  }

  .youtube-container {
    display: block;
  }

  .youtube-video {
    padding: 5px 0;
  }

  .youtube-video iframe {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .contact-form {
    width: 100%;
    margin: 124px auto 28px;
    padding: 24px 16px;
  }

  .intro,
  .rules,
  .schedule,
  .costume {
    padding: 20px 16px;
  }
}

@media (max-width: 420px) {
  .navbar {
    height: 112px;
  }

  .nav-link {
    font-size: 12px;
  }

  .mainSwiper {
    margin-top: 124px;
  }
}