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

/* ── Sticky footer: 내용이 짧으면 푸터를 화면 하단에 고정 ── */
html {
    height: 100%;
}

.site-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.site-shell > .site-main {
    flex: 1 0 auto;
    width: 100%;
}

.site-shell > footer {
    flex-shrink: 0;
    margin-top: auto;
}

/* ── Site header ── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: #fff;
    border-bottom: 1px solid #e8ecf0;
}

.site-header__bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 64px;
}

.site-header__logo {
    flex-shrink: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e3a5f;
    line-height: 1.2;
}

.site-header__logo-img {
    max-height: 36px;
}

.site-header__menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    margin-left: auto;
    padding: 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.site-header__menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 0 auto;
    background: #374151;
    border-radius: 1px;
    transition: transform 0.2s, opacity 0.2s;
}

.site-header.is-menu-open .site-header__menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.site-header.is-menu-open .site-header__menu-toggle span:nth-child(2) {
    opacity: 0;
}

.site-header.is-menu-open .site-header__menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.site-header__nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0 1rem;
    background: #fff;
    border-bottom: 1px solid #e8ecf0;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.site-header.is-menu-open .site-header__nav {
    display: flex;
}

.site-header__nav-link {
    padding: 0.75rem 16px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #374151;
    transition: color 0.15s, background 0.15s;
}

.site-header__nav-link:hover,
.site-header__nav-link.is-active {
    color: #1e3a5f;
    background: #f8fafc;
}

.site-header__actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.site-header__search-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.site-header__search-toggle:hover,
.site-header.is-search-open .site-header__search-toggle {
    border-color: #cbd5e1;
    color: #1e3a5f;
}

.site-header__search-panel {
    border-top: 1px solid #eef2f7;
    background: #fafbfc;
}

.site-header__search-form {
    display: flex;
    gap: 0.5rem;
    padding: 0.875rem 0;
}

.site-header__search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

.site-header__search-form input[type="search"]:focus {
    outline: none;
    border-color: #94a3b8;
}

.site-header__search-submit {
    flex-shrink: 0;
    height: 44px;
    padding: 0 1.25rem;
    border: none;
    border-radius: 8px;
    background: #1e3a5f;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

@media (min-width: 1024px) {
    .site-header__bar {
        position: relative;
        flex-wrap: nowrap;
    }

    .site-header__menu-toggle {
        display: none;
    }

    .site-header__nav {
        display: flex;
        position: static;
        flex: 1;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-end;
        align-items: center;
        gap: 0.125rem 0.25rem;
        min-width: 0;
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .site-header__nav::-webkit-scrollbar {
        display: none;
    }

    .site-header__nav-link {
        padding: 0.5rem 0.625rem;
        white-space: nowrap;
        font-size: 0.875rem;
        border-radius: 6px;
        background: transparent;
    }

    .site-header__actions {
        margin-left: 0.5rem;
    }

    .site-header__logo-img {
        max-height: 43px;
    }
}

@media (min-width: 1200px) {
    .site-header__nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9375rem;
    }
}

/* ── Home shared ── */
.home-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.home-section-head__title {
    font-size: 1.375rem;
    font-weight: 700;
}

.home-section-head__title a:hover {
    color: #1e3a5f;
}

.home-section-head__more {
    flex-shrink: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
}

.home-section-head__more:hover {
    color: #1e3a5f;
}

.home-category-posts {
    padding: 2rem 0;
}

.home-category-posts__list {
    display: grid;
    gap: 0.75rem;
}

.home-category-posts__item a {
    font-weight: 600;
    color: #1f2937;
}

.home-category-posts__item a:hover {
    color: #1e3a5f;
}

.home-category-posts__item p {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.home-search-results {
    padding: 1.5rem 0 0;
}

.home-search-results__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.home-search-results__count {
    margin-left: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
}

.home-search-results__list {
    display: grid;
    gap: 0.75rem;
}

.home-search-results__list a {
    display: block;
    padding: 1rem 1.125rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
}

.home-search-results__list a:hover {
    border-color: #cbd5e1;
}

.home-search-results__list p {
    margin-top: 0.35rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.home-empty {
    padding: 2rem;
    text-align: center;
    color: #6b7280;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
}

.site-main {
    padding: 2rem 0 3rem;
}

.site-header {
    padding: 1rem 0;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-logo {
    font-size: 1.25rem;
    font-weight: 700;
}

.site-nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.site-main {
    padding: 2rem 0 3rem;
}

.site-footer {
    padding: 2rem 0;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 0.875rem;
}

.section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.page-desc {
    color: #6b7280;
    margin-bottom: 2rem;
}

.hero {
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.hero-desc {
    font-size: 1.05rem;
    max-width: 640px;
}

.grid {
    display: grid;
    gap: 1.25rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.empty-state {
    padding: 2rem;
    text-align: center;
    color: #6b7280;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
}

.post-meta {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.post-content {
    margin-top: 1.5rem;
    line-height: 1.8;
}

.post-content p {
    margin-bottom: 1rem;
}

.thumbnail {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}
