/* ===== PAGE HERO (simple banner) ===== */
.page-hero {
    padding-top: 150px;
    background: var(--black);
    min-height: 210px;
    position: relative; overflow: hidden;
    display: flex; align-items: flex-end;
}
.page-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 15% 60%, rgba(232,97,60,0.09) 0%, transparent 55%);
}
.hero-grid-lines {
    position: absolute; right: 0; top: 0; bottom: 0; width: 44%;
    background: repeating-linear-gradient(90deg, transparent 1px, transparent 59px, rgba(255,255,255,0.022) 59px, rgba(255,255,255,0.022) 60px);
    pointer-events: none;
}
.hero-grid-lines::after {
    content: ''; position: absolute; inset: 0;
    background: repeating-linear-gradient(0deg, transparent 1px, transparent 59px, rgba(255,255,255,0.013) 59px, rgba(255,255,255,0.013) 60px);
}
.page-hero-inner {
    position: relative; z-index: 2;
    width: 100%; max-width: 1320px;
    margin: 0 auto; padding: 40px 40px 36px;
}
.page-hero-tag { font-family: 'Poppins', sans-serif; font-size: 12px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.page-hero-title { font-size: 34px; font-weight: 800; color: var(--white); line-height: 1.2; letter-spacing: -0.5px; margin-bottom: 8px; }
.page-hero-sub { font-size: 15px; color: rgba(255,255,255,0.6); font-weight: 340; }

/* ===== FILTER SECTION =====
   position:sticky; top:150px — 헤더 아래 고정
===== */
.filter-section {
    background: var(--white);
    border-bottom: 2px solid var(--gray-200);
    position: sticky; top: 150px; z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.tab-filter-row {
    display: flex; align-items: stretch;
    justify-content: space-between; gap: 0;
    flex-wrap: wrap;
}
.view-tabs { display: flex; margin-bottom: -2px; }
.view-tab {
    display: inline-flex; align-items: center;
    padding: 15px 22px; font-size: 16px; font-weight: 500;
    color: var(--gray-500); text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: var(--transition-fast); white-space: nowrap;
    font-family: 'Noto Sans KR', sans-serif;
}
.view-tab:hover { color: var(--gray-800); }
.view-tab.active { color: var(--black); font-weight: 700; border-bottom-color: var(--accent); }

.filter-search-row {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 0; flex-wrap: wrap;
    border-top: 1px solid var(--gray-100);
}
.filter-label { font-family: 'Poppins', sans-serif; font-size: 12px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gray-400); flex-shrink: 0; padding-right: 8px; }
.filter-select {
    font-family: 'Noto Sans KR', sans-serif; font-size: 15px; color: var(--gray-700);
    border: 1px solid var(--gray-200); padding: 7px 28px 7px 11px;
    background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 9px center / 8px;
    appearance: none; cursor: pointer; transition: var(--transition-fast);
}
.filter-select:focus { outline: none; border-color: var(--black); }

.search-wrap-inner {
    flex: 1; min-width: 180px; max-width: 380px;
    display: flex; align-items: center;
    border: 1px solid var(--gray-200); transition: var(--transition-fast);
}
.search-wrap-inner:focus-within { border-color: var(--black); }
.search-type-sel { font-family: 'Noto Sans KR', sans-serif; font-size: 15px; border: none; border-right: 1px solid var(--gray-200); padding: 7px 22px 7px 11px; background: var(--gray-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 7px center / 8px; appearance: none; color: var(--gray-700); cursor: pointer; flex-shrink: 0; }
.search-type-sel:focus { outline: none; }
.search-kw { flex: 1; border: none; padding: 7px 11px; font-family: 'Noto Sans KR', sans-serif; font-size: 15px; color: var(--black); background: transparent; min-width: 0; }
.search-kw::placeholder { color: var(--gray-400); }
.search-kw:focus { outline: none; }
.btn-reset { padding: 7px 13px; background: none; border: 1px solid var(--gray-200); color: var(--gray-500); cursor: pointer; font-size: 15px; font-family: 'Noto Sans KR', sans-serif; transition: var(--transition-fast); flex-shrink: 0; }
.btn-reset:hover { border-color: var(--gray-400); color: var(--gray-700); }
.btn-search { padding: 7px 16px; background: var(--black); border: none; color: var(--white); cursor: pointer; font-size: 15px; transition: var(--transition-fast); flex-shrink: 0; }
.btn-search:hover { background: var(--accent); }

.result-row { padding: 9px 0 11px; border-top: 1px solid var(--gray-100); font-size: 15px; color: var(--gray-500); }
.result-row strong { color: var(--black); font-weight: 700; }

/* ===== ANNUAL TABLE SECTION ===== */
.annual-section { padding: 32px 0 80px; background: var(--gray-100); }

.annual-outer {
    background: var(--white);
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

/* 모바일 가로 스크롤 안내 */
.annual-scroll-hint {
    display: none;
    align-items: center; gap: 7px;
    padding: 9px 16px;
    background: var(--accent-soft);
    border-bottom: 1px solid rgba(232,97,60,0.1);
    font-size: 14px; color: var(--accent); font-weight: 500;
}
.annual-scroll-hint i { animation: swipeHint 1.6s ease-in-out infinite; }
@keyframes swipeHint { 0%,100%{transform:translateX(0)} 50%{transform:translateX(5px)} }

/* 가로+세로 스크롤 래퍼 — 높이를 제한해 표 자체를 스크롤 박스로 만든다. */
.annual-scroll-wrap {
    overflow: auto;
    max-height: min(640px, 70vh);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) transparent;
}
.annual-scroll-wrap::-webkit-scrollbar { height: 5px; }
.annual-scroll-wrap::-webkit-scrollbar-track { background: transparent; }
.annual-scroll-wrap::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
.annual-scroll-wrap::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* 연간 테이블 */
.annual-table {
    width: 100%; min-width: 860px;
    border-collapse: collapse; table-layout: fixed;
}
.annual-table .col-badge  { width: 76px; }
.annual-table .col-name   { width: auto; min-width: 230px; }
.annual-table .col-month  { width: 57px; }

/* 헤더 — 세로 고정은 CSS만으로 안정적으로 안 돼서(.annual-scroll-wrap이
   자체 스크롤 박스이면서 동시에 페이지 스크롤에 따라 위치가 바뀌는 일반
   요소라, position: sticky의 기준이 되는 "가장 가까운 스크롤 조상"의
   스크롤 위치(scrollTop)와 박스 자체의 화면상 위치가 서로 다른 값이라
   어긋남) annual.php의 스크립트에서 transform: translateY로 직접 계산해
   처리한다. 가로 고정(배지·과정명 열)은 문제없이 sticky로 동작해 그대로 둠. */
.annual-table thead th {
    z-index: 4;
    background: var(--gray-900);
    color: rgba(255,255,255,0.8);
    font-size: 14px; font-weight: 600;
    padding: 11px 6px; text-align: center;
    border-right: 1px solid rgba(255,255,255,0.06);
    white-space: nowrap;
    font-family: 'Poppins', 'Noto Sans KR', sans-serif;
}
/* sticky 배지·과정명 헤더 열 — 가로 방향은 sticky로 고정, 세로는 위 스크립트가 담당 */
.annual-table thead th.th-badge {
    position: sticky; left: 0; z-index: 6;
    background: var(--gray-900);
}
.annual-table thead th.th-name {
    position: sticky; left: 76px; z-index: 6;
    background: var(--gray-900);
    text-align: left; padding-left: 16px;
    border-right: 2px solid rgba(255,255,255,0.14);
}
/* 월 헤더 — 클릭 가능 */
.annual-table thead th.th-month {
    cursor: pointer; transition: background 0.18s, color 0.18s; letter-spacing: 0.2px;
}
.annual-table thead th.th-month:hover { background: var(--gray-700); color: var(--white); }
.annual-table thead th.th-month.month-selected { background: var(--accent); color: var(--white); }

/* 월 필터 활성 안내 바
   기본 hidden → .visible 시 슬라이드 인 */
.month-filter-bar {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 14px;
    background: #FFF4F1; border: 1px solid #FFCFBD;
    border-radius: 6px; margin-bottom: 12px;
    font-size: 15px; color: #B84020; font-weight: 500;
    opacity: 0; max-height: 0; overflow: hidden;
    transition: opacity 0.25s ease, max-height 0.25s ease, margin 0.25s ease, padding 0.25s ease;
}
.month-filter-bar.visible { opacity: 1; max-height: 60px; }
.month-filter-bar i { font-size: 14px; }
.btn-show-all {
    margin-left: auto; padding: 4px 14px;
    background: var(--accent); color: var(--white);
    border: none; border-radius: 4px;
    font-size: 14px; font-weight: 600;
    font-family: 'Noto Sans KR', sans-serif;
    cursor: pointer; transition: background 0.18s; white-space: nowrap;
}
.btn-show-all:hover { background: var(--accent-hover); }

/* 테이블 바디 행 */
.annual-table tbody tr {
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.12s;
}
.annual-table tbody tr:last-child { border-bottom: none; }
.annual-table tbody tr:hover { background: #fdf9f8; }
.annual-table tbody td {
    padding: 9px 6px; vertical-align: middle;
    text-align: center; border-right: 1px solid var(--gray-100);
    font-size: 15px;
}

/* sticky 배지 열 */
.annual-table tbody td.td-badge {
    position: sticky; left: 0; z-index: 3;
    background: var(--white); border-right: 1px solid var(--gray-100);
    padding: 10px 6px; vertical-align: middle;
}
.annual-table tbody tr:hover td.td-badge { background: #fdf9f8; }

/* sticky 과정명 열 */
.annual-table tbody td.td-name {
    position: sticky; left: 76px; z-index: 3;
    background: var(--white); text-align: left;
    padding: 14px 16px;
    border-right: 2px solid var(--gray-200);
    box-shadow: 3px 0 8px -3px rgba(0,0,0,0.08);
}
.annual-table tbody tr:hover td.td-name { background: #fdf9f8; }

/* 월 셀 (빈 셀) */
.annual-table tbody td.td-month { padding: 4px; height: 54px; }

/* 월 셀 (일정 있는 셀) — 연한 주황 배경 */
.annual-table tbody td.td-month-active {
    padding: 0; background: #FFE0D4;
    cursor: pointer; transition: background 0.15s;
}
.annual-table tbody td.td-month-active:hover { background: #FFCFBD; }
.annual-table tbody td.td-month-active .mdate {
    display: flex; align-items: center; justify-content: center;
    height: 100%; min-height: 54px;
    color: #B84020; font-family: 'Poppins', sans-serif;
    font-size: 13px; font-weight: 700; line-height: 1.3;
    text-align: center; padding: 4px 2px;
    text-decoration: none;
}

/* 배지 */
.a-badge {
    display: block; font-size: 12px; font-weight: 700;
    padding: 2px 5px; margin-bottom: 3px;
    text-align: center; letter-spacing: 0.2px;
    line-height: 1.4; white-space: nowrap;
}
.a-badge:last-child { margin-bottom: 0; }
.a-badge-closed  { background: var(--gray-200); color: var(--gray-600); }
.a-badge-ongoing { background: #FFE0D4; color: #B84020; }
.a-badge-soon    { background: #FFF0C8; color: #8A5E10; }
.a-badge-refund  { background: #D0E8FF; color: #1A5FA8; }
.a-badge-norefund{ background: var(--gray-600); color: #fff; }

/* 과정명 링크 */
.course-link {
    display: block; font-size: 15px; font-weight: 500;
    color: var(--black); text-decoration: none;
    line-height: 1.45; transition: color 0.18s;
    margin-bottom: 3px;
}
.course-link:hover { color: var(--accent); }
/* 강사명 (과정명 아래 작은 글씨) */
.course-teacher {
    font-size: 13px; color: var(--gray-400);
    font-weight: 400; line-height: 1.3;
}

/* ===== CTA BANNER ===== */
.cta-banner { background: var(--dark); padding: 72px 0; position: relative; overflow: hidden; }
.cta-banner::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(232,97,60,0.07) 0%, transparent 60%); }
.cta-banner .container { position: relative; z-index: 2; text-align: center; }
.cta-label { font-family: 'Poppins', sans-serif; font-size: 13px; font-weight: 600; letter-spacing: 4px; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.cta-banner h2 { font-size: 32px; font-weight: 800; color: var(--white); line-height: 1.35; margin-bottom: 10px; letter-spacing: -0.5px; }
.cta-banner h2 .dot { color: var(--accent); }
.cta-banner p { font-size: 16px; color: rgba(255,255,255,0.72); font-weight: 340; margin-bottom: 32px; }
.cta-btns { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.cta-primary { display: inline-flex; align-items: center; gap: 8px; padding: 14px 36px; background: var(--accent); color: var(--white); text-decoration: none; font-size: 16px; font-weight: 600; transition: var(--transition); font-family: 'Noto Sans KR', sans-serif; }
.cta-primary:hover { background: var(--accent-hover); transform: translateY(-2px); }
.cta-outline { display: inline-flex; align-items: center; gap: 8px; padding: 14px 36px; border: 1px solid rgba(255,255,255,0.2); color: rgba(255,255,255,0.75); text-decoration: none; font-size: 16px; font-weight: 400; transition: var(--transition); font-family: 'Noto Sans KR', sans-serif; }
.cta-outline:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.4); color: var(--white); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .annual-scroll-hint { display: flex; }
}
@media (max-width: 768px) {
    .page-hero { min-height: 170px; padding-top: 60px; }
    .page-hero-inner { padding: 24px 20px; }
    .page-hero-title { font-size: 24px; }
    .filter-section { top: 60px; }
    .view-tab { padding: 13px 14px; font-size: 15px; }
    .filter-search-row { gap: 6px; }
    .filter-label { display: none; }
    .filter-select { display: none; }
    .search-wrap-inner { max-width: none; }
}
