body#ceremony {
  padding-top: 100px; /* headerの高さ分 */
}




#ceremony header {
  transition: top 0.3s;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

#ceremony header.hide {
  top: -100px; /* ヘッダーの高さ分消えるように */
}


.video-wrap {
    position: relative;
    width: 560px;
    max-width: 100%;
    aspect-ratio: 16 / 9; /* モダンブラウザはこれでOK */
    margin: 0 auto;
  }

  .video-wrap iframe {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 0;
    top: 0;
    left: 0;
  }

  @supports not (aspect-ratio: 16 / 9) {
    .video-wrap {
      height: 0;
      padding-bottom: 56.25%; /* = 9 ÷ 16 */
    }
  }

h2.douga{
    text-align: center;
    border-bottom: 4px solid #0075c2;
        width: 40%;
    margin: 0 auto 2% auto;
}
 .ceremony {
    width: 100%;
        margin: 0 auto 6%;
    padding: 40px 20px;
    font-family: 'Noto Serif JP', serif;
    background-color: #f8f9fa;
    position: relative;
  }

  .ceremony_wrapper {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 20px;
  }

  .ceremony h2 {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 60px;
    font-weight: 600;
    color: #2c3e50;
    width: 100%;
    max-width: 1280px;
  }

  .timeline {
    position: relative;
  }

  .timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    background: linear-gradient(to bottom, #006699 20%, #ccc 80%);
    animation: pulseLine 3s infinite alternate;
    z-index: 0;
  }

  .reception-timeline.timeline::before {
    background: linear-gradient(to bottom, #800040 20%, #ccc 80%)
 }
  @keyframes pulseLine {
    0% { background-position: 0% 0%; }
    100% { background-position: 0% 100%; }
  }

  .ceremony-block {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 60px;
    padding: 30px;
    background-color: #ffffff;
    position: relative;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.6s ease-out;
  }

  .ceremony-block.visible {
    opacity: 1;
    transform: translateY(0);
  }

  /*.ceremony-block::before {
    content: "";
    position: absolute;
    top: calc(2.5em + 10px);
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background-color: #006699;
    border-radius: 50%;
    box-shadow: 0 0 0 3px #fff, 0 0 0 6px #ccc;
    z-index: 2;
  }*/

  .corner-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-top: 40px solid #006699;
    border-right: 40px solid transparent;
    border-radius: 12px 0 0 0;
    z-index: 1;
  }

  .ceremony-text {
    flex: 1 1 300px;
  }

  .ceremony-text h3 {
    font-size: 1.6em;
    margin-bottom: 10px;
    color: #2d3436;
    font-weight: 500;
    border-bottom: 2px solid #ccc;
    padding-bottom: 5px;
  }

  .ceremony-text p {
    font-size: 1em;
    line-height: 1.8;
    color: #555;
  }

  .ceremony-media {
    flex: 1 1 300px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .ceremony-media img {
	  cursor: pointer;
    width: 100%;
    height: auto;
    max-width: 420px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }

  .pdf-link {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 14px;
    background-color: #006699;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.3s;
  }

  .pdf-link:hover {
    background-color: #004d66;
  }







.gallery {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      gap: 10px;
    }

    .gallery img {
      width: 100%;
      cursor: pointer;
      border-radius: 6px;
      transition: transform 0.3s;
    }

    .gallery img:hover {
      transform: scale(1.05);
    }

    /* ライトボックスのスタイル */
    .lightbox {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.9);
      justify-content: center;
      align-items: center;
      z-index: 9999;
    }

    .lightbox img {
      max-width: 90%;
      max-height: 80%;
      border-radius: 8px;
    }

    .lightbox:target {
      display: flex;
    }

    .close {
      position: absolute;
      top: 20px;
      right: 30px;
      font-size: 30px;
      color: white;
      text-decoration: none;
      font-weight: bold;
    }

    .close:hover {
      color: #ccc;
    }


.gyarally h2{
	font-size: 2.5em;
    text-align: center;
    margin-bottom: 60px;
    font-weight: 600;
    color: #2c3e50;
    width: 100%;
    max-width: 1280px;
}
.gyarally h2:after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 140px;
    height: 2px;
    background-color: #0075c2;
}




.custom-gallery {
  display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 45px;
    max-width: 1245px;
    margin: 0 auto;
}

.custom-gallery img {
  width: 100%;
  height: auto;
  cursor: pointer;
  border-radius: 4px;
  transition: transform 0.2s ease;
	box-shadow: 0 4px 10px rgb(0 0 0 / 79%);
  border-radius: 6px;
}

.custom-gallery img:hover {
  transform: scale(1.05);
}

.custom-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.custom-lightbox.active {
  display: flex;
  opacity: 1;
}

.custom-lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 0 20px #000;
  transform: scale(0.8);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.custom-lightbox.active img {
  transform: scale(1);
  opacity: 1;
}

.custom-lightbox-close {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 36px;
  color: white;
  cursor: pointer;
  z-index: 10000;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .custom-gallery {
           grid-template-columns: repeat(2, 1fr);
        gap: 36px;
        margin: 0 3%;
  }
	
.pdf-link {
    width: 100%;
    text-align: center;
}
	
}

@media (max-width: 480px) {
  .custom-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}




@media (max-width: 780px) {

h2.douga{
    width: 100%;
}
}


/* 初期状態（非表示） */
.ceremony-block,
.custom-gallery img {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

/* 表示された時の状態 */
.ceremony-block.visible,
.custom-gallery img.visible {
  opacity: 1;
  transform: translateY(0);
}


.hirayama-video-block {
    max-width: 100%;
    margin: 2em auto;
    padding: 0;
    text-align: center;
  }

  .hirayama-video {
    width: 100%;
    max-width: 800px;
    height: auto;
    border: none;
    display: block;
    margin: 0 auto;
  }



  .hirayama-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    line-height: 55px; /* 中央寄せに重要 */
    text-align: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.4s, transform 0.3s ease;
  }

  .hirayama-back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.3);
  }

  .hirayama-back-to-top.show {
    opacity: 1;
  }

  @media (max-width: 768px) {
    .hirayama-back-to-top {
      width: 45px;
      height: 45px;
      font-size: 18px;
      line-height: 45px;
      bottom: 20px;
      right: 15px;
    }
  }

  .reception-block {
    background-color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 117, 194, 0.1);
    border-radius: 20px;
    padding: 1.5rem;
  }

  .reception-corner {
    border-top: 40px solid #800040;
  }

  .ceremony-media.single {
    text-align: center;
  }

  .ceremony-media.single img {
    cursor: pointer;
    width: 100%;
    height: auto;
    max-width: 420px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }

  .ceremony-media.multi {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
  }

  .ceremony-media.multi img {
    cursor: pointer;
    width: 48%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }

  @media (max-width: 940px){
    .reception-title {
      width: 100%;
    }
    .ceremony-media.multi img {
      width: 100%;
    }
  }


.ceremony-media.vertical {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  align-items: center;
  margin-top: 1rem;
}

.ceremony-media.vertical img {
  max-width: 480px;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

