/* ==========================================================================
   양주시 드론봇인재교육센터 - 공통 스타일
   ========================================================================== */

:root {
	--brand-end: #d9534f;
	--brand-wait: #08a35c;
    --brand-primary: #1e5fbf;
    --brand-secondary: #4a90e2;
    --brand-accent: #e8f0fb;
    --brand-deep: #0b3a7a;
    --text-primary: #1a1a1a;
    --text-secondary: #555;
    --text-muted: #342c2e;
    --border-color: #e0e0e0;
    --border-strong: #333;
    --bg-light: #1465f70d;
    --bg-tab: #e3edf9;
    --success: #5cb85c;
    --danger: #d9534f;
    --weekend-sun: #d9534f;
    --weekend-sat: #4a90e2;
}

html, body {
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Presentation', -apple-system, sans-serif;
    color: var(--text-primary);
    background: #fff;
    line-height: 1.5;
    font-size: 18px;
}

a { color: inherit; }

/* ===== 상단 유틸리티 바 ===== */
.top-bar {
    background: #1a1a1a;
    color: #fff;
    font-size: 0.85em;
    padding: 8px 0;
}
.top-bar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: flex-end;
    gap: 16px;
}
.top-bar a {
    color: #fff;
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.2s;
}
.top-bar a:hover { opacity: 1; }
.top-bar .sep { opacity: 0.4; }

/* ===== 헤더 / 네비게이션 ===== */
.header {
    border-bottom: 1px solid var(--border-color);
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 0px;
    display: flex;
    align-items: center;
    height: 90px;
}
.logo-group {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-right: 60px;
}
.logo-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
}
.logo-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9375em;
    color: var(--text-muted);
    border-radius: 4px;
}
.logo-img-placeholder img { max-width: 100%; }
.logo-text {
    font-size: 0.9375em;
    font-weight: 600;
    margin-top: 4px;
    color: var(--text-secondary);
    text-align: center;
}
.logo-text .brand {
    color: var(--brand-primary);
    font-weight: 700;
}

.gnb {
    display: flex;
    flex: 1;
    list-style: none;
}
.gnb li {
    flex: 1;
    text-align: center;
}
.gnb a {
    display: block;
    padding: 32px 0;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
}
.gnb a:hover { color: var(--brand-primary); }
.gnb a.active {
    color: var(--brand-deep);
}

/* 햄버거 버튼 - 기본은 숨김(데스크탑) */
.hamburger {
    display: none;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    z-index: 110;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: transform 0.3s, opacity 0.3s;
    border-radius: 1px;
}
.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* 모바일 메뉴 백드롭 - 기본은 숨김 */
.menu-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s;
}
.menu-backdrop.active {
    display: block;
    opacity: 1;
}

/* ===== 서브 페이지 공통 레이아웃 ===== */
.sub-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 0px 80px;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 40px;
}
.lnb h3 {
    font-size: 1.375em;
    font-weight: 700;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--brand-primary);
    margin-bottom: 16px;
}
.lnb ul { list-style: none; }
.lnb li a {
    display: block;
    padding: 14px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9375em;
    transition: all 0.2s;
}
.lnb li a:hover { color: var(--brand-primary); }
.lnb li a.active {
    background: var(--bg-tab);
    color: var(--brand-deep);
    font-weight: 700;
    border-left: 3px solid var(--brand-primary);
    padding-left: 13px;
}

.content { min-width: 0; }
.content-title {
    font-size: 1.75em;
    font-weight: 700;
    margin-bottom: 10px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--text-primary);
}
.content-subtitle {
    font-size: 1.125em;
    font-weight: 600;
    margin: 28px 0 14px;
    color: var(--text-primary);
}

/* ===== 공통 버튼 ===== */
.btn-primary {
    background: var(--brand-primary);
    color: #fff;
    border: none;
    padding: 14px 36px;
    font-size: 0.9375em;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
}
.btn-primary:hover { background: var(--brand-deep); }

/* ===== 토스트 ===== */
.toast {
    position: fixed;
    bottom: 40px;
    right: 40px;
    padding: 16px 24px;
    background: var(--text-primary);
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.toast.show { opacity: 1; }

/* ===== 모달 (Alert / Confirm) ===== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}
.modal-backdrop.show {
    opacity: 1;
    visibility: visible;
}
.modal-box {
    background: #fff;
    border-radius: 10px;
    width: 90%;
    max-width: 380px;
    padding: 36px 24px 24px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    transform: scale(0.96);
    transition: transform 0.2s;
}
.modal-backdrop.show .modal-box {
    transform: scale(1);
}
.modal-message {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 28px;
    line-height: 1.5;
    word-break: keep-all;
}
.modal-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
}
.modal-actions button {
    min-width: 100px;
    padding: 11px 24px;
    background: #fff;
    border: 1px solid #d0d0d0;
    color: var(--text-secondary);
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    font-family: inherit;
}
.modal-actions button:hover {
    background: var(--bg-light);
    border-color: #b0b0b0;
}
.modal-actions .modal-confirm {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
    font-weight: 500;
}
.modal-actions .modal-confirm:hover {
    background: var(--brand-deep);
    border-color: var(--brand-deep);
}

/* ===== 모달 입력창 ===== */
.modal-input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.modal-input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(30, 95, 191, 0.12);
}

.modal-input::placeholder {
    color: var(--text-muted);
}

@media (max-width: 480px) {
    .modal-box { padding: 30px 20px 20px; }
    .modal-message { font-size: 15px; margin-bottom: 24px; }
    .modal-actions button { min-width: 90px; padding: 10px 18px; font-size: 14px; }
}

/* ===== 푸터 ===== */
.footer {
    background: #2a2a2a;
    color: #ccc;
    padding: 30px 0;
}
.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 0px;
}
.footer-links {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.footer-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.9375em;
}
.footer-links a:hover { color: #fff; }
.footer-links a.highlight {
    color: #fff;
    font-weight: 600;
}
.footer-info {
    font-size: 0.9375em;
    color: #999;
    line-height: 1.7;
}

/* ===== 반응형 공통 ===== */

/* 태블릿 (1024px 이하) */
@media (max-width: 1024px) {
    .sub-wrap {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 30px 24px 60px;
    }
    .lnb { display: flex; flex-wrap: wrap; gap: 8px; }
    .lnb h3 { width: 100%; }
    .lnb ul { display: flex; gap: 4px; flex-wrap: wrap; width: 100%; }
    .lnb li a {
        border: 1px solid var(--border-color);
        border-radius: 20px;
        padding: 8px 16px;
    }
    .lnb li a.active {
        border-left: 1px solid var(--brand-primary);
        padding-left: 16px;
    }
    .gnb a { font-size: 0.9375em; }
    .header-inner { padding: 0 20px; }
    .logo-group { margin-right: 30px; }
    .logo-img-placeholder img { max-height: 44px; }
}

/* 모바일 (768px 이하) - 햄버거 메뉴 */
@media (max-width: 768px) {
    .top-bar { font-size: 0.6875em; padding: 6px 0; }
    .top-bar-inner { padding: 0 14px; gap: 8px; flex-wrap: wrap; justify-content: center; }

    .header-inner {
        height: 64px;
        padding: 0 14px;
        position: relative;
    }
    .logo-group {
        gap: 10px;
        margin-right: 0;
    }
    .logo-img-placeholder img { max-height: 36px; }

    /* 햄버거 버튼 표시 */
    .hamburger { display: flex; }

    /* GNB를 사이드 패널로 변경 */
    .gnb {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        max-width: 80vw;
        height: 100vh;
        background: #fff;
        flex-direction: column;
        padding: 80px 0 40px;
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 105;
        overflow-y: auto;
    }
    .gnb.open { right: 0; }
    .gnb li {
        flex: none;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid #f0f0f0;
    }
    .gnb a {
        display: block;
        padding: 18px 24px;
        font-size: 1em;
    }
    .gnb a.active {
        background: var(--bg-tab);
        border-left: 4px solid var(--brand-primary);
        padding-left: 20px;
    }

    /* 서브 페이지 좌우 여백 */
    .sub-wrap {
        padding: 24px 16px 50px;
        gap: 20px;
    }
    .content-title {
        font-size: 1.5em;
        margin-bottom: 20px;
        padding-bottom: 12px;
    }
    .content-subtitle {
        font-size: 1.0625em;
        margin: 20px 0 12px;
    }

    /* 푸터 */
    .footer { padding: 24px 0; }
    .footer-inner { padding: 0 16px; }
    .footer-links { gap: 16px; }
    .footer-links a { font-size: 0.8125em; }
    .footer-info { font-size: 0.75em; }
}

/* 소형 모바일 (480px 이하) */
@media (max-width: 480px) {
    .top-bar-inner .sep { display: none; }
    .top-bar-inner { gap: 6px 12px; }
    .header-inner { height: 58px; }
    .logo-img-placeholder img { max-height: 30px; }
    .logo-group { gap: 8px; }
    .sub-wrap { padding: 20px 12px 40px; }
    .content-title { font-size: 1.375em; }
}