/* ========================================
   검색/정렬 영역
   ======================================== */

.search_sort_wrap {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.search_sort_inner {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.search_group {
    flex: 1;
    min-width: 280px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.search_input {
    flex: 1;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.search_input:focus {
    border-color: #007bff;
}

.search_button {
    height: 38px;
    padding: 0 24px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.3s;
    white-space: nowrap;
    box-sizing: border-box;
}

.search_button:hover {
    background: #0056b3;
}

.select_group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.select_label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}

.select_box {
    height: 38px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: white;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s;
    min-width: 100px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .select_box {
        min-width: 0;
    }
}

.select_box:focus {
    border-color: #007bff;
}

.reset_button {
    height: 38px;
    padding: 0 20px;
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s;
    white-space: nowrap;
    box-sizing: border-box;
}

.reset_button:hover {
    background: #e0e0e0;
    border-color: #999;
}

/* ========================================
   갤러리 레이아웃 스타일
   ======================================== */

.gallery_wrap {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px 0;
    width: 100%;
}

.gallery_item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
}

.gallery_item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.gallery_item.secret-post {
    cursor: pointer;
}

.gallery_img_wrap {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    overflow: hidden;
    background: #f5f5f5;
}

.gallery_img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    pointer-events: none;
}

.gallery_item:hover .gallery_img {
    transform: scale(1.05);
}

.gallery_overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.gallery_item:hover .gallery_overlay {
    opacity: 1;
}

.gallery_overlay_content {
    color: #fff;
    text-align: center;
    padding: 20px;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 500;
    pointer-events: none;
}

.badge_notice {
    position: static;
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
    pointer-events: none;
    white-space: nowrap;
    margin-right: 8px;
    flex-shrink: 0;
}

.gallery_info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
}

.gallery_title {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: #333;
    min-height: 32px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery_title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
    pointer-events: none;
}

.gallery_title a:hover {
    color: #007bff;
}

.gallery_title img {
    display: inline-block;
    margin-right: 4px;
    vertical-align: middle;
    pointer-events: none;
}

.gallery_content {
    margin: 8px 0;
    font-size: 12px;
    line-height: 1.5;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 30px;
}

.comment_count {
    color: #e74c3c;
    font-weight: bold;
    margin-left: 4px;
}

.badge {
    display: inline-block;
    padding: 3px 6px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 3px;
    margin-left: 8px;
}

.badge_end {
    background: #95a5a6;
    color: #fff;
}

.badge_wait {
    background: #f39c12;
    color: #fff;
}

.badge_ing {
    background: #27ae60;
    color: #fff;
}

.gallery_meta {
    font-size: 11px;
    color: #999;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.gallery_author {
    display: inline-block;
    margin-right: 8px;
}

.gallery_author::before {
    content: "작성자: ";
    font-size: 10px;
}

.gallery_date {
    display: inline-block;
}

.gallery_date::before {
    content: "작성일: ";
    font-size: 10px;
}

/* ========================================
   공지사항 테이블 스타일
   ======================================== */

.notice_section {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.notice_table {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.notice_row {
    display: grid;
    grid-template-columns: 1fr 100px;
    gap: 15px;
    align-items: center;
    background: #fffbf0;
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid #e74c3c;
}

.notice_row:last-child {
    border-bottom: none;
}

.notice_row:hover {
    background: #fff5e6;
}

.notice_title_col {
    min-width: 0;
    font-size: 13px;
    font-weight: 500;
}

.notice_title_col a {
    color: #333;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notice_title_col a:hover {
    color: #007bff;
}

.notice_date_col {
    text-align: right;
    font-size: 12px;
    color: #999;
    flex-shrink: 0;
}

/* ========================================
   공지사항 테이블 행 스타일
   ======================================== */

.gallery_notice_row {
    display: grid;
    grid-template-columns: 1fr 100px;
    gap: 15px;
    align-items: center;
    background: #fffbf0;
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid #e74c3c;
}

.gallery_notice_row:hover {
    background: #fff5e6;
}

.gallery_notice_title_col {
    min-width: 0;
    font-size: 13px;
}

.gallery_notice_title_col a {
    color: #333;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery_notice_title_col a:hover {
    color: #007bff;
}

.gallery_notice_date_col {
    text-align: right;
    font-size: 12px;
    color: #999;
    flex-shrink: 0;
}

.no_list_gallery {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
}

.b_page_no {
    display: flex;
    justify-content: flex-end;
    margin: 20px 0;
    padding: 20px 0;
    border-top: 1px solid #eee;
}

.write_btn {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.write_btn:hover {
    background: #0056b3;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 30px 0;
    padding: 20px 0;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.pagination .active {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

@media (max-width: 1400px) {
    .gallery_wrap {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

@media (max-width: 1200px) {
    .gallery_wrap {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .search_sort_inner {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search_group {
        min-width: auto;
        width: 100%;
    }
    
    .search_input {
        flex: 1;
    }
    
    .select_group {
        width: 100%;
    }
    
    .select_box {
        width: 100%;
    }
    
    .reset_button {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .gallery_wrap {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .notice_row {
        grid-template-columns: 1fr 80px;
        gap: 10px;
        padding: 10px 12px;
    }
    
    .notice_title_col {
        font-size: 12px;
    }
    
    .notice_date_col {
        font-size: 11px;
    }
    
    .gallery_notice_row {
        grid-template-columns: 1fr 80px;
        gap: 10px;
        padding: 10px 12px;
    }
    
    .gallery_notice_title_col {
        font-size: 12px;
    }
    
    .gallery_notice_date_col {
        font-size: 11px;
    }
    
    .search_sort_inner {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    /* 검색 박스 - 한 줄 유지 (input + button) */
    .search_group {
        flex-direction: row;
        min-width: auto;
        width: 100%;
        gap: 8px;
    }
    
    .search_input {
        flex: 1;
        width: auto;
        min-width: 0;
    }
    
    .search_button {
        flex-shrink: 0;
        width: auto;
        padding: 0 16px;
    }
    
    /* 범위/정렬 - 한 줄에 2개씩 */
    .select_group {
        flex-direction: row;
        width: auto;
        flex: 1;
        gap: 8px;
        align-items: center;
        min-width: 0;
    }
    
    .select_label {
        flex-shrink: 0;
        white-space: nowrap;
        font-size: 11px;
    }
    
    .select_box {
        flex: 1;
        width: auto;
        min-width: 0;
        font-size: 11px;
        height: 36px;
        padding: 0 8px;
    }
    
    .reset_button {
        width: 100%;
        height: 36px;
    }
    
    .gallery_content {
        display: none;
    }
}

@media (max-width: 480px) {
    .gallery_wrap {
        gap: 8px;
        padding: 10px 0;
    }
    
    .gallery_info {
        padding: 10px;
    }
    
    .gallery_title {
        font-size: 13px;
        min-height: 28px;
    }
    
    .gallery_content {
        font-size: 11px;
        display: none;
    }
    
    .gallery_meta {
        font-size: 10px;
        margin-top: 5px;
        padding-top: 5px;
    }
    
    .notice_row {
        grid-template-columns: 1fr 70px;
        gap: 8px;
        padding: 8px 10px;
    }
    
    .notice_title_col {
        font-size: 11px;
    }
    
    .notice_date_col {
        font-size: 10px;
    }
    
    .gallery_notice_row {
        grid-template-columns: 1fr 70px;
        gap: 8px;
        padding: 8px 10px;
    }
    
    .gallery_notice_title_col {
        font-size: 11px;
    }
    
    .gallery_notice_date_col {
        font-size: 10px;
    }
    
    .search_sort_wrap {
        padding: 12px;
    }
    
    .search_sort_inner {
        gap: 8px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .search_group {
        flex-direction: row;
        gap: 6px;
        width: 100%;
        min-width: 0;
    }
    
    .search_input {
        flex: 1;
        height: 36px;
        font-size: 12px;
        min-width: 0;
    }
    
    .search_button {
        flex-shrink: 0;
        height: 36px;
        padding: 0 14px;
        font-size: 12px;
        width: auto;
    }
    
    .select_group {
        flex-direction: row;
        gap: 6px;
        width: auto;
        flex: 1;
        min-width: 0;
        align-items: center;
    }
    
    .select_box {
        flex: 1;
        height: 36px;
        font-size: 12px;
        min-width: 0;
        padding: 0 8px;
    }
    
    .reset_button {
        width: 100%;
        height: 36px;
        font-size: 11px;
    }
    
    .select_label {
        font-size: 11px;
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    .b_page_no {
        justify-content: center;
    }
}