@charset "utf-8";
/* CSS Document */
/*==========================================================
                  ブログ用
==========================================================*/
@media (prefers-color-scheme: dark) {
    body { background: #1e1e1e; color: #ddd; }
    .card { background: #2c2c2c; }
}

@media (prefers-color-scheme: dark) { h1, h2 { color: #4da6ff; } }
#page-blog-article h2{
  font-size: 1.6rem;
  border-top: 2px solid;
  border-bottom: 2px solid;
  text-align: left;
  padding: 16px;
  margin: 56px auto 32px;
}
#page-blog-article h3{
  font-size: 1.6rem;
  font-weight: bold;
}
#page-blog-article h2::before,
#page-blog-article h3::before{
  content: none;
}
#page-blog-article .card h2:first-child,
#page-blog-admin .card h2:first-child{
  margin: 16px auto 32px;
}
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.2s;
}
.card:hover { transform: translateY(-5px); }

.thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    display: block;
    margin-bottom: 10px;
}

main img {
    max-width: 100%;
    height: auto;
    margin: 10px 0;
    border-radius: 8px;
}

form input, form textarea, form select {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}
@media (prefers-color-scheme: dark) { form input, form textarea, form select { background: #333; color: #ddd; border-color: #555; } }

button {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

.sidebar { float: right; width: 30%; padding: 20px; background: #fff; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
@media (max-width: 768px) { .sidebar { float: none; width: 100%; } }
@media (prefers-color-scheme: dark) { .sidebar { background: #2c2c2c; } }
.sidebar h2{
  font-size: 1.6rem;
  text-align: left;
  margin: 48px auto 16px;
}
.sidebar h2::before{
  content: none;
}
.sidebar h2:first-child{
  margin-top: 8px;
}

.main-content { width: 65%; }
@media (max-width: 768px) { .main-content { width: 100%; } }
.main-content h2{
  font-size: 1.8rem;
  text-align: left;
  margin: 32px auto 16px;
}
.main-content h2::before{
  content: none;
}
.main-content h2 a{
  text-decoration: none;
}

.pagination a { margin: 0 5px; padding: 5px 10px; background: #eee; border-radius: 4px; text-decoration: none; color: #333; }
.pagination a.active { background: #007bff; color: white; }
.pagination a:hover { background: #0056b3 !important; color: white !important; }

.pagination {
    text-align: center;
    margin: 30px 0;
}
.pagination a {
    margin: 0 5px;
    padding: 8px 12px;
    background: #eee;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
}
.pagination a:hover {
    background: #ddd;
}
.pagination a.active {
    background: #007bff;
    color: white;
}

/* アーカイブのアコーディオン全体 */
.toggle::after {
    content: ' ▼';
    float: right;
    transition: transform 0.3s;
}
.months.open + .toggle::after {  /* 順序が逆の場合調整 */
    transform: rotate(180deg);
}
.archive-list.accordion {
    list-style: none;
    padding: 0;
    margin: 0;
}

.archive-list.accordion li.year {
    margin-bottom: 5px;
}

/* アコーディオン用三角アイコン */
.archive-list .toggle {
    display: block;
    padding: 10px;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    position: relative;  /* 三角の位置を調整するため */
    transition: background 0.3s;
}

.archive-list .toggle:hover {
    background: #e0e0e0;
}

/* 三角アイコン（::afterで追加） */
.archive-list .toggle::after {
    content: ' ▼';  /* 閉じているとき下向き */
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;  /* ぬるっと回転 */
}

/* 開いたとき（.months が open なら、その親 li.year 内の toggle を対象に） */
.archive-list li.year:has(.months.open) .toggle::after {
    transform: translateY(-50%) rotate(180deg);  /* 上向きに180度回転 */
}

/* 月リスト（ぬるっと開閉はそのまま） */
.archive-list .months {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out;
    padding: 0;
    background: #fafafa;
}

.archive-list .months.open {
    max-height: 1000px;  /* 十分大きな値 */
    padding: 10px 0;
}

#page-content .sidebar .year{
  padding-left: 0;
}
#page-content .sidebar .year::before{
  content: none;
}
#page-content .sidebar .months li{
  padding-left: 24px;
}
#page-content .sidebar .months li::before{
  content: none;
}
#page-content .sidebar .months li:last-child{
  margin-bottom: 8px;
}
#page-blog-article h1{
  font-size: 2.4rem;
  overflow-wrap: anywhere;
}
#page-blog-article #headertitle span{
  display: none;
}
@media (max-width: 768px) {
#page-blog-article h1{
  font-size: 1.6rem;
  line-height: 1.6;
  text-align: left;
}
}
code { background: #f8f8f8; padding: 2px 4px; border-radius: 3px; }
