@charset "utf-8";

/* ===== 축제 컬러 팔레트 ===== */
:root {
    --color1      : #0f1c2d;
    --color2      : #cf5c1e;
    --color3      : #e8954e;
    --color4      : #fff7ee;
    --color-gold  : #f5c842;
    --color-dark  : #12091f;
    --color-text  : #2a1f0e;
    --color-border: #e8d9c8;
    --header-h    : 80px;
    --footer-h    : 200px;
    --content-max : 1200px;

    /* 사용자 커스텀 — header.jsp 에서 scs_domain 값이 있을 때만 덮어씀 */
    --c-body-bg      : var(--color4);
    --c-body-color   : var(--color-text);
    --c-body-bg2     : var(--color1);
    --c-body-color2  : var(--color-gold);
    --c-header-bg    : linear-gradient(135deg, #0d1824 0%, #162840 60%, #0d1824 100%);
    --c-header-color : #d6e8f7;
    --c-header-bg2   : #1a2f4a;
    --c-header-color2: var(--color-gold);
}

/* ===== 유틸리티 ===== */
.text-left   { text-align: left   !important; }
.text-right  { text-align: right  !important; }
.text-center { text-align: center !important; }
.d-none      { display: none      !important; }

/* ===== 기본 ===== */
*, *::before, *::after { box-sizing: border-box; }

body {
    padding: 0;
    margin: 0;
    font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
    color: var(--c-body-color);
    background: var(--c-body-bg);
}

/* ===== 헤더 ===== */
header {
    display: block;
    width: 100%;
    height: var(--header-h);
    background: var(--c-header-bg);
    border-bottom: 3px solid var(--c-header-color2);
    box-shadow: 0 3px 16px rgba(0, 0, 0, 0.45);
    position: sticky;
    top: 0;
    z-index: 500;
    padding: 0;
    margin: 0;
}

.header-inner {
    display: flex;
    align-items: center;
    height: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 24px;
    gap: 24px;
}

/* 로고/브랜드 */
.site-brand {
    flex-shrink: 0;
}
.site-brand a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.site-logo {
    height: 46px;
    width: auto;
    object-fit: contain;
}
.site-name {
    color: var(--c-header-color2);
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.3px;
    white-space: nowrap;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

/* 네비게이션 */
.site-nav {
    flex: 1;
    display: flex;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

header .menu-list {
    display: flex;
    height: 100%;
    padding: 0;
    margin: 0;
    list-style: none;
    align-items: stretch;
}

header .menu-list li {
    position: relative;
    flex-shrink: 0;
    height: 100%;
    padding: 0;
    margin: 0;
    list-style: none;
    align-content: center;
}

header .menu-list li a,
header .menu-list li button {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 18px;
    background: transparent;
    border: none;
    color: var(--c-header-color);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s, background 0.2s;
    position: relative;
}

header .menu-list li a::after,
header .menu-list li > button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--c-header-color2);
    border-radius: 2px 2px 0 0;
    transition: width 0.25s;
}

header .menu-list li a:hover,
header .menu-list li > button:hover,
header .menu-list li a.on {
    color: var(--c-header-color2);
    background: rgba(255, 255, 255, 0.06);
}

header .menu-list li a:hover::after,
header .menu-list li > button:hover::after,
header .menu-list li a.on::after {
    width: 70%;
}

/* 로그인/로그아웃 (auth 항목) */
header .menu-list li.auth-item a,
header .menu-list li.auth-item button {
    color: var(--c-header-color2);
    font-weight: 600;
    border: 1px solid var(--c-header-color2);
    border-radius: 20px;
    padding: 0 16px;
    height: 36px;
    margin: auto 8px;
    opacity: 0.85;
}
header .menu-list li.auth-item a:hover,
header .menu-list li.auth-item button:hover {
    background: var(--c-header-bg2);
    color: var(--c-header-color);
    border-color: var(--c-header-bg2);
    opacity: 1;
}
header .menu-list li.auth-item a::after,
header .menu-list li.auth-item button::after { display: none; }

/* ===== 드롭다운 서브메뉴 ===== */
.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 180px;
    list-style: none;
    padding: 6px 0;
    margin: 0;
    background: var(--c-header-bg2);
    border-top: 2px solid var(--c-header-color2);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.sub-menu li {
    position: relative;
    width: 100%;
    height: auto;
    list-style: none;
}
.sub-menu li a,
.sub-menu li button {
    display: block;
    width: 100%;
    height: auto;
    padding: 10px 20px;
    background: transparent;
    color: var(--c-header-color);
    text-align: left;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.sub-menu li a::after,
.sub-menu li button::after { display: none; }
.sub-menu li a:hover,
.sub-menu li button:hover,
.sub-menu li a.on {
    background: rgba(255, 255, 255, 0.1);
    color: var(--c-header-color2);
}
/* 3차 이하: 오른쪽 펼침 */
.sub-menu .sub-menu {
    top: 0;
    left: 100%;
    background: var(--c-header-bg2);
    border-top: 2px solid var(--c-header-color2);
    filter: brightness(0.88);
}
.sub-menu .sub-menu li a,
.sub-menu .sub-menu li button { color: var(--c-header-color); }
.sub-menu .sub-menu li a:hover,
.sub-menu .sub-menu li button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--c-header-color2);
    filter: none;
}

/* 데스크탑 호버 표시 */
header .menu-list li:hover > .sub-menu,
.sub-menu li:hover > .sub-menu { display: block; }

/* ===== 햄버거 버튼 ===== */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    padding: 0;
}
.hamburger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--c-header-color2);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}
.hamburger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.open span:nth-child(2) { opacity: 0; }
.hamburger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== 페이지 콘텐츠 래퍼 ===== */
.page-content {
    min-height: calc(100vh - var(--header-h) - var(--footer-h));
    background: var(--c-body-bg);
    padding: 36px 24px;
    max-width: 100%;
}
.page-content > * { max-width: var(--content-max); margin-left: auto; margin-right: auto; }

/* ===== 푸터 ===== */
.site-footer {
    display: block;
    width: 100%;
    min-height: var(--footer-h);
    background: var(--c-header-bg);
    border-top: 3px solid var(--c-header-color2);
    color: var(--c-header-color);
    padding: 40px 24px;
}
.footer-inner {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    max-width: var(--content-max);
    margin: 0 auto;
    flex-wrap: wrap;
}
.footer-brand { flex: 1; min-width: 160px; }
.footer-festival-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--c-header-color2);
    margin: 0 0 6px;
}
.footer-tagline {
    font-size: 13px;
    color: var(--c-header-color);
    opacity: 0.7;
    margin: 0;
}
.footer-nav { flex: 1; min-width: 140px; }
.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.footer-nav ul li a {
    color: var(--c-header-color);
    text-decoration: none;
    font-size: 14px;
    opacity: 0.8;
    transition: color 0.2s, opacity 0.2s;
}
.footer-nav ul li a:hover {
    color: var(--c-header-color2);
    opacity: 1;
}
.footer-copy { flex-shrink: 0; text-align: right; }
.footer-copy p {
    margin: 0 0 4px;
    font-size: 13px;
    color: var(--c-header-color);
    opacity: 0.65;
}
.footer-powered {
    font-size: 11px;
    color: var(--c-header-color);
    opacity: 0.45;
}

/* ===== 검색폼 ===== */
[name=searchForm] {
    display: flex;
    width: 70%;
    margin: 20px auto;
    gap: 8px;
}
[name=searchForm] div { flex-grow: 1; }
[name=searchForm] div input,
[name=searchForm] select,
[name=searchForm] div button {
    display: block;
    width: 95%;
    margin: auto;
    height: 44px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 0 12px;
    font-size: 14px;
}
[name=searchForm] div button {
    background: var(--c-body-bg2);
    color: var(--c-body-color2);
    cursor: pointer;
    border-color: var(--c-body-bg2);
}
[name=searchForm] div button:hover {
    filter: brightness(1.15);
}

/* ===== 테이블 ===== */
.table {
    display: table;
    width: 80%;
    margin: 20px auto;
    border-collapse: collapse;
}
.table td, .table th {
    border-bottom: 1px solid var(--color-border);
    height: 38px;
    padding: 0 12px;
    align-content: center;
    vertical-align: middle;
}
.table th {
    background: var(--c-body-bg2);
    color: var(--c-body-color2);
    font-weight: 600;
    font-size: 14px;
}
.table tbody tr:hover { background: rgba(0, 0, 0, 0.04); }
.table input[type=text],
.table input[type=number],
.table input[type=email],
.table input[type=password] {
    display: block;
    width: 95%;
    height: 34px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 0 8px;
}

/* ===== 페이징 ===== */
.paging {
    display: flex;
    width: 50%;
    margin: 20px auto;
    gap: 4px;
    justify-content: center;
}
.paging li { list-style: none; }
.paging li button {
    display: block;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid var(--color-border);
    background: var(--c-body-bg);
    color: var(--c-body-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.15s, color 0.15s;
}
.paging li button:hover,
.paging li button.on {
    background: var(--c-body-bg2);
    color: var(--c-body-color2);
    border-color: var(--c-body-bg2);
}

/* ===== 버튼 영역 ===== */
.btn-area {
    display: flex;
    width: 80%;
    margin: 20px auto;
}
.btn-area .btn-left  { flex-grow: 1; text-align: left; }
.btn-area .btn-right { flex-grow: 1; text-align: right; }
.btn-area .btn { margin: 4px; }

/* ===== 파일 목록 ===== */
.file-list { display: block; width: 100%; }
.file-list li { list-style: none; padding: 4px 0; font-size: 13px; }
.file-list li a { color: var(--c-body-bg2); text-decoration: none; }
.file-list li a:hover { text-decoration: underline; }

/* ===== 본문 링크 ===== */
.page-content a {
    color: var(--c-body-color);
    text-decoration: none;
}
.page-content a:hover {
    color: var(--c-body-color2);
    text-decoration: underline;
}
.table td a {
    color: var(--c-body-color);
    text-decoration: none;
}
.table td a:hover {
    color: var(--c-body-color2);
    text-decoration: underline;
}

/* ===== 공통 버튼 (.btn + 변형) ===== */
.btn {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: filter 0.15s, background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
    line-height: 1.5;
}
.btn:hover { text-decoration: none; }

.btn-primary {
    background: var(--c-body-bg2);
    color: var(--c-body-color2);
    border-color: var(--c-body-bg2);
}
.btn-primary:hover {
    filter: brightness(1.15);
    color: var(--c-body-color2);
}

.btn-success { background: #28a745; color: #fff; border-color: #28a745; }
.btn-success:hover { filter: brightness(1.1); color: #fff; }

.btn-danger { background: #dc3545; color: #fff; border-color: #dc3545; }
.btn-danger:hover { filter: brightness(1.1); color: #fff; }

.btn-list,
.btn-secondary,
.btn-outline-secondary {
    background: transparent;
    color: var(--c-body-color);
    border-color: var(--color-border);
}
.btn-list:hover,
.btn-secondary:hover,
.btn-outline-secondary:hover {
    background: var(--color-border);
    color: var(--c-body-color);
}
