/* ANIWAS Portal Theme — layout styles for page/single/archive/404 */

body {
    background: var(--c-bg, #fafafa);
    color: var(--c-txt, #0a0a0a);
    font-family: 'Noto Sans JP', system-ui, sans-serif;
    margin: 0;
}

/* ── 共通コンテナ ─────────────────────────────────────────── */
.anw-wrap {
    max-width: var(--w-max, 1000px);
    margin: 0 auto;
    padding: 28px 16px 48px;
}

/* ── 投稿単体 (single.php) ───────────────────────────────── */
.anw-post-back {
    display: inline-flex;
    align-items: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--c-txt, #0a0a0a);
    text-decoration: none;
    border: var(--border-w, 1.5px) solid var(--c-border, #7a7a7a);
    border-radius: var(--radius-sm, 4px);
    padding: 0 14px;
    height: 36px;
    margin-bottom: 12px;
    box-sizing: border-box;
}
.anw-post-back:hover { color: var(--c-hover-txt, #0044cc); }

.anw-post-article {
    background: var(--c-panel, #ffffff);
    border: var(--border-w, 1.5px) solid var(--c-border, #7a7a7a);
    border-radius: var(--radius, 6px);
    box-shadow: var(--shadow-1, 0 1px 4px rgba(0,0,0,0.08));
    overflow: hidden;
}

.anw-post-header {
    padding: 16px 20px;
    border-bottom: var(--border-w, 1.5px) solid var(--c-border-lt, #cccccc);
}

.anw-post-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 0 8px;
    color: var(--c-txt, #0a0a0a);
    line-height: 1.35;
}

.anw-post-meta {
    font-size: 0.88rem;
    color: var(--c-muted, #333333);
    margin: 0;
}

.anw-post-body {
    padding: 20px 20px 28px;
    font-size: 1rem;
    line-height: 1.85;
    color: var(--c-txt, #0a0a0a);
}

.anw-post-body h2 { font-size: 1.25rem; font-weight: 700; margin: 1.6em 0 0.5em; }
.anw-post-body h3 { font-size: 1.1rem;  font-weight: 700; margin: 1.4em 0 0.4em; }
.anw-post-body p  { margin: 0 0 1em; }
.anw-post-body a  { color: var(--c-brand, #0044cc); text-decoration: underline; }
.anw-post-body img { max-width: 100%; border-radius: var(--radius, 6px); }

/* ── アーカイブ (archive.php) ────────────────────────────── */
.anw-archive-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: var(--border-w, 1.5px) solid var(--c-border, #7a7a7a);
    color: var(--c-txt, #0a0a0a);
}

.anw-post-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.anw-post-card {
    background: var(--c-panel, #ffffff);
    border: var(--border-w, 1.5px) solid var(--c-border, #7a7a7a);
    border-radius: var(--radius, 6px);
    box-shadow: var(--shadow-1, 0 1px 4px rgba(0,0,0,0.08));
    overflow: hidden;
}

.anw-post-card-link {
    display: block;
    padding: 16px 18px;
    text-decoration: none;
    color: inherit;
}

.anw-post-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 6px;
    color: var(--c-txt, #0a0a0a);
}

.anw-post-card-link:hover .anw-post-card-title {
    color: var(--c-hover-txt, #3d46c4);
}

.anw-post-card-meta {
    font-size: 0.84rem;
    color: var(--c-muted, #333333);
    margin-bottom: 8px;
}

.anw-post-card-excerpt {
    font-size: 0.92rem;
    color: var(--c-sub, #1a1a1a);
    margin: 0;
    line-height: 1.65;
}

.anw-no-posts {
    color: var(--c-sub, #1a1a1a);
    font-size: 0.95rem;
    padding: 20px 0;
}

/* ── 404 ──────────────────────────────────────────────────── */
.anw-404-wrap {
    text-align: center;
    padding: 80px 20px 60px;
}

.anw-404-code {
    font-size: 5rem;
    font-weight: 800;
    color: var(--c-brand, #0044cc);
    margin: 0 0 8px;
    line-height: 1;
}

.anw-404-msg {
    font-size: 1.1rem;
    color: var(--c-sub, #1a1a1a);
    margin: 0 0 28px;
}

.anw-404-btn {
    display: inline-block;
    padding: 10px 26px;
    background: var(--c-brand, #0044cc);
    color: #ffffff;
    border-radius: var(--radius, 6px);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
}

.anw-404-btn:hover {
    background: var(--c-active, #3d46c4);
}

/* ── フッター ────────────────────────────────────────────── */
/* WP ブロックが追加する content padding を無効化 — 各ページコンテナが自前で管理 */
.entry-content.has-global-padding,
.wp-block-post-content.has-global-padding {
    padding-inline: 0 !important;
}

.anw-footer {
    background: var(--c-panel, #ffffff);
    border-top: 1.5px solid var(--c-border, #7a7a7a);
    font-family: 'Noto Sans JP', system-ui, sans-serif;
    margin-top: 8px;
}

.anw-footer-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0 32px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 36px 40px 32px;
    align-items: start;
}

.anw-footer-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--c-txt, #0a0a0a);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1.5px solid var(--c-border, #7a7a7a);
}

.anw-footer-link {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--c-sub, #1a1a1a);
    text-decoration: none;
    padding: 6px 0;
    line-height: 1.4;
}

.anw-footer-link:hover { color: var(--c-hover-txt, #0044cc); }

.anw-footer-copy {
    text-align: center;
    font-size: 0.88rem;
    color: var(--c-muted, #333333);
    padding: 14px 16px 20px;
    border-top: 1.5px solid var(--c-border, #7a7a7a);
}

@media (max-width: 800px) {
    .anw-footer-inner {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px 20px;
        padding: 24px 20px 20px;
    }
}

@media (max-width: 480px) {
    .anw-footer-inner {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 16px;
        padding: 20px 16px 16px;
    }
    .anw-footer-title  { font-size: 1.2rem; }
    .anw-footer-link   { font-size: 1.05rem; padding: 4px 0; }
}

/* ── ダークモード ─────────────────────────────────────────── */
html[data-theme="dark"] .anw-post-card-link:hover .anw-post-card-title {
    color: var(--c-hover-txt);
}
