/*
Theme Name: iimono-log
Author: minimoo
Description: 画像メインのミニマルな1カラムテーマ。
Version: 1.0
*/

/* --- 0. Base Style --- */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
    background: #f9f9f9;
}

p {
    margin: 0;
}

.entry-note .wp-block-image {
    display: none;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- 1. Header --- */
.site-header {
    padding: 40px 0;
}

.site-header .container {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* 右端に揃える */
}

.site-header h1 a::before,
.site-header .site-logo a::before {
    content: "🏝️";
    margin-right: 0.1em;
}

.site-header h1,
.site-header .site-logo {
    margin: 0;
    text-align: right;
}

.site-header h1 a,
.site-header .site-logo a {
    font-family: 'Kantumruy Pro', sans-serif;
    font-weight: 400;
    text-decoration: none;
    color: #ccc; /* サイト名は控えめなグレー */
    font-size: 1.2rem;
    letter-spacing: 0.03em;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.4rem;
}

.site-description {
    margin: 15px 0 0;
    font-size: 0.7rem;
    color: #999;
    letter-spacing: 0.05em;
}

/* --- 2. Index: Post Grid --- */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* スマホ初期値 */
    gap: 10px;
}

/* レスポンシブ列数調整: デフォルトを4列へ */
@media (min-width: 480px) { 
    .post-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    } 
}

@media (min-width: 600px) { 
    .post-grid { 
        grid-template-columns: repeat(4, 1fr); /* 最大4列に固定 */
        gap: 15px;
    } 
}

.post-item a {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #eee;
    border-radius: 2px;
    text-decoration: none;
}

.post-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    /* 修正箇所：初期状態を少し暗くする（0.7 = 70%の明るさ） */
    filter: brightness(0.85); 
    transition: filter 0.2s ease, transform 0.2s ease;
}

.post-no-image {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-sizing: border-box;
    text-align: center;
    background: #ccc;
    color: #de7e44;
    /* 修正箇所：画像なしの場合も同様に暗くする */
    filter: brightness(0.85);
    transition: filter 0.2s ease;
}

.post-no-image span {
    font-size: 0.75rem;
    line-height: 1.4;
    word-break: break-all;
    font-weight: 500;
}

.post-item a:hover .post-image,
.post-item a:hover .post-no-image {
    filter: brightness(1);
    opacity: 1;
}

.post-item a:hover .post-image {
    transform: scale(1.05);
}

/* --- 2.1 Index: Post View Count (Added) --- */
.view-count {
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* JSでこのクラスがついたら表示 */
.view-count.is-visible {
    opacity: 1;
}

.card-view-count {
    position: absolute;
    bottom: 5px;
    left: 5px;
    color: #fff;
    font-size: 0.65rem;
    font-family: 'Supermercado One', sans-serif;
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
    z-index: 10;
    pointer-events: none;
    opacity: 0.8;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.card-view-count i {
    font-size: 0.6rem;
    opacity: 0.8;
}

.post-item a:hover .card-view-count {
    opacity: 0.8;
}

/* --- 3. Index: Date Label --- */
.post-date {
    font-family: 'Supermercado One', sans-serif;
    position: absolute;
    top: 0;
    left: 5px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.8);
    color: #666;
    padding: 5px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
    min-width: 32px;
    border-radius: 0 0 1px 1px;
}

.post-date .year  { font-size: 9px; margin-bottom: 2px; }
.post-date .month { font-size: 10px; }
.post-date .day   { font-size: 18px; color: #444; margin-top: 1px; }

@media (max-width: 480px) {
    .post-date {
        padding: 3px 5px; /* 全体の余白を小さく */
        min-width: 26px;  /* 横幅を少し細く */
        left: 3px;        /* 端との隙間を微調整 */
    }
    
    .post-date .year  { font-size: 8px; margin-bottom: 1px; }
    .post-date .month { font-size: 8px; }
    .post-date .day   { font-size: 14px; margin-top: 1px; } /* 日付の数字を小さく */
}

/* --- 4. Single: Slider --- */
.slider-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    margin-bottom: 30px;
    touch-action: pan-y;
}

.slider-wrapper {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.slider-slide {
    flex: 0 0 100%;
}

.slider-slide img {
    width: 100%;
    height: auto;
    display: block;
    border: 3px solid #fff;
    border-radius: 2px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.slider-slide img {
    pointer-events: none;
    user-select: none;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    font-size: 20px;
    cursor: pointer;
    padding: 15px 10px;
    z-index: 10;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.slider-btn:hover { opacity: 1; }
.slider-btn.prev { left: 0; }
.slider-btn.next { right: 0; }

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 15px 0 30px; /* 画像の下に余白を作る */
}

.slider-dots .dot {
    width: 6px;
    height: 6px;
    background: #ddd; /* デフォルトは薄いグレー */
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dots .dot.active {
    background: #999; /* アクティブ時は少し濃く */
    transform: scale(1.3);
}

/* 念のため、note内の画像が残らないよう強制的に非表示 */
.entry-note img {
    display: none !important;
}

/* --- 5. Single: Specimen Label Table --- */
.entry-title {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.specimen-label {
    width: 100%;
    border-collapse: collapse;
    margin: 40px 0 20px;
    border-top: 1px solid #eee;
}

.specimen-label th,
.specimen-label td {
    padding: 15px 10px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
    text-align: left;
}

.specimen-label th {
    font-family: 'Supermercado One', sans-serif;
    font-weight: normal;
    color: #999;
    font-size: 0.8rem;
    width: 80px;
    text-transform: lowercase;
}

.specimen-label td {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
}

.specimen-label td.entry-date {
    font-family: 'Supermercado One', sans-serif;
    letter-spacing: 0.08em;
    color: #666;
}

.specimen-label td.entry-tags a {
    font-size: 0.8rem;
    color: #bbb;
    text-decoration: none;
    margin-right: 12px;
}

.specimen-label td.entry-tags a:before { content: "#"; }

.entry-note {
    line-height: 1.8;
    color: #444;
}

.entry-note p {
    font-size: 0.8rem;
}

.entry-note img { display: none; } /* スライダーで表示済みの画像は隠す */

/* --- 6. Footer --- */
.site-footer {
    text-align: center;
    padding: 50px 0;
    font-size: 0.8rem;
    color: #999;
}

.footer-pages {
    margin: 0 0 30px;
}

.footer-pages ul {
    list-style: none;
    margin: 0;
    padding: 0;

    display: flex;
    justify-content: center;
    gap: 1.5em;
}

.footer-pages li {
    margin: 0;
    padding: 0;
    position: relative;
}

.footer-pages li::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f0da";
    margin-right: 0.5em;
    color: #ccc;
}

.footer-pages a {
    text-decoration: none;
    color: #666;
}

.footer-pages a:hover {
    text-decoration: underline;
    color: #999;
}

@media (max-width: 768px) {
    .footer-pages ul {
        flex-direction: column;
        align-items: center;
        gap: 1.5em;
    }
}


/* アーカイブページ（タグ絞り込み時）の見出し */
.archive-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
}

.archive-title {
    font-family: 'Supermercado One', sans-serif;
    font-size: 0.8rem;
    color: #555;
    font-weight: normal;
    margin: 0;
    letter-spacing: 0.05em;
}

/* 「tag」という文字だけ少し薄く小さく */
.archive-title span {
    color: #bbb;
    margin-right: 8px;
    text-transform: lowercase;
}

.tag-meta {
    font-size: 0.75rem;
    color: #888;
    margin-top: 10px;
    line-height: 1.5;
}

.purchase-links {
    margin-top: 1rem;
    border-radius: 2px;
    font-size: 0.8rem;
    color: #888;
    border-top: 1px dotted #ccc;
    padding: 1rem 0.5rem 0;
}

/* カートアイコン */
.purchase-links i {
    font-size: 0.8rem;
    color: #ccc;
}

/* PRラベル */
.purchase-links .pr-label {
    font-size: 0.75rem;
    color: #999;
    margin-right: 10px;
}

/* リンクのデザイン */
.purchase-links a {
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
}

.purchase-links a:hover {
    color: #de7e44;
}

/* 区切り線のスラッシュ */
.purchase-links .sep {
    margin: 0 8px;
    color: #eee;
}

/* テンプレートパーツ：記事遷移ナビ */
.post-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 30px 0; /* 少し上下の余白を広げると見やすくなります */
    font-family: 'Supermercado One', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.post-navigation a {
    text-decoration: none;
    color: #bbb;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    transition: color 0.3s ease;
}

.post-navigation a:hover {
    color: #666;
}

.nav-next, .nav-home, .nav-prev {
    flex: 1;
}

.nav-next {
    text-align: left;
}

.nav-home {
    text-align: center;
    font-size: 1rem;
}

.nav-prev {
    text-align: right;
}

.nav-next i {
    margin-right: 5px;
}

.nav-prev i {
    margin-left: 5px;
}

/* アクセスカウント */
.view-count {
    padding: 0.3rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #a0a0a0;
    font-size: 0.8rem;
    font-family: 'Supermercado One', sans-serif; 
}

.view-icon {
    font-size: 0.7rem;
    opacity: 0.8;
}

/* ページネーション */
.pagination {
    margin: 40px 0 10px;
}

/* <ul>リストの設定 */
.pagination ul {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 10px;
}

/* <li>内の <a> と <span> 共通のデザイン */
.pagination ul li a,
.pagination ul li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 33px;
    height: 33px;
    text-decoration: none;
    font-size: 0.8rem;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: #999;
    border: 1px solid #eee;
    border-radius: 50%;
    transition: all 0.3s ease;
}

/* ホバー時（未訪問のページ） */
.pagination ul li a:hover {
    border-color: #de7e44;
    color: #666;
    background-color: #fcfcfc;
}

/* 現在のページのハイライト（span.current） */
.pagination ul li span.current {
    background-color: #de7e44;
    border-color: #de7e44;
    color: #fff;
    font-weight: bold;
}

/* PREV / NEXT ボタンの調整 */
.pagination ul li .prev,
.pagination ul li .next {
    width: auto;
    padding: 0 15px;
    border-radius: 20px;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}

/* PREV / NEXT 内のアイコン位置微調整 */
.pagination ul li .prev i { margin-right: 5px; }
.pagination ul li .next i { margin-left: 5px; }

/* 点々（...）の装飾 */
.pagination ul li .dots {
    border: none;
    background: transparent;
    color: #ccc;
}

/* 固定ページ */
.page-content {
    text-align: center;
    color: #444;
}

.page-content p {
    line-height: 1.9;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.page-title {
    font-size: 1.3rem;
}

.page-content h2 {
    font-size: 1.1rem;
    margin-top: 2rem;
}

/* お問い合わせフォーム */
.wpcf7 form {
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
}

.wpcf7 input,
.wpcf7 textarea {
  width: 100%;
  padding: 0.6em;
  font-size: 1rem;
  box-sizing: border-box;
}

.wpcf7-submit {
  width: auto;
  padding: 0.6em 1.2em;
}
