/* ギャラリー管理Plusプラグイン: フロント用スタイル */

/* --- 共通スタイル --- */
.ec-galleryRole { margin-bottom: 24px; box-sizing: border-box; }
.ec-galleryRole *, .ec-galleryRole *::before, .ec-galleryRole *::after { box-sizing: border-box; }
.ec-galleryRole__image { display: block; width: 100%; height: auto; }
.ec-galleryRole__title { margin: 4px 0 0; font-size: 13px; text-align: center; color: #525263; }
.ec-galleryRole__item a { display: block; text-decoration: none; color: inherit; overflow: hidden; }
.ec-galleryRole__item a .ec-galleryRole__image { transition: transform .3s, opacity .2s; }
.ec-galleryRole__item a:hover .ec-galleryRole__image { transform: scale(1.05); opacity: .7; }

/* --- 1: スライダー --- */
.ec-galleryRole--slider { max-width: 1130px; margin-left: auto; margin-right: auto; padding: 0 20px; }
.ec-galleryRole--slider .ec-galleryRole__slider { margin-bottom: 0; }
.ec-galleryRole--slider .slick-dots { position: absolute; bottom: 5px; z-index: 5; display: block; width: 100%; padding: 0; margin: 0; list-style: none; text-align: center; }
.ec-galleryRole--slider .slick-dots li { position: relative; display: inline-block; width: 20px; height: 20px; margin: 0 5px; padding: 0; cursor: pointer; }
.ec-galleryRole--slider .slick-dots li button { font-size: 0; line-height: 0; display: block; width: 20px; height: 20px; padding: 5px; cursor: pointer; color: transparent; border: 0; outline: none; background: transparent; }
.ec-galleryRole--slider .slick-dots li button::before { content: ""; position: absolute; top: 0; left: 0; width: 12px; height: 12px; background-color: #fff; border-radius: 50%; opacity: .5; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.ec-galleryRole--slider .slick-dots li.slick-active button::before { opacity: 1; }

/* --- 2: 全幅スライダー --- */
.ec-galleryRole--fullwidth-slider { width: 100vw; margin-left: calc(-50vw + 50%); overflow: hidden; }
.ec-galleryRole--fullwidth-slider .ec-galleryRole__slider { margin-bottom: 0; }
.ec-galleryRole--fullwidth-slider .ec-galleryRole__item { padding: 0; }
.ec-galleryRole--fullwidth-slider .ec-galleryRole__image { max-width: 1130px; margin: 0 auto; }
@media (min-width: 768px) {
  .ec-galleryRole--fullwidth-slider .slick-slide { opacity: .5; transition: opacity .3s; }
  .ec-galleryRole--fullwidth-slider .slick-slide.slick-center,
  .ec-galleryRole--fullwidth-slider .slick-slide.slick-current { opacity: 1; }
}
.ec-galleryRole--fullwidth-slider .slick-dots { position: absolute; bottom: 5px; z-index: 5; display: block; width: 100%; padding: 0; margin: 0; list-style: none; text-align: center; }
.ec-galleryRole--fullwidth-slider .slick-dots li { position: relative; display: inline-block; width: 20px; height: 20px; margin: 0 5px; padding: 0; cursor: pointer; }
.ec-galleryRole--fullwidth-slider .slick-dots li button { font-size: 0; line-height: 0; display: block; width: 20px; height: 20px; padding: 5px; cursor: pointer; color: transparent; border: 0; outline: none; background: transparent; }
.ec-galleryRole--fullwidth-slider .slick-dots li button::before { content: ""; position: absolute; top: 0; left: 0; width: 12px; height: 12px; background-color: #fff; border-radius: 50%; opacity: .5; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.ec-galleryRole--fullwidth-slider .slick-dots li.slick-active button::before { opacity: 1; }
.ec-galleryRole--fullwidth-slider .slick-prev,
.ec-galleryRole--fullwidth-slider .slick-next { position: absolute; top: 50%; transform: translateY(-50%); z-index: 10; width: 44px; height: 44px; border: none; border-radius: 50%; background: rgba(0,0,0,.4); color: #fff; font-size: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.ec-galleryRole--fullwidth-slider .slick-prev:hover,
.ec-galleryRole--fullwidth-slider .slick-next:hover { background: rgba(0,0,0,.6); }
.ec-galleryRole--fullwidth-slider .slick-prev { left: 10px; }
.ec-galleryRole--fullwidth-slider .slick-next { right: 10px; }
.ec-galleryRole--fullwidth-slider .slick-prev::before { content: "\2039"; font-size: 28px; color: #fff; line-height: 1; }
.ec-galleryRole--fullwidth-slider .slick-next::before { content: "\203A"; font-size: 28px; color: #fff; line-height: 1; }

/* --- 3: モーダルスライダー --- */
.ec-galleryRole--modal-slider .ec-galleryRole__modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99999; display: flex; align-items: center; justify-content: center; }
.ec-galleryRole--modal-slider .ec-galleryRole__modalOverlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,.7); }
.ec-galleryRole--modal-slider .ec-galleryRole__modalContent { position: relative; width: 90%; max-width: 800px; z-index: 1; }
.ec-galleryRole--modal-slider .ec-galleryRole__modalClose { position: absolute; top: 0; right: 0; transform: translate(50%, -50%); width: 36px; height: 36px; border: none; border-radius: 50%; background: rgba(255,255,255,.9); color: #333; font-size: 22px; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 10; transition: background .2s; box-shadow: 0 2px 6px rgba(0,0,0,0.2); }
.ec-galleryRole--modal-slider .ec-galleryRole__modalClose:hover { background: #fff; }
.ec-galleryRole--modal-slider .ec-galleryRole__modalImage { display: block; max-width: min(100%, calc(100vw - 76px)); max-height: 85vh; width: auto; object-fit: contain; margin: 0 auto; transition: transform .3s, opacity .2s; }
.ec-galleryRole--modal-slider .ec-galleryRole__modalImageWrap a { display: block; overflow: hidden; background: #fff; }
.ec-galleryRole--modal-slider .ec-galleryRole__modalImageWrap a:hover .ec-galleryRole__modalImage { transform: scale(1.05); opacity: .7; }
.ec-galleryRole--modal-slider .ec-galleryRole__modalTitle { margin: 8px 0 0; font-size: 14px; text-align: center; color: #fff; }
.ec-galleryRole--modal-slider .ec-galleryRole__modalSlider.slick-slider { margin-bottom: 0; }
.ec-galleryRole--modal-slider .ec-galleryRole__modalSliderWrap { width: 100vw; margin-left: calc(-50vw + 50%); }
.ec-galleryRole--modal-slider .ec-galleryRole__modalItem { display: flex; flex-direction: column; align-items: center; position: relative; padding: 20px 38px 30px; }
.ec-galleryRole--modal-slider .ec-galleryRole__modalImageWrap { position: relative; display: inline-flex; justify-content: center; align-items: center; max-width: 100%; overflow: visible; }
.ec-galleryRole--modal-slider .ec-galleryRole__modalImage { max-width: min(800px, calc(100vw - 76px)); }
.ec-galleryRole--modal-slider .ec-galleryRole__modalTitle { position: absolute; bottom: 0; left: 0; right: 0; max-width: 800px; margin: 0 auto; }
.ec-galleryRole--modal-slider .ec-galleryRole__modalPrev,
.ec-galleryRole--modal-slider .ec-galleryRole__modalNext { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: none; border-radius: 50%; background: rgba(255,255,255,.2); color: #fff; font-size: 24px; cursor: pointer; z-index: 2; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.ec-galleryRole--modal-slider .ec-galleryRole__modalPrev:hover,
.ec-galleryRole--modal-slider .ec-galleryRole__modalNext:hover { background: rgba(255,255,255,.4); }
.ec-galleryRole--modal-slider .ec-galleryRole__modalPrev { left: -54px; }
.ec-galleryRole--modal-slider .ec-galleryRole__modalNext { right: -54px; }
@media (max-width: 767px) {
  .ec-galleryRole--modal-slider .ec-galleryRole__modalPrev { left: -4px; }
  .ec-galleryRole--modal-slider .ec-galleryRole__modalNext { right: -4px; }
}
.ec-galleryRole--modal-slider .ec-galleryRole__modal[data-state="hidden"] { display: none; }
@keyframes ecGalleryModalFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes ecGalleryModalFadeOut { from { opacity: 1; } to { opacity: 0; } }
.ec-galleryRole--modal-slider .ec-galleryRole__modal[data-state="visible"] { animation: ecGalleryModalFadeIn .4s ease-out; }
.ec-galleryRole--modal-slider .ec-galleryRole__modal[data-state="closing"] { animation: ecGalleryModalFadeOut .3s ease-in forwards; }

/* --- 4: グリッド --- */
.ec-galleryRole--grid { max-width: 1130px; margin-left: auto; margin-right: auto; padding: 0 20px; }
.ec-galleryRole--grid .ec-galleryRole__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ec-galleryRole--grid .ec-galleryRole__item { overflow: hidden; }
.ec-galleryRole--grid .ec-galleryRole__title { text-align: left; }
@media (max-width: 767px) {
  .ec-galleryRole--grid .ec-galleryRole__grid { grid-template-columns: repeat(2, 1fr); }
}

/* --- 5: グリッド(Lightbox2) --- */
.ec-galleryRole--grid-lightbox { max-width: 1130px; margin-left: auto; margin-right: auto; padding: 0 20px; }
.ec-galleryRole--grid-lightbox .ec-galleryRole__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ec-galleryRole--grid-lightbox .ec-galleryRole__item { overflow: hidden; }
.ec-galleryRole--grid-lightbox .ec-galleryRole__item a { cursor: zoom-in; }
.ec-galleryRole--grid-lightbox .ec-galleryRole__item a[href^="http"],
.ec-galleryRole--grid-lightbox .ec-galleryRole__item a[href^="/"] { cursor: pointer; }
.ec-galleryRole--grid-lightbox .ec-galleryRole__title { text-align: left; }
@media (max-width: 767px) {
  .ec-galleryRole--grid-lightbox .ec-galleryRole__grid { grid-template-columns: repeat(2, 1fr); }
}
.lightboxOverlay { position: fixed !important; top: 0 !important; left: 0 !important; width: 100% !important; height: 100% !important; }
/* Lightbox2: transform中央配置（display制御はLightbox2に委任） */
.lightbox { position: fixed !important; top: 50% !important; left: 50% !important; transform: translate(-50%, -50%) !important; margin: 0 !important; }
/* Lightbox2: 内部コンテナのposition調整 */
.lightbox .lb-outerContainer { position: relative !important; margin: 0 auto !important; overflow: visible !important; }
.lightbox .lb-dataContainer { margin: 0 auto !important; }
/* Lightbox2: クローズボタン — JSでlb-outerContainerに移動後、画像右上角に配置 */
.lightbox .lb-outerContainer .lb-close { position: absolute !important; top: 0 !important; right: 0 !important; transform: translate(50%, -50%) !important; width: 36px !important; height: 36px !important; border: none !important; background: rgba(255,255,255,.9) !important; border-radius: 50% !important; opacity: 1 !important; text-indent: -9999px !important; box-shadow: 0 2px 6px rgba(0,0,0,0.2) !important; transition: background .2s !important; z-index: 10 !important; cursor: pointer !important; padding: 0 !important; }
.lightbox .lb-outerContainer .lb-close::after { content: "\00D7"; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); text-indent: 0; font-size: 22px; font-weight: bold; color: #333; line-height: 1; }
.lightbox .lb-outerContainer .lb-close:hover { background: #fff !important; }
/* Lightbox2: ナビ矢印 — モーダルスライダーと統一 */
.lightbox .lb-nav { position: static !important; height: 100% !important; }
.lightbox .lb-nav a.lb-prev,
.lightbox .lb-nav a.lb-next { opacity: 1 !important; width: 44px !important; height: 44px !important; position: absolute !important; top: 50% !important; transform: translateY(-50%) !important; border-radius: 50% !important; background: rgba(255,255,255,.2) !important; text-indent: -9999px !important; transition: background .2s !important; }
.lightbox .lb-nav a.lb-prev:hover,
.lightbox .lb-nav a.lb-next:hover { background: rgba(255,255,255,.4) !important; }
.lightbox .lb-nav a.lb-prev { left: -54px !important; }
.lightbox .lb-nav a.lb-next { right: -54px !important; }
.lightbox .lb-nav a.lb-prev::after { content: "\2039"; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); text-indent: 0; font-size: 28px; color: #fff; line-height: 1; }
.lightbox .lb-nav a.lb-next::after { content: "\203A"; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); text-indent: 0; font-size: 28px; color: #fff; line-height: 1; }
@media (max-width: 767px) {
  .lightbox .lb-nav a.lb-prev { left: -4px !important; }
  .lightbox .lb-nav a.lb-next { right: -4px !important; }
}
/* Lightbox2: キャプション */
.lightbox .lb-data .lb-caption { font-size: 14px !important; color: #fff !important; }
.lightbox .lb-data .lb-number { color: rgba(255,255,255,.6) !important; font-size: 12px !important; }
