@charset "utf-8";

/*----------------------------------- GT THEME  ----------------------------------------
-- 온웹(ONWEB) GT테마에 포함된 파일입니다.
-- GT테마는 상용테마로 구매자의 허용된 사이트 외에는 사용하실 수 없습니다.
-- Theme Name: GT/ Maker: ONWEB
----------------------------------------------------------------------------------------*/

/* Pretendard 폰트 로드 */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

/* ==========================================================================
   시공갤러리 전용 스타일 - Construction Gallery Premium Styles
   ========================================================================== */

/* 전역 설정 */
#construction-gallery {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
    min-height: 100vh;
    padding: 0;
}

/* ==========================================================================
   현대적인 카테고리 스타일
   ========================================================================== */

.modern-category-section {
    margin: 0 auto 30px;
    padding: 0;
    position: relative;
    max-width: 1200px;
}

.category-container {
    background: #ffffff;
    border-radius: 16px;
    padding: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: none;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.category-wrapper {
    display: flex;
    justify-content: stretch;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0;
    position: relative;
}

.modern-category-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px 18px;
    background: #ffffff;
    color: #333333;
    text-decoration: none;
    border-radius: 13px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    min-height: 60px;
    flex: 1;
    border: 2px solid transparent;
    margin: 0 1px;
}

.modern-category-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.modern-category-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    transition: transform 0.5s ease;
    z-index: 2;
}

.category-text {
    position: relative;
    z-index: 3;
    transition: transform 0.3s ease;
}

.modern-category-item:hover {
    background: #f8f9fa;
    color: #333333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102,126,234,0.15);
    border-color: #e3e7ff;
}

.modern-category-item:hover .category-text {
    transform: scale(1.05);
}

.modern-category-item.active {
    background: transparent;
    color: #ffffff;
    font-weight: 700;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102,126,234,0.3);
    border-color: transparent;
}

.modern-category-item.active::before {
    opacity: 1;
}

.modern-category-item.active::after {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.6s ease;
}

.modern-category-item.active .category-text {
    transform: scale(1.08);
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* 서브 카테고리 */
.sub-category {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
    display: none;
    position: relative;
}

.sub-category.show {
    display: block;
    animation: slideDownFade 0.3s ease;
}

@keyframes slideDownFade {
    from { 
        opacity: 0; 
        transform: translateY(-10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.sub-category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 0 20px;
}

.sub-category-btn {
    padding: 12px 24px;
    background: #ffffff;
    color: #333333;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.sub-category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #9921e8 0%, #5f72be 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.sub-category-btn:hover {
    color: #333;
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102,126,234,0.2);
}

.sub-category-btn.active {
    background: transparent;
    color: #ffffff;
    border-color: transparent;
    font-weight: 700;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(153,33,232,0.3);
}

.sub-category-btn.active::before {
    opacity: 1;
}

/* ==========================================================================
   갤러리 정보 헤더
   ========================================================================== */

.gallery-info-header {
    text-align: center;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-count-info {
    font-size: 16px;
    color: #333;
    line-height: 1.2;
}

.total-count {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    margin-right: 4px;
}

.count-label {
    font-weight: 500;
    color: #666;
    margin-right: 6px;
}

.count-divider {
    font-size: 20px;
    font-weight: 600;
    color: #adb5bd;
    margin: 0 6px;
}

.all-count {
    font-size: 18px;
    font-weight: 600;
    color: #6c757d;
    margin-right: 4px;
}

.count-sub-label {
    font-weight: 500;
    color: #666;
    margin-right: 8px;
}

.current-filter {
    display: inline-block;
    margin-left: 10px;
    padding: 4px 12px;
    background: #667eea;
    color: #fff;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

/* ==========================================================================
   갤러리 그리드 - 프리미엄 카드 디자인
   ========================================================================== */

.gallery-container {
    margin-top: 20px;
    padding: 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    padding: 0;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    position: relative;
    cursor: pointer;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(102,126,234,0.05), rgba(118,75,162,0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 20px;
    z-index: 1;
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.gallery-link {
    display: block;
    color: inherit;
    text-decoration: none;
    position: relative;
    z-index: 2;
}

.gallery-image {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: linear-gradient(45deg, #f0f2f5, #e1e5e9);
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    filter: brightness(1.02);
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.gallery-category-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(102,126,234,0.3);
    z-index: 3;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.8) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    color: #fff;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.gallery-item:hover .overlay-content {
    transform: translateY(0);
}

.view-icon {
    font-size: 24px;
    display: block;
    margin-bottom: 8px;
}

.view-text {
    font-size: 14px;
    font-weight: 600;
}

.gallery-info {
    padding: 24px;
    position: relative;
}

.gallery-title {
    font-size: 20px;
    font-weight: 800;
    color: #222;
    margin-bottom: 14px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 52px;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: -0.5px;
}

.comment-count {
    color: #667eea;
    font-size: 12px;
    margin-left: 6px;
    font-weight: 600;
}

.gallery-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #888;
    margin-bottom: 15px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.gallery-date,
.gallery-views {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.gallery-description {
    color: #555;
    font-size: 15px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
}

/* ==========================================================================
   빈 상태 디자인
   ========================================================================== */

.gallery-empty {
    text-align: center;
    padding: 80px 20px;
    background: #f8f9fa;
    border-radius: 16px;
    margin: 40px 0;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.7;
}

.empty-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.empty-description {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* ==========================================================================
   페이지네이션 스타일링
   ========================================================================== */

.pg_wrap {
    text-align: center;
    margin: 50px 0;
    padding: 30px 0;
}

.pg_wrap .pg {
    display: inline-flex;
    gap: 8px;
    background: #fff;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
}

.pg_wrap .pg a,
.pg_wrap .pg strong {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
}

.pg_wrap .pg a {
    color: #666;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.pg_wrap .pg a:hover {
    background: #667eea;
    color: #fff;
    transform: scale(1.1);
    border-color: #667eea;
}

.pg_wrap .pg strong {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102,126,234,0.3);
}

.pg_wrap .pg .pg_start,
.pg_wrap .pg .pg_end,
.pg_wrap .pg .pg_prev,
.pg_wrap .pg .pg_next {
    background: #333;
    color: #fff;
}

.pg_wrap .pg .pg_start:hover,
.pg_wrap .pg .pg_end:hover,
.pg_wrap .pg .pg_prev:hover,
.pg_wrap .pg .pg_next:hover {
    background: #667eea;
    transform: scale(1.1);
}

/* ==========================================================================
   하단 검색 영역
   ========================================================================== */

.gallery-search-bottom {
    margin: 50px auto 50px auto;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px;
    border: 1px solid #e9ecef;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
    max-width: 1200px;
    backdrop-filter: blur(10px);
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.search-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: -0.5px;
}

.search-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: stretch;
}

.search-input {
    flex: 1;
    padding: 18px 24px;
    border: 2px solid #e9ecef;
    border-radius: 50px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    border-color: #dee2e6;
}

.search-input:focus {
    border-color: #667eea;
    box-shadow: 0 6px 25px rgba(102,126,234,0.2);
    outline: none;
    transform: translateY(-2px);
}

.search-btn {
    padding: 18px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: 0 6px 20px rgba(102,126,234,0.3);
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    min-width: 120px;
    justify-content: center;
}

.search-btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6b4ba2 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102,126,234,0.4);
}

.search-result-info {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 15px 20px;
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
}

.search-clear {
    color: #dc3545;
    text-decoration: none;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.search-clear:hover {
    background: #dc3545;
    color: #fff;
}

/* ==========================================================================
   하단 관리 버튼
   ========================================================================== */

.gallery-bottom-controls {
    margin-top: 50px;
    padding: 30px 0;
    border-top: 1px solid #e9ecef;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 50px;
}

.control-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-write-main,
.btn-admin-main {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-write-main {
    background: #667eea;
    color: #fff;
}

.btn-write-main:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102,126,234,0.3);
    background: #5a6fd8;
}

.btn-admin-main {
    background: linear-gradient(45deg, #6c757d, #495057);
    color: #fff;
}

.btn-admin-main:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(108,117,125,0.3);
}

.btn-icon {
    font-size: 18px;
}

/* ==========================================================================
   모바일 반응형
   ========================================================================== */

@media (max-width: 768px) {
    .modern-category-section {
        padding: 0 15px;
        margin-bottom: 25px;
    }
    
    .category-container {
        padding: 3px;
        border-radius: 14px;
    }
    
    .category-wrapper {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 3px;
    }
    
    .modern-category-item {
        padding: 18px 8px;
        font-size: 14px;
        min-height: 54px;
        border-radius: 12px;
        margin: 0;
        border: none;
        font-weight: 600;
    }
    
    .category-text {
        font-size: 14px;
        line-height: 1.3;
    }
    
    .sub-category-nav {
        gap: 6px;
    }
    
    .sub-category-btn {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .gallery-image {
        height: 200px;
    }
    
    .gallery-info {
        padding: 18px;
    }
    
    .gallery-title {
        font-size: 17px;
        font-weight: 700;
        line-height: 1.4;
    }
    
    .gallery-description {
        font-size: 14px;
        line-height: 1.6;
    }
    
    .gallery-info-header {
        padding: 12px 15px;
        margin-bottom: 20px;
    }
    
    .gallery-count-info {
        font-size: 14px;
    }
    
    .search-title {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .gallery-search-bottom {
        margin: 40px auto 40px auto;
        padding: 25px 20px;
    }
    
    .total-count {
        font-size: 20px;
    }
    
    .search-input-group {
        flex-direction: row;
        gap: 12px;
    }
    
    .search-input {
        flex: 1;
        padding: 16px 20px;
        font-size: 16px;
        border-radius: 25px;
    }
    
    .search-btn {
        padding: 16px 24px;
        font-size: 15px;
        justify-content: center;
        min-width: 80px;
        border-radius: 25px;
    }
    
    .search-result-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .control-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-write-main,
    .btn-admin-main {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .modern-category-section {
        padding: 0 10px;
        margin-bottom: 20px;
    }
    
    .category-container {
        padding: 2px;
        border-radius: 12px;
    }
    
    .category-wrapper {
        grid-template-columns: repeat(4, 1fr);
        gap: 2px;
    }
    
    .modern-category-item {
        padding: 15px 6px;
        font-size: 13px;
        min-height: 48px;
        border-radius: 10px;
        font-weight: 600;
        letter-spacing: -0.2px;
    }
    
    .category-text {
        font-size: 13px;
        line-height: 1.2;
    }
    
    .sub-category-nav {
        gap: 8px;
        padding: 0 10px;
    }
    
    .sub-category-btn {
        padding: 10px 16px;
        font-size: 12px;
        font-weight: 600;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .gallery-item {
        border-radius: 16px;
    }
    
    .gallery-image {
        height: 180px;
    }
    
    .gallery-info {
        padding: 15px;
    }
    
    .gallery-info-header {
        padding: 15px;
    }
    
    .total-count {
        font-size: 18px;
    }
}

/* ==========================================================================
   로딩 애니메이션
   ========================================================================== */

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.gallery-item.loading {
    animation: pulse 1.5s infinite;
}

/* ==========================================================================
   접근성 개선
   ========================================================================== */

.sound_only {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* 포커스 상태 개선 */
.modern-category-item:focus,
.sub-category-btn:focus,
.search-input:focus,
.search-btn:focus,
.btn-write-main:focus,
.btn-admin-main:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* 고대비 모드 지원 */
@media (prefers-contrast: high) {
    .gallery-item {
        border: 2px solid #333;
    }
    
    .modern-category-item {
        border: 2px solid #333;
    }
    
    .search-input {
        border: 2px solid #333;
    }
}

/* 모션 감소 설정 지원 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   기존 테마 호환성
   ========================================================================== */

/* 게시판 버튼 */
#bo_gall a.btn_b01,
#bo_gall a.btn_b02,
#bo_v a.btn_b01,
#bo_v a.btn_b02 {
    /* 기존 스타일 유지 */
}

#bo_w .btn_submit {
    padding: 0 20px;
    border-radius: 2px;
    color: #fff;
    display: inline-block;
    background: #667eea;
    border: 0;
    height: 40px;
    line-height: 40px;
    font-weight: 400;
    text-decoration: none;
    vertical-align: bottom;
}

#bo_w .btn_cancel {
    border-radius: 2px;
    padding: 0 20px;
    color: #fff;
    display: inline-block;
    background: #333;
    border: 0;
    height: 40px;
    line-height: 40px;
    text-decoration: none;
    vertical-align: bottom;
}