/* --- パンフレット一覧ページ --- */

.pamphlet-grid {
    display: grid;
    /* モバイルファースト: 最初は1列、画面幅に応じて列数を増やす */
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 32px;
    padding: 0 0 60px;
    /* max-width: 1200px; */
    margin: 0 auto;
}

/* PC画面（1024px以上）ではきれいに4列にする */
@media screen and (min-width: 1024px) {
    .pamphlet-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* カード本体 */
.pamphlet-card {
    background-color: var(--white);
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%; /* 高さを揃える */
}

.pamphlet-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

/* 画像エリア */
.pamphlet-img-container {
    position: relative;
    width: 100%;
    aspect-ratio: 210 / 297; /* A4比率を維持 */
    background-color: var(--light-gray);
    overflow: hidden;
    cursor: pointer;
}

.pamphlet-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.pamphlet-card:hover .pamphlet-img-container img {
    transform: scale(1.05);
}

/* 拡大アイコン */
.modal-indicator {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 32px;
}

@media (hover: hover) {
    .pamphlet-img-container:hover .modal-indicator {
        opacity: 1;
    }
}
@media (hover: none) {
    .modal-indicator {
        inset: auto;
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        background: rgba(0,0,0,0.6);
        border-radius: 50%;
        font-size: 18px;
        opacity: 1;
    }
}

/* コンテンツエリア */
.pamphlet-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.pamphlet-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color-dark);
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.pamphlet-card-description {
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
}

.pamphlet-card-footer {
    padding: 0 20px 24px;
    text-align: center;
}

/* ダウンロードボタン */
.pamphlet-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    /* パディングを調整し、ボックスサイズを明示 */
    padding: 10px 4px; 
    box-sizing: border-box; /* ★重要: パディングを含めた幅計算 */
    background-color: var(--white);
    color: #d93025; /* PDFレッド */
    border: 1px solid #d93025;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px; 
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    white-space: nowrap; /* 折り返し禁止 */
}

.pamphlet-download-btn:hover {
    background-color: #d93025;
    color: var(--white);
    box-shadow: 0 4px 8px rgba(217, 48, 37, 0.3);
}

/* スケルトンローダー（読み込み中のグレーの箱） */
.skeleton-card { pointer-events: none; }
.skeleton-img { width: 100%; aspect-ratio: 210/297; background: #eee; }
.skeleton-content { padding: 20px; }
.skeleton-title { width: 70%; height: 24px; background: #eee; margin-bottom: 15px; border-radius: 4px; }
.skeleton-text { width: 100%; height: 60px; background: #eee; margin-bottom: 15px; border-radius: 4px; }
.skeleton-btn { width: 100%; height: 45px; background: #eee; border-radius: 6px; }

/* アニメーション */
.skeleton-img, .skeleton-title, .skeleton-text, .skeleton-btn {
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 0.8; }
    100% { opacity: 0.6; }
}

/* モーダル微調整 */
.image-modal {
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    transition: opacity 0.3s, visibility 0.3s;
}
.modal-container {
    background: transparent;
    box-shadow: none;
    max-width: 90vw;
}
.modal-content img {
    max-height: 85vh;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.close-modal-btn {
    top: -50px;
    right: 0;
    color: #fff;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
}
.sticker-notice {
    font-size: 10px;
    color: var(--text-color-dark);
    margin-top: 8px;
}