@charset "utf-8";

/* ===== 폰트 ===== */
@font-face {
    font-family: 'Pretendard';
    src: url('https://fastly.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'TTHakgyoansimKkwabaegiR';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2402_keris@1.0/TTHakgyoansimKkwabaegiR.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

/* Shadow Into Light Two 폰트 */
@import url('https://fonts.googleapis.com/css2?family=Shadows+Into+Light+Two&display=swap');

/* ===== 색상 변수 (관리자 설정에 맞게 수정) ===== */
:root {
    --lagong-primary-color: #ed7d31;  /* 태그 배경색 - 관리자 색상에 맞게 변경 */
}

/* ===== 목록 스타일 ===== */
.lagong_wrap {
    width: 100%;
    font-family: 'Pretendard', sans-serif;
}

/* 상단 글쓰기 버튼 */
.lagong_top_area {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
    padding: 20px 0;
}

.lagong_write_btn_new {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    color: #666;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s;
    border: 1px solid #e0e0e0;
}

.lagong_write_btn_new:hover {
    background: #f8f8f8;
    color: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.lagong_write_btn_new .material-symbols-outlined {
    font-size: 22px;
}

/* 그리드 */
.lagong_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 240px);
    gap: 20px;
    list-style: none;
    margin: 0 0 40px 0;
    padding: 0;
    justify-content: center;
}

.lagong_item {
    position: relative;
    transition: transform 0.3s ease;
}

.lagong_item:hover {
    transform: translateY(-5px);
}

/* ===== 카드 ===== */
.lagong_card {
    position: relative;
    width: 240px;
    height: 340px;
    border-radius: 12px;
    overflow: hidden;
    background: #e0e0e0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    cursor: pointer;
}

/* 이미지 래퍼 */
.lagong_img_wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* 카드 이미지 */
.lagong_img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.5s ease;
}

.lagong_item:hover .lagong_img {
    transform: scale(1.05);
}

/* ★★★ 오버레이 - 아래쪽만 그라데이션 (축소) ★★★ */
.lagong_overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 75%,
        rgba(0, 0, 0, 0.7) 100%
    );
}

/* ★★★ 태그 - 둥근 라운드 + 색상 변수 ★★★ */
.lagong_tag {
    align-self: flex-start;
    font-size: 10px;
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    background: var(--lagong-primary-color);
    font-weight: 500;
}

/* 텍스트 박스 */
.lagong_text_box {
    text-align: center;
    padding-bottom: 12px;
}

/* ★★★ 영어 서브타이틀 (페어명 위) ★★★ */
.lagong_pair_subtitle {
    display: block;
    font-size: 10pt;
    color: #f1f1f1;
    font-family: 'Shadows Into Light Two', cursive;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
    margin-bottom: 2px;
}

/* 페어명 */
.lagong_pair_name {
    display: block;
    font-size: 26pt;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 6px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    font-family: 'TTHakgyoansimKkwabaegiR', sans-serif;
    position: relative;
    z-index: 2;
}

/* ★★★ 페어설명 - 위치 올림 ★★★ */
.lagong_pair_desc {
    display: block;
    font-size: 10pt;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
    margin-top: -2px;
}

/* 관리자 버튼 */
.lagong_admin_btns {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 5px;
    z-index: 10;
}

.lagong_btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.lagong_btn:hover {
    background: #fff;
    transform: scale(1.15);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.lagong_btn.lagong_edit:hover {
    color: #4CAF50;
}

.lagong_btn.lagong_delete:hover {
    color: #f44336;
}

.lagong_btn .material-symbols-outlined {
    font-size: 16px;
}

/* 데이터 없음 */
.lagong_no_data {
    text-align: center;
    padding: 80px 20px;
    color: #999;
    font-size: 16px;
}

/* ===== 이미지 모달 ===== */
.lagong_modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.lagong_modal_container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 95vw;
    max-height: 95vh;
    gap: 15px;
}

/* 모달 이미지 */
.lagong_modal_content {
    max-width: 90vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    animation: modalZoom 0.3s ease-out;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

/* 정보 박스 */
.lagong_modal_info {
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    min-width: 200px;
    max-width: 600px;
    width: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: modalSlideUp 0.3s ease-out;
}

.lagong_modal_title {
    font-size: 22px;
    font-weight: bold;
    color: #333;
    margin: 0;
    font-family: 'TTHakgyoansimKkwabaegiR', sans-serif;
    line-height: 1.4;
}

.lagong_modal_text {
    font-size: 14px;
    line-height: 1.8;
    color: #555;
    margin: 12px 0 0 0;
    text-align: center;
}

.lagong_modal_text:empty {
    display: none;
    margin: 0;
}

@keyframes modalZoom {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes modalSlideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.lagong_modal_close {
    position: fixed;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10000;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
}

.lagong_modal_close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===== 글쓰기 스타일 ===== */
.lagong_write_wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px;
}

.lagong_write_wrap h2 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 30px;
    text-align: center;
    color: #333;
}

.lagong_write_form {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.lagong_form_group {
    margin-bottom: 25px;
}

.lagong_form_group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.lagong_form_group .required {
    color: #f44336;
}

.lagong_input,
.lagong_file_input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.lagong_input:focus {
    outline: none;
    border-color: #4CAF50;
}

.lagong_file_item {
    margin-bottom: 10px;
}

.lagong_current_file {
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.lagong_btn_wrap {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.lagong_btn_wrap .lagong_btn_basic,
.lagong_btn_wrap .lagong_btn_primary {
    padding: 12px 30px;
    cursor: pointer;
    font-size: 15px;
    border: none;
}

.lagong_btn_basic {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd !important;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    text-align: center;
}

.lagong_btn_basic:hover {
    background: #e8e8e8;
}

.lagong_btn_primary {
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 5px;
}

.lagong_btn_primary:hover {
    background: #45a049;
}

/* ===== 상세보기 스타일 ===== */
.lagong_view_wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.lagong_view_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
}

.lagong_view_meta {
    display: flex;
    gap: 15px;
    align-items: center;
}

.lagong_view_tag {
    background: var(--lagong-primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.lagong_view_name,
.lagong_view_date {
    font-size: 13px;
    color: #666;
}

.lagong_view_btns {
    display: flex;
    gap: 8px;
}

.lagong_btn_edit,
.lagong_btn_delete {
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 13px;
    border: 1px solid #ddd;
    transition: all 0.2s;
}

.lagong_btn_edit {
    background: #fff;
    color: #4CAF50;
}

.lagong_btn_edit:hover {
    background: #4CAF50;
    color: #fff;
}

.lagong_btn_delete {
    background: #fff;
    color: #f44336;
}

.lagong_btn_delete:hover {
    background: #f44336;
    color: #fff;
}

.lagong_view_body {
    padding: 20px 0;
}

.lagong_view_title {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

.lagong_view_description {
    font-size: 15px;
    color: #666;
    padding: 15px;
    background: #f9f9f9;
    border-left: 3px solid var(--lagong-primary-color);
    border-radius: 4px;
    margin-bottom: 30px;
}

.lagong_view_thumb {
    text-align: center;
    margin-bottom: 30px;
}

.lagong_view_thumb img {
    max-width: 100%;
    border-radius: 8px;
}

.lagong_view_content {
    line-height: 1.8;
    color: #333;
    font-size: 15px;
}

.lagong_view_files {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.lagong_view_files h3 {
    font-size: 16px;
    margin-bottom: 15px;
}

.lagong_view_files ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lagong_view_files li {
    margin-bottom: 10px;
}

.lagong_view_files a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--lagong-primary-color);
    text-decoration: none;
}

.lagong_view_files a:hover {
    text-decoration: underline;
}

.lagong_view_nav {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.lagong_nav_prev,
.lagong_nav_next {
    display: block;
    padding: 15px;
    margin-bottom: 10px;
    background: #f9f9f9;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    transition: background 0.2s;
}

.lagong_nav_prev:hover,
.lagong_nav_next:hover {
    background: #f0f0f0;
}

.lagong_nav_label {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.lagong_nav_title {
    display: block;
    font-size: 14px;
    font-weight: 500;
}

/* ===== 반응형 ===== */
@media (max-width: 992px) {
    .lagong_grid {
        grid-template-columns: repeat(auto-fill, 200px);
        gap: 15px;
    }
    
    .lagong_card {
        width: 200px;
        height: 280px;
    }
    
    .lagong_pair_name {
        font-size: 22pt;
    }
}

@media (max-width: 768px) {
    .lagong_grid {
        grid-template-columns: repeat(auto-fill, 160px);
        gap: 12px;
    }
    
    .lagong_card {
        width: 160px;
        height: 230px;
    }
    
    .lagong_pair_name {
        font-size: 18pt;
    }
    
    .lagong_pair_desc {
        font-size: 9pt;
    }
    
    .lagong_write_wrap,
    .lagong_view_wrap {
        padding: 20px;
    }
    
    .lagong_view_header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .lagong_modal {
        padding: 10px;
    }
    
    .lagong_modal_content {
        max-width: 95vw;
        max-height: 70vh;
    }
    
    .lagong_modal_info {
        padding: 12px 16px;
        max-width: 95vw;
    }
    
    .lagong_modal_title {
        font-size: 18px;
    }
    
    .lagong_modal_text {
        font-size: 13px;
    }
    
    .lagong_modal_close {
        top: 10px;
        right: 10px;
        font-size: 28px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .lagong_grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 10px;
    }
    
    .lagong_card {
        width: 100%;
        height: 220px;
    }
    
    .lagong_pair_name {
        font-size: 16pt;
    }
    
    .lagong_tag {
        font-size: 9px;
        padding: 4px 10px;
    }
}
