130 lines
3.2 KiB
CSS
130 lines
3.2 KiB
CSS
/* --- STORY 섹션 레이아웃 --- */
|
|
.story-section {
|
|
width: 100%;
|
|
padding: 80px 0;
|
|
background-color: #f8f9fa;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* 📌 [분할] 내용과 미디어가 함께 있는 경우 (좌우 2단) */
|
|
.story-layout-split {
|
|
display: flex;
|
|
align-items: stretch;
|
|
gap: 10px;
|
|
}
|
|
.story-layout-split .story-text {
|
|
flex: 1;
|
|
min-width: 0;
|
|
text-align: left; /* 기본 좌측 정렬 */
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
}
|
|
/* 💡 [수정] 분할 레이아웃일 때 제목(h2)만 가운데 정렬 */
|
|
.story-layout-split .story-text h2 {
|
|
text-align: center;
|
|
}
|
|
.story-layout-split .story-image {
|
|
flex: 1;
|
|
min-width: 0;
|
|
display: block; /* 이미지 영역 보이기 */
|
|
border-radius: 12px;
|
|
overflow: hidden;
|
|
box-shadow: 0 10px 30px rgba(0,0,0,0.1);
|
|
/*aspect-ratio: 4 / 3;*/
|
|
}
|
|
|
|
/* 📌 [전체] 내용만 있는 경우 (텍스트가 중앙에 넓게 배치) */
|
|
.story-layout-full {
|
|
display: flex;
|
|
justify-content: center;
|
|
}
|
|
.story-layout-full .story-text {
|
|
flex: none;
|
|
width: 100%;
|
|
max-width: 800px;
|
|
margin: 0 auto;
|
|
text-align: center; /* 모든 텍스트 가운데 정렬 */
|
|
}
|
|
.story-layout-full .story-image {
|
|
display: none; /* 이미지/슬라이더 영역 숨김 */
|
|
}
|
|
|
|
/* 공통 텍스트 스타일 */
|
|
.story-text .subtitle {
|
|
font-size: 16px;
|
|
font-weight: 700;
|
|
color: var(--accent-color);
|
|
margin-bottom: 10px;
|
|
display: block;
|
|
text-align: center; /* 💡 추가: 텍스트 가운데 정렬 */
|
|
}
|
|
/* h2는 각 레이아웃 클래스에서 정렬을 제어하므로 여기서는 공통 스타일만 정의 */
|
|
.story-text h2 {
|
|
font-size: 36px;
|
|
font-weight: 900;
|
|
color: var(--primary-color);
|
|
margin-bottom: 20px;
|
|
line-height: 1.4;
|
|
}
|
|
.story-text p {
|
|
font-size: 16px;
|
|
line-height: 1.8;
|
|
color: var(--secondary-color);
|
|
}
|
|
.story-text img,
|
|
.story-text video {
|
|
max-width: 100%;
|
|
height: auto;
|
|
border-radius: 8px;
|
|
margin: 20px 0;
|
|
}
|
|
|
|
/* --- 슬라이더(Swiper) 스타일 --- */
|
|
.story-slider {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
.story-slider .swiper-slide {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
.story-slider img,
|
|
.story-slider video {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
display: block;
|
|
}
|
|
.story-slider .swiper-pagination-bullet {
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
opacity: 1;
|
|
}
|
|
.story-slider .swiper-pagination-bullet-active {
|
|
background-color: var(--accent-color);
|
|
}
|
|
|
|
/* 📌 [추가] DB에 게시물이 없을 때의 기본 레이아웃 (위아래 배치) */
|
|
.story-layout-static {
|
|
display: flex;
|
|
flex-direction: column; /* 💡 핵심: 아이템을 세로로 쌓습니다. */
|
|
align-items: center; /* 가운데 정렬 */
|
|
gap: 40px; /* 텍스트와 이미지 사이의 간격 */
|
|
text-align: center; /* 모든 텍스트 가운데 정렬 */
|
|
}
|
|
|
|
.story-layout-static .story-text {
|
|
max-width: 800px; /* 텍스트 최대 너비 제한 */
|
|
}
|
|
|
|
.story-layout-static .story-image {
|
|
width: 100%;
|
|
max-width: 800px; /* 이미지 최대 너비 제한 */
|
|
}
|
|
|
|
.story-layout-static .story-image img {
|
|
width: 100%;
|
|
border-radius: 12px;
|
|
}
|
|
/* 반응형 스타일 */
|