:root {
    --bg: #f3f6fb;
    --surface: #ffffff;
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
    --secondary: #edf3ff;
    --accent: #ffcc00;
    --text: #1c2430;
    --muted: #677489;
    --border: #dbe3ef;
    --danger: #c0392b;
    --success: #198754;
    --shadow: 0 12px 30px rgba(18, 38, 63, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    padding-top: 138px;
}
body.dark-theme {
    --bg: #0f1724;
    --surface: #192234;
    --primary: #4b8cff;
    --primary-dark: #6ca0ff;
    --secondary: #22304a;
    --accent: #ffc107;
    --text: #f2f5fb;
    --muted: #b6c2d9;
    --border: #31425f;
    --shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 8px;
    background: var(--primary);
    color: #fff;
    padding: 10px 14px;
    z-index: 1000;
}
.skip-link:focus { left: 8px; }

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.top-header {
    
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
}
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 16px;
}
.brand-block {
    display: flex;
    align-items: center;
    gap: 14px;
}
.logo {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: grid;
    place-items: left;
    background: ;
    color: #fff;
    font-weight: 700;
    letter-spacing: 1px;
}
.site-title {
    margin: 0;
    font-size: 1.2rem;
}
.site-tagline {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}
.theme-btn, .menu-toggle, .btn {
    min-height: 44px;
    border: none;
    cursor: pointer;
    border-radius: 12px;
}
.theme-btn, .menu-toggle {
    background: var(--secondary);
    color: var(--text);
    padding: 10px 16px;
}
.navbar {
    background: #0b2344;
    position: fixed;
    top: 83px;
    left: 0;
    width: 100%;
    z-index: 999;
    box-shadow: 0 50px 20px rgba(0,0,0,0.08);
}
.nav-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
}
.menu-toggle {
    display: none;
    margin: 0px 0;
}
.menu, .submenu, .submenu-sub {
    list-style: none;
    margin: 0;
    padding: 0;
}
.menu {
    display: flex;
    align-items: center;
}
.menu > li {
    position: relative;
}
.menu > li > a,
.submenu li a,
.submenu-sub li a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 16px 18px;
}
.menu > li:hover > a,
.submenu li:hover > a,
.submenu-sub li:hover > a {
    background: rgba(255,255,255,0.12);
}
.submenu,
.submenu-sub {
    display: none;
    position: absolute;
    min-width: 210px;
    background: #14345f;
    box-shadow: var(--shadow);
    z-index: 100;
}
.submenu { top: 100%; left: 0; }
.submenu-sub { top: 0; left: 100%; }
.dropdown:hover > .submenu,
.dropdown-sub:hover > .submenu-sub {
    display: block;
}

.hero-section {
    padding: 56px 0 24px;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 26px;
    align-items: stretch;
}
.hero-chip {
    display: inline-block;
    background: var(--secondary);
    color: var(--primary);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.9rem;
    margin-bottom: 16px;
}
.hero-section h2 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
}
.hero-section p {
    color: var(--muted);
    font-size: 1.05rem;
}
.hero-panel, .section-card, .feature-card, .notice-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
}
.hero-panel {
    padding: 28px;
}
.hero-panel h3 { margin-top: 0; }
.hero-panel ul { padding-left: 20px; line-height: 1.9; }
.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    text-decoration: none;
    font-weight: 700;
}
.primary-btn {
    background: var(--primary);
    color: #fff;
}
.primary-btn:hover { background: var(--primary-dark); }
.secondary-btn {
    background: var(--secondary);
    color: var(--text);
}
.flash-news {
    margin: 12px 0 26px;
}
.flash-news .container {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #111827;
    color: #fff;
    border-radius: 18px;
    overflow: hidden;
    padding: 0 18px;
}
.flash-label {
    background: #ef4444;
    padding: 10px 16px;
    font-weight: 700;
    border-radius: 10px;
    animation: pulseFlash 1s infinite;
}
@keyframes pulseFlash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}
.notice-board {
    padding: 28px;
    margin: 0 auto 28px;
    width: min(1180px, calc(100% - 32px));
}
.section-head {
    margin-bottom: 18px;
}
.section-head h2 { margin: 0 0 8px; }
.section-head p { margin: 0; color: var(--muted); }
.notice-grid, .feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.notice-item, .feature-card {
    padding: 22px;
}
.notice-category {
    display: inline-block;
    background: var(--secondary);
    color: var(--primary);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    margin-bottom: 12px;
}
.notice-item p, .feature-card p, .page-block p { color: var(--muted); }
.feature-section { padding-bottom: 36px; }
.page-block {
    padding: 36px 0;
    display: grid;
    gap: 20px;
}
.section-card {
    padding: 28px;
}
.contact-form, .admin-card form {
    display: grid;
    gap: 16px;
}
.form-row {
    display: grid;
    gap: 8px;
}
input, textarea, select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
}
.footer {
    background: #0b2344;
    color: #fff;
    margin-top: 0px;
}
.footer-wrap {
    padding: 0px 0;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.popup-modal {
    display: none;
    align-items: center;
    justify-content: center;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    padding: 20px;
    z-index: 999;
}
.popup-content {
    background: var(--surface);
    color: var(--text);
    width: min(460px, 100%);
    border-radius: 24px;
    padding: 30px;
    position: relative;
    box-shadow: var(--shadow);
    animation: popupIn 0.35s ease;
}
@keyframes popupIn {
    from { transform: translateY(20px) scale(0.96); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
.close-btn {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--secondary);
    color: var(--text);
    cursor: pointer;
    font-size: 1.5rem;
}
.popup-badge {
    color: #b91c1c;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.admin-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: linear-gradient(135deg, #dbeafe, #eff6ff);
}
.admin-card {
    width: min(460px, 100%);
    background: #fff;
    border-radius: 22px;
    padding: 28px;
    box-shadow: var(--shadow);
}
.wide-card { width: min(1100px, 100%); }
.admin-top, .admin-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.table-wrap { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}
th, td {
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    padding: 12px;
}
.error-msg { color: var(--danger); }
.success-msg { color: var(--success); }
.hint-text, .empty-box { color: #6b7280; }
.empty-box { padding: 20px; background: var(--secondary); border-radius: 16px; }

@media (max-width: 900px) {
    .hero-grid,
    .notice-grid,
    .feature-grid {
        grid-template-columns: 1fr;
    }
    .menu-toggle { display: inline-flex; }
    .menu {
        display: none;
        flex-direction: column;
        width: 100%;
        align-items: stretch;
    }
    .menu.show-menu { display: flex; }
    .menu > li { width: 100%; }
    .submenu,
    .submenu-sub {
        position: static;
        display: block;
        min-width: 100%;
        box-shadow: none;
        background: #17365f;
    }
    .dropdown:hover > .submenu,
    .dropdown-sub:hover > .submenu-sub {
        display: block;
    }
    .footer-wrap,
    .topbar,
    .nav-wrap {
        flex-direction: column;
        align-items: stretch;
    }
}


.menu-loading span,
.menu-error span {
    display: block;
    color: #fff;
    padding: 16px 18px;
}
.submenu-toggle {
    display: none;
    min-width: 40px;
    min-height: 40px;
    border: none;
    border-radius: 10px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    cursor: pointer;
    margin: 6px 10px 6px auto;
}
.dropdown,
.dropdown-sub {
    position: relative;
}
@media (max-width: 900px) {
    .menu > li,
    .dropdown,
    .dropdown-sub {
        display: flex;
        flex-direction: column;
    }
    .menu > li > a,
    .dropdown > a,
    .dropdown-sub > a {
        width: 100%;
    }
    .submenu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .submenu,
    .submenu-sub {
        display: none;
    }
    .submenu-open > .submenu,
    .submenu-open > .submenu-sub {
        display: block;
    }
}


.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.user-pill {
    background: var(--secondary);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 0.92rem;
}
.hint-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px 14px;
    color: #334155;
}


.slider-section {
    padding-bottom: 28px;
}
.image-slider {
    position: relative;
    height: 510px;
    border-radius: 24px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: var(--shadow);
}
.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.9s ease-in-out;
}
.slide.active {
    opacity: 1;
    z-index: 1;
}
.slide img {
    width: 100%;
    height: 100%;
    object-fit: fill;
}
.slider-dots {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}
.dot {
    width: 12px;
    height: 12px;
    border: none;
    border-radius: 999px;
    background: rgba(255,255,255,0.45);
    cursor: pointer;
}
.dot.active {
    background: #ffffff;
    transform: scale(1.1);
}
@media (max-width: 900px) {
    .image-slider {
        height: 500px;
    }
}

@media (max-width: 900px) {
    body {
        padding-top: 152px;
    }
    .navbar {
        top: 83px;
    }
}
