body {
  padding-top: 56px;
}

/* アンカーリンクで各セクションのヘッダーへ飛んだ際に固定ナビの下に隠れないようにする */
section[id] {
  scroll-margin-top: 56px;
}

/* Navbar */
.navbar-toggler {
  border: 0;
  padding: 0;
}

.navbar-toggler:focus {
  box-shadow: none;
}

.navbar-nav .nav-link {
  border-bottom: 2px solid transparent;
}

.navbar-nav .nav-link.active {
  border-bottom-color: #212529;
  color: #000;
  font-weight: 600;
}

/* Hero */
.hero {
  position: relative;
  height: 80vh;
  min-height: 320px;
  background: url("../hpimg/bg.jpg") center center / cover no-repeat;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
}

.hero .hero-logo {
  position: relative;
  max-width: 220px;
  width: 40%;
}

.hero .hero-copy {
  position: relative;
  margin: 1.5rem 0 0;
  color: #fff;
  font-size: clamp(1rem, 2.4vw, 1.6rem);
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

/* Section spacing */
.site-section {
  padding: 4rem 0;
}

.site-section h2 {
  margin-bottom: 0;
  font-weight: 700;
}

/* Placeholder image box used instead of real photos */
.placeholder-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #ced4da;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
}

#beginner .card,
#members .card,
#link .card {
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.25);
}

.works-category-btn.active {
  background-color: #212529;
  border-color: #212529;
  color: #fff;
}

.works-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 6rem auto;
}

.works-scroll-item {
  aspect-ratio: 1 / 1;
}

.works-scroll-frame {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #fff;
}

.works-scroll-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.25));
}

@media (max-width: 767px) {
  .works-gallery {
    grid-template-columns: repeat(2, 1fr);
    margin: 2rem auto;
  }
}

/* News list */
.news-list-scroll {
  max-height: 390px;
  overflow-y: auto;
}

.news-list .news-item {
  border-bottom: 1px solid #dee2e6;
  padding: 1rem 0;
}

.news-list .news-item:last-child {
  border-bottom: none;
}

.contact-confirm-list dt {
  font-size: 0.875rem;
  color: #6c757d;
  margin-bottom: 0.25rem;
}

.contact-confirm-list dd {
  margin-bottom: 1rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.contact-confirm-list dd:last-child {
  margin-bottom: 0;
}

.leaflet-modal-image {
  display: block;
  height: auto;
  margin: 0 auto;
  max-height: 75vh;
  max-width: 100%;
}

#leaflet-carousel .carousel-control-prev-icon,
#leaflet-carousel .carousel-control-next-icon {
  filter: invert(1) grayscale(1);
}

/* About page sidebar */
.about-title {
  font-weight: 700;
}

.about-subtitle {
  background-color: #212529;
  color: #fff;
  display: block;
  padding: 0.75rem 1rem;
  width: 100%;
}

.about-block-image {
  cursor: zoom-in;
  float: right;
  margin: 0 0 1rem 1.5rem;
  max-width: 180px;
  width: 28%;
}

.about-block-image:focus {
  outline: 3px solid rgba(13, 110, 253, 0.35);
  outline-offset: 3px;
}

.about-block-content::after {
  clear: both;
  content: "";
  display: block;
}

.about-block-content-wide {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr 1fr;
}

.about-block-content-wide::after {
  display: none;
}

.about-block-content-wide .about-block-image {
  float: none;
  margin: 0;
  max-width: none;
  order: 2;
  width: 100%;
}

.about-block-content-wide .about-block-text {
  order: 1;
}

.about-block-videos {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0;
}

.about-modal-image {
  height: auto;
  max-height: 75vh;
  max-width: 100%;
}

.about-video {
  aspect-ratio: 16 / 9;
  flex: 0 1 400px;
  max-width: 100%;
}

.about-video iframe {
  border: 0;
  display: block;
  height: 100%;
  width: 100%;
}

.about-sidebar {
  position: sticky;
  top: 80px;
}

.about-sidebar .nav-link {
  border-left: 3px solid transparent;
  color: #212529;
  padding-left: 0.75rem;
}

.about-sidebar .nav-link.active {
  background-color: #f8f9fa;
  border-left-color: #212529;
  color: #000;
  font-weight: bold;
}

@media (max-width: 767.98px) {
  .hero {
    background-attachment: scroll;
    height: 40vh;
  }

  #beginner .row,
  #members .row,
  #link .row {
    padding-inline: 1.5rem;
  }

  .about-sidebar {
    position: static;
  }

  .about-block-image {
    float: none;
    margin: 0 0 1rem;
    max-width: 220px;
    width: 100%;
  }

  .about-block-content-wide {
    display: block;
  }

  .about-block-content-wide .about-block-image {
    margin: 0 0 1rem;
    max-width: none;
    width: 100%;
  }

  .about-block-content-forties .about-block-image {
    max-width: none;
    width: 100%;
  }

  .about-video {
    flex-basis: 100%;
  }
}
