/* Photo Setting Styles */
.photo-setting-wrapper {
    margin-bottom: 30px;
    position: relative;
    width: 100%;
}

/* =========================================
   Slider Common (Yahoo, Fade, Coverflow, Cube, Carousel)
   ========================================= */
.photo-setting-swiper {
    width: 100%;
    height: auto;
    background-color: #111;
    border-radius: 4px;
    overflow: hidden;
}

.photo-setting-swiper .swiper-slide {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #111;
    aspect-ratio: 16 / 9;
}

/* スタイルのバリエーション：カルーセル用はaspect-ratioを少し変更 */
.style-slider_carousel .photo-setting-swiper .swiper-slide {
    aspect-ratio: 4 / 3;
}

/* キューブ用（背景が黒だと変な隙間が出ることがあるため） */
.style-slider_cube .photo-setting-swiper .swiper-slide {
    background-color: #333;
}

.photo-setting-swiper .swiper-slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* ヤフーニュース風のサムネイルスライダー */
.photo-setting-thumbs {
    margin-top: 8px;
    height: 70px;
    box-sizing: border-box;
}
.photo-setting-thumbs .swiper-slide {
    width: 20%;
    height: 100%;
    opacity: 0.5;
    cursor: pointer;
    background-color: #111;
    border-radius: 4px;
    overflow: hidden;
    transition: opacity 0.3s;
}
.photo-setting-thumbs .swiper-slide:hover {
    opacity: 0.8;
}
.photo-setting-thumbs .swiper-slide-thumb-active {
    opacity: 1;
    border: 2px solid #ed0000;
}
.photo-setting-thumbs .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* スライダー用ナビゲーション */
.photo-setting-swiper .swiper-button-next,
.photo-setting-swiper .swiper-button-prev {
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    transition: background 0.3s;
}
.photo-setting-swiper .swiper-button-next:hover,
.photo-setting-swiper .swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.8);
}
.photo-setting-swiper .swiper-button-next:after,
.photo-setting-swiper .swiper-button-prev:after {
    font-size: 18px;
}
.photo-setting-swiper .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.5;
}
.photo-setting-swiper .swiper-pagination-bullet-active {
    background: #fff;
    opacity: 1;
}

/* =========================================
   Lists / Galleries
   ========================================= */

/* Grid Gallery */
.style-grid_gallery .photo-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}
.style-grid_gallery .photo-item {
    aspect-ratio: 1 / 1;
    border-radius: 6px;
    overflow: hidden;
    background: #f0f0f0;
}
.style-grid_gallery .photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Masonry Gallery */
.style-masonry_gallery .photo-list-container {
    column-count: 3;
    column-gap: 15px;
}
.style-masonry_gallery .photo-item {
    break-inside: avoid;
    margin-bottom: 15px;
    border-radius: 6px;
    overflow: hidden;
}
.style-masonry_gallery .photo-item img {
    width: 100%;
    display: block;
    height: auto;
}
@media (max-width: 768px) {
    .style-masonry_gallery .photo-list-container {
        column-count: 2;
    }
}
@media (max-width: 480px) {
    .style-masonry_gallery .photo-list-container {
        column-count: 1;
    }
}

/* Column Full */
.style-column_full .photo-list-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.style-column_full .photo-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Card List */
.style-card_list .photo-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.style-card_list .photo-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}
.style-card_list .photo-item:hover {
    transform: translateY(-5px);
}
.style-card_list .photo-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

/* Parallax */
.style-parallax .photo-parallax-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.style-parallax .parallax-item {
    width: 100%;
    height: 400px;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    margin-bottom: 2px;
}
@media (max-width: 768px) {
    /* モバイルではfixedが不安定なため通常の画像のように見せるかscrollにする */
    .style-parallax .parallax-item {
        background-attachment: scroll;
        height: 300px;
    }
}


/* =========================================
   画像保護用のCSS（選択・ドラッグ無効化）
   ========================================= */
.protected-image {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    pointer-events: auto;
}

img {
    -webkit-touch-callout: none;
}

/* =========================================
   Alt Text Styles
   ========================================= */
.photo-alt-text {
    text-align: center;
    font-size: 14px;
    color: #555;
    margin-top: 8px;
    margin-bottom: 8px;
    line-height: 1.4;
}

/* スライダー内のAltテキスト */
.photo-setting-swiper .photo-alt-text {
    color: #fff;
    margin-top: 10px;
}

/* パララックス内のAltテキスト */
.style-parallax .photo-alt-text {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
    background: rgba(0,0,0,0.3);
    margin: 0;
}
