/* =========================================
   Media Site Styles (Common)
   ========================================= */
:root {
    --media-primary: #0a2440;
    --media-accent: #c5a065;
    --media-bg: #f5f7fa;
    --media-text: #333;
}

body {
    background-color: var(--media-bg);
    color: var(--media-text);
    font-family: "Noto Sans JP", sans-serif;
    margin: 0;
}

.inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
}
a:hover {
    opacity: 0.8;
}
img {
    max-width: 100%;
    height: auto;
    vertical-align: bottom;
}

/* ▼▼▼ 追加：レスポンシブ表示制御（ここが重要） ▼▼▼ */
.sp-only {
    display: none;
}
.pc-only {
    display: block;
}
.sp-drawer {
    display: none;
} /* PCではドロワーを完全に消す */

/* ★修正箇所：PCではスマホ用CTAを隠す★ */
.sp-cta {
    display: none;
}

/* --- Header --- */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}
.site-logo {
    font-size: 24px;
    font-weight: 900;
    font-family: "Montserrat", sans-serif;
    color: var(--media-primary);
    margin: 0;
}
.logo-sub {
    font-size: 12px;
    color: var(--media-accent);
    font-weight: 500;
    margin-left: 5px;
}
.nav-list {
    display: flex;
    list-style: none;
    gap: 25px;
    margin: 0;
    padding: 0;
}
.nav-list a {
    font-size: 14px;
    font-weight: 700;
    color: var(--media-primary);
}
.btn-lp-link {
    background: var(--media-accent);
    color: #fff;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
}

/* --- Hero --- */
.media-hero {
    position: relative;
    background: var(--media-primary);
    color: #fff;
    padding: 60px 0;
    text-align: center;
    margin-bottom: 50px;
}
.media-title {
    font-size: 32px;
    margin: 0 0 10px 0;
}
.media-sub {
    font-size: 14px;
    opacity: 0.8;
    margin: 0;
}

/* --- Posts Layout --- */
.section-heading {
    font-size: 24px;
    border-bottom: 2px solid var(--media-primary);
    padding-bottom: 10px;
    margin-bottom: 30px;
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.section-heading span {
    font-size: 14px;
    color: #888;
    font-weight: normal;
}

/* Latest Grid */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 80px;
}
.post-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}
.post-card:hover {
    transform: translateY(-5px);
}

.post-thumb {
    position: relative;
    height: 200px;
    overflow: hidden;
}
.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.post-cat {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--media-primary);
    color: #fff;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
}
.cat-driver {
    background: #e67e22;
}
.cat-medical-office {
    background: #27ae60;
}
.cat-nurse {
    background: #e91e63;
}
.cat-management {
    background: #8e44ad;
}

.post-body {
    padding: 20px;
}
.post-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}
.post-title {
    font-size: 18px;
    margin: 0 0 15px 0;
    line-height: 1.5;
    height: 3em;
    overflow: hidden;
}
.post-tags .tag {
    font-size: 11px;
    color: #777;
    margin-right: 5px;
}

/* Category Sections (Horizontal) */
.category-section {
    margin-bottom: 60px;
}
.cat-heading-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-left: 5px solid var(--media-accent);
    padding-left: 15px;
}
.section-heading-sm {
    font-size: 20px;
    margin: 0;
}
.view-more {
    font-size: 12px;
    color: var(--media-accent);
    font-weight: 700;
}
.post-list-horizontal {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.post-card-sm {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.post-thumb-sm {
    height: 120px;
    overflow: hidden;
}
.post-thumb-sm img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.post-body-sm {
    padding: 15px;
}
.post-title-sm {
    font-size: 14px;
    margin: 0 0 5px 0;
    line-height: 1.4;
    height: 2.8em;
    overflow: hidden;
}
.post-body-sm time {
    font-size: 10px;
    color: #999;
}

/* --- Footer --- */
.site-footer {
    background: #fff;
    padding: 40px 0;
    border-top: 1px solid #eee;
    text-align: center;
}
.footer-logo {
    font-weight: 700;
    color: var(--media-primary);
    margin-bottom: 20px;
}
.footer-nav a {
    margin: 0 15px;
    font-size: 13px;
    color: #666;
}
.copyright {
    margin-top: 30px;
    font-size: 11px;
    color: #999;
}

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
    /* 表示切り替え */
    .pc-only {
        display: none;
    }
    .sp-only {
        display: block;
    }

    /* ★修正箇所：スマホでは表示する★ */
    .sp-cta {
        display: block;
        /* 必要に応じて余白などを調整 */
        margin-right: 15px; /* ハンバーガーメニューとの間隔 */
    }

    .post-grid {
        grid-template-columns: 1fr;
    }
    .post-list-horizontal {
        grid-template-columns: 1fr 1fr;
    }

    /* Hamburger & Drawer */
    .sp-drawer {
        display: block; /* ▼重要：スマホ時のみ復活させる▼ */
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(255, 255, 255, 0.98);
        z-index: 90;
        transform: translateY(-100%);
        transition: transform 0.3s;
    }
    .sp-drawer.active {
        transform: translateY(0);
    }
    .sp-drawer-inner {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
        gap: 30px;
    }
    .sp-nav ul {
        list-style: none;
        padding: 0;
        text-align: center;
    }
    .sp-nav li {
        margin-bottom: 20px;
    }
    .sp-nav a {
        font-size: 18px;
        font-weight: 700;
        color: var(--media-primary);
    }

    .hamburger {
        width: 30px;
        height: 20px;
        position: relative;
        cursor: pointer;
    }
    .hamburger span {
        position: absolute;
        left: 0;
        width: 100%;
        height: 2px;
        background: var(--media-primary);
        transition: 0.3s;
    }
    .hamburger span:nth-of-type(1) {
        top: 0;
    }
    .hamburger span:nth-of-type(2) {
        top: 9px;
    }
    .hamburger span:nth-of-type(3) {
        bottom: 0;
    }
    .hamburger.active span:nth-of-type(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .hamburger.active span:nth-of-type(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-of-type(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}
/* =========================================
   Single Page Styles (記事詳細)
   ========================================= */
.single-main {
    padding-bottom: 80px;
    background: #fff;
}
.inner-sm {
    max-width: 800px; /* 記事本文は読みやすいように幅を狭める */
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Area */
.single-header {
    padding-top: 40px;
    margin-bottom: 60px;
}
.single-breadcrumb {
    font-size: 12px;
    color: #999;
    margin-bottom: 20px;
}
.single-breadcrumb a {
    color: #666;
    text-decoration: underline;
}
.single-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
.single-title {
    font-size: 32px;
    color: var(--media-primary);
    line-height: 1.4;
    margin-bottom: 30px;
}
.single-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    max-height: 500px;
    object-fit: cover;
}
.single-thumbnail {
    max-width: 1000px; /* 画像は少し広めに */
    margin: 0 auto;
    padding: 0 20px;
}

/* Content Area (本文の装飾) */
.single-content {
    font-size: 16px;
    line-height: 1.9;
    color: #333;
    margin-bottom: 60px;
}
.single-content p {
    margin-bottom: 30px;
}
.single-content h2 {
    font-size: 24px;
    color: var(--media-primary);
    border-bottom: 2px solid var(--media-accent);
    padding-bottom: 10px;
    margin: 60px 0 30px;
}
.single-content h3 {
    font-size: 20px;
    color: var(--media-primary);
    border-left: 5px solid var(--media-primary);
    padding-left: 15px;
    margin: 40px 0 20px;
}
.single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 20px 0;
}
.single-content ul,
.single-content ol {
    background: #f9f9f9;
    padding: 30px 30px 30px 50px;
    border-radius: 8px;
    margin-bottom: 30px;
}
.single-content li {
    margin-bottom: 10px;
}
.single-content blockquote {
    border-left: 5px solid #ccc;
    margin: 30px 0;
    padding: 15px 20px;
    color: #666;
    background: #f5f5f5;
}

/* Footer Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}
.post-navigation a {
    font-weight: 700;
    color: var(--media-primary);
}
.back-to-top {
    text-align: center;
}
.back-to-top a {
    display: inline-block;
    padding: 10px 30px;
    border: 1px solid var(--media-primary);
    border-radius: 50px;
    color: var(--media-primary);
    font-weight: 700;
    transition: all 0.3s;
}
.back-to-top a:hover {
    background: var(--media-primary);
    color: #fff;
}

/* =========================================
   Archive Page Styles (カテゴリ)
   ========================================= */
.archive-hero {
    background: #0a2440; /* メディアトップと同じ色か、少し変えてもOK */
}
.archive-label {
    display: block;
    font-family: "Montserrat", sans-serif;
    color: var(--media-accent);
    font-size: 14px;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
    font-weight: 700;
}

/* Pagination */
.pagination {
    margin-top: 50px;
    text-align: center;
}
.nav-links .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    border: 1px solid #ddd;
    margin: 0 5px;
    border-radius: 4px;
    color: var(--media-primary);
}
.nav-links .current {
    background: var(--media-primary);
    color: #fff;
    border-color: var(--media-primary);
}

/* SP Adjustments */
@media (max-width: 768px) {
    .single-title {
        font-size: 24px;
    }
    .single-header {
        padding-top: 20px;
    }
    .single-content {
        font-size: 15px;
    }
}