@charset "utf-8";
/* --- 1枚表示のスライドショー設定 --- */

.single-slider-container {
    width: 100%;
    max-width: 620px;   /* ご希望の幅 */
    height: 450px;      /* ご希望の高さ */
    margin: 30px auto;  /* 中央配置 */
    position: relative;
    overflow: hidden;
    border: 5px solid #fff;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
}

.single-slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.single-slide {
	width: 100%;
	height: 100%;
	position: absolute;
	top: 0;
	left: -1px;
	opacity: 0; /* 最初は透明 */
	animation: fadeSlider 52s infinite; /* 20秒で1周（枚数に合わせて調整） */
}

.single-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 画像を切らずに収める */
    background-color: #333; /* 余白を暗くして写真を引き立てる */
}

/* --- 13それぞれの開始タイミングを 4秒ずつずらす --- */
.single-slide:nth-child(1) { animation-delay: 0s; }
.single-slide:nth-child(2) { animation-delay: 4s; }
.single-slide:nth-child(3) { animation-delay: 8s; }
.single-slide:nth-child(4) { animation-delay: 12s; }
.single-slide:nth-child(5) { animation-delay: 16s; }
.single-slide:nth-child(6) { animation-delay: 20s; }
.single-slide:nth-child(7) { animation-delay: 24s; }
.single-slide:nth-child(8) { animation-delay: 28s; }
.single-slide:nth-child(9) { animation-delay: 32s; }
.single-slide:nth-child(10) { animation-delay: 36s; }
.single-slide:nth-child(11) { animation-delay: 40s; }
.single-slide:nth-child(12) { animation-delay: 44s; }
.single-slide:nth-child(13) { animation-delay: 48s; }

/* フェードアニメーション */
@keyframes fadeSlider {
    0% { opacity: 0; }
    2% { opacity: 1; }   /* 5%の地点でパッと表示 */
    7.6% { opacity: 1; }  /* 20%まで表示維持 */
    9.6% { opacity: 0; }  /* 消える */
    100% { opacity: 0; }
}

/* スマホ対応：画面が狭いときは高さを自動にして比率を保つ */
@media (max-width: 620px) {
    .single-slider-container {
        height: auto;
        aspect-ratio: 620 / 450; /* 比率を維持 */
    }
}
/* --- キャプション（説明文）の装飾 --- */
.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7); /* 半透明の黒背景 */
    color: #fff;
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    /* 画像と一緒に表示されるよう、親の.single-slideに含まれているため自動でフェードします */
}

/* 画像の高さをテキスト分だけ少し確保するために調整（任意） */
.single-slider-container {
    height:500px; /* テキストが入る分、少し高く（450pxから500pxへ）すると余裕が出ます */
}

/* 1. スライドショー全体の枠を固定する */
.single-slider-container {
    width: 100% !important;
    max-width: 800px !important; /* 少し幅を広げてゆとりを持たせます */
    height: auto !important;     /* 高さを固定せず自動に */
    aspect-ratio: 4 / 3 !important; /* ★重要：デジカメ写真の標準比率(4:3)で枠を確保 */
    margin: 30px auto !important;
    position: relative;
    overflow: hidden;
    background-color: #333;      /* 余白を黒にして写真を引き立てる */
}

/* 2. 画像自体の表示設定 */
.single-slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important; /* 画像の全体を必ず枠内に収める */
}


