/**
 * 성공기 페이지 스타일 - 원본(momoprs.com) 디자인과 동일
 * Source: /theme/momo/skin/board/diary/css/list.css
 */

/* ==========================================
   상단 타이틀 (.top_title) - 원본 동일
   ========================================== */

.top_title .inner {
    padding: 94px 19.06%;
}

.top_title .text_box {
    text-align: center;
}

.top_title .text_box h3 {
    font-size: 44px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

/* ==========================================
   비주얼 섹션 (.visual_box) - 원본 동일
   ========================================== */

.visual_box .inner {
    padding: 80px 14.6%;
}

.visual_box .title_box {
    text-align: center;
}

.visual_box .title_box h4 {
    font-size: 44px;
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
}

.visual_box .title_box .sub_title {
    font-size: 28px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--primary-color, #2E1566);
}

.visual_box .title_box .sub_text {
    font-size: 18px;
    line-height: 1.5;
    letter-spacing: -1px;
    margin-top: 14px;
    color: #1c1c1c;
}

.visual_box .img_box {
    width: calc(1080/1368 * 100%);  /* 약 78.9% */
    margin: 60px auto 0;
}

.visual_box .img_box picture {
    display: block;
    width: 100%;
}

.visual_box .img_box img {
    width: 100%;
    height: auto;
    display: block;
}

/* 모바일 전용 줄바꿈 */
.show-mobile {
    display: none;
}

/* ==========================================
   반응형 - 상단 타이틀 & 비주얼
   ========================================== */

@media screen and (max-width: 1024px) {
    .top_title .inner {
        padding: 60px 5%;
    }
    .top_title .text_box h3 {
        font-size: 36px;
    }
    .visual_box .inner {
        padding: 60px 5%;
    }
    .visual_box .title_box h4 {
        font-size: 36px;
    }
    .visual_box .title_box .sub_text {
        font-size: 16px;
    }
    .visual_box .img_box {
        width: 100%;
    }
}

@media screen and (max-width: 768px) {
    .top_title {
        display: none;
    }
    .visual_box .inner {
        padding: 80px 5% 32px;
    }
    .visual_box .title_box h4 {
        font-size: 28px;
    }
    .visual_box .title_box .sub_text {
        font-size: 14px;
        margin-top: 10px;
    }
    .visual_box .img_box {
        width: 100%;
        margin-top: 40px;
    }
    .show-mobile {
        display: inline;
    }
}

/* ==========================================
   주의 문구 (.note_box) - 원본 동일
   ========================================== */

/* note_box: 카드(.list_box.stories)와 동일한 좌우 % 인셋(같은 부모 기준) → 회색 박스가 카드 폭에 정확히 정렬.
   #content 특정성으로 전역 sub_common.css(.note_box: 풀폭 회색 flex)를 확실히 덮어씀. */
#content .note_box {
    box-sizing: border-box;
    display: block;          /* sub_common 의 display:flex 해제 */
    width: auto;             /* sub_common 의 width:100% 해제 (block 이므로 padding 으로 인셋) */
    background: transparent; /* sub_common 의 회색 배경 해제 — 회색은 .note_inner 만 */
    padding: 0 20%;          /* .list_box.stories 좌우 padding 과 동일 */
    margin: 0 0 100px;       /* 위 간격은 .list_box.stories 하단 padding(100px)에 의존 / 아래는 푸터와 간격 */
}

#content .note_box .note_inner {
    background-color: #f8f8f8;
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.note_text {
    font-size: 16px;
    line-height: 1.4;
    color: var(--black-color-300, #888);
    font-weight: 500;
    text-align: left;
}

/* 인셋은 .list_box.stories 반응형 padding 값과 동일하게 단계별로 맞춤 */
@media screen and (max-width: 1540px) {
    #content .note_box { padding: 0 12%; }
}

@media screen and (max-width: 1440px) {
    #content .note_box { padding: 0 8%; }
}

@media screen and (max-width: 1058px) {
    #content .note_box { padding: 0 6%; margin-bottom: 90px; }
}

@media screen and (max-width: 1024px) {
    #content .note_box { padding: 0 5%; margin-bottom: 80px; }
    #content .note_box .note_inner { padding: 24px 28px; }
}

@media screen and (max-width: 768px) {
    #content .note_box { padding: 0 5%; margin-bottom: 60px; }
    #content .note_box .note_inner { padding: 20px 16px; }

    .note_text {
        font-size: 14px;
    }
}

/* ==========================================
   목록 페이지 스타일 (성공기 전용: .list_box.stories)
   gallery.css의 !important 오버라이드 필요
   ========================================== */

.list_box.stories {
    padding: 64px 20% 100px;
}

.list_box.stories > ul {
    display: grid;
    grid-template-columns: repeat(2, 2fr);
    column-gap: 80px;
    row-gap: 30px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.list_box.stories > ul > li {
    position: relative;
    border-radius: 16px;
    border: 1px solid #b9bac1 !important;
    padding: 16px !important;
    background-color: rgba(22, 23, 24, 0.15); /* 의료법 게이팅: 비로그인 카드 전체 회색 틴트(원본 li 인라인 동일) */
}
/* 로그인(body.is-login) 또는 수원점(body.suwon, 성공기 예외)은 틴트 해제 */
body.is-login .list_box.stories > ul > li,
body.suwon .list_box.stories > ul > li {
    background-color: transparent;
}

.list_box.stories > ul > li a {
    display: flex;
    flex-direction: column;
    gap: 14px;
    justify-content: center;
    align-items: center;
    position: relative;
    text-decoration: none;
    color: inherit;
}

/* 이미지 박스 (원본 동일: 직사각형 + 둥근모서리) */
.list_box.stories > ul > li a .img_box {
    width: calc(400/468 * 100%);
    overflow: hidden;
}

.list_box.stories > ul > li a .img_box picture {
    display: block;
    width: 100%;
}

.list_box.stories > ul > li a .img_box img {
    width: 100%;
    display: block;
    border-radius: 16px;
}

/* 해시태그 영역 (원본 동일) */
.list_box.stories > ul > li a .hashtag {
    text-align: center;
    width: 100%;
}

.list_box.stories > ul > li a .hashtag p {
    font-weight: 700;
    font-size: 1.45rem;
    line-height: 2.375rem;
    letter-spacing: -0.04em;
    margin-bottom: 8px;
    margin-top: 0;
}

.list_box.stories > ul > li a .hashtag span {
    display: inline-block;
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.125rem;
    margin-right: 4px;
    white-space: nowrap;
}

/* ==========================================
   반응형 - 1540px
   ========================================== */
@media screen and (max-width: 1540px) {
    .list_box.stories {
        padding: 64px 12% 100px;
    }
}

/* ==========================================
   반응형 - 1440px
   ========================================== */
@media screen and (max-width: 1440px) {
    .list_box.stories {
        padding: 64px 8% 100px;
    }
}

/* ==========================================
   반응형 - 1058px
   ========================================== */
@media screen and (max-width: 1058px) {
    .list_box.stories {
        padding: 64px 6% 100px;
    }
}

/* ==========================================
   반응형 - 태블릿 (1024px)
   ========================================== */
@media screen and (max-width: 1024px) {
    .list_box.stories {
        padding: 52px 5% 80px;
    }

    .list_box.stories > ul {
        grid-template-columns: repeat(2, 3fr);
        column-gap: 20px;
        row-gap: 24px;
    }

    .list_box.stories > ul > li a .img_box {
        width: 90%;
    }

    .list_box.stories > ul > li a .hashtag p {
        font-size: 1.3rem;
        line-height: 1.375rem;
        letter-spacing: -0.02em;
        margin-bottom: 6px;
    }

    .list_box.stories > ul > li a .hashtag span {
        font-size: 0.8rem;
        line-height: 0.688rem;
    }
}

/* ==========================================
   반응형 - 모바일 (768px)
   ========================================== */
@media screen and (max-width: 768px) {
    .list_box.stories {
        padding: 24px 5% 60px;
    }

    .list_box.stories > ul {
        grid-template-columns: repeat(1, 4fr);
        gap: 8px;
    }

    .list_box.stories > ul > li {
        border-radius: 8px;
    }

    .list_box.stories > ul > li a .img_box img {
        border-radius: 8px;
    }

    .list_box.stories > ul > li a .hashtag p {
        font-size: 1.125rem;
        line-height: 1.375rem;
    }

    .list_box.stories > ul > li a .hashtag span {
        font-size: 0.75rem;
        line-height: 0.938rem;
        margin-right: 1%;
    }
}

/* ==========================================
   상세 페이지 스타일 (story.php용)
   ========================================== */

/* intro 섹션 */
section.intro {
    padding: 80px 0;
    text-align: center;
}

section.intro .inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section.intro h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.04em;
}

section.intro p.sub_text {
    font-size: 1.125rem;
    color: #666;
    line-height: 1.8;
}

/* change 섹션 */
section.change {
    background: #f8f9fa;
    padding: 60px 0;
}

section.change .inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section.change .text_box {
    text-align: center;
}

section.change .text_box .date {
    font-size: 1rem;
    color: #888;
    margin-bottom: 16px;
}

section.change .text_box h4 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

section.change .text_box .sub_text {
    font-size: 1.125rem;
    color: #666;
}

/* hope 섹션 */
section.hope {
    padding: 80px 0;
}

section.hope .inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section.hope h3 {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
}

/* point 섹션 */
section.point {
    background: #2E1566;
    color: #fff;
    padding: 80px 0;
}

section.point .inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section.point h3 {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
}

/* beforeafter 섹션 */
section.beforeafter {
    padding: 80px 0;
}

section.beforeafter .inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section.beforeafter h3 {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
}

/* solution 섹션 */
section.solution {
    background: #f8f9fa;
    padding: 80px 0;
}

section.solution .inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section.solution h3 {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
}

/* banner 섹션 */
section.banner {
    padding: 60px 0;
    background: linear-gradient(135deg, #2E1566, #5a3d8a);
    color: #fff;
    text-align: center;
}

section.banner .inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section.banner h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
}

section.banner .btn {
    display: inline-block;
    padding: 14px 48px;
    background: #fff;
    color: #2E1566;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

section.banner .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* more 섹션 (다른 성공기) */
section.more {
    padding: 80px 0;
}

section.more .inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section.more h3 {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
}

/* Swiper 슬라이더 커스텀 */
.swiper {
    width: 100%;
    padding-bottom: 40px;
}

.swiper-slide img {
    width: 100%;
    border-radius: 12px;
}

.swiper-pagination-bullet-active {
    background: #2E1566;
}

.swiper-button-next,
.swiper-button-prev {
    color: #2E1566;
}

/* 목록으로 돌아가기 */
.back-to-list {
    text-align: center;
    margin-top: 60px;
}

.back-to-list a {
    display: inline-block;
    padding: 14px 48px;
    background: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    font-size: 15px;
    transition: all 0.2s;
}

.back-to-list a:hover {
    background: #555;
}
