/* ── style_reviews.css (Goryeo Yeonwa Premium Branding) ──────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Montserrat:wght@200;300;400;500;600&family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

:root {
    --bg-color: #F4F5F6; /* 미술관 오프화이트 */
    --card-bg: #FFFFFF;
    --card-border: #EAEAEA;
    --text-color: #1A1A1A; /* 미니멀리즘 블랙 */
    --text-muted: #767676; /* 고급 웜 그레이 */
    --accent-color: #000000;
    --font-heading: 'Cormorant Garamond', 'Noto Sans KR', serif;
    --font-body: 'Montserrat', 'Noto Sans KR', sans-serif;
}

/* ── 기본 리셋 ── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ── 로딩 스크린 ── */
.loader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--bg-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}
.loader.hidden {
    opacity: 0;
    pointer-events: none;
}
.spinner {
    width: 40px; height: 40px;
    border: 2px solid rgba(0,0,0,0.05);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* ── 공식 사이트 스타일 네비게이션 헤더 ── */
.header {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    background-color: transparent;
}
.logo a {
    font-family: var(--font-body);
    font-size: 1.25rem;
    letter-spacing: 0.22em; /* 와이드 자간 */
    font-weight: 500;
    color: #000000;
    text-transform: uppercase;
}
.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 2.2rem;
}
.nav-menu a {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: color 0.3s;
    font-weight: 400;
    color: #555555;
}
.nav-menu a:hover,
.nav-menu a.active {
    color: #000000;
    font-weight: 500;
}

/* ── 미니멀리즘 히어로 섹션 ── */
.hero-section {
    position: relative;
    padding: 5rem 2rem 4rem 2rem;
    text-align: center;
    background-color: transparent;
}
.hero-content {
    max-width: 900px;
    margin: 0 auto;
}
.hero-badge {
    font-family: var(--font-body);
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    color: var(--text-color);
    border-bottom: 1.5px solid var(--text-color);
    padding-bottom: 0.3rem;
    display: inline-block;
    margin-bottom: 2rem;
    font-weight: 500;
}
.hero-section h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: #000000;
    margin-bottom: 1.8rem;
    word-break: keep-all;
}
.hero-section h1 span {
    font-weight: 500;
}
.hero-desc {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 300;
    max-width: 650px;
    margin: 0 auto 2.5rem auto;
    word-break: keep-all;
    line-height: 1.8;
}
.rating-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: #FFFFFF;
    border: 1px solid var(--card-border);
    padding: 0.6rem 1.6rem;
}
.stars {
    color: #000000;
    font-size: 0.85rem;
    letter-spacing: 1px;
}
.rating-text {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-muted);
}
.rating-text strong {
    color: #000;
    font-size: 1rem;
}
.reviews-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ── 메인 필터 및 그리드 영역 ── */
.content-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem 8rem 3rem;
}

/* 플랫 미니멀 버튼 필터 바 */
.filter-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 4rem;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 1.5rem;
}
.filter-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 0.5rem 1.2rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
}
.filter-btn:hover {
    color: #000000;
}
.filter-btn.active {
    color: #FFFFFF;
    font-weight: 500;
    background-color: #000000;
}

/* 리뷰 그리드 시스템 */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem 2rem; /* 넉넉한 공간 여백 부여 */
    min-height: 400px;
}
.grid-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 1rem;
    color: var(--text-muted);
    padding: 6rem 0;
}

/* 직각 엣지 카드 디자인 */
.review-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0px; /* 완벽한 직각 */
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    
    /* Reveal 애니메이션을 위한 초기 상태 */
    opacity: 0;
    transform: translateY(20px);
}
.review-card.visible {
    opacity: 1;
    transform: translateY(0);
}
.review-card:hover {
    transform: translateY(-5px);
    border-color: #B5B5B5;
}

.card-img-container {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 비율 */
    background-color: #EAEAEA;
    overflow: hidden;
}
.card-img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}
.review-card:hover .card-img {
    transform: scale(1.04);
}
.card-category {
    position: absolute;
    top: 0.8rem; left: 0.8rem;
    background: #000000;
    color: #FFFFFF;
    padding: 0.25rem 0.6rem;
    font-size: 0.6rem;
    font-family: var(--font-body);
    letter-spacing: 0.1em;
    font-weight: 500;
}

.card-body {
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}
.card-stars {
    color: #000000;
    font-size: 0.75rem;
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
}
.card-text {
    font-size: 0.85rem;
    color: #333333;
    font-weight: 300;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: keep-all;
}
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #F0F0F0;
    padding-top: 0.8rem;
    font-size: 0.75rem;
    font-family: var(--font-body);
    color: var(--text-muted);
}
.card-author {
    font-weight: 400;
    color: #1A1A1A;
}

/* ── 오프화이트 뮤지엄 카탈로그 라이트박스 ── */
.lightbox {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(244, 245, 246, 0.96); /* 오프화이트 반투명 마스크 */
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    backdrop-filter: blur(20px);
}
.lightbox.open {
    opacity: 1;
    pointer-events: auto;
}
.lightbox-close {
    position: absolute;
    top: 2rem; right: 2rem;
    background: none;
    border: none;
    color: #000000;
    font-size: 1.5rem;
    cursor: pointer;
    width: 45px; height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
    z-index: 1010;
}
.lightbox-close:hover {
    transform: rotate(90deg);
}

.lightbox-wrapper {
    background: #FFFFFF;
    border: 1px solid var(--card-border);
    display: flex;
    max-width: 1050px;
    width: 90%;
    height: 75vh;
    border-radius: 0px; /* 직각 */
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.05); /* 강한 그림자는 빼고 고급스러운 음영만 부여 */
    transform: scale(0.97);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.lightbox.open .lightbox-wrapper {
    transform: scale(1);
}

.lightbox-img-container {
    flex: 1.3;
    background: #EAEAEA;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
#lightbox-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lightbox-info {
    flex: 1;
    padding: 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid var(--card-border);
    background: #FFFFFF;
}
.lightbox-stars {
    color: #000000;
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
}
.lightbox-text {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #2A2A2A;
    margin-bottom: 2rem;
    word-break: keep-all;
    font-weight: 300;
}
.lightbox-meta {
    border-top: 1px solid #EAEAEA;
    padding-top: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-family: var(--font-body);
    color: var(--text-muted);
}
.lightbox-author {
    color: #000000;
    font-weight: 500;
}
.lightbox-tag {
    color: #000000;
    font-weight: 500;
    text-transform: uppercase;
}

/* SEO 숨김 태그 */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ── 공식 푸터 복제 구현 ── */
.footer {
    background: #F4F5F6;
    border-top: 1px solid var(--card-border);
    padding: 5rem 3rem 4rem 3rem;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}
.footer-main-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 4rem;
}

/* 공식 맵 임베드 컨테이너 */
.footer-map-container {
    flex: 1.2;
    min-width: 320px;
    height: 220px;
    border: 1px solid var(--card-border);
    background-color: #EAEAEA;
}
.footer-map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.footer-nav-row {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    gap: 4rem;
    min-width: 280px;
}
.footer-col h4 {
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: #000000;
    margin-bottom: 1.2rem;
    font-weight: 500;
}
.footer-col p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.8;
}
.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.footer-col a {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: color 0.3s;
}
.footer-col a:hover {
    color: #000000;
}

.footer-bottom {
    border-top: 1px solid #EAEAEA;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-body);
    letter-spacing: 0.05em;
}

/* ── 반응형 처리 ── */

@media (max-width: 1200px) {
    .reviews-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.2rem 1.5rem;
    }
    .lightbox-wrapper {
        height: auto;
        max-height: 90vh;
        flex-direction: column;
    }
    .lightbox-img-container {
        flex: none;
        height: 45vh;
    }
    .lightbox-info {
        padding: 2.5rem;
    }
}

@media (max-width: 900px) {
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .header {
        padding: 2rem 1.5rem;
    }
    .logo a {
        font-size: 1.1rem;
    }
    .hero-section h1 {
        font-size: 2.3rem;
    }
    .footer-main-row {
        flex-direction: column;
        align-items: stretch;
    }
    .footer-nav-row {
        justify-content: flex-start;
    }
}

@media (max-width: 600px) {
    .reviews-grid {
        grid-template-columns: 1fr;
    }
    .hero-section h1 {
        font-size: 1.8rem;
    }
    .filter-bar {
        margin-bottom: 2rem;
        padding-bottom: 1rem;
    }
    .filter-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
    .lightbox-img-container {
        height: 35vh;
    }
    .lightbox-info {
        padding: 1.5rem;
    }
    .lightbox-text {
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
    }
    .footer-nav-row {
        flex-direction: column;
        gap: 2rem;
    }
}
