/* ==========================================================
    0) 공통(기본) 및 충돌 제거
========================================================== */
body {
    background: #f8f9fa;
    font-family: 'Noto Sans KR', sans-serif;
    margin: 0;
    padding: 0;
}

#wrapper, #container { 
    width: 100%;
    overflow-x: hidden; 
}

/* ==========================================================
    1) 레이아웃
========================================================== */
.jeju-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    max-width: 1500px;
    margin: 0 auto;
    gap: 40px;
    padding: 50px 30px;
    align-items: flex-start;
}

.jeju-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.jeju-content { overflow: visible; min-width: 0; }
.section { margin-bottom: 45px; }

.bottom-section {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto 100px;
    padding: 0 30px;
    box-sizing: border-box;
}

/* ==========================================================
    2) 공통 헤더 (타이틀/더보기)
========================================================== */
.nation-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0 10px 10px !important;
    margin-bottom: 25px !important;
    border-bottom: 2px solid #333 !important;
}
.nation-header h2 {
    font-size: 24px !important;
    font-weight: 800 !important;
    color: #222 !important;
    margin: 0 !important;
}
.nation-more {
    font-size: 14px !important;
    color: #6c5ce7 !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    background: #f0edff !important;
    padding: 5px 15px !important;
    border-radius: 20px !important;
}

/* ==========================================================
    3) 리스트 (일반 제휴샵 - 텍스트 꺾임 및 레이아웃 수정)
========================================================== */
.normal-list { 
    width: 100% !important; 
    margin-top: 20px !important;
    display: block !important;
}

/* 1. 리스트 컨테이너 가로 정렬 강제화 */
.normal-list ul, 
.normal-list .latest_card_ul, 
.normal-list .gall_ul {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    flex-direction: row !important; /* 세로 정렬 방지 */
}

/* 2. 개별 카드 너비 및 높이 고정 */
.normal-list li, 
.normal-list .latest_card_li, 
.normal-list .gall_li {
    flex: 0 0 calc(33.333% - 14px) !important; /* 한 줄에 3개 */
    background: #fff !important;
    border-radius: 12px !important;
    border: 1px solid #eee !important;
    overflow: hidden !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important;
    display: flex !important;
    flex-direction: column !important; /* 이미지 아래 텍스트 */
    min-height: 320px !important;
}

/* 3. 텍스트 세로 꺾임 방지 핵심 코드 */
.normal-list a, 
.normal-list .card-body, 
.normal-list .subject {
    display: block !important;
    width: 100% !important;
    white-space: normal !important; /* 글자가 꺾이지 않고 옆으로 흐르게 */
    word-break: keep-all !important;
    text-align: left !important;
    padding: 10px !important;
    text-decoration: none !important;
}

/* 4. 이미지 크기 고정 */
.normal-list img {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover !important;
    border-radius: 12px 12px 0 0 !important;
}

/* 5. 내부 텍스트 스타일 (제목, 주소, 가격 등) */
.normal-list .subject, .normal-list h3 {
    font-size: 17px !important;
    font-weight: 800 !important;
    color: #222 !important;
    margin-bottom: 5px !important;
}

.normal-list .addr, .normal-list .info {
    font-size: 13px !important;
    color: #888 !important;
}

/* 📱 모바일: 한 줄에 1개씩 */
@media (max-width: 768px) {
    .normal-list li {
        flex: 0 0 100% !important;
        min-height: auto !important;
    }
}
/* ==========================================================
    4) 메인 타이틀/배너 (여백 및 좌우 밀림 해결)
========================================================== */
.jeju-main-header {
    margin-bottom: 40px;
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(to bottom, #ffffff, #f8f9fa);
    border-radius: 20px;
}
.premium-title {
    font-size: 38px;
    font-weight: 900;
    color: #1a1a1a;
    letter-spacing: -2px;
    margin-bottom: 25px;
    line-height: 1.2;
}
.premium-title span { color: #6c5ce7; position: relative; display: inline-block; }

/* 🚀 배너 좌우 붙음 방지 및 이쁘게 수정 */
.top-banner .swiper-slide {
    padding: 0 5px;
    box-sizing: border-box;
}

.top-banner a, .kakao-banner a {
    display: block !important;
    border-radius: 15px !important; 
    overflow: hidden !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    background: #fff;
}

.top-banner img, .kakao-banner img { 
    width: 100% !important; 
    height: auto !important; 
    display: block !important;
    object-fit: cover;
}

/* ==========================================================
    5) 커뮤니티
========================================================== */
.community-section { 
    max-width: 1200px; 
    margin: 40px auto; 
    padding: 40px 20px; 
    background: #fff; 
    border-radius: 12px; 
}
.community-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 30px; 
}
.community-item { border-left: 1px solid #eee; padding-left: 15px; min-width: 0; }
.community-item:first-child { border-left: none; padding-left: 0; }
.community-item li { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 10px 0; border-bottom: 1px solid #f1f1f1; font-size: 14px; gap: 10px; 
}
.community-item li a {
    display: block; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; flex: 1; color: #333; text-decoration: none;
}
.community-item li span.datetime { font-size: 12px; color: #999; white-space: nowrap; flex-shrink: 0; }

/* ==========================================================
    🚀 모바일 최적화 (배너 왼쪽 붙음 해결 포함)
========================================================== */
@media (max-width: 1200px) {
    .jeju-container { 
        display: flex !important; 
        flex-direction: column !important; 
        margin-top: 52px !important; 
        padding: 20px 0 30px !important; /* 컨테이너 패딩 조정 */
    }
    .jeju-content { order: 1 !important; width: 100% !important; }
    .jeju-sidebar { order: 2 !important; width: 100% !important; margin-top: 30px !important; position: relative !important; top: 0 !important; }
    
    /* 모바일 배너 좌우 여백 강제 고정 */
    .top-banner, .kakao-banner { padding: 0 20px !important; margin: 20px auto !important; }
}

@media (max-width: 768px) {
    .jeju-container { margin-top: 0px !important; }
    .jeju-main-header { padding: 30px 15px; margin-bottom: 20px; }
    .premium-title { font-size: 26px; margin-bottom: 15px; }

    .community-grid { grid-template-columns: 1fr; gap: 15px; }
    .community-item { border-left: none; background: #fcfcfc; padding: 15px; border-radius: 8px; margin-bottom: 10px; }

    .normal-list li, .normal-list .latest_card_li { flex: 0 0 100% !important; }
    .jeju-card .card-img, .jeju-card .img-box, .jeju-card .thumb {
        height: 200px !important; 
        object-fit: cover !important;
    }
.top-banner, .kakao-banner {
        padding: 0 20px !important;
        margin: 20px auto !important;
    }
/* 카드 텍스트 */
.jeju-card .card-body { padding: 12px !important; }
.jeju-card h3 { font-size: 16px !important; font-weight: bold; }
.jeju-card .addr { font-size: 12px !important; color: #666; }