@charset "utf-8";

/* ============================================================
   event.css — 이벤트 게시판 전용
   의존: style.css (공통 reset, 버튼, 체크박스)
   컬러/폰트/페이징/버튼은 jjtheme.css :root 변수 사용
   (jj_basic list.css와 완전 동일한 변수 체계)
   ============================================================ */

/* ------------------------------------------------------------
   1. 컨테이너
------------------------------------------------------------ */
#bo_event {
    position: relative;
    width: 100%;
    margin-bottom: 24px;
    box-sizing: border-box;
}
#bo_event::after { display: block; visibility: hidden; clear: both; content: ""; }

/* ------------------------------------------------------------
   2. 이벤트 상태 컬러 — basic의 brand 변수 연계
      진행중: brand(green 계열 대신 site brand), 예정: amber, 종료: gray
------------------------------------------------------------ */
.status-ing       { background: #10b981; color: #fff; }
.status-ended     { background: #6b7280; color: #fff; }
.status-scheduled { background: #f59e0b; color: #fff; }

/* ------------------------------------------------------------
   3. 카테고리 바 — basic list.css와 완전 동일
------------------------------------------------------------ */
#bo_cate { margin: 16px 0 12px; }
#bo_cate h2 { position: absolute; font-size: 0; line-height: 0; overflow: hidden; }
#bo_cate ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
#bo_cate li { display: inline-block; }
#bo_cate a {
    display: inline-block;
    padding: 4px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    color: var(--txt-s);
    line-height: 1.6;
    transition: border-color 0.15s, color 0.15s;
    text-decoration: none;
}
#bo_cate a:hover, #bo_cate a:focus, #bo_cate #bo_cate_on {
    border-color: var(--brand); color: var(--brand); font-weight: 600; text-decoration: none;
}

/* ------------------------------------------------------------
   4. 상단 바 — Total 건수 (basic과 동일)
------------------------------------------------------------ */
#bo_btn_top { padding: 8px 0; margin-bottom: 4px; border-bottom: 1px solid #e4e4e4; }
#bo_btn_top::after { display: block; visibility: hidden; clear: both; content: ""; }
#bo_list_total { font-size: 13px; color: #888; line-height: 1.6; }
#bo_list_total span { color: var(--txt); font-weight: 600; }

/* ============================================================
   스타일 1·3: 그리드형 / 하이브리드형
   ============================================================ */
.event-style-1 .event_grid,
.event-style-3 .event_grid {
    display: grid;
    grid-template-columns: repeat(var(--event-pc-cols, 3), 1fr);
    gap: 20px;
    margin: 20px 0 0;
}

.event_item {
    position: relative;
    background: var(--white);
    border: 1px solid #ececec;
    border-radius: 4px;
    transition: border-color 0.15s, box-shadow 0.15s;
    overflow: hidden;
}
.event_item:hover {
    border-color: var(--brand);
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}
/* 공지 — basic .bo_notice와 동일 */
.event_item.event_notice {
    background: #ebffef;
    border-color: #b2dfb7;
}
.event_item_chk {
    position: absolute; top: 10px; left: 10px; z-index: 10;
}
.event_item_link { display: block; text-decoration: none; color: inherit; }
.event_item_link:hover { text-decoration: none; }

/* 썸네일 */
.event_thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f5f5f5;
}
.event_thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s; }
.event_item:hover .event_thumb img { transform: scale(1.03); }
.event_noimg { display: flex; align-items: center; justify-content: center; height: 100%; background: #f5f5f5; }
.event_noimg i { font-size: 40px; color: #ccc; }

/* 상태 배지 — basic notice_icon 스타일 기준 유지 (이벤트 고유 배경색) */
.event_status_badge {
    position: absolute; top: 8px; right: 8px;
    padding: 2px 8px;
    font-size: 11px; font-weight: 700;
    border-radius: 2px;
    line-height: 1.5; white-space: nowrap;
}
.event_status_icon {
    position: absolute; top: 8px; right: 8px;
    font-size: 20px;
}
.event_status_text {
    position: absolute; top: 8px; right: 8px;
    padding: 2px 8px; font-size: 11px; font-weight: 700;
    border-radius: 2px; line-height: 1.5;
}

/* 새글 배지 — basic과 동일 */
.event_new {
    position: absolute; top: 8px; left: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 4px; height: 18px;
    font-size: 10px; font-weight: 700;
    color: var(--white); background: var(--brand);
    border-radius: 2px;
}

/* 정보 영역 */
.event_info { padding: 10px 12px 12px; }

/* 기간 — basic 메타 폰트 기준 */
.event_period { font-size: 11px; color: #aaa; margin-bottom: 5px; }
.event_period i { margin-right: 3px; color: #ccc; }

/* 제목 — basic bo_tit 기준 */
.event_title {
    font-size: 14px; font-weight: 500; color: var(--txt);
    line-height: 1.45; margin-bottom: 6px;
    overflow: hidden; text-overflow: ellipsis;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.event_item:hover .event_title { color: var(--brand); }

/* 댓글 수 — basic cnt_cmt와 동일 */
.event_comment {
    display: inline-block; padding: 0 5px;
    height: 16px; line-height: 16px;
    font-size: 11px; color: var(--brand);
    background: var(--brand-light); border-radius: 2px;
    font-weight: 400; vertical-align: middle; margin-left: 4px;
}

/* 설명 (스타일 3) */
.event_desc {
    font-size: 12px; color: var(--txt-s); line-height: 1.5; margin-bottom: 6px;
    overflow: hidden; text-overflow: ellipsis;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
/* 스타일 1: 설명 숨김 */
.event-style-1 .event_desc { display: none; }

/* 메타 — basic td_datetime 기준 */
.event_meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11px; color: #aaa; margin-top: 4px; }
.event_meta i { margin-right: 3px; color: #ccc; font-size: 11px; }

/* ============================================================
   스타일 2: 테이블형 — basic tbl_head01와 동일
   ============================================================ */
.event-style-2 .tbl_head01 table { width: 100%; }
.event-style-2 .td_stat { width: 80px; text-align: center; }
.event-style-2 .td_date { width: 170px; text-align: center; font-size: 12px; color: #888; }
.event-status {
    display: inline-block; padding: 2px 8px;
    font-size: 11px; font-weight: 600; border-radius: 2px;
}
.event_list_desc { font-size: 11px; color: var(--txt-s); margin-top: 4px; }

/* ============================================================
   스타일 4: 배너형
   ============================================================ */
.event-style-4 .event_banner_list {
    display: flex; flex-direction: column; gap: 24px; margin: 20px 0 0;
}
.event_banner_item {
    position: relative; border-radius: 4px; overflow: hidden;
    border: 1px solid #ececec; transition: border-color 0.15s, box-shadow 0.15s;
}
.event_banner_item:hover { border-color: var(--brand); box-shadow: 0 2px 10px rgba(0,0,0,0.08); }
.event_banner_chk { position: absolute; top: 14px; left: 14px; z-index: 10; }
.event_banner_link { display: block; position: relative; text-decoration: none; }
.event_banner_img { width: 100%; height: var(--banner-height, 300px); object-fit: cover; display: block; }
.event_banner_noimg {
    display: flex; align-items: center; justify-content: center;
    height: var(--banner-height, 300px); background: #f0f0f0;
}
.event_banner_noimg i { font-size: 64px; color: #ccc; }
.event_banner_overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.68), transparent);
    color: #fff;
}
.event_banner_status {
    display: inline-block; padding: 3px 10px;
    font-size: 12px; font-weight: 600; border-radius: 2px; margin-bottom: 8px;
}
.event_banner_title { font-size: 18px; font-weight: 600; margin-bottom: 6px; line-height: 1.4; }
.event_banner_desc { font-size: 13px; margin-bottom: 6px; opacity: 0.9; }
.event_banner_period { font-size: 12px; opacity: 0.8; }
.event_banner_period i { margin-right: 4px; }
.event_banner_empty { text-align: center; padding: 80px 20px; color: #aaa; border: 1px solid #ececec; border-radius: 4px; }

/* ============================================================
   view 페이지 — 이벤트 상태 헤더
   ============================================================ */
.event_view_header {
    background: #f8f9fa;
    padding: 16px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    border-left: 3px solid #ccc;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.event_view_header.status-ing       { background: #ecfdf5; border-left-color: #10b981; }
.event_view_header.status-ended     { background: #f3f4f6; border-left-color: #6b7280; }
.event_view_header.status-scheduled { background: #fffbeb; border-left-color: #f59e0b; }
.event_view_status { font-size: 15px; font-weight: 600; color: var(--txt); }
.event_view_status i { margin-right: 6px; }
.event_view_period { font-size: 13px; color: var(--txt-s); display: flex; align-items: center; }
.event_view_period i { margin-right: 6px; }
.event_view_desc {
    background: #eff6ff; padding: 14px 16px; margin: 14px 0;
    border-radius: 4px; font-size: 14px; color: #1e40af; line-height: 1.6;
}
.event_view_desc i { margin-right: 6px; }

/* ============================================================
   글쓰기 — 이벤트 날짜 필드
   ============================================================ */
.event-fields {
    background: #f9fafb; padding: 16px;
    border: 1px solid #e5e7eb; border-radius: 4px; margin: 14px 0;
}
.event-field-row {
    display: flex; align-items: center; margin-bottom: 10px;
}
.event-field-row:last-of-type { margin-bottom: 0; }
.event-label { width: 90px; font-size: 13px; font-weight: 500; color: var(--txt); flex-shrink: 0; }
.event-field-row input { flex: 1; }
.event-field-note { margin-top: 10px; font-size: 11px; color: #9ca3af; }
.event-field-note i { margin-right: 4px; }

/* ============================================================
   하단 버튼 바 — basic bo_fx와 완전 동일
   ============================================================ */
.bo_fx {
    display: flex; justify-content: flex-end; align-items: center;
    margin: 14px 0 6px; padding-top: 12px;
    border-top: 1px solid #e4e4e4; float: none;
}
.bo_fx::after { display: block; visibility: hidden; clear: both; content: ""; }
.btn_bo_user { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; float: none; }
.btn_bo_user li { float: none; width: auto; background: transparent; margin: 0; }
.btn_bo_user > li { position: relative; }
.btn_bo_user .more_opt { top: auto; bottom: 42px; }
.btn_bo_user .more_opt::before { top: auto; bottom: -6px; transform: rotate(225deg); }
.btn_bo_user .more_opt { min-width: 110px; }
.btn_bo_user .more_opt li { padding: 9px 4px 9px 14px; }

/* ============================================================
   검색창 — basic list.css와 완전 동일 (모달형)
   ============================================================ */
.bo_sch_wrap { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 9999; }
.bo_sch_bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.25); }
.bo_sch {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
    width: min(360px, 90vw); background: var(--white);
    border: 1px solid var(--border); border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12); overflow: visible; text-align: left;
}
.bo_sch::after { display: block; visibility: hidden; clear: both; content: ""; }
.bo_sch h3 { padding: 16px 20px; font-size: 14px; font-weight: 600; color: var(--txt); border-bottom: 1px solid #eee; margin: 0; }
.bo_sch legend { position: absolute; width: 0; height: 0; overflow: hidden; background: transparent; }
.bo_sch form { padding: 16px 20px 20px; display: block; }
.bo_sch select { border: 1px solid var(--border); width: 100%; height: 40px; padding: 0 10px; border-radius: 4px; font-size: 13px; color: #444; background: var(--white); appearance: auto; }
.bo_sch select:focus { border-color: var(--brand); outline: none; }
.bo_sch .sch_bar { display: flex; align-items: center; width: 100%; margin-top: 10px; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.bo_sch .sch_input { flex: 1; height: 40px; padding: 0 12px; border: none; background: var(--white); font-size: 13px; color: var(--txt); box-shadow: none; }
.bo_sch .sch_input:focus { outline: none; border: none !important; box-shadow: none; }
.bo_sch .sch_btn { width: 44px; height: 40px; border: none; border-left: 1px solid var(--border); background: var(--white); color: var(--txt-s); font-size: 15px; cursor: pointer; flex-shrink: 0; transition: color 0.15s; }
.bo_sch .sch_btn:hover { color: var(--brand); }
.bo_sch .bo_sch_cls { position: absolute; top: 0; right: 0; padding: 14px 16px; font-size: 16px; color: #bbb; background: transparent; border: none; cursor: pointer; line-height: 1; transition: color 0.15s; }
.bo_sch .bo_sch_cls:hover { color: #555; }

/* ============================================================
   빈 목록
   ============================================================ */
.event_empty {
    grid-column: 1 / -1; text-align: center;
    padding: 60px 20px; color: #aaa; font-size: 14px;
    border: 1px solid #ececec; background: #fafafa; border-radius: 4px;
}

/* ============================================================
   페이징 — basic list.css와 완전 동일
   ============================================================ */
.pg_wrap { position: relative; display: block; text-align: center; width: 100%; float: none; clear: both; margin: 30px 0 20px; }
.pg { display: inline-block; float: none; margin: 0 auto; padding: 0; }
.pg a, .pg strong {
    display: inline-block; float: none;
    min-width: 34px; height: 34px; padding: 0 8px; margin: 0 2px;
    font-size: 14px; font-family: 'Apple SD Gothic Neo', sans-serif !important;
    line-height: 32px; text-decoration: none;
    border: 1px solid #e0e0e0; border-radius: 4px;
    background: var(--white); color: #555;
    text-align: center; vertical-align: middle; box-sizing: border-box; transition: all 0.2s;
}
.pg strong { background: var(--brand); border-color: var(--brand); color: var(--white); font-weight: 600; }
.pg a:hover { background: #f5f5f5; border-color: var(--brand); color: var(--brand); }
.pg_start a, .pg_prev a, .pg_next a, .pg_end a { font-size: 0 !important; position: relative; }
.pg_start a:before { content: "\f100"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 14px; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); color: #555; }
.pg_prev  a:before { content: "\f104"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 14px; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); color: #555; }
.pg_next  a:before { content: "\f105"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 14px; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); color: #555; }
.pg_end   a:before { content: "\f101"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 14px; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); color: #555; }
.pg_start a:hover:before, .pg_prev a:hover:before, .pg_next a:hover:before, .pg_end a:hover:before { color: var(--brand); }

/* ============================================================
   반응형
   ============================================================ */
@media (max-width: 1024px) {
    .event-style-1 .event_grid, .event-style-3 .event_grid {
        grid-template-columns: repeat(var(--event-tablet-cols, 2), 1fr); gap: 16px;
    }
}
@media (max-width: 767px) {
    .event-style-1 .event_grid, .event-style-3 .event_grid {
        grid-template-columns: repeat(var(--event-mobile-cols, 1), 1fr); gap: 12px;
    }
    .event_info { padding: 8px 10px 10px; }
    .event_title { font-size: 13px; }
    .event_desc { font-size: 11px; }
    .event_meta { font-size: 10px; gap: 6px; }
    .event_banner_title { font-size: 15px; }
    .event_banner_desc, .event_banner_period { font-size: 11px; }
    .event_banner_overlay { padding: 14px; }
    .event_view_header { flex-direction: column; }
    .event-field-row { flex-direction: column; align-items: flex-start; }
    .event-label { width: 100%; margin-bottom: 4px; }
    .event-field-row input { width: 100%; }
    .bo_fx { margin-top: 10px; padding-top: 10px; }
    .pg a, .pg strong { min-width: 30px; height: 30px; line-height: 28px; padding: 0 6px; font-size: 12px; }
    .pg_start a:before, .pg_prev a:before, .pg_next a:before, .pg_end a:before { font-size: 12px; }
}
@media (max-width: 480px) {
    .pg a, .pg strong { min-width: 28px; height: 28px; line-height: 26px; padding: 0 4px; font-size: 11px; }
    .pg_start a:before, .pg_prev a:before, .pg_next a:before, .pg_end a:before { font-size: 11px; }
}
