/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */

/* ============================================
   Blocksy Header Menu - Hover & Active Color
   ============================================ */

/* 메인 메뉴 hover */
[data-id="menu"] .menu-item>a:hover,
header .menu-item>a:hover,
#header .menu-item>a:hover,
.ct-header .menu-item>a:hover,
.site-header .menu-item>a:hover {
    color: #c00 !important;
}

/* 메인 메뉴 active (현재 페이지 / 부모 메뉴) */
[data-id="menu"] .current-menu-item>a,
[data-id="menu"] .current-menu-ancestor>a,
[data-id="menu"] .current-menu-parent>a,
[data-id="menu"] .current_page_item>a,
[data-id="menu"] .current_page_parent>a,
[data-id="menu"] .current_page_ancestor>a,
header .current-menu-item>a,
header .current-menu-ancestor>a,
header .current-menu-parent>a,
header .current_page_item>a,
header .current_page_parent>a,
header .current_page_ancestor>a,
.ct-header .current-menu-item>a,
.ct-header .current-menu-ancestor>a,
.ct-header .current-menu-parent>a,
.ct-header .current_page_item>a,
.ct-header .current_page_parent>a,
.ct-header .current_page_ancestor>a {
    color: #c00 !important;
}

/* Sticky 상태에서도 동일하게 적용 */
.elementor-sticky--active .menu-item>a:hover,
.elementor-sticky--active .current-menu-item>a,
.elementor-sticky--active .current-menu-ancestor>a,
.elementor-sticky--active .current-menu-parent>a,
.e-sticky-clone .menu-item>a:hover,
.e-sticky-clone .current-menu-item>a,
.e-sticky-clone .current-menu-ancestor>a,
.e-sticky-clone .current-menu-parent>a {
    color: #c00 !important;
}

/* ============================================
   JetEngine Listing Item - Image Ratio Styles
   ============================================ */

/**
 * 4:3 비율 이미지 (아카이브 카드용)
 * 사용법: Listing Item의 Dynamic Image 또는 컨테이너에 클래스 추가
 * 클래스: .ratio-4-3
 */
.ratio-4-3 {
    position: relative;
    width: 100%;
    padding-bottom: 75%;
    /* 4:3 = 75% */
    overflow: hidden;
}

.ratio-4-3 img,
.ratio-4-3 .jet-listing-dynamic-image__img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/**
 * 3:4 비율 이미지 (세로형 포스터용)
 * 클래스: .ratio-3-4
 */
.ratio-3-4 {
    position: relative;
    width: 100%;
    padding-bottom: 133.33%;
    /* 3:4 = 133.33% */
    overflow: hidden;
}

.ratio-3-4 img,
.ratio-3-4 .jet-listing-dynamic-image__img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/**
 * 1:1 비율 이미지 (정사각형)
 * 클래스: .ratio-1-1
 */
.ratio-1-1 {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    /* 1:1 = 100% */
    overflow: hidden;
}

.ratio-1-1 img,
.ratio-1-1 .jet-listing-dynamic-image__img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/**
 * 16:9 비율 이미지 (와이드)
 * 클래스: .ratio-16-9
 */
.ratio-16-9 {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 = 56.25% */
    overflow: hidden;
}

.ratio-16-9 img,
.ratio-16-9 .jet-listing-dynamic-image__img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/**
 * 원본 비율 유지 (기본값)
 * 클래스: .ratio-auto
 */
.ratio-auto {
    position: relative;
    width: 100%;
}

.ratio-auto img,
.ratio-auto .jet-listing-dynamic-image__img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   JetEngine Listing Grid 공통 스타일
   ============================================ */

/* 리스팅 그리드 카드 기본 스타일 */
.jet-listing-grid__item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.jet-listing-grid__item:hover {
    transform: translateY(-4px);
}

/* 카드 내 이미지 컨테이너 */
.jet-listing-dynamic-image {
    overflow: hidden;
    border-radius: 0;
}

.jet-listing-dynamic-image img {
    transition: transform 0.4s ease;
}

.jet-listing-grid__item:hover .jet-listing-dynamic-image img {
    transform: scale(1.05);
}

/* 카드 타이틀 */
.jet-listing-dynamic-field--post-title {
    font-family: 'DINPro', 'YoonVGothic', sans-serif;
    margin-top: 12px;
}

/* 카드 메타 정보 (날짜 등) */
.jet-listing-dynamic-field--meta {
    font-size: 14px;
    color: #666;
    margin-top: 8px;
}

/* ============================================
   Artist Single Page Styles
   ============================================ */

/* Hero Image */
.artist-hero-image {
    width: 100%;
    margin-bottom: 40px;
}

.artist-hero-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    object-position: center;
}

/* Tab Menu */
.artist-tab-menu,
.single-tab-menu,
.exhibition-nav-menu {
    display: flex;
    gap: 24px;
    /*margin-top: 20px;
    margin-bottom: 20px;
    padding: 16px 0;*/
}

/* Exhibition Nav Menu - 상단 스타일 */
.exhibition-nav-menu {
    padding: 20px 0;
    margin-bottom: 20px;
}

.artist-tab-menu a,
.single-tab-menu a,
.single-tab-menu .tab-link,
.exhibition-nav-menu a {
    font-family: 'DINPro', 'YoonVGothic', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    color: #999;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.artist-tab-menu a.active,
.artist-tab-menu a:hover,
.single-tab-menu a.active,
.single-tab-menu a:hover,
.single-tab-menu .tab-link.active,
.single-tab-menu .tab-link:hover,
.exhibition-nav-menu a.active,
.exhibition-nav-menu a:hover {
    color: #c00;
}

/* Tab Content - 앵커 스크롤 방식 (콘텐츠 항상 표시) */
.anchor-section {
    scroll-margin-top: 100px;
    /* sticky header 높이 고려 */
    padding-top: 40px;
}

/* 탭 전환 방식을 사용할 경우 (옵션) */
.tab-toggle-content {
    display: none;
}

.tab-toggle-content.active {
    display: block;
}

/* About Section */
.artist-about-section {
    display: flex;
    gap: 40px;
    margin-bottom: 60px;
}

.artist-profile-image {
    flex: 0 0 200px;
}

.artist-profile-image img {
    width: 100%;
    height: auto;
}

.artist-info {
    flex: 1;
}

.artist-name,
.single-title {
    font-family: 'DINPro', 'YoonVGothic', sans-serif;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.artist-title-position,
.single-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

.artist-biography,
.single-description {
    font-size: 15px;
    line-height: 1.8;
    color: #333;
}

/* Biography Read More */
.biography-content,
.description-content {
    max-height: 200px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.5s ease;
}

.biography-content::after,
.description-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(transparent, #fff);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.biography-content.expanded,
.description-content.expanded {
    max-height: none;
}

.biography-content.expanded::after,
.description-content.expanded::after {
    opacity: 0;
}

/* CV Download Link */
.cv-download-link {
    display: inline-block;
    margin-top: 16px;
    font-size: 14px;
    color: #333;
    text-decoration: underline;
}

.cv-download-link:hover {
    color: #000;
}

/* Works Section */
.artist-works-section,
.works-section {
    margin-bottom: 60px;
}

.artist-works-grid,
.works-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.works-grid .jet-listing-grid__items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* Related Section */
.artist-related-section,
.related-section {
    margin-bottom: 60px;
}

.related-link {
    display: block;
    padding: 5px 0;
    font-size: 15px;
    color: #333;
    text-decoration: underline;
}

.related-link:hover {
    color: #000;
}

/* Load More Button */
.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    margin-top: 24px;
    border: 1px solid #ddd !important;
    background: #fff !important;
    color: #333 !important;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}

.load-more-btn:hover {
    background: #f5f5f5;
    border-color: #999;
}

/* Gallery Button Group - 가운데 정렬 */
.gallery-btn-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 32px auto 0;
}

/* Gallery Load More / Show Less 공통 스타일 */
.gallery-load-more-btn,
.gallery-show-less-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: fit-content;
    padding: 12px 32px;
    margin: 0;
    border: 1px solid #ddd !important;
    background: #fff !important;
    color: #333 !important;
    font-family: 'DINPro', 'YoonVGothic', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}

.read-more-btn {
    display: block;
    width: fit-content;
    padding: 12px 32px;
    margin: 32px 0 0;
    /* 좌측 정렬 */
    border: 1px solid #ddd !important;
    background: #fff !important;
    color: #333 !important;
    font-family: 'DINPro', 'YoonVGothic', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}

.gallery-load-more-btn:hover,
.gallery-show-less-btn:hover,
.read-more-btn:hover {
    background: #f5f5f5;
    border-color: #999;
}

/* Load More Content - 초기 높이 제한 */
#loadmore-content,
.loadmore-content,
[id="loadmore-content"] {
    max-height: 100px !important;
    overflow: hidden !important;
    position: relative !important;
    transition: max-height 0.5s ease;
}

/* 그라데이션 페이드 효과 */
#loadmore-content::after,
.loadmore-content::after,
[id="loadmore-content"]::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 50px !important;
    background: linear-gradient(transparent, #fff) !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease;
    z-index: 10;
}

/* Expanded 상태 - 전체 표시 */
#loadmore-content.expanded,
.loadmore-content.expanded,
[id="loadmore-content"].expanded {
    max-height: 3000px !important;
    /* none 대신 큰 값 사용 */
    overflow: visible !important;
}

#loadmore-content.expanded::after,
.loadmore-content.expanded::after,
[id="loadmore-content"].expanded::after {
    opacity: 0 !important;
    display: none !important;
}

/* 일반 load-more-btn에만 ::after 화살표 적용 (gallery용 제외) */
.load-more-btn:not(.gallery-load-more-btn)::after {
    content: '→';
}

/* ============================================
   Gallery Load More - CSS Columns 레이아웃
   ============================================ */

/* 갤러리 컨테이너 - CSS Columns */
.gallery-loadmore .elementor-gallery__container {
    display: block !important;
    column-count: 4 !important;
    column-gap: 10px !important;
    position: relative !important;
    padding-bottom: 0 !important;
}

/* 각 아이템 */
.gallery-loadmore .e-gallery-item {
    display: block !important;
    position: relative !important;
    transform: none !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
    break-inside: avoid !important;
    margin-bottom: 10px !important;
    overflow: hidden;
}

/* 아이템 내부 이미지 (height:0 + padding-bottom 비율 트릭) */
.gallery-loadmore .e-gallery-item .e-gallery-image {
    position: relative !important;
    width: 100% !important;
    height: 0 !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

/* 숨김 아이템 */
.gallery-loadmore .e-gallery-item.gallery-hidden {
    display: none !important;
}

/* 비율 강제 옵션 (필요시 사용) */

/* 정사각형 강제 */
.gallery-loadmore.ratio-1-1 .e-gallery-item {
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.gallery-loadmore.ratio-1-1 .e-gallery-item .e-gallery-image {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    background-size: cover !important;
}

/* 4:3 강제 */
.gallery-loadmore.ratio-4-3 .e-gallery-item {
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.gallery-loadmore.ratio-4-3 .e-gallery-item .e-gallery-image {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    background-size: cover !important;
}

/* ============================================
   반응형
   ============================================ */

@media (max-width: 1024px) {
    .gallery-loadmore .elementor-gallery__container {
        column-count: 3 !important;
    }
}

@media (max-width: 768px) {
    .gallery-loadmore .elementor-gallery__container {
        column-count: 2 !important;
    }
}

/* ============================================
   커스텀 갤러리 숏코드 [sklo_gallery] - Isotope
   ============================================ */

.sklo-gallery__grid {
    position: relative;
}

.sklo-gal__item {
    display: block;
    width: calc((100% - 30px) / 4);
    margin-bottom: 10px;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s ease;
    border: 1px solid #E1E8ED;
}

.sklo-gal__item:hover {
    opacity: 0.85;
}

.sklo-gal__img {
    width: 100%;
    height: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.sklo-gal__item.sklo-gal-hidden {
    display: none;
}

.sklo-gallery__btns {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
    padding: 0;
}

.sklo-gal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: fit-content;
    padding: 12px 32px;
    margin: 0;
    border: 1px solid #ddd !important;
    background: #fff !important;
    color: #333 !important;
    font-family: 'DINPro', 'YoonVGothic', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}

.sklo-gal-btn:hover {
    background: #f5f5f5;
    border-color: #999;
}

@media (max-width: 1024px) {
    .sklo-gal__item {
        width: calc((100% - 20px) / 3);
    }
}

@media (max-width: 768px) {
    .sklo-gal__item {
        width: calc((100% - 10px) / 2);
    }
}

/* 라이트박스 */
.sklo-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.sklo-lightbox--open {
    display: flex;
}

.sklo-lightbox__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
}

.sklo-lightbox__img-wrap {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sklo-lightbox__img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    display: block;
}

.sklo-lightbox__close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    line-height: 1;
    padding: 8px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.sklo-lightbox__close:hover {
    opacity: 1;
}

.sklo-lightbox__prev,
.sklo-lightbox__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    padding: 16px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.sklo-lightbox__prev:hover,
.sklo-lightbox__next:hover {
    opacity: 1;
}

.sklo-lightbox__prev {
    left: 16px;
}

.sklo-lightbox__next {
    right: 16px;
}

/* ============================================
   Responsive - Artist Single
   ============================================ */

@media (max-width: 1024px) {

    .artist-works-grid,
    .works-grid,
    .works-grid .jet-listing-grid__items {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .artist-hero-image img {
        height: 300px;
    }

    .artist-about-section {
        flex-direction: column;
    }

    .artist-profile-image {
        flex: none;
        width: 150px;
    }

    .artist-works-grid,
    .works-grid,
    .works-grid .jet-listing-grid__items {
        grid-template-columns: repeat(2, 1fr);
    }

    .artist-tab-menu,
    .single-tab-menu {
        gap: 16px;
    }

    .artist-name,
    .single-title {
        font-size: 22px;
    }

    .gallery-btn-group {
        margin-top: 16px;
        gap: 8px;
    }

    .gallery-load-more-btn,
    .gallery-show-less-btn {
        padding: 10px 24px;
        font-size: 13px;
    }
}



