/* =========================================================
   중앙기독학교 입학처 - 공통 스타일 (2026 리디자인)
   컨셉: 연세대학교 입학처 등 국내 대학 입학처 사이트에서 흔히 보이는
   신뢰감 있는 브랜드 블루 + 여백 중심의 모던한 레이아웃을,
   "중앙기독학교"라는 기독교 K-12 학교의 정체성(신앙, 예배당 아치 모티프)과
   결합한 디자인.
   ========================================================= */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');

:root {
    /* ---- Brand blue (Yonsei 계열 입학처 사이트에서 흔히 쓰이는 딥블루 톤) ---- */
    --brand-900: #08213f;
    --brand-800: #0b2f63;
    --brand-700: #0f3d7e;
    --brand-600: #14468f;
    --brand-500: #2569be;
    --brand-100: #e8eefb;

    /* ---- 절제된 골드 악센트 (신앙/중요 표시에만 제한적으로 사용) ---- */
    --gold-600: #96741f;
    --gold-500: #b4923a;
    --gold-100: #f6efdc;

    /* ---- 중립색 ---- */
    --paper: #ffffff;
    --mist: #f4f6f9;
    --mist-200: #eaeef4;
    --line: #e1e6ee;
    --ink-900: #12161f;
    --ink-700: #333b4a;
    --ink-600: #4b5563;
    --ink-400: #8993a4;

    --danger: #c0392b;
    --success: #1e7a4c;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(8, 33, 63, 0.06), 0 1px 3px rgba(8, 33, 63, 0.04);
    --shadow-md: 0 12px 32px rgba(8, 33, 63, 0.12);
    --shadow-lg: 0 24px 64px rgba(8, 33, 63, 0.18);
    --container-w: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--paper);
    color: var(--ink-900);
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
    line-height: 1.62;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

.container {
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Eyebrow / section labels ---------- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--brand-600);
    margin-bottom: 10px;
}
.eyebrow::before {
    content: '';
    width: 18px; height: 2px;
    background: var(--gold-500);
    border-radius: 2px;
}

/* ---------- Header ---------- */
.site-header {
    background: rgba(255,255,255,0.94);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 200;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 74px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    font-weight: 800;
    font-size: 19px;
    color: var(--brand-800);
    letter-spacing: -0.02em;
    white-space: nowrap;
    flex-shrink: 0;
    margin-right: 10px;
}

.brand .brand-logo {
    height: 40px;
    width: auto;
    flex-shrink: 0;
}

.brand-logo-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 10px;
    padding: 4px 7px;
    flex-shrink: 0;
}
.brand-logo-chip img { height: 30px; width: auto; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: var(--ink-600);
    flex-shrink: 0;
    margin-left: auto;
    padding-left: 12px;
}
.header-actions a.btn-ghost { font-weight: 600; }
.header-actions a.btn-ghost:hover { color: var(--brand-700); }

/* ---------- Mobile nav toggle (햄버거 버튼, 기본은 숨김) ---------- */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 5px;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--brand-800);
    border-radius: 2px;
    transition: transform .2s ease, opacity .2s ease, width .2s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); width: 22px; }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); width: 22px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 22px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .16s ease;
    white-space: nowrap;
}
.btn-primary { background: var(--brand-700); color: #fff; }
.btn-primary:hover { background: var(--brand-800); transform: translateY(-1px); }
.btn-gold { background: var(--gold-500); color: #fff; }
.btn-gold:hover { background: var(--gold-600); }
.btn-outline { background: transparent; border-color: var(--line); color: var(--ink-600); }
.btn-outline:hover { border-color: var(--brand-600); color: var(--brand-700); }
.btn-white { background: #fff; color: var(--brand-800); }
.btn-white:hover { background: var(--mist); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-danger[disabled] { background: var(--line); color: var(--ink-400); cursor: not-allowed; }
.btn-danger-outline:hover { border-color: var(--danger); color: var(--danger); }
.btn-block { width: 100%; }

/* ---------- 관리자: 상단 "관리메뉴" 버튼 + 드롭다운 패널 ---------- */
.admin-menu-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--paper);
    color: var(--ink-700);
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}
.admin-menu-toggle:hover { background: var(--mist); border-color: var(--brand-600); }
.admin-menu-toggle.open { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
.admin-menu-toggle-icon { font-size: 15px; }

.admin-menu-panel {
    max-height: 0;
    overflow: hidden;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    transition: max-height .25s ease;
}
.admin-menu-panel.open { max-height: 620px; overflow-y: auto; }

.admin-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    padding: 28px 24px;
}
.admin-menu-group h5 {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ink-400);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--line);
}
.admin-menu-link {
    display: block;
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    color: var(--ink-700);
    font-size: 14px;
    font-weight: 600;
}
.admin-menu-link:hover { background: var(--mist); color: var(--brand-700); }
.admin-menu-link.active { background: var(--brand-700); color: #fff; }

@media (max-width: 900px) {
    .admin-menu-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (max-width: 560px) {
    .admin-menu-grid { grid-template-columns: 1fr; padding: 20px 16px; gap: 20px; }
    .admin-menu-toggle-text { display: none; }
}
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 15px 30px; font-size: 15.5px; }

/* ---------- Nav / Mega menu (헤더 안, 로고 오른쪽에 나란히 배치) ---------- */
.site-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 74px;
    position: relative;
    z-index: 150;
}
.site-nav > .nav-dropdown > a,
.site-nav > a.nav-top {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 14px;
    color: var(--ink-700);
    font-size: 15px;
    font-weight: 700;
    position: relative;
    white-space: nowrap;
}
.site-nav a:hover { background: var(--mist); }
.site-nav a:hover, .site-nav a.active { color: var(--brand-700); }
.site-nav a.active::after {
    content: '';
    position: absolute;
    left: 14px; right: 14px; bottom: 0;
    height: 3px;
    background: var(--gold-500);
    border-radius: 3px 3px 0 0;
}
.nav-dropdown { position: relative; height: 100%; }
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%; left: 0;
    background: var(--paper);
    min-width: 230px;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 10px;
    border-top: 3px solid var(--gold-500);
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
    color: var(--ink-900);
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14.5px;
    display: block;
}
.nav-dropdown-menu a:hover { background: var(--mist); color: var(--brand-700); }

.nav-caret { display: none; } /* 데스크톱에서는 사용 안 함 */

@media (max-width: 860px) {
    /* 헤더 자체가 두 줄로 접히도록: 1줄=로고+버튼+햄버거, 2줄=네비 드로어 */
    .header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 0;
    }
    .brand { order: 1; }
    .header-actions { order: 2; margin-left: auto; padding-left: 0; }

    /* 헤더에 햄버거 버튼 노출 */
    .nav-toggle {
        display: flex;
        order: 3;
        border-radius: var(--radius-sm);
    }
    .nav-toggle:hover, .nav-toggle:active { background: var(--mist); }

    /* 네비게이션 바 자체를 접이식 드로어로 전환 (로고 아래 2번째 줄) */
    .site-nav {
        order: 4;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        height: auto;
        max-height: 0;
        overflow: hidden;
        transition: max-height .25s ease;
    }
    .site-nav.open {
        max-height: 640px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        margin-top: 10px;
        padding-top: 8px;
        border-top: 1px solid var(--line);
    }

    .site-nav > .nav-dropdown > a,
    .site-nav > a.nav-top {
        height: auto;
        padding: 14px 4px;
        width: 100%;
    }
    .site-nav a.active::after { display: none; } /* 모바일에서는 밑줄 대신 배경색으로 표시 */
    .site-nav a.active { background: var(--mist); border-radius: var(--radius-sm); }

    .nav-dropdown {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        height: auto;
        border-bottom: 1px solid var(--line);
    }
    .nav-dropdown > a { flex: 1 1 auto; }

    /* 하위메뉴 여닫는 화살표 버튼 (모바일 전용) */
    .nav-caret {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border: none;
        border-radius: 50%;
        background: transparent;
        color: var(--ink-400);
        font-size: 16px;
        cursor: pointer;
        transition: transform .2s ease, color .2s ease, background .2s ease;
    }
    .nav-caret:hover, .nav-caret:active { background: var(--mist); }
    .nav-dropdown.open .nav-caret { transform: rotate(180deg); color: var(--brand-700); background: var(--mist); }

    /* 서브메뉴: hover 팝업 대신 클릭으로 부드럽게 펼쳐지는 아코디언 */
    .nav-dropdown-menu {
        display: block;
        position: static;
        width: 100%;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        box-shadow: none;
        border-top: none;
        background: var(--mist);
        border-radius: var(--radius-sm);
        padding: 0 0 0 8px;
        transition: max-height .25s ease, opacity .2s ease, padding .25s ease;
    }
    .nav-dropdown.open .nav-dropdown-menu {
        max-height: 320px;
        opacity: 1;
        padding: 4px 0 8px 8px;
    }
    .nav-dropdown-menu a { color: var(--ink-700); }
    .nav-dropdown-menu a:hover { background: rgba(15,61,126,.08); color: var(--brand-700); }

    /* 데이터 테이블: 옆으로 스크롤 가능하게 */
    table.data-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    /* 헤더가 좁은 화면에서 겹치지 않도록 여유 확보 */
    .header-actions { gap: 10px; }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    color: #fff;
    overflow: hidden;
    padding: 96px 0 130px;
    background: var(--brand-900);
}
.hero-photo-layer { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.hero-photo {
    position: absolute; top: 0; right: 0; bottom: 0; left: 0;
    background-color: var(--brand-800);
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.6s ease;
}
.hero-photo.active { opacity: 1; }

/* ---------- 히어로 배경 자동재생 영상 (유튜브/비메오) ---------- */
.hero-video-embed {
    position: absolute; inset: 0;
    overflow: hidden;
    z-index: 1;
    background: var(--brand-900); /* 로딩 중에는 배경색으로 대체, 그 위에 썸네일이 이미 깔려있음 */
}
.hero-video-embed iframe {
    position: absolute;
    top: 50%; left: 50%;
    width: 100%; height: 100%;
    /* 16:9 영상을 컨테이너 비율과 무관하게 꽉 채우는(cover) 트릭 */
    min-width: 177.78vh;
    min-height: 56.25vw;
    transform: translate(-50%, -50%);
    border: 0;
    pointer-events: none; /* 클릭은 재생 버튼(위 z-index)에서 받아 라이트박스로 연결 */
}
.hero-play-btn {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 84px; height: 84px; border-radius: 50%;
    background: rgba(255,255,255,.92); border: none; cursor: pointer;
    color: var(--brand-800); font-size: 26px; padding-left: 6px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 28px rgba(0,0,0,.35);
    transition: transform .18s ease, background .18s ease;
    z-index: 3;
}
.hero-play-btn:hover { transform: translate(-50%, -50%) scale(1.08); background: #fff; }

/* ---------- Video lightbox modal ---------- */
.video-modal {
    display: none;
    position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 500;
    align-items: center; justify-content: center;
}
.video-modal.open { display: flex; }
.video-modal-backdrop {
    position: absolute; top: 0; right: 0; bottom: 0; left: 0;
    background: rgba(6,14,28,.86);
}
.video-modal-box {
    position: relative; z-index: 1;
    width: min(920px, 92vw);
}
.video-modal-close {
    position: absolute; top: -44px; right: 0;
    background: transparent; border: none; color: #fff;
    font-size: 22px; cursor: pointer; padding: 8px;
}
.video-modal-frame {
    position: relative; width: 100%; padding-top: 56.25%;
    background: #000; border-radius: var(--radius-md); overflow: hidden;
}
.video-modal-frame iframe {
    position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; border: 0;
}

/* ---------- 안내 내용 모달 (서식자료실 등 텍스트 콘텐츠용) ---------- */
.info-modal {
    display: none;
    position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 500;
    align-items: center; justify-content: center;
    padding: 24px;
}
.info-modal.open { display: flex; }
.info-modal-backdrop {
    position: absolute; top: 0; right: 0; bottom: 0; left: 0;
    background: rgba(6,14,28,.72);
}
.info-modal-box {
    position: relative; z-index: 1;
    width: min(680px, 100%);
    max-height: 82vh;
    overflow-y: auto;
    background: var(--paper);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 36px;
}
.info-modal-close {
    position: absolute; top: 16px; right: 16px;
    width: 34px; height: 34px;
    background: var(--mist); border: none; border-radius: 50%;
    color: var(--ink-600); font-size: 16px; cursor: pointer;
}
.info-modal-close:hover { background: var(--line); }
.info-modal-title { margin: 0 30px 14px 0; font-size: 19px; color: var(--ink-900); }
.info-modal-files { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.info-modal-files:empty { display: none; }
.info-modal-body { font-size: 14.5px; line-height: 1.8; color: var(--ink-700); }

@media (max-width: 480px) {
    .info-modal-box { padding: 24px 20px; max-height: 88vh; }
}

.hero-overlay {
    position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 1;
    background:
        radial-gradient(ellipse 900px 550px at 14% 0%, rgba(37,105,190,.45), transparent 62%),
        radial-gradient(ellipse 700px 500px at 100% 8%, rgba(180,146,58,.16), transparent 55%),
        linear-gradient(100deg, rgba(6,20,42,.92) 0%, rgba(8,28,58,.86) 42%, rgba(10,40,80,.55) 100%);
}
.hero-grid-pattern {
    position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 1;
    background-image:
        linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,.9), transparent 78%);
}
.hero-dots {
    position: absolute; left: 24px; bottom: 22px; z-index: 2;
    display: flex; gap: 7px;
}
.hero-dots span {
    width: 7px; height: 7px; border-radius: 50%;
    background: rgba(255,255,255,.35); transition: background .2s ease, width .2s ease;
}
.hero-dots span.active { background: var(--gold-500); width: 20px; border-radius: 4px; }
.hero-inner { position: relative; z-index: 2; }
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 9px;
    font-size: 13px; font-weight: 700; letter-spacing: .08em;
    color: #fff; background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.22);
    padding: 7px 16px; border-radius: 999px; margin-bottom: 26px;
}
.hero-eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-500); }
.hero h1 {
    font-size: 46px; font-weight: 800; line-height: 1.22;
    max-width: 640px; letter-spacing: -0.03em;
    margin-bottom: 20px;
}
.hero h1 em {
    font-style: normal;
    background: linear-gradient(90deg, #fff, #cfe0f7);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead {
    font-size: 17px; color: rgba(255,255,255,.8);
    max-width: 520px; margin-bottom: 36px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 56px; }

/* D-day 배지: 실제 접수기간 데이터를 보여주는 시그니처 요소 */
.dday-card {
    position: relative;
    display: flex;
    align-items: stretch;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.22);
    backdrop-filter: blur(6px);
    border-radius: var(--radius-lg);
    max-width: 560px;
    overflow: hidden;
}
.dday-card .dday-num {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: var(--gold-500);
    color: #2a2005;
    padding: 18px 26px;
    font-weight: 800;
    min-width: 108px;
}
.dday-card .dday-num .n { font-size: 30px; line-height: 1; letter-spacing: -0.02em; }
.dday-card .dday-num .u { font-size: 11px; margin-top: 4px; letter-spacing: .04em; }
.dday-card .dday-body { padding: 16px 22px; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.dday-card .dday-title { font-size: 14.5px; font-weight: 700; color: #fff; }
.dday-card .dday-range { font-size: 12.5px; color: rgba(255,255,255,.72); }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
.section-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    margin-bottom: 28px; gap: 16px; flex-wrap: wrap;
}
.section-head h2 { font-size: 26px; font-weight: 800; }
.section-head .sub { color: var(--ink-400); font-size: 14.5px; margin-top: 6px; }
.section-head .more {
    font-size: 13.5px; font-weight: 700; color: var(--brand-700);
    display: inline-flex; align-items: center; gap: 4px;
}
.section-head .more:hover { color: var(--brand-900); }

.section-mist { background: var(--mist); }

/* ---------- Quick-access cards (flex, not grid — see design note) ---------- */
.quick-row { display: flex; flex-wrap: wrap; gap: 18px; }
.quick-card {
    flex: 1 1 240px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 30px 24px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    position: relative;
    overflow: hidden;
}
.quick-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.quick-card .icon {
    width: 52px; height: 52px; margin-bottom: 18px;
    border-radius: 14px; background: var(--brand-100);
    display: flex; align-items: center; justify-content: center;
    color: var(--brand-700); font-size: 24px;
}
.quick-card .name { font-weight: 800; font-size: 17px; color: var(--ink-900); margin-bottom: 6px; }
.quick-card .desc { font-size: 13.5px; color: var(--ink-400); line-height: 1.5; }
.quick-card .arrow {
    position: absolute; right: 22px; top: 26px; color: var(--ink-400);
    font-size: 18px; transition: transform .18s ease, color .18s ease;
}
.quick-card:hover .arrow { transform: translateX(3px); color: var(--brand-700); }

/* school-links (홈페이지 급별 학교 카드) 도 동일 패턴 재사용 */
.school-links { display: flex; flex-wrap: wrap; gap: 16px; }
.school-link-card {
    flex: 1 1 200px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    text-align: center;
    transition: transform .15s ease, box-shadow .15s ease;
}
.school-link-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.school-link-card .icon {
    width: 48px; height: 48px; margin: 0 auto 14px;
    border-radius: 12px; background: var(--brand-100);
    display: flex; align-items: center; justify-content: center;
    color: var(--brand-700); font-size: 22px;
}
.school-link-card .name { font-weight: 700; color: var(--brand-800); }

/* ---------- Stat band ---------- */
.stat-band {
    background: linear-gradient(120deg, var(--brand-900), var(--brand-700));
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 40px 8px;
    display: flex;
    flex-wrap: wrap;
}
.stat-item { flex: 1 1 200px; text-align: center; padding: 12px 20px; }
.stat-item .num { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; }
.stat-item .num .unit { font-size: 17px; font-weight: 700; margin-left: 2px; }
.stat-item .label { font-size: 13px; color: rgba(255,255,255,.72); margin-top: 6px; }

/* ---------- Two-column (flex) ---------- */
.two-col { display: flex; gap: 24px; flex-wrap: wrap; }
.two-col > .col-main { flex: 1 1 60%; min-width: 320px; }
.two-col > .col-side { flex: 1 1 34%; min-width: 280px; }

.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 26px;
}

.list-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14.5px;
}
.list-row:last-child { border-bottom: none; }
.list-row .tag {
    font-size: 11px; font-weight: 700; color: var(--gold-600);
    border: 1px solid var(--gold-500); border-radius: 5px;
    padding: 2px 7px; margin-right: 8px; background: var(--gold-100);
}
.list-row .date { color: var(--ink-400); font-size: 12.5px; white-space: nowrap; }

.faq-item summary {
    cursor: pointer; font-weight: 700; padding: 13px 0;
    list-style: none; font-size: 14.5px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: 'Q'; color: var(--brand-700); font-weight: 800; margin-right: 8px; }
.faq-item p { color: var(--ink-600); padding-bottom: 14px; margin: 0; font-size: 14px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:last-child { border-bottom: none; }

/* ---------- 입학처소개 블록 에디터 (관리자) ---------- */
.block-editor-desc { color: var(--ink-400); font-size: 13.5px; margin-bottom: 16px; }
.block-editor-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    background: var(--mist);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 16px;
}
.block-editor-toolbar-label { font-size: 13px; font-weight: 700; color: var(--ink-600); margin-right: 4px; }

.block-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.block-list-empty {
    text-align: center;
    color: var(--ink-400);
    padding: 40px 12px;
    border: 1px dashed var(--line);
    border-radius: var(--radius-md);
}
.block-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 16px;
}
.block-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.block-type-label { font-size: 13px; font-weight: 700; color: var(--brand-700); }
.block-card-controls { display: flex; gap: 4px; }
.block-card-controls button {
    width: 30px; height: 30px;
    border: 1px solid var(--line);
    background: var(--paper);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    color: var(--ink-600);
    transition: background .15s ease;
}
.block-card-controls button:hover { background: var(--mist); }

.block-heading-input { font-size: 18px; font-weight: 700; }
.block-paragraph-input { min-height: 110px; resize: vertical; }
.block-image-body { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.block-image-preview {
    width: 140px; height: 100px;
    border-radius: var(--radius-sm);
    background: var(--mist);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    color: var(--ink-400);
    font-size: 12.5px;
    flex-shrink: 0;
}
.block-image-preview img { width: 100%; height: 100%; object-fit: cover; }
.block-image-fields { flex: 1 1 200px; display: flex; flex-direction: column; gap: 8px; }
.block-button-fields { display: flex; flex-direction: column; gap: 8px; }
.block-divider-note { color: var(--ink-400); font-size: 13px; margin: 0; }
.block-map-fields { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.block-map-embed-label { display: block; font-size: 12.5px; color: var(--ink-400); margin-bottom: 6px; }
.block-map-embed-input { min-height: 90px; font-family: monospace; font-size: 12px; resize: vertical; }
.block-map-embed-status { font-size: 12.5px; color: var(--ink-600); margin: 8px 0 0; }
.block-editor-actions { margin-top: 8px; }

/* ---------- 입학처소개 블록 렌더링 (공개 화면) ---------- */
.intro-blocks { display: flex; flex-direction: column; gap: 18px; }
.intro-block-heading { font-size: 22px; color: var(--ink-900); margin: 10px 0 0; }
.intro-block-paragraph { font-size: 15px; line-height: 1.9; color: var(--ink-700); margin: 0; }
.intro-block-image { margin: 0; }
.intro-block-image img { width: 100%; border-radius: var(--radius-md); }
.intro-block-image figcaption { margin-top: 8px; font-size: 13px; color: var(--ink-400); text-align: center; }
.intro-block-button { margin: 4px 0; }
.intro-block-divider { border: none; border-top: 1px solid var(--line); margin: 8px 0; }

/* ---------- 입학처소개: 오시는 길 (지도 + 연락처 카드) ---------- */
.map-block { display: flex; gap: 24px; align-items: stretch; }
.map-block-canvas {
    flex: 1 1 60%;
    min-height: 400px;
    border-radius: var(--radius-md);
    background: var(--mist);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.map-block-loading { color: var(--ink-400); font-size: 13.5px; }
.map-contact-card {
    flex: 0 0 300px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.map-contact-card h4 {
    margin: 0 0 4px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--brand-700);
    font-size: 16px;
    color: var(--ink-900);
}
.map-contact-row { display: flex; gap: 12px; align-items: flex-start; }
.map-contact-icon {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--mist);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}
.map-contact-row > div { display: flex; flex-direction: column; gap: 2px; }
.map-contact-label { font-size: 12px; color: var(--ink-400); }
.map-contact-value { font-size: 14px; color: var(--ink-900); font-weight: 600; line-height: 1.5; }
.map-contact-card .btn { margin-top: 4px; }

@media (max-width: 860px) {
    .map-block { flex-direction: column; }
    .map-contact-card { flex-basis: auto; }
    .map-block-canvas { min-height: 280px; }
}

@media (max-width: 480px) {
    .block-image-body { flex-direction: column; }
    .block-image-preview { width: 100%; height: 140px; }
}

/* ---------- 서브페이지 하위메뉴 (같은 그룹의 형제 페이지를 모두 노출) ---------- */
.subnav-wrap {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}
.subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 24px;
}
.subnav a {
    padding: 9px 18px;
    border-radius: 999px;
    background: var(--mist);
    color: var(--ink-700);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}
.subnav a:hover { background: var(--mist-200); color: var(--brand-700); }
.subnav a.active { background: var(--brand-700); color: #fff; }

@media (max-width: 700px) {
    .subnav { padding: 12px 16px; gap: 6px; }
    .subnav a { padding: 8px 14px; font-size: 13px; }
}

/* ---------- 홈 화면: 공지사항 / FAQ 패널 (배너와 분리된 여백 + 살짝 뜬 카드) ---------- */
.notice-faq-wrap { margin-top: 48px; margin-bottom: 8px; }
.notice-faq-panel {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 36px 40px;
}
.notice-faq-panel .two-col { gap: 0; }
.notice-faq-panel .col-side {
    border-left: 1px solid var(--line);
    padding-left: 40px;
    margin-left: 16px;
}
.list-row a {
    color: var(--ink-900);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}
.list-row a:hover { color: var(--brand-700); }

/* ---------- 서식 자료실 (공개 화면): 제목 + 안내글 + 여러 파일 ---------- */
.form-archive-item { padding: 18px 4px; border-bottom: 1px solid var(--line); }
.form-archive-item:last-child { border-bottom: none; }
.form-archive-title { font-weight: 700; font-size: 15px; color: var(--ink-900); margin-bottom: 6px; }
.form-archive-desc { font-size: 13.5px; color: var(--ink-600); line-height: 1.7; margin-bottom: 12px; }
.form-archive-files { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.form-archive-file {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 14px;
    background: var(--mist);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-700);
    transition: background .15s ease, color .15s ease;
}
.form-archive-file:hover { background: var(--brand-700); color: #fff; }
.form-archive-item .date { font-size: 12px; color: var(--ink-400); }

/* ---------- 공지사항 게시판 검색 (공개 화면) ---------- */
.board-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    margin-bottom: 16px;
}
.board-search-select {
    width: auto;
    flex: 0 0 auto;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--paper);
}
.board-search-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 11px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 14px;
}
.board-search-result {
    font-size: 13.5px;
    color: var(--ink-600);
    padding: 12px 16px;
    background: var(--mist);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.board-search-result strong { color: var(--brand-700); }
.board-search-result a { margin-left: auto; color: var(--brand-700); font-weight: 600; text-decoration: underline; }

@media (max-width: 480px) {
    .board-search-select { min-width: 74px; padding: 11px 8px; }
    .board-search-input { padding: 11px 10px; }
    .board-search-result a { margin-left: 0; }
}

@media (max-width: 700px) {
    .notice-faq-wrap { margin-top: 28px; }
    .notice-faq-panel { padding: 26px 22px; }
    .notice-faq-panel .col-side {
        border-left: none;
        padding-left: 0;
        margin-left: 0;
        margin-top: 28px;
        padding-top: 24px;
        border-top: 1px solid var(--line);
    }
}

/* ---------- CTA band ---------- */
.cta-band {
    background: var(--brand-800);
    background-image: radial-gradient(ellipse 500px 300px at 90% 0%, rgba(180,146,58,.25), transparent 60%);
    border-radius: var(--radius-lg);
    padding: 52px 44px;
    color: #fff;
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.cta-band h3 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.cta-band p { color: rgba(255,255,255,.75); font-size: 14.5px; }
.cta-band-text { flex: 1 1 320px; }
.cta-band-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Forms ---------- */
.form-page { max-width: 640px; margin: 0 auto; padding: 56px 0; }
.form-page h1 { font-size: 25px; font-weight: 800; margin-bottom: 6px; }
.form-page .subtitle { color: var(--ink-400); margin-bottom: 32px; font-size: 14px; }

.field-group { margin-bottom: 20px; }
.field-group.two-col-fields { display: flex; gap: 20px; }
.field-group.two-col-fields > div { flex: 1; }
.field-group label {
    display: block; font-weight: 700; font-size: 14px; margin-bottom: 8px;
}
.field-group .hint { font-size: 12.5px; color: var(--ink-400); margin-top: 6px; }
.field-group .char-count { font-size: 12.5px; color: var(--ink-400); margin-top: 6px; text-align: right; }
.field-group .char-count.invalid { color: var(--danger); }

input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=date], input[type=number], input[type=datetime-local], select, textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    background: var(--paper);
    color: var(--ink-900);
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--brand-600);
    box-shadow: 0 0 0 3px rgba(20, 70, 143, .13);
}
textarea { resize: vertical; min-height: 140px; }

.social-login { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.btn-social {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 12px; border-radius: var(--radius-sm); font-weight: 700; font-size: 14.5px;
    border: 1px solid var(--line); cursor: pointer;
}
.btn-google { background: #fff; color: #1c1f26; }
.btn-naver { background: #03c75a; color: #fff; border-color: #03c75a; }
.btn-kakao { background: #fee500; color: #1c1f26; border-color: #fee500; }

.divider-text {
    display: flex; align-items: center; gap: 12px;
    color: var(--ink-400); font-size: 12.5px; margin: 20px 0;
}
.divider-text::before, .divider-text::after {
    content: ''; flex: 1; height: 1px; background: var(--line);
}

.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 20px; }
.alert-error { background: #fdecea; color: var(--danger); }
.alert-success { background: #e9f7ef; color: var(--success); }
.alert-info { background: var(--brand-100); color: var(--brand-700); }

/* ---------- Step wizard ---------- */
.step-wizard { display: flex; justify-content: space-between; margin-bottom: 40px; overflow-x: auto; gap: 4px; }
.step-wizard .step {
    flex: 1; text-align: center; font-size: 12px; color: var(--ink-400);
    padding-bottom: 12px; border-bottom: 3px solid var(--line); white-space: nowrap; padding-inline: 6px;
}
.step-wizard .step.done { color: var(--brand-700); border-color: var(--brand-700); font-weight: 700; }
.step-wizard .step.current { color: var(--gold-600); border-color: var(--gold-500); font-weight: 800; }

table.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data-table th, table.data-table td {
    border: 1px solid var(--line); padding: 10px 12px; text-align: left;
}
table.data-table th { background: var(--mist); font-weight: 700; }

/* ---------- 공지사항 관리: 검색 툴바 ---------- */
.admin-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 16px;
}
.admin-toolbar-select {
    width: auto;
    flex: 0 0 auto;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    background: var(--mist);
}
.admin-toolbar-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
}
.admin-toolbar-result {
    font-size: 13px;
    color: var(--ink-400);
    flex: 0 0 auto;
    white-space: nowrap;
}
.admin-toolbar-result strong { color: var(--brand-700); }

/* ---------- 공지사항 관리: 선택삭제 바 ---------- */
.bulk-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    background: var(--mist);
    border: 1px solid var(--line);
    border-bottom: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    font-size: 13.5px;
}
.bulk-bar-all { display: flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 600; color: var(--ink-700); }
.bulk-bar-all input { width: auto; }
.bulk-bar-count { color: var(--ink-400); }

/* ---------- 공지사항 관리: 모던 테이블 ---------- */
.notice-list-card { padding: 0; overflow: hidden; border-radius: 0 0 var(--radius-md) var(--radius-md); }
table.notice-table { font-size: 14px; }
table.notice-table th, table.notice-table td {
    border: none;
    border-bottom: 1px solid var(--line);
    padding: 14px 12px;
}
table.notice-table th {
    background: var(--paper);
    color: var(--ink-400);
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    border-bottom: 2px solid var(--line);
}
table.notice-table tbody tr { transition: background .12s ease; }
table.notice-table tbody tr:hover { background: var(--mist); }
table.notice-table tbody tr:last-child td { border-bottom: none; }
table.notice-table tr.is-pinned-row { background: #fff9ec; }
table.notice-table tr.is-pinned-row:hover { background: #fdf1d9; }
.notice-id { color: var(--ink-400); font-size: 13px; font-variant-numeric: tabular-nums; }
.notice-title-link { font-weight: 600; color: var(--ink-900); }
.notice-title-link:hover { color: var(--brand-700); text-decoration: underline; }
.notice-meta { color: var(--ink-600); font-size: 13px; font-variant-numeric: tabular-nums; }
.notice-actions { display: flex; gap: 6px; white-space: nowrap; }
.notice-table-empty { text-align: center; color: var(--ink-400); padding: 48px 12px !important; }

@media (max-width: 700px) {
    .admin-toolbar-select { min-width: 66px; padding: 9px 6px; }
    .bulk-bar { flex-wrap: wrap; border-radius: var(--radius-md); border-bottom: 1px solid var(--line); margin-bottom: 10px; }
    .notice-list-card { border-radius: var(--radius-md); }
}

/* ---------- Signature / policy box ---------- */
.policy-box {
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 16px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--ink-600);
    background: var(--mist);
    margin-bottom: 16px;
}
.signature-box {
    border: 1px dashed var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    touch-action: none;
    width: 100%;
    max-width: 480px;
    height: 160px;
}

/* ---------- Floating quick menu ---------- */
.quick-menu {
    position: fixed; right: 22px; bottom: 26px; z-index: 300;
    display: flex; flex-direction: column; gap: 10px;
}
.quick-menu a, .quick-menu button {
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--paper); border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: flex; align-items: center; justify-content: center;
    color: var(--brand-800); font-size: 20px; cursor: pointer;
    transition: transform .15s ease, background .15s ease;
}
.quick-menu a:hover, .quick-menu button:hover { transform: translateY(-2px); background: var(--brand-800); color: #fff; }
.quick-menu .qm-primary { background: var(--gold-500); border-color: var(--gold-500); color: #fff; }
.quick-menu .qm-primary:hover { background: var(--gold-600); }
.quick-menu .qm-label {
    position: absolute; right: 62px; top: 50%; transform: translateY(-50%);
    background: var(--ink-900); color: #fff; font-size: 12.5px; font-weight: 600;
    padding: 6px 11px; border-radius: 7px; white-space: nowrap;
    opacity: 0; pointer-events: none; transition: opacity .15s ease;
}
.quick-menu a:hover .qm-label, .quick-menu button:hover .qm-label { opacity: 1; }

/* ---------- Print (원서접수 상세보기 PDF 저장용) ---------- */
@media print {
    .site-header, .site-nav, .site-footer, .quick-menu, .no-print { display: none !important; }
    body { background: #fff; }
    .card { border: 1px solid #ccc; box-shadow: none; break-inside: avoid; }
    a[href]::after { content: ''; }
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--brand-900);
    color: rgba(255,255,255,.68);
    padding-top: 56px;
    font-size: 13.5px;
}
.footer-top { display: flex; gap: 40px; flex-wrap: wrap; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-brand { flex: 1 1 260px; }
.footer-brand .brand { color: #fff; margin-bottom: 12px; }
.footer-brand .brand .brand-mark { box-shadow: none; }
.footer-brand p { max-width: 320px; line-height: 1.7; }
.footer-col { flex: 0 1 200px; }
.footer-col h4 { color: #fff; font-size: 13.5px; font-weight: 700; margin-bottom: 14px; }
.footer-col a { display: block; padding: 5px 0; color: rgba(255,255,255,.62); }
.footer-col a:hover { color: #fff; }
.footer-bottom {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
    padding: 22px 0 28px; font-size: 12.5px; color: rgba(255,255,255,.45);
}

@media (max-width: 860px) {
    .hero { padding: 56px 0 90px; }
    .hero h1 { font-size: 32px; }
    .hero p.lead { font-size: 15px; }
    .dday-card { flex-direction: column; max-width: 100%; }
    .dday-card .dday-num { flex-direction: row; gap: 10px; min-width: 0; }
    .cta-band { padding: 32px 24px; }
}

/* ---------- 초소형 폰 화면(360~480px대) 세부 튜닝 ---------- */
@media (max-width: 480px) {
    .container { padding: 0 16px; }

    .header-inner { height: auto; padding: 10px 0; gap: 8px; }
    .brand .brand-logo { height: 32px; }
    .brand span { display: none; } /* 로고만 표시, 학교명 텍스트는 숨김 */
    .header-actions { gap: 8px; font-size: 13px; }
    .header-actions > span { display: none; } /* "OOO님" 인사말은 숨기고 버튼 우선 노출 */
    .btn-sm { padding: 7px 12px; font-size: 12.5px; }

    .hero { padding: 44px 0 72px; }
    .hero h1 { font-size: 25px; }
    .hero p.lead { font-size: 13.5px; }
    .hero-eyebrow { font-size: 12px; padding: 6px 13px; }
    .hero-cta { margin-bottom: 40px; }

    .quick-menu { right: 14px; bottom: 16px; gap: 8px; }
    .quick-menu a, .quick-menu button {
        width: 44px; height: 44px; font-size: 17px;
    }
    .quick-menu .qm-label { display: none; } /* 좁은 화면에서 라벨 풍선은 생략 */

    .cta-band { padding: 26px 18px; }
    .cta-band h3 { font-size: 20px; }

    .form-page { padding: 32px 0; }
    .form-page h1 { font-size: 21px; }

    .step-wizard .step { font-size: 11px; padding-inline: 4px; }

    .section { padding: 44px 0; }
    .section-head h2 { font-size: 21px; }
}
