/*
Theme Name: Kaigo Diary
Description: Original theme for Kaigo Diary
Author: Masashi
Version: 1.0
*/

:root {
    --bg: #f5f9f7;
    --fg: #0d1f17;
    --accent: #2db87a;
    --accent2: #5bc8c0;
    --accent-grad: linear-gradient(135deg, #2db87a, #5bc8c0);
    --muted: #e8f4f0;
    --border: #c8dfd8;
    --dark: #0d1f17;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg) !important; /* 背景色を強制 */
    color: var(--fg);
    font-family: 'Noto Sans JP', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

/* 1. Progress Bar */
#progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--accent-grad);
    z-index: 9999;
    width: 0%;
    transition: width 0.1s linear;
}

/* 2. Hero Section */
.hero {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg);
    overflow: hidden;
    z-index: 1;
}

#heroBg {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(100px, 20vw, 260px);
    color: transparent;
    -webkit-text-stroke: 1px #c8dfd8;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    user-select: none;
    white-space: nowrap;
    z-index: 0;
    will-change: transform;
}

.hero-deco-1 {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    position: absolute;
    top: -100px;
    right: -100px;
    background: radial-gradient(circle, rgba(45,184,122,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-deco-2 {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    position: absolute;
    bottom: -80px;
    left: -80px;
    background: radial-gradient(circle, rgba(91,200,192,0.10) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-label {
    font-size: 11px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 24px;
    opacity: 0;
    animation: fadeIn 1.2s forwards 0.5s;
}

.hero-title h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(64px, 12vw, 150px);
    line-height: 0.9;
    color: var(--dark);
}

.hero-title h1 span {
    display: block;
    overflow: hidden;
}

.hero-title h1 em {
    display: block;
    font-style: normal;
    transform: translateY(110%);
    opacity: 0;
    animation: slideUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-title h1 span:nth-child(1) em { animation-delay: 0s; }
.hero-title h1 span:nth-child(2) em { animation-delay: 0.1s; }
.hero-title h1 span:nth-child(3) em { animation-delay: 0.2s; }

.hero-subtext {
    margin-top: 24px;
    font-size: 13px;
    font-weight: 300;
    color: #7a9e8e;
    opacity: 0;
    animation: fadeIn 1.5s forwards 1s;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0;
    animation: fadeIn 1.2s forwards 1.5s;
}

.scroll-indicator span {
    font-size: 10px;
    color: #9ab8a8;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.scroll-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    transform-origin: top;
    animation: scrollPulse 2s infinite;
}

/* 3. Sections Wrapper */
.sections {
    position: relative;
    z-index: 10;
    background-color: var(--bg);
}

.marquee-bar {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 18px 0;
    background: var(--accent-grad);
    overflow: hidden;
    position: relative;
    z-index: 11;
}

.marquee-track {
    display: flex;
    width: max-content;
    white-space: nowrap;
    animation: marquee 14s linear infinite;
}

.marquee-item {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    color: #fff;
    padding: 0 48px;
    display: flex;
    align-items: center;
}

.marquee-item span {
    opacity: 0.5;
    margin: 0 12px;
}

/* About Section */
.about-section {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg);
    border-bottom: 1px solid var(--border);
    text-align: center;
    z-index: 5;
}

footer.site-footer {
    background: #fff !important;
    padding: 60px 40px;
    border-top: 1px solid var(--border);
    text-align: center;
    position: relative;
    z-index: 1000; /* フッターも最前面に */
}

.about-inner {
    max-width: 680px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-inner.visible {
    opacity: 1;
    transform: translateY(0);
}

.about-body {
    font-size: 15px;
    color: #4a6a5a;
    line-height: 2.2;
    font-weight: 300;
}

/* 3-2. Stagger Section */
.stagger-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    border-top: 1px solid var(--border);
    background-color: var(--bg);
    position: relative;
    z-index: 12;
}

.sticky-column {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 64px;
    border-right: 1px solid var(--border);
    background-color: var(--bg);
}

.stagger-section.reverse .sticky-column {
    order: 2;
    border-right: none;
    border-left: 1px solid var(--border);
}

.scroll-column {
    padding: 120px 64px;
    display: flex;
    flex-direction: column;
    gap: 64px;
}

.stagger-section.reverse .scroll-column {
    order: 1;
}

/* Sticky Column Content */
.section-num {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 120px;
    color: #daeee6;
    line-height: 1;
    margin-bottom: -10px;
}

.section-tag {
    font-size: 10px;
    color: var(--accent);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.section-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(36px, 5vw, 72px);
    color: var(--dark);
    line-height: 1;
    margin-bottom: 24px;
}

.section-body {
    font-size: 14px;
    color: #6a8a7a;
    line-height: 1.9;
    max-width: 360px;
    font-weight: 300;
    margin-bottom: 40px;
}

.cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: var(--dark);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--dark);
    transition: 0.3s;
}

.cta svg {
    transition: transform 0.3s;
}

.cta:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.cta:hover svg {
    transform: translateX(4px);
}

/* Scroll Cards */
.scroll-card {
    background: #fff;
    border: 1px solid var(--border);
    position: relative;
    display: flex;
    flex-direction: column;
    height: auto;
    width: 100%;
    max-width: 1000px; /* 記事カードはゆったりと */
    margin: 0 auto 80px; 
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    transform: translateY(40px);
}

/* ギャラリー全体の設定：ブラウザの自由なレイアウトに任せる */
.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    width: 100%;
    margin-top: 60px;
    padding: 0 40px;
}

@media (max-width: 767px) {
    .gallery-grid { 
        padding: 0 24px;
        gap: 20px;
    }
}

.gallery-item {
    flex: 1 1 300px; /* 300pxをベースに、空きスペースがあれば広がる */
    max-width: none; /* 制限なし */
    margin: 0;
    border-radius: 16px;
    overflow: hidden;
    background-color: var(--muted);
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.gallery-item img {
    width: 100% !important;
    height: auto !important; /* 写真本来の比率を活かす */
    display: block !important;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.gallery-item:hover img {
    transform: scale(1.1) !important;
}

.gallery-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.gallery-item:hover img {
    transform: scale(1.1) !important;
}

.scroll-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

/* ホバー時の画像拡大演出 */
.scroll-card .card-visual img {
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-card:hover .card-visual img {
    transform: scale(1.05);
}

.scroll-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-card:nth-child(2) { transition-delay: 0.1s; }
.scroll-card:nth-child(3) { transition-delay: 0.2s; }
.scroll-card:nth-child(4) { transition-delay: 0.3s; }
.scroll-card:nth-child(5) { transition-delay: 0.4s; }
.scroll-card:nth-child(6) { transition-delay: 0.5s; }
.scroll-card:nth-child(7) { transition-delay: 0.6s; }
.scroll-card:nth-child(8) { transition-delay: 0.7s; }
.scroll-card:nth-child(9) { transition-delay: 0.8s; }
.scroll-card:nth-child(10) { transition-delay: 0.9s; }

.card-visual {
    width: 100%;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-color: var(--muted);
}

/* 画像がない場合のカード（no-thumbクラス）の調整 */
.scroll-card.no-thumb .card-visual {
    aspect-ratio: auto;
    height: 60px; /* 高さを大幅に抑える */
    background-color: transparent; /* 背景色を消して隙間感をなくす */
}

.scroll-card.no-thumb .geo-shape {
    transform: scale(0.5); /* 幾何学模様を控えめなアクセントにする */
    opacity: 0.3;
}

.card-visual img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}


/* Card Backgrounds & Glows */
#card-a { background-color: #0d2a1f; }
#card-a::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 60% at 50% 50%, rgba(45,184,122,0.3) 0%, transparent 70%); }
#card-b { background-color: #0d1f2a; }
#card-b::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 60% at 50% 50%, rgba(91,200,192,0.3) 0%, transparent 70%); }
#card-c { background-color: #1a2a1a; }
#card-c::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 60% at 50% 50%, rgba(45,184,122,0.2) 0%, transparent 70%); }

.card-info {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* 常に上揃え */
    border-top: 1px solid var(--border);
    background-color: var(--bg);
    position: relative;
    z-index: 2;
    gap: 16px;
}

/* 画像がない場合は上のボーダーを消して一体感を出す */
.scroll-card.no-thumb .card-info {
    border-top: none;
    padding-top: 0;
}

.card-title {
    font-size: 14px;
    color: var(--dark);
    font-weight: 400;
    line-height: 1.6;
    flex: 1;
}

.card-meta {
    font-size: 12px;
    color: #9ab8a8;
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 0.1em;
    white-space: nowrap;
    margin-top: 4px;
}

.card-accent-dot {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 6px;
    height: 6px;
    background-color: var(--accent);
    border-radius: 50%;
}

/* 3-4. Gallery Section */
.gallery-section {
    padding: 120px 64px;
    border-top: 1px solid var(--border);
    background-color: var(--bg);
    position: relative;
    z-index: 15;
}

.gallery-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.gallery-tabs.visible {
    opacity: 1;
    transform: translateY(0);
}
.gallery-tab {
    padding: 8px 24px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--dark);
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 13px;
    outline: none;
}
.gallery-tab.active, .gallery-tab:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.gallery-item.hidden-item {
    display: none;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    display: block;
    text-decoration: none;
    background-color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 4px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item:nth-child(2) { transition-delay: 0.1s; }
.gallery-item:nth-child(3) { transition-delay: 0.2s; }
.gallery-item:nth-child(4) { transition-delay: 0.3s; }
.gallery-item:nth-child(5) { transition-delay: 0.4s; }

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(45, 90, 80, 0.9), transparent 70%);
    display: flex;
    align-items: flex-end;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay .label-tag {
    background: #fff;
    color: var(--accent);
    border: none;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0;
}

/* 3-5. Contact Section */
.contact-section {
    padding: 120px 64px;
    border-top: 1px solid var(--border);
    background-color: #fdfdfb;
    position: relative;
    z-index: 50;
}

.contact-section .section-body {
    max-width: 100%;
}

.contact-inner {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-form {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-section .form-group {
    width: 100%;
}

.contact-section .form-group input, 
.contact-section .form-group textarea {
    width: 100%;
    padding: 18px 24px;
    background-color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 0;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 16px;
    color: var(--fg);
    transition: 0.3s;
    outline: none;
    display: block;
    box-shadow: none;
}

.contact-section .form-group input:focus, 
.contact-section .form-group textarea:focus {
    background-color: #fff;
    border-color: var(--accent);
}

.contact-section .cta-button {
    width: 100%;
    margin-top: 20px;
    padding: 20px 32px;
    background: var(--accent-grad);
    color: #fff;
    border: none;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 16px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: 0.3s;
}

.contact-section .cta-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    background: var(--accent);
}

.contact-section .cta-button:hover svg {
    transform: translateX(6px);
}

.contact-section .cta-button svg {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Footer */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 80px 64px;
    border-top: 1px solid var(--border);
    background-color: var(--bg);
    position: relative;
    z-index: 20;
}

.footer-logo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 48px;
    color: var(--dark);
}

.footer-logo span {
    background: var(--accent-grad);
    -webkit-background-clip: text;
    -webkit-background-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.footer-copy {
    font-size: 11px;
    color: #9ab8a8;
    line-height: 1.8;
    text-align: right;
}

/* Animations */
@keyframes slideUp { from { transform: translateY(110%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scrollPulse { 0% { opacity: 0.4; transform: scaleY(1); } 50% { opacity: 1; transform: scaleY(1.2); } 100% { opacity: 0.4; transform: scaleY(1); } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Tag List - Premium Pill Style */
body ul.tag-list { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 10px; 
    list-style: none; 
    padding: 0;
    margin: 0;
}

body ul.tag-list li {
    margin: 0;
    padding: 0;
    list-style: none;
}

body ul.tag-list li::before {
    display: none; /* 万が一の箇条書きドットを強制排除 */
}

body ul.tag-list a {
    display: inline-block;
    padding: 6px 20px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 40px;
    font-size: 11px;
    color: var(--accent);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 0.05em;
}

body ul.tag-list a:hover { 
    border-color: var(--accent); 
    background-color: var(--accent);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 184, 122, 0.15);
}

/* Label Tags & Card Info Fix */
.card-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border-top: 1px solid var(--border);
    background-color: var(--bg);
    position: relative;
    z-index: 2;
    gap: 8px;
    width: 100%;
}

.card-title {
    font-size: 16px;
    color: var(--dark);
    font-weight: 700;
    line-height: 1.5;
    margin: 8px 0 12px 0;
    width: 100%;
    display: block;
}

.card-meta {
    font-size: 11px;
    color: #9ab8a8;
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 0.1em;
    margin-top: 0;
}

.card-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
    width: 100%;
}

/* Premium Label Style (Fix for Blue Links) */
.label-tag {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(45, 184, 122, 0.08);
    color: var(--accent) !important;
    font-size: 11px;
    line-height: 1.2;
    border-radius: 20px;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(45, 184, 122, 0.15);
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 500;
}

.label-tag:hover {
    background: var(--accent);
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 184, 122, 0.15);
}

/* Hexagon Shape for Section 03 */
.geo-shape.hexagon {
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: linear-gradient(135deg, var(--accent), var(--primary));
    opacity: 0.6;
}

/* --------------------------------------------------
   4. Blog Post Styles (Premium Layout)
-------------------------------------------------- */

/* Marquee System (Mockup Based) */
.marquee-container {
    width: 100%;
    overflow: hidden;
    background: #fff !important; /* 強制的に白背景 */
    padding: 24px 0 0 !important;
    margin: 0 !important;
    border-bottom: 1px solid var(--border) !important;
    position: relative;
    z-index: 100;
}

.marquee-content {
    display: flex;
    white-space: nowrap;
    animation: marquee-scroll 30s linear infinite;
}

.marquee-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 60px; /* サイズを控えめに調整（暴走防止） */
    color: var(--primary);
    margin-right: 60px;
    opacity: 0.08;
    letter-spacing: 0.1em;
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- Blog Post Styles (Premium Layout - Mockup Based) --- */
.blog-container {
    max-width: 1200px;
    margin: -10px auto 0 !important; /* 下のマージンも0にして隙間を消す */
    padding: 40px !important;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 80px;
    background-color: #fdfdfb !important; /* 背景色を強制 */
    position: relative;
    z-index: 999;
}

article.post-content {
    background: #fff;
    padding: 0;
}

.main-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 16px; /* 角丸を強化 */
    overflow: hidden;
    margin-bottom: 40px; 
    margin-top: 0;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}
.main-thumbnail img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.main-thumbnail:hover img {
    transform: scale(1.05); /* 記事メイン画像もホバー拡大 */
}

.post-header { margin-bottom: 40px; }
.post-meta { margin-bottom: 16px; }
.post-date { font-family: 'Outfit', sans-serif; font-size: 13px; color: var(--accent); letter-spacing: 0.1em; text-transform: uppercase; }
.post-title { font-size: 36px; font-weight: 700; color: var(--primary); margin-bottom: 40px; line-height: 1.4; }

/* 3-Part Sections */
.story-section { margin-bottom: 120px; }
.section-header { text-align: left; margin-bottom: 40px; padding-left: 10px; }
.section-label {
    display: inline-block;
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--accent);
}
.section-title { font-size: 28px; font-weight: 700; color: var(--primary); line-height: 1.5; }

.section-content {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 80px;
    align-items: flex-start;
}

/* PC Order: Body Left, Image Right */
.section-body { order: 1; font-size: 15px; color: var(--text-muted); text-align: justify; line-height: 2.2; }
.section-image { 
    order: 2; 
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.section-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s ease; }
.section-image:hover img { transform: scale(1.05); }

/* Reverse: Image Left, Body Right (PC Only) */
@media (min-width: 993px) {
    .story-section.reverse .section-image { order: 1; }
    .story-section.reverse .section-body { order: 2; }
}

/* Sidebar Area */
.sidebar { 
    display: flex; 
    flex-direction: column; 
    gap: 60px; 
    background-color: #fdfdfb; 
    position: relative; 
    z-index: 10;
}
.widget { margin-bottom: 0; }
.widget-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    position: relative;
}
.widget-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 40px;
    height: 1px;
    background: var(--accent);
}

/* Tag List */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.tag-list li { list-style: none; margin: 0; }
.tag-list a {
    display: inline-block;
    padding: 6px 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 11px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
}
.tag-list a:hover { border-color: var(--accent); color: var(--accent); }

/* Recent Posts */
.recent-posts { list-style: none; display: flex; flex-direction: column; gap: 24px; padding: 0; margin: 0; }
.recent-item { 
    display: flex; 
    gap: 16px; 
    align-items: flex-start; 
    text-decoration: none !important; 
    color: inherit !important; 
}
.recent-thumb { 
    width: 80px; 
    height: 60px; 
    border-radius: 12px; /* 角丸を統一 */
    overflow: hidden; 
    flex-shrink: 0; 
}
.recent-thumb img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.recent-item:hover .recent-thumb img {
    transform: scale(1.1); /* サイドバー画像もホバー拡大 */
}
.recent-info .post-date { font-size: 10px; margin-bottom: 4px; display: block; color: var(--accent); }
.recent-info .recent-title { font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--primary); transition: 0.3s; }
.recent-item:hover .recent-title { color: var(--accent); }

/* Back Button */
.back-to-list { margin-top: 40px; padding: 60px 0; border-top: 1px solid var(--border); text-align: center; }
.btn-list {
    display: inline-block;
    padding: 16px 48px;
    background: var(--accent-grad) !important; /* 送信ボタンと同じグラデーションに統一 */
    color: #fff !important;
    text-decoration: none;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-list:hover { background: var(--accent); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(91, 163, 145, 0.2); }

/* ==================================================
   6. Comments Area
   ================================================== */
.comments-area {
    margin-top: 80px;
    padding-top: 60px;
    border-top: 1px solid var(--border);
}

.comments-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 32px;
    color: var(--dark);
    margin-bottom: 40px;
    letter-spacing: 0.05em;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin-bottom: 60px;
}

.comment-body {
    padding: 30px 0;
    border-bottom: 1px solid var(--border);
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.comment-author .avatar {
    border-radius: 50%;
}

.comment-author .fn {
    font-weight: 600;
    color: var(--dark);
    font-style: normal;
}

.comment-metadata {
    font-size: 12px;
    color: #999;
}

.comment-content {
    font-size: 14px;
    line-height: 1.8;
    color: #4a6a5a;
}

.comment-reply-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 12px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

/* Comment Form Styling */
#respond {
    background: var(--muted);
    padding: 40px;
    border-radius: 4px;
}

#reply-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--dark);
}

.comment-form p {
    margin-bottom: 20px;
}

.comment-form label {
    display: block;
    font-size: 13px;
    margin-bottom: 8px;
    color: var(--dark);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    background: #fff;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 14px;
    border-radius: 2px;
}

.comment-form textarea {
    height: 150px;
}

.form-submit {
    margin-top: 30px;
}

.comment-form input[type="submit"] {
    display: inline-block;
    padding: 16px 48px;
    background: var(--accent-grad, var(--accent));
    color: #fff;
    border: none;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.comment-form input[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(91, 163, 145, 0.2);
    opacity: 0.9;
}

@media (max-width: 767px) {
    #respond { padding: 24px; }
    .comments-area { margin-top: 60px; padding-top: 40px; }
}

/* ==================================================
   Responsive Overrides (Full Sync & Robust Mobile Support)
   ================================================== */


@media (max-width: 767px) {
    /* 
       IMPORTANT: html/bodyへのoverflow-x: hiddenはstickyを破壊するため、
       絶対に使用しない。index.htmlの設計思想を遵守。
    */

    /* Hero & About - index.html通り、スマホでもStickyスタッキングを維持 */
    .hero, .about-section {
        position: sticky !important;
        top: 0 !important;
        height: 100vh !important;
        overflow: hidden;
        z-index: 1;
    }

    #heroBg {
        /* 320pxでも突き抜けないサイズ調整 */
        font-size: clamp(60px, 18vw, 200px) !important;
        white-space: nowrap;
    }

    .hero-title h1 {
        font-size: clamp(48px, 15vw, 120px);
    }
    
    /* Stagger Sections (Front Page) - 1カラム化しつつ重なりを維持 */
    .stagger-section {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        background-color: var(--bg);
        position: relative;
        z-index: 2; /* Hero/Aboutの上に重なる */
    }
    
    .sticky-column {
        position: relative;
        height: auto;
        padding: 80px 24px 40px;
        border-right: none !important;
        border-left: none !important;
        width: 100%;
        order: 1;
    }
    
    .scroll-column {
        padding: 0 24px 100px;
        gap: 40px;
        width: 100%;
        order: 2;
    }

    /* Staggered Rhythm (Alternating Order) */
    .stagger-section.reverse .sticky-column { order: 1; }
    .stagger-section.reverse .scroll-column { order: 2; }

    .section-num { font-size: 80px; }
    .section-title { font-size: clamp(32px, 8vw, 48px); }

    /* Gallery Grid Fix */
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
        gap: 16px;
    }

    /* Footer - スタッキングの最後に現れるよう調整 */
    .footer {
        position: relative;
        z-index: 10;
        flex-direction: column;
        padding: 60px 24px;
        text-align: center;
    }
    .footer-copy { text-align: center; }

    /* Blog Post Specifics (single.php) */
    .blog-container { 
        grid-template-columns: 1fr; 
        padding: 0 24px;
        margin: 40px auto;
    }
    .section-content { 
        grid-template-columns: 1fr !important; 
        display: flex;
        flex-direction: column;
    }
}

/* 480px以下の極小画面向け微調整 */
@media (max-width: 480px) {
    .hero-title h1 { font-size: 56px; }
    .section-num { font-size: 64px; }
    .section-title { font-size: 28px; }
    .sticky-column, .scroll-column, .about-inner, .contact-section, .footer {
        padding-left: 20px;
        padding-right: 20px;
    }
}/* Ad Unit Protection */
.post-ad-unit {
    max-width: 100%;
    overflow: hidden;
    margin: 60px auto;
    text-align: center;
    clear: both;
}

.post-ad-unit ins, 
.post-ad-unit iframe, 
.post-ad-unit img,
.post-ad-unit script + * {
    max-width: 100% !important;
    height: auto !important;
    display: inline-block;
}

/* Ensure blog container doesn't overflow on small screens */
.blog-container {
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
}
