/* =============================================
   about.css – 寺院ご案内ページ（寺院の歴史／境内紹介／年間行事／毎月の行事）
   ============================================= */

:root {
  --yellow: #ffce00;
  --yellow-light: #fff9e0;
  --orange: #e45b08;
  --red: #b3382c;
  --text: #333;
}

.about-lead {
  max-width: 760px;
  margin: 50px auto 0;
  text-align: center;
  color: #666;
  padding: 0 20px;
}

.sec-inner {
  max-width: 1100px;
  margin: auto;
}

/* ---- ごあいさつ・住職紹介 ---- */
.greeting-layout {
  display: flex;
  align-items: stretch;
  gap: 50px;
  margin-bottom: 50px;
}

.greeting-decorate {
  position: relative;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  padding: 10px 6px;
}

.greeting-decorate .section-title {
  position: relative;
  z-index: 1;
}

#greeting .decorate-trees {
  width: 50vw;
}

.greeting-photo {
  flex-shrink: 0;
  width: 260px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.greeting-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.greeting-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.greeting-text h3 {
  margin-bottom: 20px;
}

.greeting-body p {
  margin: 0 0 14px;
  color: #444;
}

.greeting-body p:last-child {
  margin-bottom: 0;
}

.greeting-sign {
  margin-top: 30px;
  text-align: right;
}

.greeting-sign-role {
  font-size: 0.85rem;
  margin: 0 0 6px;
  color: #444;
}

.greeting-sign-name {
  font-family: "Hina Mincho", serif;
  font-size: 1.9rem;
  color: #201542;
  margin: 0;
  letter-spacing: 0.1em;
}

/* ---- 住職の著書 ---- */
.greeting-books {
  padding-top: 40px;
  border-top: 1px solid #e3d9c6;
}

.greeting-books-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  font-size: 1.1rem;
  color: #201542;
}

.greeting-books-title::before {
  content: "";
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  background: #6f461d;
  transform: rotate(45deg);
}

.book-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.book-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: #edecec70;
  padding: 20px;
}

.book-photo {
  display: block;
  flex-shrink: 0;
  width: 130px;
  aspect-ratio: 3/4;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  background: #fff;
  cursor: pointer;
}

.book-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s;
}

.book-photo:hover img {
  transform: scale(1.08);
}

.book-body {
  flex: 1;
  min-width: 0;
  padding-top: 4px;
}

.book-name {
  margin: 0 0 14px;
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
}

.book-note {
  margin: 0 0 14px;
  font-size: 0.85rem;
  line-height: 1.7;
  color: #666;
}

.book-buy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 160px;
  padding: 10px 18px;
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  background-color: rgba(32, 21, 66, 0.9);
  box-shadow: 0 5px 14px rgba(43, 25, 57, 0.18);
  transition:
    background-color 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.book-buy-btn p {
  margin: 0;
  font-weight: 500;
  color: #fff;
}

.book-buy-btn:hover {
  background-color: #201542;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(43, 25, 57, 0.24);
}

/* ---- 歴史ポイント一覧 ---- */

#history {
  background: url(../img/bk/bk-lightyellow-wa.jpg) repeat;
  background-size: auto;
  overflow: hidden;
}

#history .decorate-tree-l-t {
  width: 45vw;
}

.history-bk {
  position: absolute;
  width: 100vw;
  height: 100%;
  display: block;
  background: url("../img/about/history-bk.png") no-repeat;
  background-size: cover;
  opacity: 0.1;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
}

.history-list {
  list-style: none;
  padding: 30px 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid #e3d9c6;
}

.history-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  padding: 30px 0;
  border-bottom: 1px solid #e3d9c6;
}

.history-item:first-child {
  padding-top: 0;
}

.history-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.history-body {
  flex: 1;
  min-width: 0;
}

.history-body h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.history-body h3::before {
  content: "";
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  background: #6f461d;
  transform: rotate(45deg);
}

.history-body p {
  margin: 0 0 10px;
  color: #444;
}

.history-body p:last-child {
  margin-bottom: 0;
}

.history-photo {
  flex-shrink: 0;
  width: 240px;
  aspect-ratio: 4/3;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.history-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.history-photo-link {
  display: contents;
  cursor: pointer;
}

.history-photo-link:hover img {
  transform: scale(1.06);
}

.flex-column{
  display: flex;
  flex-direction: column;
  flex-shrink: unset;
  gap: 15px;
}

.flex-column .history-photo{
  display: flex;
  width: 100%;
  aspect-ratio: inherit;
  flex-wrap: wrap;
  gap: 15px;
  box-shadow: none;
}


.flex-column .history-photo img{
  max-height: 240px;
  object-fit: contain;
  height: 100%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  width: auto;
  transition: transform 0.4s;
}

/* ---- 境内紹介 ---- */
.keidai-lead {
  max-width: 640px;
  margin: 0 auto 30px;
  text-align: center;
  color: #666;
  font-size: 0.9rem;
}

.keidai-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  min-width: 0;
}

.keidai-photo {
  display: block;
  min-width: 0;
  aspect-ratio: 4/3;
  overflow: hidden;
  position: relative;
}

.keidai-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}

.keidai-photo:hover img {
  transform: scale(1.08);
}

.keidai-photo-caption {
  position: absolute;
  left: 0;
  bottom: 1px;
  max-width: 100%;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.85rem;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-empty-note {
  text-align: center;
  color: #999;
  padding: 40px 0;
}

/* ---- ページネーション（境内紹介） ---- */
.about-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 36px;
}

.about-pager a,
.about-pager .pager-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  font-size: 0.9rem;
  font-weight: 600;
}

.about-pager a {
  border: 1.5px solid #201542;
  color: #201542;
}

.about-pager a:hover {
  background: #201542;
  color: #fff;
}

.about-pager .pager-current {
  background: #201542;
  color: #fff;
}

/* ---- 境内紹介 ライトボックス ---- */
.keidai-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 10, 0, 0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.keidai-modal.is-open {
  display: flex;
}

.keidai-modal-stage {
  position: relative;
  display: inline-flex;
  max-width: 86vw;
  max-height: 86vh;
}

.keidai-modal-img {
  display: block;
  max-width: 86vw;
  max-height: 86vh;
  width: auto;
  box-shadow: 0 10px 60px rgba(0, 0, 0, 0.5);
}

.keidai-modal-caption {
  display: none;
  position: absolute;
  left: 14px;
  bottom: 14px;
  margin: 0;
  max-width: calc(100% - 28px);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.keidai-modal-caption.is-visible {
  display: block;
}

.keidai-modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
}

.keidai-modal-prev,
.keidai-modal-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  transition: background 0.2s;
}

.keidai-modal-prev:hover,
.keidai-modal-next:hover {
  background: rgba(255, 255, 255, 0.3);
}

.keidai-modal-prev {
  left: 20px;
}
.keidai-modal-next {
  right: 20px;
}

/* ---- 年中行事（年間行事／毎月の行事） ---- */

#nenchugyoji {
  background: url(../img/bk/bk-white-wa.jpg) repeat;
  background-size: auto;
}

.nenchugyoji-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: start;
  padding: 0;
  margin-bottom: 20px;
}

.nenchugyoji-col {
  min-width: 0;
  scroll-margin-top: 130px;
  background: rgba(255, 255, 255, 0.5);
  padding: 0;
}

.nenchugyoji-col-title {
  background: #847a91;
  color: #fff;
  padding: 5px 10px;
  font-weight: 300;
  text-align: center;
  margin-bottom: 0;
}

/* ---- 年間行事／毎月の行事 共通レイアウト ---- */
.jigyo-list {
  display: flex;
  padding: 20px;
  flex-direction: column;
  border: 1px solid #847a913d;
}

.jigyo-row {
  display: flex;
  gap: 10px;
  padding: 22px 0;
  border-bottom: 1px solid #e3d9c6;
  flex-direction: column;
}

.jigyo-row:first-child {
  padding-top: 0;
}

.jigyo-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.jigyo-date {
  flex-shrink: 0;
  color: var(--red);
  font-weight: 600;
  font-family: "Shippori Mincho B1", serif;
  font-size: 0.85rem;
  background: #b3382c17;
  width: fit-content;
  padding: 1px 3px;
}

.jigyo-body {
  flex: 1;
  min-width: 0;
}

.jigyo-title {
  font-size: 1.15rem;
  color: #201542;
  margin: 0 0 6px;
}

.jigyo-time {
  font-size: 0.85rem;
  color: #4a7ba6;
}

.jigyo-note {
  font-size: 0.85rem;
  color: #333;
  margin: 0;
}

.jigyo-note p {
  font-size: inherit;
  margin: 0 0 6px;
}

.jigyo-note p:last-child {
  margin-bottom: 0;
}

.nenkan-footnote {
  margin-top: 20px;
  text-align: center;
  color: #333;
  font-size: 0.85rem;
}

.date-time {
  display: flex;
  flex-direction: row;
  column-gap: 10px;
  align-items: center;
}

/* ---- ご参加について バナー ---- */
.join-banner-section {
  margin: auto;
}

.join-banner {
  position: relative;
  max-width: 1100px;
  margin: auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 30px;
  background: var(--yellow-light);
  border: 1px solid #e9dcc2;
}

.join-banner-matsu {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%) scaleX(-1);
  width: 30vw;
  min-width: 200px;
  opacity: 0.2;
  pointer-events: none;
  user-select: none;
  object-position: top right;
}

.join-banner-title {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.join-banner-title img {
  width: 30px;
  height: 30px;
}

.join-banner-title p {
  margin: 0;
  font-family: "Hina Mincho", serif;
  font-size: 1.25rem;
  color: #201542;
  white-space: nowrap;
}

.join-banner-text {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.join-banner-text p {
  margin: 0;
  font-size: 0.92rem;
  color: #333;
  line-height: 1.8;
}

.join-banner-btn {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.join-banner-tel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 180px;
  padding: 11px 22px;
  color: #fff;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  background-color: rgba(32, 21, 66, 0.85);
  box-shadow: 0 5px 14px rgba(43, 25, 57, 0.18);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    background-color 0.3s ease;
}

.join-banner-tel:hover {
  background-color: rgba(32, 21, 66, 1);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(43, 25, 57, 0.24);
}

/* =============================================
   レスポンシブ
   ============================================= */

@media (max-width: 1560px) {
  .greeting-layout {
    gap: 30px;
  }

  .join-banner-text p {
    font-size: 0.85rem;
  }
}

@media (min-width: 1101px) {
  .greeting-photo-sp {
    display: none;
  }
}

@media (max-width: 1100px) {
  .greeting-layout {
    gap: 20px;
    margin-bottom: 0;
    align-items: flex-start;
  }

  .greeting-photo {
    display: none;
  }

  .greeting-photo-sp {
    margin-top: 0;
    display: block;
    width: 100%;
  }

  .keidai-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .greeting-decorate {
    padding: 0;
  }

  .nenchugyoji-columns {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .history-body h3 {
    font-size: 1.3rem;
  }

  .history-item {
    gap: 20px;
  }

  .history-list {
    padding: 30px 0;
  }

  .book-list {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .greeting-text h3 {
    margin-bottom: 10px;
  }

  .history-body h3 {
    margin-bottom: 0;
  }

  .greeting-photo {
    width: 200px;
  }

  .greeting-sign-name {
    font-size: 1.7rem;
    letter-spacing: 0;
  }

  .greeting-books {
    padding-top: 30px;
  }

  .book-photo {
    width: 100px;
  }

  #greeting .decorate-trees {
    width: 100vw;
  }

  .keidai-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .history-item {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
    border-bottom: none;
    padding: 0;
  }
  

  .history-photo {
    width: 100%;
    aspect-ratio: 16/9;
  }

  .history-list {
    padding-top: 10px;
    gap: 30px;       
    border-top: 1px solid #e3d9c6;
  }

  .flex-column{
    flex-direction: column;
    gap: 10px;
  }
  
  .jigyo-row {
    flex-direction: column;
    gap: 6px;
  }

  .jigyo-date {
    width: auto;
  }

  .keidai-modal-prev,
  .keidai-modal-next {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .keidai-modal-prev {
    left: 8px;
  }

  .keidai-modal-next {
    right: 8px;
  }

  .join-banner-section {
    padding: 0;
  }

  .join-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 20px;
  }

  .join-banner-btn {
    align-self: stretch;
  }

  .join-banner-tel {
    width: 100%;
  }

  .nenkan-footnote {
    text-align: left;
    margin-top: 15px;
    font-size: 0.8rem;
  }
}

@media (max-width: 600px) {
  .jigyo-title {
    font-size: 1rem;
  }

  .flex-column .history-photo img {
    max-width: 100%;
    max-height: none;
    width: auto;
    height: auto;
  }
}
