/* Explain: Component styles for cards, buttons, navigation, and utility elements. */
.site-header {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
}

.brand-main {
    font-family: var(--font-heading);
    font-weight: 900;
    letter-spacing: -0.02em;
}

.brand-sub {
    letter-spacing: 0.14em;
}

.nav-link {
    position: relative;
    padding-bottom: 0.3rem;
    color: var(--text-color);
    font-weight: 500;
    transition: color 200ms ease;
}

.nav-link::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    border-radius: 999px;
    background: var(--accent-color);
    content: "";
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 200ms ease;
}

.nav-link:hover,
.nav-link:focus-visible {
    color: var(--accent-color);
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
    transform: scaleX(1);
}

details.more-menu > summary {
    list-style: none;
}

details.more-menu > summary::-webkit-details-marker {
    display: none;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--accent-color);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.section-kicker::before {
    width: 2rem;
    height: 2px;
    border-radius: 999px;
    background: var(--accent-color);
    content: "";
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 0.75rem;
}

@media (min-width: 1024px) {
    .quick-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.quick-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    height: 100%;
    min-height: 6.75rem;
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    background: #ffffff;
    padding: 1.1rem 0.6rem;
    color: var(--text-color);
    font-size: 0.88rem;
    font-weight: 600;
    text-align: center;
    transition: transform 250ms ease, border-color 250ms ease, box-shadow 250ms ease;
}

.quick-card i {
    display: inline-flex;
    flex-shrink: 0;
    height: 1.75rem;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 1.4rem;
    line-height: 1;
}

.quick-card span {
    display: flex;
    width: 100%;
    min-height: 2.6em;
    align-items: center;
    justify-content: center;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.3;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.quick-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 16px 36px rgba(15, 36, 68, 0.12);
    transform: translateY(-4px);
}

.stat-card {
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    background: #ffffff;
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
}

.stat-card strong {
    display: block;
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.1;
}

.stat-value {
    display: flex;
    align-items: baseline;
    gap: 0.12rem;
    margin: 0;
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-weight: 900;
    line-height: 1;
}

.stat-value-num {
    font-size: 2.5rem;
    letter-spacing: -0.03em;
}

.stat-value-unit {
    color: var(--accent-color);
    font-size: 1.15rem;
    font-weight: 800;
}

.stat-label {
    margin: 0.65rem 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.policy-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    background: #ffffff;
    padding: 2rem;
    box-shadow: var(--shadow-card);
    transition: transform 250ms ease, box-shadow 250ms ease;
}

.policy-card:hover {
    box-shadow: 0 22px 46px rgba(15, 36, 68, 0.13);
    transform: translateY(-5px);
}

.policy-card i.policy-icon {
    display: inline-flex;
    height: 3rem;
    width: 3rem;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: var(--accent-soft);
    color: var(--accent-color);
    font-size: 1.25rem;
}

.affiliate-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--border-color);
    border-radius: 1.75rem;
    background: #ffffff;
    padding: 2rem;
    box-shadow: var(--shadow-card);
    transition: transform 250ms ease, box-shadow 250ms ease, border-color 250ms ease;
}

.affiliate-card:hover {
    border-color: rgba(37, 99, 235, 0.4);
    box-shadow: 0 24px 52px rgba(15, 36, 68, 0.14);
    transform: translateY(-5px);
}

.affiliate-badge {
    display: inline-flex;
    height: 3.25rem;
    width: 3.25rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    color: #ffffff;
    font-size: 1.35rem;
}

/* ── 산하조직 카드 ──
   로고 크기·위치와 조직명·영문명·설명·버튼의 줄 간격을 모든 카드에서 동일하게 유지하고
   설명 길이가 달라도 버튼과 안내 문구가 카드 아래쪽 같은 자리에 오도록 고정합니다. */
.affiliate-card-head {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* 로고 — 모든 카드에서 같은 크기·모양·위치 */
.affiliate-logo {
    display: inline-flex;
    height: 3.75rem;
    width: 3.75rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 1.1rem;
    background: #ffffff;
    padding: 0.55rem;
}

.affiliate-logo img {
    height: 100%;
    width: 100%;
    object-fit: contain;
}

/* 조직명 — 한 줄 높이 고정 */
.affiliate-name {
    display: flex;
    min-height: 1.6rem;
    align-items: center;
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.35;
    color: var(--text-color);
    overflow-wrap: anywhere;
}

/* 영문명 — 한 줄 높이 고정 */
.affiliate-name-en {
    display: flex;
    min-height: 1.1rem;
    align-items: center;
    margin: 0.15rem 0 0;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

/* 설명 — 최대 네 줄, 카드마다 같은 높이를 차지해 아래 요소 위치를 고정합니다. */
.affiliate-desc {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    overflow: hidden;
    min-height: calc(1.75em * 4);
    margin: 1.5rem 0 0;
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

/* 버튼·안내 문구 — 카드 아래쪽 같은 자리에 고정 */
.affiliate-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1.25rem;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.notice-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 1.1rem;
    background: #ffffff;
    padding: 1.1rem 1.4rem;
    color: var(--text-color);
}

.notice-tag {
    flex-shrink: 0;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-color);
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.unit-card {
    height: 100%;
    border: 1px solid var(--border-color);
    border-radius: 1.4rem;
    background: #ffffff;
    padding: 1.75rem;
    box-shadow: var(--shadow-card);
}

.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    background: #ffffff;
    box-shadow: var(--shadow-card);
    transition: transform 250ms ease, box-shadow 250ms ease;
}

.project-card:hover {
    box-shadow: 0 22px 48px rgba(15, 36, 68, 0.13);
    transform: translateY(-5px);
}

.back-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 50;
    display: inline-flex;
    height: 3rem;
    width: 3rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(15, 36, 68, 0.25);
    transition: background 250ms ease;
}

.back-to-top:hover {
    background: var(--primary-hover);
}

@media (max-width: 767px) {
    .quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.subsite-filter-btn {
    display: inline-flex;
    min-height: 2.6rem;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: #ffffff;
    padding: 0 1.1rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: background 200ms ease, color 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.subsite-filter-btn:hover {
    background: var(--surface-color);
}

.subsite-filter-btn:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.subsite-filter-btn.is-active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(27, 58, 107, 0.28);
}

.subsite-filter-btn.is-active:hover {
    background: var(--primary-hover);
}

.subsite-reset-btn {
    display: inline-flex;
    flex-shrink: 0;
    min-height: 2.6rem;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: #ffffff;
    padding: 0 1.1rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}

.subsite-reset-btn:hover {
    border-color: var(--accent-color);
    background: var(--surface-color);
    color: var(--accent-color);
}

/* ── 전국 회원 프로필 카드 ──
   사진 크기·모서리, 글자 크기·줄 간격, 안쪽 여백을 모든 카드에서 동일하게 유지하고
   소개 길이가 달라도 카드 높이와 요소 위치가 흔들리지 않도록 고정합니다. */
.member-card {
    display: flex;
    height: 100%;
    flex-direction: column;
    gap: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    background: #ffffff;
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
    transition: transform 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
}

.member-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 18px 40px rgba(15, 36, 68, 0.13);
    transform: translateY(-4px);
}

.member-photo {
    display: block;
    height: 4rem;
    width: 4rem;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    background: var(--surface-color);
}

.member-photo img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

/* 지역·시도 배지 줄 — 배지가 한 줄을 넘겨도 카드마다 같은 높이를 차지해
   사진·이름·소개가 모든 카드에서 같은 위치에서 시작합니다. */
.member-chips {
    display: flex;
    min-height: 1.55rem;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
}

.member-chip {
    display: inline-block;
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.25rem;
}

.member-chip-region {
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-muted);
}

.member-chip-province {
    background: var(--accent-soft);
    color: var(--accent-color);
}

.member-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
    color: var(--text-color);
}

.member-bio {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    min-height: 2.4rem;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.member-meta {
    display: grid;
    gap: 0.375rem;
    margin: auto 0 0;
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
    font-size: 0.75rem;
    line-height: 1.4;
}

.member-meta-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.member-meta-label {
    width: 2.5rem;
    flex-shrink: 0;
    font-weight: 600;
    color: var(--text-muted);
}

.member-meta-value {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-color);
}