/* ==========================================
 * 千里淳風 - Responsive Styles
 * Mobile-first breakpoints
 * ========================================== */

/* ==========================================
 * Tablet: 768px - 1023px
 * ========================================== */
@media (max-width: 1023px) {
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .footer-inner {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-article__image {
        height: 320px;
    }

    .hero-article__title {
        font-size: 1.5rem;
    }

    .article-header__title {
        font-size: 1.6rem;
    }
}

/* ==========================================
 * Mobile: 0 - 767px
 * ========================================== */
@media (max-width: 767px) {
    :root {
        --header-height: 56px;
    }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.3rem; }
    h3 { font-size: 1.1rem; }

    .container {
        padding: 0 16px;
    }

    /* Header */
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--color-bg);
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-md);
        flex-direction: column;
        padding: 8px 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-item > a {
        padding: 12px 20px;
    }

    .nav-submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding-left: 20px;
        display: none;
    }

    .nav-item.submenu-open > .nav-submenu {
        display: block;
    }

    /* Hero */
    .hero-article__image {
        height: 240px;
    }

    .hero-article__overlay {
        padding: 20px;
    }

    .hero-article__title {
        font-size: 1.2rem;
    }

    .hero-article__excerpt {
        font-size: 0.85rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Article grid */
    .article-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Category tabs */
    .category-tabs {
        gap: 6px;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 12px;
        -webkit-overflow-scrolling: touch;
    }

    .category-tab {
        white-space: nowrap;
        padding: 6px 14px;
        font-size: 0.85rem;
    }

    /* Single article */
    .article-header__title {
        font-size: 1.4rem;
    }

    .article-header__meta {
        gap: 10px;
        font-size: 0.85rem;
    }

    .article-body {
        font-size: 1rem;
        line-height: 1.8;
    }

    .article-body h2 {
        font-size: 1.3rem;
    }

    .article-body h3 {
        font-size: 1.1rem;
    }

    /* Search form */
    .search-form {
        flex-direction: column;
    }

    .search-form__select {
        width: 100%;
    }

    /* Footer */
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* Pagination */
    .pagination {
        flex-wrap: wrap;
    }

    /* Breadcrumb */
    .breadcrumb {
        font-size: 0.8rem;
    }
}

/* ==========================================
 * Print styles
 * ========================================== */
@media print {
    .site-header,
    .site-footer,
    .nav-toggle,
    .breadcrumb,
    .category-tabs,
    .related-articles,
    .pagination,
    .search-section {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    .article-body a::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }

    .article-body img {
        max-width: 100%;
        page-break-inside: avoid;
    }
}
