/* =======================================================
   style.css: Cosmos Hiker Custom Styles
   역할: Tailwind CSS로 커버되지 않는 커스텀 스타일 및 애니메이션 정의
   ======================================================= */

/* --- 1. 배경 및 애니메이션 --- */

#hero-section {
    /* 기존 스타일 유지하되, 약간의 조정 */
    min-height: 45vh;
    background-image: url('/web_images/wallpaper/kyoto_walk.jpg');
    /*background-image: url('https://images.unsplash.com/photo-1493780474015-ba834fd0ce2f?q=80&w=2042&auto=format&fit=crop');*/
    /* 예시 이미지 (프라하 느낌 대체) */
    background-size: cover;
    background-position: center;
    background-color: #f0f0f0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 상세 보기 로드 시 부드러운 애니메이션 효과 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out forwards;
}

/* --- 2. 컨텐츠 스타일링 (.gh-content -> 워드프레스 호환) --- */
/* 워드프레스에서 넘어오는 HTML 컨텐츠 스타일링 */

.gh-content {
    color: #374151;
    line-height: 1.8;
    font-family: 'Noto Sans KR', sans-serif;
}

/* 문단 */
.gh-content p {
    margin-bottom: 1.5rem;
    /* [User] 모바일 본문 폰트 크기 (예: 1rem = 16px, 1.125rem = 18px) */
    font-size: 1.0rem;
    /* 기본: 16px */
    word-break: keep-all;
}

/* Desktop Font Size Increase */
@media (min-width: 1080px) {
    .gh-content p {
        /* [User] 여기서 본문 폰트 크기를 조절하세요 (예: 1.35rem, 1.5rem 등) */
        font-size: 1.25rem;
        /* 현재: 20px */
    }
}

/* 제목 태그 스타일 */
.gh-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: #111;
    font-family: 'Playfair Display', serif;
    border-bottom: 2px solid #f3f4f6;
    padding-bottom: 0.5rem;
}

.gh-content h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
    font-family: 'Playfair Display', serif;
}

/* 링크 스타일 */
.gh-content a {
    color: #3b82f6;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: color 0.2s;
}

.gh-content a:hover {
    color: #1d4ed8;
}

/* 인용구 스타일 (워드프레스 Quote 블록) */
.gh-content blockquote,
.gh-content .wp-block-quote {
    border-left: 4px solid #3b82f6;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #555;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 0 0.5rem 0.5rem 0;
}

/* 이미지 스타일 (워드프레스 Image 블록) */
.gh-content img,
.gh-content figure img {
    border-radius: 0.75rem;
    margin: 2rem auto;
    max-width: 100%;
    height: auto;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.gh-content figure {
    margin: 2rem 0;
}

.gh-content figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

/* 리스트 스타일 */
.gh-content ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.gh-content ol {
    list-style-type: decimal;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.gh-content li {
    margin-bottom: 0.5rem;
}

/* 코드 블록 */
.gh-content pre {
    background: #1f2937;
    color: #f3f4f6;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

/* --- 3. 이미지 갤러리 및 모달 스타일 --- */

.image-gallery {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.gallery-img {
    width: calc(50% - 5px);
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s;
}

.gallery-img:hover {
    transform: scale(1.02);
}

/* 모바일 대응: 세로 정렬 */
@media (max-width: 768px) {
    .image-gallery {
        flex-direction: column;
    }

    .gallery-img {
        width: 100%;
    }
}

/* 모달 스타일 */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 1000;
    /* Sit on top */
    padding-top: 50px;
    /* Location of the box */
    left: 0;
    top: 0;
    width: 100%;
    /* Full width */
    height: 100%;
    /* Full height */
    overflow: auto;
    /* Enable scroll if needed */
    background-color: rgb(0, 0, 0);
    /* Fallback color */
    background-color: rgba(0, 0, 0, 0.9);
    /* Black w/ opacity */
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    animation-name: zoom;
    animation-duration: 0.3s;
}

@keyframes zoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

/* 닫기 버튼 */
.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}