@charset "utf-8";

/**
 * ZZAN STUDIO Official Layout - Type C (Portfolio/Instagram Style)
 */

.type-c-container {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 20px 60px 20px;
}

.type-c-section { margin-bottom: 80px; }

/* 1. 인스타그램형 섹션 (Top) */
.type-c-insta {
    margin-top: 20px;
    margin-bottom: 60px !important;
}
.type-c-insta .zbxe_widget_output { margin: 0; }
.type-c-insta .widgetContainer { padding: 0 !important; }

/* 스토리(인스타그램) 타입 위젯 그리드 최적화 (PC) */
.type-c-insta [data-list-type='story'] .zzan-widget-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin: 0;
}
.type-c-insta [data-list-type='story'] .list-item {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}
.type-c-insta [data-list-type='story'] .thumb-area {
    margin: 0 !important;
    border-radius: 4px;
    overflow: hidden;
}

/* 2. 커스텀 포트폴리오 그리드 섹션 (Widget Style 통합) */
.type-c-portfolio-grid {
    margin-bottom: 120px !important;
}

/* 위젯 스타일 헤더가 이미 layout.css에 정의되어 있으므로 개별 보정만 진행 */
.type-c-portfolio-grid .zzan-ws-header {
    margin-bottom: 40px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--zzan-border, rgba(255,255,255,0.1));
}

/* 포트폴리오 그리드 컨테이너 (PC 4열) */
.portfolio-grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 0;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #111;
}

.portfolio-link {
    display: block;
    width: 100%;
}

.portfolio-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.portfolio-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.portfolio-thumb-wrap .no-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #222;
    color: #444;
    font-size: 12px;
    font-weight: 700;
}

/* 오버레이 효과 */
.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0) 100%);
    display: flex;
    align-items: flex-end;
    padding: 30px;
    opacity: 0;
    transition: all 0.4s ease;
}

.overlay-content {
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.2, 1, 0.3, 1);
}

.overlay-content .category {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    color: var(--zzan-neon, #a2ff00);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.overlay-content .title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.overlay-content .date {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

/* Hover 인터랙션 */
.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover .overlay-content {
    transform: translateY(0);
}

/* 4. 하단 하이브리드 섹션 */
.type-c-hybrid-wrap { margin-bottom: 60px; }
.type-c-hybrid-flex {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* ============================================================
   [Type C] 퀵링크 섹션 독립 관리 (Type B 스타일 이식)
   ============================================================ */

/* 뉴스룸 전용 퀵링크 섹션 (하단 배치용) */
.quick-links-section.section-quick-links {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 100px 0 0 0 !important;
    background: var(--zzan-select-bg);
    margin-top: 80px;
}

.quick-links-section.section-quick-links .type-a-container {
    padding-bottom: 100px !important;
}

.quick-links-section.section-quick-links .bg-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 5;
}

/* Type C 퀵링크 래퍼 */
.type-b-quick-wrapper {
    position: relative;
    padding: 0 10px;
}

.type-b-quick-wrapper .swiper-container {
    overflow: visible !important;
    padding: 40px 0;
    margin: -40px 0;
}

/* 개별 카드 디자인 - Type C 포트폴리오 스타일 최적화 */
.type-b-quick-card {
    display: block !important;
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1.1; /* 세로로 약간 더 긴 비율로 세련되게 변경 */
    background: #0d0d0d;
    border-radius: 12px; /* 포트폴리오와 통일된 라운딩 */
    overflow: hidden;
    text-decoration: none;
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 5;
    border: 1px solid rgba(255,255,255,0.05);
}

.type-b-quick-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border-color: rgba(255,255,255,0.15);
}

.type-b-quick-card .card-bg {
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease;
    z-index: 1;
}

.type-b-quick-card:hover .card-bg {
    transform: scale(1.1);
    opacity: 0.5;
}

/* 오버레이 추가 */
.type-b-quick-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0) 100%);
    z-index: 2;
    transition: height 0.5s ease;
}

.type-b-quick-card:hover::after {
    height: 80%;
}

.type-b-quick-card .card-content {
    position: relative;
    z-index: 10;
    height: 100%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* 하단 정렬로 변경 */
    align-items: flex-start; /* 좌측 정렬로 변경 */
    text-align: left;
    pointer-events: none;
}

.type-b-quick-card .card-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    transform-origin: left bottom;
}

.type-b-quick-card:hover .card-icon {
    background: var(--zzan-neon, #a2ff00);
    transform: scale(1.1) translateY(-5px);
    border-color: transparent;
}

.type-b-quick-card:hover .card-icon img {
    filter: brightness(0);
}

.type-b-quick-card .card-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: filter 0.3s ease;
}

.type-b-quick-card .card-text {
    transform: translateY(10px);
    transition: transform 0.4s ease;
}

.type-b-quick-card:hover .card-text {
    transform: translateY(0);
}

.type-b-quick-card .card-title {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.2;
    word-break: keep-all;
    letter-spacing: -0.5px;
}

.type-b-quick-card .card-desc {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
    margin-bottom: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.3s ease;
}

.type-b-quick-card:hover .card-desc {
    color: rgba(255,255,255,0.9);
}

.type-b-quick-card .card-more {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--zzan-neon, #a2ff00);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-top: 20px;
    opacity: 0; /* 평소엔 숨김 */
    transform: translateX(-10px);
    transition: all 0.4s ease 0.1s;
}

.type-b-quick-card:hover .card-more {
    opacity: 1;
    transform: translateX(0);
}

.type-b-quick-card .card-more svg {
    width: 14px;
    height: 14px;
}

/* 화살표 스타일 */
.type-b-quick-section .quick-nav-prev,
.type-b-quick-section .quick-nav-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 50;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.type-b-quick-section .quick-nav-prev:hover,
.type-b-quick-section .quick-nav-next:hover {
    background: var(--zzan-neon);
    color: #000;
    transform: translateY(-50%) scale(1.1);
}

.type-b-quick-section .quick-nav-prev { left: -22px; }
.type-b-quick-section .quick-nav-next { right: -22px; }

.type-b-quick-section .quick-nav-prev svg,
.type-b-quick-section .quick-nav-next svg {
    width: 24px;
    height: 24px;
}
.hybrid-left-50 { width: 50%; }
.hybrid-right-50 { width: 50%; }

.hybrid-right-50 .zzan-widget-header {
    margin-bottom: 20px;
}
.hybrid-right-50 [data-list-type='hybrid'] .list-item.first-item {
    margin-bottom: 25px;
}

/* 이미지 호버 효과 강화 (Type C 공통) */
.type-c-section img { transition: all 0.5s ease; }

/* 반응형 미디어 쿼리 - 태블릿(1200px 이하) */
@media screen and (max-width: 1200px) {
    .portfolio-grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 반응형 미디어 쿼리 - 작은 태블릿(1024px 이하) */
@media screen and (max-width: 1024px) {
    .type-c-hybrid-flex { flex-direction: column; }
    .hybrid-left-50, .hybrid-right-50 { width: 100%; }
}

/* 반응형 미디어 쿼리 - 모바일(768px 이하) */
@media screen and (max-width: 768px) {
    .type-c-section { margin-bottom: 50px; }
    .type-c-insta { margin-bottom: 40px !important; }

    /* 모바일 카드 디자인 강제 적용 (한 줄에 1개씩) */
    .type-c-container .zzan-card {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        background-color: var(--zzan-w-card-bg) !important;
        border: 1px solid var(--zzan-w-border) !important;
        border-radius: 24px !important;
        overflow: hidden !important;
        box-shadow: var(--zzan-w-shadow, 0 10px 30px rgba(0,0,0,0.2)) !important;
        transition: transform 0.3s ease !important;
        margin-bottom: 30px !important;
    }

    /* 썸네일 영역 16:9 비율 유지 */
    .type-c-container .zzan-thumb-wrap {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 9 !important;
        padding: 0 !important;
        margin: 0 !important;
        background: #000 !important;
    }

    .type-c-container .zzan-thumb-wrap img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        opacity: 0.85 !important;
    }

    .type-c-container .zzan-meta-wrap {
        padding: 20px !important;
    }

    .type-c-container .zzan-title {
        font-size: 17px !important;
        font-weight: 700 !important;
        margin-bottom: 10px !important;
        line-height: 1.4 !important;
    }

    .type-c-container .zzan-info {
        font-size: 12px !important;
        opacity: 0.6;
    }

    /* 인스타그램 그리드 모바일 (3열 유지) */
    .type-c-insta .zzan-widget-list {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 5px !important;
    }

    /* 포트폴리오 그리드 모바일 (2열 8개 노출 처리) */
    .type-c-portfolio-grid .zzan-ws-header {
        margin-bottom: 25px;
    }
    
    .portfolio-grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    /* 9번째 아이템부터는 모바일에서 숨김 (2x4 = 8개 유지) */
    .portfolio-item.item-9,
    .portfolio-item.item-10,
    .portfolio-item.item-11,
    .portfolio-item.item-12 {
        display: none;
    }

    .portfolio-overlay {
        padding: 15px;
        opacity: 1; /* 모바일은 항상 노출 (가독성) */
        background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    }
    .overlay-content {
        transform: translateY(0);
    }
    .overlay-content .title {
        font-size: 14px;
        margin-bottom: 5px;
    }
    .overlay-content .category {
        font-size: 10px;
        margin-bottom: 5px;
    }

    /* 하이브리드 섹션 모바일 */
    .type-c-hybrid-flex {
        display: block !important;
    }
    .hybrid-left-50, .hybrid-right-50 {
        width: 100% !important;
        margin-bottom: 40px;
    }
    .hybrid-left-50 .zzan-slider-frame {
        height: 250px !important;
    }

    .type-c-quick-simple .quick-nav-prev,
    .type-c-quick-simple .quick-nav-next { display: none; }
}

/* 초소형 모바일 대응 */
@media screen and (max-width: 480px) {
    .type-c-portfolio-grid .type-c-title { font-size: 20px; }
    .portfolio-grid-container { gap: 5px; }
    .portfolio-overlay { padding: 10px; }
    .overlay-content .title { font-size: 13px; }
}
