/* Portable Blog System - Modern Theme (Enhanced) */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&display=swap');

html {
    scroll-behavior: smooth; /* 3. Smooth Scroll */
}

body {
    font-family: 'Noto Sans JP', "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #f8f9fa;
}

a {
    text-decoration: none;
    color: #0d6efd;
    transition: color 0.2s ease;
}
a:hover {
    color: #0a58ca;
}

/* 2. Reading Progress Bar */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: #0d6efd;
    width: 0%;
    z-index: 9999;
    transition: width 0.1s;
}

/* Header */
.blog-header {
    border-bottom: 1px solid #eaeaea;
    background-color: #fff;
    padding: 1rem 0;
    position: relative;
    z-index: 1000;
}
.blog-header-logo {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 700;
}

/* Hero Section */
.hero-section {
    position: relative;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
    color: #fff;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.6));
    z-index: 0;
}
.hero-content {
    position: relative;
    z-index: 1;
}
.text-shadow {
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Cards (Post Grid) */
.card-post {
    border: none;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    height: 100%;
}
.card-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.card-post .card-body {
    padding: 1.5rem;
}
.card-post h3 {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

/* Sidebar Widgets */
.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.sidebar-widget h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.5rem;
    color: #555;
}

/* Post Detail */
.blog-post {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
.blog-post-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.blog-post-meta {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    cursor: zoom-in; /* Indicate clickable */
    transition: transform 0.2s;
}
.post-content img:hover {
    opacity: 0.95;
}
.post-content h2 {
    margin-top: 2rem;
    border-left: 5px solid #0d6efd;
    padding-left: 1rem;
    font-size: 1.5rem;
}

/* 1. Lightbox Overlay */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    cursor: zoom-out;
    backdrop-filter: blur(5px);
}
.lightbox-overlay.active {
    display: flex;
    animation: fadeIn 0.3s;
}
.lightbox-img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoomIn { from { transform: scale(0.9); } to { transform: scale(1); } }

/* 4. Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
}
.toast {
    background-color: #333;
    color: #fff;
    border-radius: 8px;
    padding: 12px 20px;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    animation: slideInRight 0.3s, fadeOut 0.3s 2.7s forwards;
    min-width: 250px;
}
.toast i {
    font-size: 1.2rem;
    margin-right: 10px;
    color: #2ecc71;
}
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }

/* Footer */
.blog-footer {
    padding: 2rem 0;
    color: #727272;
    text-align: center;
    background-color: transparent;
    border-top: 1px solid rgba(0,0,0,0.1);
    margin-top: 3rem;
}