.body  * {
    box-sizing: border-box;
}

:root {
    --hub-text-sub: #5d6878;
    --hub-border: #dfe5ec;
    --hub-border-dark: #cbd3dd;
    --hub-primary: #315f9d;
    --hub-primary-dark: #1f477d;
    --hub-primary-soft: #eef4fb;
    --hub-shadow: 0 12px 34px rgba(28, 42, 56, 0.08);
}

html {
    scroll-behavior: smooth;
}

.hub-main {
    min-height: 100vh;
}

.hub-hero {
    color: #ffffff;
    background:
        linear-gradient(
            120deg,
            #172f4d,
            #315f9d
        );
}

.hub-hero-inner {
    width: min(1320px, calc(100% - 48px));
    margin: 0 auto;
    padding: 3rem 0 5rem;
}

.hub-breadcrumb {
    margin-bottom: 5rem;
}

.hub-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.9rem;
}

.hub-breadcrumb li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hub-breadcrumb li:not(:last-child)::after {
    content: "/";
}

.hub-breadcrumb a {
    text-decoration: none;
    color : white !important;
}

.hub-breadcrumb a:hover {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.hub-breadcrumb [aria-current="page"] {
    color: #ffffff;
}

.hub-hero-heading {
    max-width: 760px;
}

.hub-hero h1 {
    margin: 0;
    font-size: clamp(2.1rem, 5vw, 3.6rem);
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.hub-hero-description {
    max-width: 640px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.83);
    font-size: 1.06rem;
    line-height: 1.8;
}

.hub-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 52px;
    width: min(1320px, calc(100% - 48px));
    margin: 0 auto;
    padding: 64px 0 100px;
}

.hub-sidebar-inner {
    position: sticky;
    top: 82px;
}

.hub-sidebar-title {
    margin: 0 0 12px;
    color: var(--hub-text-sub);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.hub-country-nav {
    overflow: hidden;
    border: 1px solid var(--hub-border);
    border-radius: 14px;
    background: white;
}

.hub-country-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--hub-border);
    color: var(--main-text-color);
    font-size: 0.96rem;
    font-weight: 650;
    text-decoration: none;
    transition:
        color 0.16s ease,
        background-color 0.16s ease;
}

.hub-country-nav a:last-child {
    border-bottom: 0;
}

.hub-country-nav a:hover {
    background: #f6f8fa;
}

.hub-country-nav a.active {
    color: var(--hub-primary-dark);
    background: var(--hub-primary-soft);
}

.hub-sidebar-notice {
    margin-top: 20px;
    padding: 18px;
    border: 1px solid var(--hub-border);
    border-radius: 14px;
    background: white;
}

.hub-sidebar-notice p {
    margin: 0 0 12px;
    color: var(--hub-text-sub);
    font-size: 0.84rem;
    line-height: 1.7;
}

.hub-sidebar-notice a {
    color: var(--hub-primary-dark);
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
}

.hub-sidebar-notice a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.hub-content-area {
    min-width: 0;
}

.hub-introduction {
    display: grid;
    grid-template-columns: minmax(220px, 0.7fr) minmax(300px, 1fr);
    gap: 48px;
    align-items: end;
    margin-bottom: 46px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--hub-border-dark);
}

.hub-section-label {
    color: var(--hub-primary);
}

.hub-introduction h2,
.hub-guide h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.15rem);
    line-height: 1.3;
    letter-spacing: -0.035em;
}

.hub-introduction > p {
    margin: 0;
    color: var(--hub-text-sub);
    line-height: 1.8;
}

.hub-contents {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.hub-category {
    scroll-margin-top: 90px;
    padding: 26px;
    border: 1px solid #e3e9f0;
    border-radius: 20px;
    background: #f8f9fb;
}

.hub-category-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    width: 100%;
    gap: 24px;
    margin-bottom: 18px;
    color: inherit;
    background: transparent;
    text-align: left;
}

.hub-category-title-wrap {
    display: flex;
    align-items: center;
    gap: 13px;
}

.hub-category-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    border-radius: 10px;
    color: var(--hub-primary-dark);
    background: var(--hub-primary-soft);
    font-size: 0.78rem;
    font-weight: 800;
}

.hub-category-title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.025em;
}

.hub-category-meta {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 12px;
}

.hub-category-toggle-icon {
    position: relative;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--hub-primary-soft);
}

.hub-category-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.hub-category-toggle-icon::before,
.hub-category-toggle-icon::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 2px;
    border-radius: 2px;
    background: var(--hub-primary-dark);
    content: "";
    transform: translate(-50%, -50%);
    transition: transform 0.18s ease;
}

.hub-category-toggle[aria-expanded="false"]
    .hub-category-toggle-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.hub-category-toggle:focus-visible {
    outline: 3px solid rgba(49, 95, 157, 0.25);
    outline-offset: 3px;
}

.hub-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hub-item {
    min-width: 0;
}

.hub-item-link {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    min-height: 108px;
    height: 100%;
    padding: 19px;
    overflow: hidden;
    border: 1px solid var(--hub-border);
    color: var(--main-text-color);
    border-radius: 12px;
    background: white;
    box-shadow: 0 2px 8px rgba(28, 42, 56, 0.03);
    text-decoration: none;
    transition:
        border-color 0.18s ease,
        background-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.hub-item-link:hover {
    border-color: #b8c8dc;
    background: #fbfcfe;
    box-shadow: 0 10px 24px rgba(28, 42, 56, 0.09);
    transform: translateY(-2px);
}

.hub-item-link:focus-visible {
    outline: 3px solid rgba(49, 95, 157, 0.25);
    outline-offset: 2px;
}

.hub-item-content {
    display: flex;
    align-items: flex-start;
    min-width: 0;
    gap: 14px;
}

.hub-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 11px;
    background: #f0f3f5;
}

.hub-item-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.hub-item-text {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 5px;
}

.hub-item-name {
    overflow-wrap: anywhere;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.015em;
    transition: color 0.18s ease;
}

.hub-item-link:hover .hub-item-name {
    color: var(--hub-primary-dark);
}

.hub-item-description {
    display: -webkit-box;
    overflow: hidden;
    color: var(--hub-text-sub);
    font-size: 0.82rem;
    line-height: 1.55;
    -webkit-box-orient: vertical;
}

.hub-item-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    border-radius: 50%;
    color: var(--hub-primary-dark);
    background: var(--hub-primary-soft);
    font-size: 0.98rem;
    margin-top: 1px;
    transition: transform 0.18s ease;
}

.hub-item-link:hover .hub-item-arrow {
    transform: translateX(3px);
}

.hub-guide {
    margin-top: 88px;
    padding-top: 46px;
    border-top: 1px solid var(--hub-border-dark);
}

.hub-guide-heading {
    margin-bottom: 24px;
}

.hub-guide-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.hub-guide-links > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 110px;
    padding: 22px;
    border: 1px solid var(--hub-border);
    color: var(--main-text-color);
    border-radius: 14px;
    background: white;
    text-decoration: none;
    transition:
        border-color 0.18s ease,
        transform 0.18s ease;
}

.hub-guide-links > a:hover {
    border-color: var(--hub-primary);
    transform: translateY(-2px);
}

.hub-guide-link-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hub-guide-link-text strong {
    font-size: 1rem;
}

.hub-guide-link-text small {
    color: var(--hub-text-sub);
    font-size: 0.82rem;
    line-height: 1.6;
}

.hub-caution {
    margin-top: 48px;
    padding: 24px 26px;
    border-left: 4px solid #d97706;
    background: #fff8eb;
}

.hub-caution h2 {
    margin: 0 0 7px;
    font-size: 1rem;
}

.hub-caution p {
    margin: 0;
    color: #66563d;
    font-size: 0.88rem;
    line-height: 1.75;
}

.hub-loading,
.hub-error {
    display: flex;
    min-height: 220px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    border: 1px solid var(--hub-border);
    border-radius: 16px;
    color: var(--hub-text-sub);
    background: white;
    text-align: center;
}

.hub-loading p,
.hub-error p {
    margin: 12px 0 0;
}

.hub-error h2 {
    margin: 0;
    font-size: 1.2rem;
}

.hub-loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #dfe6e3;
    border-top-color: var(--hub-primary);
    border-radius: 50%;
    animation: hub-spin 0.8s linear infinite;
}
.hub-alerts {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 42px;
}

.hub-alerts[hidden] {
    display: none;
}

.hub-alert {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 24px;
    overflow: hidden;
    border: 1px solid;
    border-radius: 14px;
}

.hub-alert-content {
    display: flex;
    align-items: flex-start;
    min-width: 0;
    gap: 16px;
    padding: 22px 0 22px 22px;
}

.hub-alert-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    margin-top: 2px;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 800;
}

.hub-alert-body {
    min-width: 0;
}

.hub-alert-label {
    margin: 0 0 3px;
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hub-alert-title {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.45;
    letter-spacing: -0.02em;
}

.hub-alert-description {
    max-width: 760px;
    margin: 7px 0 0;
    font-size: 0.88rem;
    line-height: 1.7;
}

.hub-alert-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    gap: 14px;
    padding: 20px 22px;
    border-left: 1px solid currentColor;
    font-size: 0.87rem;
    font-weight: 750;
    text-decoration: none;
    transition: background-color 0.16s ease;
    color: inherit;
}

.hub-alert-link:hover {
    background: rgba(255, 255, 255, 0.46);
}

/* 긴급정보 */

.hub-alert-emergency {
    color: #8f1d1d;
    border-color: #e7a8a8;
    background: #fff1f1;
}

.hub-alert-emergency .hub-alert-icon {
    color: #ffffff;
    background: #b42323;
}

/* 경계 정보 */

.hub-alert-warning {
    color: #774400;
    border-color: #e7c17f;
    background: #fff8e8;
}

.hub-alert-warning .hub-alert-icon {
    color: #ffffff;
    background: #b76b00;
}

/* 주요 안내 */

.hub-alert-notice {
    color: #304c72;
    border-color: #adc2df;
    background: #f0f5fc;
}

.hub-alert-notice .hub-alert-icon {
    color: #ffffff;
    background: #3d6597;
}

/* 일반 안내 */

.hub-alert-info {
    color: #425466;
    border-color: #cbd5df;
    background: #f4f7fa;
}

.hub-alert-info .hub-alert-icon {
    color: #ffffff;
    background: #5b6f82;
}

@keyframes hub-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 920px) {
    .hub-layout {
        grid-template-columns: 1fr;
        gap: 38px;
    }

    .hub-sidebar-inner {
        position: static;
    }

    .hub-sidebar-title {
        display: none;
    }

    .hub-country-nav {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .hub-country-nav a {
        justify-content: center;
        min-height: 50px;
        border-right: 1px solid var(--hub-border);
        border-bottom: 0;
    }

    .hub-country-nav a:last-child {
        border-right: 0;
    }

    .hub-country-nav a span:last-child {
        display: none;
    }

    .hub-sidebar-notice {
        display: none;
    }
}

@media (max-width: 700px) {
    .hub-hero-inner,
    .hub-layout {
        width: min(100% - 32px, 1320px);
    }

    .hub-hero-inner {
        padding: 24px 0 42px;
    }

    .hub-breadcrumb {
        margin-bottom: 34px;
    }

    .hub-hero-description {
        font-size: 0.96rem;
    }

    .hub-layout {
        padding: 34px 0 72px;
    }

    .hub-introduction {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-bottom: 36px;
        padding-bottom: 24px;
    }

    .hub-contents {
        gap: 12px;
    }

    .hub-category {
        overflow: hidden;
        padding: 0;
        border: 1px solid var(--hub-border);
        border-radius: 14px;
        background: white;
        transition:
            border-color 0.18s ease,
            box-shadow 0.18s ease;
    }

    .hub-category.is-open {
        border-color: #c6d5e8;
        box-shadow: 0 8px 24px rgba(31, 71, 125, 0.08);
    }

    .hub-category-header {
        align-items: center;
        margin: 0;
        padding: 17px 18px;
        transition: background-color 0.18s ease;
    }

    .hub-category-toggle {
        display: inline-flex;
    }

    .hub-category.is-open .hub-category-header {
        background: var(--hub-primary-soft);
    }

    .hub-category.is-open .hub-category-title {
        color: var(--hub-primary-dark);
    }

    .hub-category-count {
        font-size: 0.78rem;
    }

    .hub-list,
    .hub-guide-links {
        grid-template-columns: 1fr;
    }

    .hub-list {
        gap: 8px;
        padding: 10px;
        border-top: 1px solid #dbe5f1;
        background: #f8fafc;
    }

    .hub-list[hidden] {
        display: none;
    }

    .hub-item-link {
        min-height: 78px;
        gap: 10px;
        padding: 13px 12px;
        border: 1px solid #e1e7ee;
        border-radius: 10px;
        box-shadow: none;
        align-items: center;
    }

    .hub-item-link:hover {
        border-color: #b9cbe2;
        background: var(--hub-primary-soft);
        transform: none;
    }

    .hub-item-arrow {
        width: 24px;
        height: 24px;
        margin-top: 0;
        background: transparent;
        font-size: 0.9rem;
    }

    .hub-item-icon {
        width: 36px;
        height: 36px;
    }

    .hub-item-icon img {
        width: 21px;
        height: 21px;
    }

    .hub-item-name {
        font-size: 0.94rem;
        line-height: 1.35;
    }

    .hub-item-description {
        font-size: 0.76rem;
        line-height: 1.45;
    }

    .hub-guide {
        margin-top: 66px;
    }
    .hub-alerts {
        margin-bottom: 34px;
    }

    .hub-alert {
        flex-direction: column;
        gap: 0;
    }

    .hub-alert-content {
        padding: 18px;
    }

    .hub-alert-link {
        justify-content: space-between;
        min-width: 0;
        padding: 14px 18px;
        border-top: 1px solid currentColor;
        border-left: 0;
    }

    .hub-alert-title {
        font-size: 1.05rem;
    }
}

@media (max-width: 430px) {
    .hub-hero-inner,
    .hub-layout {
        width: min(100% - 24px, 1320px);
    }

    .hub-country-nav a {
        padding: 12px 8px;
        font-size: 0.88rem;
    }

    .hub-category-title {
        font-size: 1.22rem;
    }

    .hub-category-number {
        width: 32px;
        height: 32px;
    }

    .hub-item-arrow {
        width: 26px;
        height: 26px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
