/*
Theme Name: Hotplace Custom
Theme URI: https://myaigrd.com
Author: MYAIGRD
Description: 핫플레이스 전용 커스텀 매거진 테마 (화이트 & 오렌지 포인트)
Version: 2.3
Text Domain: hotplace-custom
*/

/* 글로벌 리셋 및 변수 */
:root {
    --primary-color: #FF6B00; /* 오렌지 포인트 */
    --primary-hover: #E56000;
    --text-color: #1A1A1A;
    --text-muted: #666666;
    --bg-color: #FFFFFF;
    --border-color: #E0E0E0;
    --radius: 12px;
}

* { box-sizing: border-box; }
body {
    margin: 0; padding: 0;
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; transition: color 0.2s; }
a:hover { color: var(--primary-color); }
ul { list-style: none; padding: 0; margin: 0; }
img { max-width: 100%; height: auto; display: block; }

/* 유틸리티 */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ==========================================
   헤더 (Header)
========================================== */
.site-header {
    border-bottom: 1px solid var(--border-color);
    padding-top: 30px;
    background: #fff;
    position: relative;
    z-index: 1000;
}

.header-logo-wrap {
    text-align: center;
    margin-bottom: 20px;
}
.site-logo {
    max-height: 220px; /* 로고 크기 더 확대 */ /* 로고 크기 조절 */
    margin: 0 auto;
}

.header-search-wrap {
    max-width: 600px;
    margin: 0 auto 30px auto;
    padding: 0 20px;
}
.search-form {
    display: flex;
    align-items: center;
    background: #f7f7f7;
    border-radius: 50px;
    padding: 5px 5px 5px 20px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}
.search-form:focus-within {
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.1);
}
.search-field {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 0;
    font-size: 16px;
    font-family: inherit;
    outline: none;
}
.search-submit {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}
.search-submit:hover { background: var(--primary-hover); }

.main-navigation {
    border-top: 1px solid var(--border-color);
}
.main-navigation ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px; /* 버튼 사이 간격 넓게 */
    padding: 10px 0 20px 0;
}
.main-navigation li { margin: 0; }
.main-navigation a {
    display: block;
    padding: 10px 20px;
    font-weight: 500;
    font-size: 15px;
    white-space: nowrap;
    border: 1px solid var(--border-color); /* 둥근 버튼 테두리 */
    border-radius: 30px; /* 완전 둥근 캡슐 모양 */
    background-color: #fff;
    transition: all 0.2s ease;
}
.main-navigation a:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: #fffaf5; /* 마우스 올렸을 때 연한 주황 배경 */
    box-shadow: none;
}


/* ==========================================
   메인 화면 (Front Page)
========================================== */
.front-page-main {
    padding: 20px 0 40px 0;
    max-width: 1200px;
    margin: 0 auto;
}

/* 히어로 섹션 */
.hero-container {
    display: flex;
    gap: 20px;
    margin-bottom: 50px;
    padding: 0 20px;
}
.hero-main-post {
    flex: 2;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
}
.hero-thumbnail {
    width: 100%;
    height: 100%;
    min-height: 540px;
    background-size: cover;
    background-position: center;
    background-color: #f0f0f0; /* 이미지가 늦게 뜰 때 회색 배경 */
    transition: transform 0.5s ease;
}
.hero-main-post:hover .hero-thumbnail { transform: scale(1.05); }
.hero-main-post a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}
.hero-content {
    position: absolute;
    bottom: 0; left: 0;
    padding: 30px;
    color: #fff;
    z-index: 2;
}
.hero-meta { color: var(--primary-color); font-weight: bold; margin-bottom: 10px; font-size: 14px; }
.hero-title { margin: 0; font-size: 32px; font-weight: 700; line-height: 1.3; }

.hero-list-posts {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
}
.hero-list-item a {
    display: flex;
    gap: 15px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background-color: #fff;
    transition: all 0.3s ease;
}
.hero-list-item a:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.08);
    transform: translateY(-2px);
}
.list-thumbnail {
    width: 110px;
    height: 100px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-color: #f0f0f0;
    flex-shrink: 0;
}
.list-content { flex: 1; }
.list-meta { color: var(--primary-color); font-size: 12px; font-weight: bold; margin-bottom: 5px; }
.list-title { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.4; color: var(--text-color); }
.hero-list-item:hover .list-title { color: var(--primary-color); }

/* 캐러셀 섹션 */
.carousel-section {
    margin-bottom: 50px;
    padding: 0 20px;
}
.section-header {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.section-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

/* 네이티브 가로 스크롤 (스와이프) */
.carousel-container {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
    margin: 0 -20px; /* 좌우 여백까지 스크롤 되게 */
    padding: 0 20px 20px 20px; /* 그림자 잘림 방지 */
}
.carousel-container::-webkit-scrollbar { display: none; } /* Chrome */

.carousel-track {
    display: inline-flex;
    gap: 20px;
}
.carousel-card {
    width: 280px;
    flex-shrink: 0;
    scroll-snap-align: start;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: transform 0.3s ease;
}
.carousel-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.card-thumbnail {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: #f0f0f0;
}
.card-content { padding: 20px; }
.card-title { 
    margin: 0 0 10px 0; 
    font-size: 18px; 
    line-height: 1.4; 
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-excerpt { 
    margin: 0; 
    font-size: 14px; 
    color: var(--text-muted); 
    line-height: 1.5; 
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 푸터 */
.site-footer {
    border-top: 1px solid var(--border-color);
    padding: 30px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* ==========================================
   모바일 반응형 (Mobile Responsive)
========================================== */
@media (max-width: 768px) {
    .site-header { 
        padding-top: 0; /* 기존 여백 제거 */
    }

    /* 언어 선택기를 얇은 상단 바(Top Bar)로 변경 */
    .language-switcher {
        position: static !important; 
        display: flex !important;
        justify-content: flex-end !important;
        padding: 6px 15px !important;
        background: #f9f9f9 !important;
        border-bottom: 1px solid #eee !important;
    }
    .lang-btn {
        border: none;
        background: transparent;
        padding: 0;
        font-size: 12px;
        color: #666;
        box-shadow: none;
    }
    .lang-dropdown {
        top: 30px;
        right: 15px;
    }

    /* 로고와 검색창을 깔끔하게 한 줄로 */
    .header-top-wrap {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px; 
        gap: 15px;
    }
    .header-logo-wrap {
        margin: 0;
        flex: 0 0 65px; /* 로고 영역 65px 고정 */
    }
    .site-logo { 
        width: 100%;
        height: auto;
        max-height: none;
    }
    .header-search-wrap {
        margin: 0;
        flex-grow: 1;
        padding: 0;
    }
    .search-form {
        padding: 0 5px 0 15px;
        background: #f0f2f5; /* 모던한 연회색 배경 */
        border: none;
    }
    .search-field {
        padding: 10px 0;
        font-size: 14px;
    }
    .search-submit {
        width: 36px;
        height: 36px;
        background: transparent;
        color: var(--primary-color);
    }
    .search-submit:hover {
        background: transparent;
    }

    /* 상단 메뉴(카테고리) 스와이프 - 디자인 슬림화 */
    .main-navigation {
        border-top: none; /* 불필요한 선 제거 */
        border-bottom: 1px solid #eee;
    }
    .main-navigation ul {
        overflow-x: auto;
        justify-content: flex-start;
        flex-wrap: nowrap;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        padding: 10px 15px 15px 15px;
        gap: 8px; /* 버튼 사이 간격 좁힘 */
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .main-navigation ul::-webkit-scrollbar {
        display: none;
    }
    .main-navigation li {
        flex-shrink: 0;
    }
    .main-navigation a {
        padding: 8px 18px; /* 버튼 위아래 여백 줄임 */
        font-size: 14px;
        border: 1px solid #e0e0e0;
    }
    
    .hero-container {
        flex-direction: column;
    }
    .hero-main-post {
        flex: none;
        width: 100%;
    }
    .hero-thumbnail { min-height: 250px; }
    .hero-title { font-size: 24px; }
    
    .hero-list-posts { display: none; /* 모바일에서는 우측 리스트 숨김 (너무 길어짐) */ }
    
    .carousel-card {
        width: 80vw; /* 모바일에서 화면의 80% 차지하게 해서 옆 카드가 살짝 보이도록 유도 */
    }
    

}

/* 카테고리 활성화(ON) 상태 */
.main-navigation .current-cat a {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    font-weight: 700;
}
.main-navigation .current-cat a:hover {
    background-color: var(--primary-hover);
    color: #fff;
}

/* ==========================================
   서브 페이지 (Single Post)
========================================== */
.single-main {
    max-width: 1140px; /* 상단 메뉴 폭과 동일하게 시원하게 확장 */
    margin: 0 auto;
    padding: 0 20px 60px 20px;
}
.single-top-popular {
    margin: 5px 0 30px 0;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}
.single-top-popular .section-title {
    font-size: 20px; /* 메인보다 살짝 작게 */
}
.single-header {
    text-align: center;
    margin-bottom: 40px;
}
.single-meta {
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: center;
}
.meta-cat {
    background: var(--primary-color);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
}
.single-title {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.4;
    margin: 0;
}
.single-content {
    font-size: 20px; /* 폰트 2px 증가 */
    line-height: 1.8;
    color: #222; /* 살짝 더 진하게 해서 가독성 향상 */
}
/* 문단(엔터) 사이 간격 넉넉하게 확보 */
.single-content p {
    margin-top: 0;
    margin-bottom: 35px; 
}
.single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}
/* 강제 캐시 무효화 및 가독성 오버라이드 (데스크탑 기본) */
.single-content {
    font-size: 20px !important; /* 다시 PC 폰트 키움 */
    line-height: 1.8 !important;
}
.single-content p {
    margin-bottom: 30px !important;
}

@media (max-width: 768px) {
    .single-title { font-size: 24px !important; }
    .single-content { 
        font-size: 16px !important; 
        line-height: 1.7 !important;
    }
    .single-content h2, .single-content h3 {
        font-size: 20px !important;
        line-height: 1.4 !important;
        margin-bottom: 15px !important;
    }
    .single-content p {
        margin-bottom: 25px !important;
    }
    /* 지도 버튼 등 인라인 스타일 버튼 모바일 최적화 */
    .single-content a[style*="background-color"] {
        font-size: 13px !important;
        padding: 10px 5px !important;
        word-break: keep-all !important;
        white-space: nowrap !important;
        letter-spacing: -0.5px !important;
    }
    /* 모바일 상단 여백 강제 축소 */
    .single-top-popular {
        margin-top: 0 !important;
        padding-top: 15px !important;
    }
    .single-main {
        padding-top: 0 !important;
    }
}

/* 자동 스크롤 부드럽게 (목차 클릭 시) */
html {
    scroll-behavior: smooth;
}

/* ==========================================
   카테고리 화면 (Category Archive)
========================================== */
.category-header {
    text-align: center;
    padding: 15px 20px 30px 20px;
    background-color: #fff;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}
.category-title {
    font-size: 32px;
    font-weight: 800;
    margin: 0;
    color: var(--primary-color);
}
.category-description {
    margin-top: 10px;
    font-size: 16px;
    color: var(--text-muted);
}
.category-grid-section {
    padding: 0 20px 60px 20px;
}
.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 기본 가로 3개 */
    gap: 20px;
}
.grid-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}
.grid-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(255,107,0,0.1);
    transform: translateY(-3px);
}
.grid-thumbnail {
    width: 100%;
    padding-top: 60%; /* 16:9 썸네일 비율 */
    background-size: cover;
    background-position: center;
}
.grid-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.grid-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.grid-excerpt {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.grid-meta {
    margin-top: auto;
    padding-top: 15px;
    font-size: 13px;
    color: #999;
}
/* 페이징 (페이지네이션) */
.pagination {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    gap: 10px;
}
.pagination .page-numbers {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: #fff;
    font-weight: 500;
    color: #333;
    transition: all 0.2s;
}
.pagination .page-numbers:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.pagination .current {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}
@media (max-width: 992px) {
    .grid-container { grid-template-columns: repeat(2, 1fr); } /* 태블릿 2개 */
}
@media (max-width: 576px) {
    .grid-container { grid-template-columns: 1fr; } /* 모바일 1개 */
}

/* ==========================================
   소셜 기능 및 댓글 (Social & Comments)
========================================== */
.social-interaction-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 50px 0;
    padding-top: 40px;
    border-top: 1px dashed var(--border-color);
}
.btn-like, .btn-share {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    background: #fff;
    color: #333;
    outline: none;
}
.btn-like:hover, .btn-share:hover {
    border-color: var(--primary-color);
    background: #fff5f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255,107,0,0.1);
}
.btn-like.liked {
    border-color: #ff4757;
    background: #fff0f2;
    color: #ff4757;
}
.heart-bump {
    animation: heartBump 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes heartBump {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* 댓글 영역 디자인 */
.comments-area {
    background: #fafafa;
    padding: 40px;
    border-radius: var(--radius);
    margin-top: 50px;
    border: 1px solid var(--border-color);
}
.comments-title, .comment-reply-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 25px;
    color: #222;
}
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
}
.comment-list li {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
.comment-author {
    font-weight: 700;
    font-size: 16px;
    color: var(--primary-color);
}
.comment-author img {
    border-radius: 50%;
    margin-right: 15px;
    vertical-align: middle;
}
.comment-meta {
    font-size: 13px;
    color: #999;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #eee;
}
.comment-content p {
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    color: #444;
}
.comment-form-comment textarea {
    width: 100%;
    border: 2px solid #eee;
    border-radius: 12px;
    padding: 20px;
    font-size: 16px;
    resize: vertical;
    transition: 0.3s;
}
.comment-form-comment textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}
.comment-form-author input {
    width: 100%;
    max-width: 300px;
    border: 2px solid #eee;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 16px;
    transition: 0.3s;
}
.comment-form-author input:focus {
    border-color: var(--primary-color);
    outline: none;
}
.form-submit input[type="submit"] {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 15px 35px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s;
}
.form-submit input[type="submit"]:hover {
    background: #e65c00;
    box-shadow: 0 4px 15px rgba(255,107,0,0.3);
}

/* 폼 요소 폰트 강제 적용 (본문과 동일한 프리텐다드) */
input, textarea, button, select {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}
/* ==========================================
   다국어 드롭다운 메뉴 (Language Switcher)
========================================== */
.language-switcher {
    position: absolute;
    top: 25px;
    right: 20px;
    z-index: 1001;
}

.lang-btn {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.lang-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    min-width: 150px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

/* hover 대신 CSS로 동작하게 JS 쓰지 않고, 순수 CSS dropdown */
.language-switcher:hover .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown li {
    margin: 0;
}

.lang-dropdown a {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    color: var(--text-color);
    transition: background 0.2s;
    text-align: left;
}

.lang-dropdown a:hover {
    background: #fffaf5;
    color: var(--primary-color);
    font-weight: bold;
}

}







/* ==========================================
   드롭다운 서브 메뉴 스타일 (Dropdown CSS) - 무조건 보이는 절대 방식
========================================== */
.main-navigation li {
    position: relative;
    /* 호버 감지 영역 확보 */
    padding-bottom: 20px; 
    margin-bottom: -20px;
}
.main-navigation ul.sub-menu {
    display: none !important;
    /* absolute를 버리고 화면을 밀어내며 나타나도록 static으로 변경 */
    position: absolute; 
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    min-width: 200px;
    flex-direction: column;
    padding: 10px 0;
    z-index: 99999999 !important;
    margin-top: 15px;
    gap: 0;
}
.main-navigation li:hover > ul.sub-menu {
    display: flex !important;
}
/* z-index 강제 승급 */
.site-header { z-index: 999999 !important; }
.main-navigation { z-index: 999999 !important; }
.front-page-main { z-index: 1 !important; position: relative; }

.main-navigation ul.sub-menu li {
    margin: 0;
    padding: 0;
    width: 100%;
}
.main-navigation ul.sub-menu a {
    border: none !important;
    border-radius: 0 !important;
    padding: 12px 20px !important;
    text-align: center;
    background: transparent !important;
    font-size: 15px !important;
    width: 100%;
    color: var(--text-color) !important;
    position: relative;
    z-index: 2;
}
.main-navigation ul.sub-menu a:hover {
    background: #fffaf5 !important;
    color: var(--primary-color) !important;
    font-weight: 700 !important;
}
