/* 기본 설정 */
html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: Arial, sans-serif;
    background: #ffffff;
    color: #111;
}
* { box-sizing: border-box; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 15px; }

/* 검색창 */
.search-box {
    display:flex;
    align-items:center;
    gap:8px;
    width:100%;
}
.search-box input {
    height:45px;
    padding:0 12px;
    border:1px solid #ccc;
    border-radius:6px;
    flex:1;
}
.search-btn {
    height:45px;
    padding:0 18px;
    background:#ddd;
    border:1px solid #bbb;
    border-radius:6px;
    font-size:14px;
    cursor:pointer;
    white-space:nowrap;
}
.search-btn:hover { background:#ccc; }

@media(max-width:600px){
    .search-box { flex-direction:row; width:100%; }
    .search-box input { height:45px; width:100%; }
    .search-btn { height:45px; font-size:15px; padding:0 16px; }
}

/* 카테고리 메뉴 */
.category-section {
    width: 100%;
    margin: 15px 0;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.category-section > *:not(:last-child) {
    margin-bottom: 10px;
}
.cat-item { margin:3px; padding:0; }
.cat-item a {
    display:flex;
    justify-content:center;
    align-items:center;
    width:100%;
    height:38px;
    background:#f4f4f4;
    border-radius:6px;
    border:1px solid #ddd;
    color:#000;
    text-decoration:none;
    font-size:14px;
    font-weight:500;
    white-space:nowrap;
    transition:0.2s;
}
.cat-item a:hover { background:#e7e7e7; }

/* 카테고리 타이틀 및 모바일 버튼 공통 스타일 */
.cat-h2, .cat-open-btn {
    display: block;
    width: 100%;
    height: 45px;
    background: #e0e0e0;
    border: 1px solid #bbb;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
    line-height: 45px;
    cursor: pointer;
    padding: 0;
    box-sizing: border-box;
}

/* PC 스타일 */
.cat-box {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    column-gap: 16px;
    row-gap: 0px;
}

.cat-open-btn {
    display: none; /* PC 숨김 */
}

/* 모바일 전용 스타일 */
@media (max-width: 600px) {
    .cat-box {
        display: none;
        flex-direction: column;
        gap: 3px;
        padding: 4px 0;
    }

    .cat-box.open {
        display: flex;
    }

    .cat-open-btn {
        display: inline-block;
    }
 
    .cat-item a {
        width: 100%;
        height: 34px;
        background: #efefef;
        border: 1px solid #ccc;
        border-radius: 6px;
        font-size: 14px;
        text-align: center;
    }
}

/* 카드형 목록 */
.item-list {
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:15px;
}
.item {
    background:#fff;
    border:1px solid #eee;
    border-radius:8px;
    overflow:hidden;
}
.item-link { display:block; color:inherit; text-decoration:none; }

.item .thumb {
    width: 100%;
    padding-top: 56.25%; 
    position: relative;
    background: #ccc;
    overflow: hidden;
    border-radius: 6px;
}

.item .thumb img {
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; 
    will-change: transform, opacity; 
}

.item .info { 
    padding: 10px; 
}

.item-hcut { 
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.item-pcut { 
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    font-size: 14px;
    font-weight: 400;
    color: #555;
    line-height: 1.5;
}

.pagination {
    margin-top: 20px;
    text-align: center;
}

.item .date { font-size:12px; color:#777; }
.item-link:hover .title { text-decoration:underline; }

@media(max-width:900px){
    .item-list { grid-template-columns:repeat(3,1fr); }
}
@media(max-width:600px){
    .item-list { grid-template-columns:repeat(2,1fr); }
}
@media(max-width:400px){
    .item-list { grid-template-columns:repeat(1,1fr); }
}

/* 뷰페이지 */
.view-about-title {
    word-break: break-all;
    overflow-wrap: break-word;
    white-space: normal;
}
.content {
    line-height:1.6;
    font-size:16px;
    margin-top:20px;
}

/* 반응형 고정 요소 수정 */
.content img,
.content video,
.content iframe,
.content embed,
.content object,
.video-wrap video {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* content img 강제 확대 방지 */
.content img {
    width: auto;
}

.content iframe {
    aspect-ratio: 16 / 9;
    width: 100%;
}

.content picture,
.content picture img {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* 영상 영역 */
.video-wrap {
    width:100%;
    margin:20px 0;
    background:#000;
    border-radius:8px;
    overflow:hidden;
}

.video-wrap video {
    width:100%;
    height:auto;
    display:block;
    object-fit:contain;
    background:#000;
}

@media (min-width: 601px){
    .video-wrap{ width:80%; margin:20px auto; }
}

/* 추천 게시물 */
.recommend-card {
    display:flex;
    justify-content:center;
    align-items:center;
    padding:12px;
    background:#f4f4f4;
    border:1px solid #ddd;
    border-radius:6px;
    text-align:center;
    transition:0.2s;
    min-height:42px;
}
.recommend-card:hover { background:#e7e7e7; }
.recommend-card a {
    display:block;
    width:100%;
    color:#000;
    font-size:14px;
    font-weight:500;
    text-decoration:none;
    word-break:break-all;
    white-space:normal;
}
.recommend-grid {
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:10px;
}
@media(max-width:600px){
    .recommend-grid { grid-template-columns:1fr; }
}

/* hero-about 공통 스타일 합치기 */
.hero-image-container, .about-image-container {
    margin: 20px 0;
    width: 100%;
}
.hero-image-container picture, .hero-image-container img,
.about-image-container picture, .about-image-container img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}
.hero-text, .about-text {
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 25px;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 6px;
}

.title, .item .info, .item-link, .content {
    word-wrap:break-word;
    overflow-wrap:break-word;
    word-break:break-all;
}

/* 배너 영역 */
.banner-section{
    width:100%;
    margin:10px 0 15px;
}
.banner-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:10px;
}
.banner-item a{
    display:block;
    width:100%;
}
.banner-item img{
    width:100%;
    height:auto;
    display:block;
    border-radius:6px;
}

@media(max-width:600px){
    .banner-grid{
        grid-template-columns:1fr;
        gap:8px;
    }
    .mobile-hide{
        display:none !important;
    }
}

/* 푸터 */
.footer-section {
    margin-top:50px;
    padding:20px 0;
    text-align:center;
    border-top:1px solid #ddd;
    color:#555;
}
.logo-area, .footer-copyright {
    width: 100%;
    text-align: center;
}
.logo { display:inline-block; width:320px; height:80px; text-decoration:none; }
.logo img { width:100%; height:auto; display:block; margin: 0 auto; }

.footer-links-section {
    width: 100%;
    max-width: 700px;
    margin: 0 auto 25px;
    padding: 0 10px;
}
.footer-toggle-btn {
    width: 100%;
    height: 45px;
    background: #f3f3f3;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    line-height: 45px;
    cursor: pointer;
    text-align: center;
}
.footer-links-wrapper {
    display: none;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-top: 10px;
    padding: 15px;
}
.footer-links-wrapper.open {
    display: block;
}
.footer-links-box h3 {
    margin: 0;
}
.footer-links-box {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.footer-links-box a {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    color: #333;
    text-decoration: none;
}
.footer-links-box a:hover {
    background: #eee;
}
.footer-links-text {
    width: 100%;
    margin-top: 10px;
    font-size: 14px;
    color: #777;
    text-align: center;
}
.footer-links-text a {
    color: #777;
    text-decoration: none;
    margin: 0 4px;
}
.footer-links-text a:hover {
    text-decoration: underline;
}

@media(max-width:600px){
    .footer-links-section {
        max-width: 100%;
        padding: 0 8px;
    }
    .footer-toggle-btn {
        font-size: 15px;
        height: 42px;
    }
    .footer-links-box a {
        font-size: 14px;
        padding: 10px;
    }
}

/* 데이터 리스트 섹션 스타일 */
.comments-h2, .reviews-h2, .faq-h2 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    border-left: 5px solid #333;
    padding-left: 10px;
}
.data-list-box { 
    margin-top: 20px; 
    padding: 20px; 
    background: #f9f9f9; 
    border: 1px solid #ddd; 
    border-radius: 8px; 
    width: 100%; 
    box-sizing: border-box;
}
.data-box { 
    margin-bottom: 15px; 
    border-bottom: 1px solid #e0e0e0; 
    padding-bottom: 15px; 
}
.data-box:last-child { border-bottom: none; }
.data-q { 
    font-weight: bold; 
    display: block; 
    margin-bottom: 8px; 
    color: #000;
    font-size: 15px;
}
.data-a { 
    display: block; 
    color: #444; 
    font-size: 14px;
    background: #fff; 
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #eee;
}
.empty-msg { 
    color: #666; 
    font-style: italic; 
    background: #fff; 
    padding: 15px; 
    border-radius: 5px; 
    text-align: center; 
    border: 1px dashed #ccc;
}
.tg-link { color: #0088cc; font-weight: bold; text-decoration: underline; }