/* ============================================
   1. 기본 서브 구조 - 공통 동기화 (sub1, process 동일)
   ============================================ */
.sub_wrapper { background-color: #fff; min-height: 100vh; }

.sub_hero { position: relative; width: 100%; margin: -1px 0 !important; padding: 0 !important; line-height: 0; font-size: 0; overflow: hidden; background: none !important; }
.sub_hero img { width: 100%; height: auto !important; display: block; margin: 0 !important; padding: 0 !important; border: none !important; }
.hero_text_overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; text-align: center; background-color: rgba(0,0,0,0.2); z-index: 10; padding: 0 20px; }
.hero_text_overlay .hero_title { font-size: 42px; font-weight: 800; color: #fff; margin-bottom: 10px; text-shadow: 0 4px 10px rgba(0,0,0,0.3); letter-spacing: -1px; }
.hero_text_overlay .hero_subtitle { font-size: 18px; color: #eee; font-weight: 500; text-shadow: 0 2px 5px rgba(0,0,0,0.3); word-break: keep-all; }

/* LNB (sub1.css 오리지널 디자인 완벽 복제) */
.sub_lnb {
    border-bottom: 1px solid #eee;
    background-color: #fcfcfc;
    position: relative;
    z-index: 900;
    height: 60px;
    display: flex;
    align-items: center;
    margin: 0 !important;
    padding: 5px !important;
    border-top: none !important;
}
.sub_lnb .lnb_inner {
    display: flex;
    align-items: center;
    gap: 15px;
}
.sub_lnb .home_btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 50%;
    font-size: 16px;
    color: #444;
    transition: 0.3s;
    flex-shrink: 0;
}
.sub_lnb .home_btn:hover {
    background-color: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}
.sub_lnb .lnb_item {
    position: relative;
}
.sub_lnb .lnb_btn {
    height: 44px;
    padding: 0 25px;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
}
.sub_lnb .lnb_btn:hover {
    border-color: var(--accent-color);
}
.sub_lnb .lnb_btn.color_accent {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background-color: rgba(130, 180, 41, 0.05); /* sub1의 연한 그린 배경 */
}

/* LNB Dropdown (sub1.css 스타일 완벽 이식) */
.sub_lnb .lnb_dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: auto;
    min-width: 160px;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    display: none;
    padding: 10px 0;
    overflow: hidden;
    z-index: 1000;
}
.sub_lnb .lnb_dropdown.show { display: block !important; } 
.sub_lnb .lnb_dropdown li a {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    color: #666;
    transition: 0.2s;
}
.sub_lnb .lnb_dropdown li a:hover,
.sub_lnb .lnb_dropdown li.active a {
    background-color: #f9f9f9;
    color: var(--accent-color);
    font-weight: 700;
}

/* Content Area */
.sub_content_area { padding: 80px 0 120px; }
.sub_content_area .content_inner { display: flex; gap: 80px; }

/* Sidebar */
.sub_sidebar { width: 260px; flex-shrink: 0; }
.sub_sidebar .side_title_box { background: linear-gradient(135deg, var(--accent-color), #82b429); padding: 30px 25px; margin-bottom: 0; border-radius: 12px 12px 0 0; }
.sub_sidebar .side_title { color: #fff; font-size: 24px; font-weight: 800; letter-spacing: -0.5px; margin: 0; }
.sub_sidebar .side_menu_list { border: 1px solid var(--border-soft); border-top: none; border-radius: 0 0 12px 12px; overflow: hidden; background: #fff; }
.sub_sidebar .side_menu_list li a { display: flex; justify-content: space-between; align-items: center; padding: 18px 25px; font-size: 16px; color: var(--text-secondary); font-weight: 500; border-bottom: 1px solid #f3f4f6; transition: 0.3s; }
.sub_sidebar .side_menu_list li.active a { background-color: var(--bg-light-green); color: var(--accent-color); font-weight: 700; }

.sub_main_content { flex: 1; min-width: 0; }

.content_header { margin-bottom: 40px; }
.content_header .page_title { font-size: 34px; font-weight: 800; color: #111; margin-bottom: 12px; letter-spacing: -1px; }
.content_header .title_bar { width: 40px; height: 4px; background-color: var(--accent-color); }


/* ============================================
   2.5. 필터 탭 라인 (Filter Tabs)
   ============================================ */
.filter_tabs_wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
    padding-bottom: 20px;
}

.filter_btn {
    padding: 10px 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.filter_btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.filter_btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(80, 154, 0, 0.2);
}

/* ============================================
   2.6. 지적소유권 (license2.html) 전용 뷰어 박스
   ============================================ */
.cert_viewer_box {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    overflow: hidden;
    text-align: center;
}

#certViewerImg {
    width: 100%;
    height: auto;
    transition: opacity 0.3s ease;
    display: block; /* 하단 여백 제거 */
}

/* ============================================
   2. 인증서 전용 갤러리 뷰 (Premium Grid Box)
   ============================================ */
.license_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px;
}

.license_card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--border-soft);
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
}

.license_card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border-color: rgba(80, 154, 0, 0.3); /* Accent subtle border */
}

/* 스마트 프레임 (원본 보존형 이미지 박스) */
.card_img_box {
    width: 100%;
    aspect-ratio: 3 / 4; /* 인증서는 주로 세로형이 많음 */
    background-color: #f7f9fa; /* 미술관 벽면 컬러 */
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

.card_img_box img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 원본 텍스트 절단 방지 */
    transition: transform 0.6s ease;
    mix-blend-mode: multiply; /* 흰 바탕 이미지가 회색 프레임에 자연스럽게 스며들도록 */
}

/* 호버 시 돋보기 팝업 레이어 */
.hover_overlay {
    position: absolute;
    inset: 0;
    background: rgba(80, 154, 0, 0.85); /* Accent color overlay */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hover_overlay i {
    font-size: 36px;
    color: #fff;
    transform: scale(0.5);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.license_card:hover .card_img_box img {
    transform: scale(1.05); /* 사진 살짝 줌인 */
}

.license_card:hover .hover_overlay {
    opacity: 1;
}

.license_card:hover .hover_overlay i {
    transform: scale(1); /* 돋보기 아이콘 팝업 */
}

.card_txt_box {
    margin-top: 20px;
    text-align: center;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cert_title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    word-break: keep-all;
    margin: 0;
    transition: color 0.3s;
}

.license_card:hover .cert_title {
    color: var(--accent-color);
}


/* ============================================
   3. 모달 (Lightbox) 오버레이 기능
   ============================================ */
.lightbox_modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    
    /* Center it */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Animation hidden state */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
}

.lightbox_modal.show {
    opacity: 1;
    visibility: visible;
}

.lightbox_close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    z-index: 10001;
    transition: transform 0.3s;
}

.lightbox_close:hover {
    transform: rotate(90deg);
    color: var(--accent-color);
}

.lightbox_content_wrap {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    
    /* Pop Animation */
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lightbox_modal.show .lightbox_content_wrap {
    transform: scale(1) translateY(0);
}

.lightbox_content {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    background: #fff; /* 일부 투명 png 인증서를 위해 흰 배경 강제 */
    padding: 10px;
}

.lightbox_caption {
    margin-top: 15px;
    color: #fff;
    font-size: 18px;
    font-weight: 500;
    text-align: center;
    background: rgba(0,0,0,0.5);
    padding: 8px 30px;
    border-radius: 30px;
}


/* ============================================
   4. 글로벌 모바일 반응형
   ============================================ */
@media screen and (max-width: 1024px) {
    .sub_content_area { padding: 60px 0 90px; }
    .sub_content_area .content_inner { flex-direction: column; gap: 40px; }
    .sub_sidebar { display: none !important; }
    .sub_main_content { width: 100%; flex: auto; }
}

@media screen and (max-width: 768px) {
    .sub_content_area { padding: 40px 0 60px; }
    .hero_text_overlay .hero_title { font-size: 32px; }
    .hero_text_overlay .hero_subtitle { font-size: 15px; }

    /* LNB 모바일 최적화 (process/sub1 동기화) */
    .sub_lnb .lnb_btn { padding: 0 15px; font-size: 13px; height: 40px; }
    .sub_lnb .home_btn { width: 40px; height: 40px; min-width: 40px; }
    .sub_lnb { height: auto; padding: 10px 0 !important; overflow: visible; }
    .sub_lnb .lnb_inner { gap: 8px; flex-wrap: wrap; justify-content: center; padding-bottom: 5px; overflow: visible; }
    .sub_lnb .lnb_dropdown { z-index: 1000; }
    
    .license_grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
    
    .card_txt_box {
        margin-top: 15px;
    }
    .cert_title {
        font-size: 14px;
    }
    
    .lightbox_close {
        top: 15px;
        right: 20px;
        font-size: 40px;
    }
}

@media screen and (max-width: 480px) {
    .license_grid {
        grid-template-columns: repeat(2, 1fr); /* 모바일에서는 무조건 2개씩 꽉차게 배치 */
        gap: 12px;
    }
    .card_img_box {
        padding: 0;
    }
    .cert_title {
        font-size: 13px;
    }
}
