@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@200..900&display=swap');

/* Fix Cormorant blocks so Chinese characters use Noto Serif SC */
.has-cormorant-font-family,
.has-cormorant-font-family *,
.wp-block-paragraph.has-cormorant-font-family,
.wp-block-heading.has-cormorant-font-family,
.wp-block-gallery.hamada-gallery figcaption,
.wp-block-gallery.hamada-gallery .wp-element-caption {
  font-family: "Cormorant", "Cormorant Garamond", "Noto Serif SC", Georgia, serif !important;
}

/* Stronger fallback for Chinese-containing text blocks */
.zh-text,
.zh-text * {
  font-family: "Cormorant", "Cormorant Garamond", "Noto Serif SC", Georgia, serif !important;
}
/* Hamada gallery: stable 7-column CSS grid */
.wp-block-gallery.hamada-gallery {
  display: grid !important;
  grid-template-columns: repeat(7, 1fr) !important;
  gap: 5px !important;
  align-items: start !important;
  justify-content: center !important;
}

/* Each gallery item */
.wp-block-gallery.hamada-gallery figure.wp-block-image {
  width: 100% !important;
  max-width: none !important;
  flex: none !important;

  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;

  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  position: relative !important;

  background: transparent !important;
  box-shadow: none !important;
  filter: none !important;
}

/* Image link wrapper */
.wp-block-gallery.hamada-gallery figure.wp-block-image > a {
  display: block !important;
  width: 100% !important;
  line-height: 0 !important;
}

/* Image */
.wp-block-gallery.hamada-gallery figure.wp-block-image img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;

  object-fit: cover !important;

  visibility: visible !important;
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;

  box-shadow: none !important;
  filter: none !important;
  border: none !important;
  outline: none !important;
}

/* Caption underneath image */
.wp-block-gallery.hamada-gallery figure.wp-block-image figcaption,
.wp-block-gallery.hamada-gallery figure.wp-block-image .wp-element-caption {
  position: static !important;
  inset: auto !important;

  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;

  margin: 8px 0 0 0 !important;
  padding: 0 0 0 3px !important;

  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  filter: none !important;
  text-shadow: none !important;

  font-family: "Cormorant", "Cormorant Garamond", Georgia, serif !important;
  font-size: 16px !important;
  font-style: normal !important;
  font-weight: 400 !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
  color: #222 !important;
  text-align: left !important;

  opacity: 0 !important;
  transform: none !important;
  transition: opacity 0.5s ease !important;
}

/* Chinese characters only */
.wp-block-gallery.hamada-gallery .zh-char {
  font-family: "Noto Serif SC", serif !important;
  font-weight: 400 !important;
  line-height: 1.35 !important;
  letter-spacing: 0.02em !important;
}

/* Caption fade-in */
.wp-block-gallery.hamada-gallery figure.wp-block-image:hover figcaption,
.wp-block-gallery.hamada-gallery figure.wp-block-image:hover .wp-element-caption {
  opacity: 1 !important;
}

/* Remove overlay effects */
.wp-block-gallery.hamada-gallery figure.wp-block-image::before,
.wp-block-gallery.hamada-gallery figure.wp-block-image::after,
.wp-block-gallery.hamada-gallery figcaption::before,
.wp-block-gallery.hamada-gallery figcaption::after,
.wp-block-gallery.hamada-gallery .wp-element-caption::before,
.wp-block-gallery.hamada-gallery .wp-element-caption::after {
  content: none !important;
  display: none !important;
}

/* Tablet */
@media (max-width: 1024px) {
  .wp-block-gallery.hamada-gallery {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .wp-block-gallery.hamada-gallery {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}
/* Mobile: continuous 3-column grid, tighter side margins */
@media (max-width: 700px) {
  .hamada-mobile-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 5px !important;

    width: 100vw !important;
    max-width: 100vw !important;

    position: relative !important;
    left: 50% !important;
    transform: translateX(-50%) !important;

    margin: 0 !important;
    padding: 0 10px !important;
    box-sizing: border-box !important;

    align-items: start !important;
  }

  .hamada-mobile-grid .wp-block-gallery.hamada-gallery {
    display: contents !important;
  }

  .hamada-mobile-grid .wp-block-gallery.hamada-gallery figure.wp-block-image {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }

  .hamada-mobile-grid .wp-block-gallery.hamada-gallery figure.wp-block-image img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
  }


}
/*-----------------------------------------------------------------------------------*/
/* Hamada-style slideshow container */
.wp-block-jetpack-slideshow.hamada-slideshow {
  width: 100vw !important;
  max-width: none !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Remove forced rectangular crop/box behavior */
.wp-block-jetpack-slideshow.hamada-slideshow .swiper,
.wp-block-jetpack-slideshow.hamada-slideshow .swiper-wrapper,
.wp-block-jetpack-slideshow.hamada-slideshow .swiper-slide,
.wp-block-jetpack-slideshow.hamada-slideshow figure {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  background: transparent !important;
  box-shadow: none !important;
  filter: none !important;
}

/* Center each slide */
.wp-block-jetpack-slideshow.hamada-slideshow .swiper-slide {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  opacity: 0 !important;
  transition: opacity 1s ease !important;
}

/* Active slide fades in */
.wp-block-jetpack-slideshow.hamada-slideshow .swiper-slide-active {
  opacity: 1 !important;
}

/* Preserve original image proportions */
.wp-block-jetpack-slideshow.hamada-slideshow img,
.wp-block-jetpack-slideshow.hamada-slideshow .wp-block-jetpack-slideshow_image {
  width: auto !important;
  height: auto !important;
  max-width: min(78vw, 1120px) !important;
  max-height: calc(100vh - 180px) !important;
  object-fit: contain !important;
  box-shadow: none !important;
  filter: none !important;
  border: none !important;
  outline: none !important;
}

/* Remove default figure spacing */
.wp-block-jetpack-slideshow.hamada-slideshow figure {
  margin: 0 !important;
  padding: 0 !important;
}

/* Hide default slideshow arrow buttons */
.wp-block-jetpack-slideshow.hamada-slideshow .swiper-button-prev,
.wp-block-jetpack-slideshow.hamada-slideshow .swiper-button-next {
  opacity: 0 !important;
  pointer-events: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Page count / pagination */
.wp-block-jetpack-slideshow.hamada-slideshow .swiper-pagination,
.wp-block-jetpack-slideshow.hamada-slideshow .wp-block-jetpack-slideshow_pagination {
  position: relative !important;
  bottom: auto !important;
  width: auto !important;
  margin-top: 34px !important;
  margin-left: 48px !important;
  padding: 0 !important;

  text-align: left !important;
  font-family: "Cormorant", "Cormorant Garamond", Georgia, serif !important;
  font-size: 50px !important;
  font-style: normal !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  color: #222 !important;

  background: transparent !important;
  box-shadow: none !important;
}

/* Right-arrow cursor */
body.hamada-cursor-next,
body.hamada-cursor-next * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='23' viewBox='0 0 23 23'%3E%3Cpath d='M8 4 L16 11.5 L8 19' fill='none' stroke='%23222' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 11 11, e-resize !important;
}

/* Left-arrow cursor */
body.hamada-cursor-prev,
body.hamada-cursor-prev * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='23' viewBox='0 0 23 23'%3E%3Cpath d='M15 4 L7 11.5 L15 19' fill='none' stroke='%23222' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 11 11, w-resize !important;
}

/* Mobile adjustment */
@media (max-width: 768px) {
  .wp-block-jetpack-slideshow.hamada-slideshow img,
  .wp-block-jetpack-slideshow.hamada-slideshow .wp-block-jetpack-slideshow_image {
    max-width: 90vw !important;
    max-height: calc(100vh - 150px) !important;
  }

  .wp-block-jetpack-slideshow.hamada-slideshow .swiper-pagination,
  .wp-block-jetpack-slideshow.hamada-slideshow .wp-block-jetpack-slideshow_pagination {
    margin-left: 24px !important;
    font-size: 28px !important;
  }
}
/*THIS IS FOR THE HEADER BUTTONS AND SLIDESHOW*/
/* Header/nav links use normal pointer cursor across the full button area */
body.hamada-cursor-next header .wp-block-navigation-item,
body.hamada-cursor-prev header .wp-block-navigation-item,
body.hamada-cursor-next header .wp-block-navigation-item *,
body.hamada-cursor-prev header .wp-block-navigation-item *,
body.hamada-cursor-next header .wp-block-navigation-item__content,
body.hamada-cursor-prev header .wp-block-navigation-item__content,
body.hamada-cursor-next header .wp-block-navigation-link,
body.hamada-cursor-prev header .wp-block-navigation-link,
body.hamada-cursor-next header .wp-block-site-title,
body.hamada-cursor-prev header .wp-block-site-title,
body.hamada-cursor-next header .wp-block-site-title *,
body.hamada-cursor-prev header .wp-block-site-title * {
  cursor: pointer !important;
}

/* Slightly enlarge the actual clickable/hover area without visibly moving layout */
header .wp-block-navigation-item__content,
header .wp-block-navigation-link,
header .wp-block-site-title a {
  display: inline-block !important;
  padding: 6px 8px !important;
  margin: -6px -8px !important;
}