/* =====================================
   林野庁 公共建築物等木材利用事例集 - 美化CSS
   ===================================== */

/* 林野庁PDFカード全体 */
.project-card[style*="border: 2px solid #87a96b"] {
    position: relative;
    overflow: visible;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card[style*="border: 2px solid #87a96b"]:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 45px rgba(135, 169, 107, 0.25) !important;
    border-color: #6a8554 !important;
}

/* 画像ホバーエフェクト */
.project-card[style*="border: 2px solid #87a96b"] .project-photo {
    transition: transform 0.5s ease, filter 0.4s ease;
}

.project-card[style*="border: 2px solid #87a96b"]:hover .project-photo {
    transform: scale(1.05);
    filter: brightness(1.05);
}

/* 林野庁バッジのアニメーション */
.project-card[style*="border: 2px solid #87a96b"] div[style*="position: absolute"][style*="left: 1rem"] {
    animation: gentlePulse 3s infinite;
}

@keyframes gentlePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(135, 169, 107, 0.7);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 0 0 8px rgba(135, 169, 107, 0);
    }
}

/* タイトルのアニメーション */
.project-card[style*="border: 2px solid #87a96b"] h3 {
    transition: color 0.3s ease;
}

.project-card[style*="border: 2px solid #87a96b"]:hover h3 {
    color: #1a3009 !important;
}

/* 事例集を開くボタンのエンハンス */
.project-card[style*="border: 2px solid #87a96b"] .gallery-badge {
    position: relative;
    display: inline-block;
    overflow: hidden;
    transition: all 0.3s ease;
}

.project-card[style*="border: 2px solid #87a96b"] .gallery-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.project-card[style*="border: 2px solid #87a96b"]:hover .gallery-badge {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(135, 169, 107, 0.4) !important;
}

.project-card[style*="border: 2px solid #87a96b"]:hover .gallery-badge::before {
    left: 100%;
}

/* 林野庁バッジのホバーエフェクト */
.project-card[style*="border: 2px solid #87a96b"] a[style*="border: 2px solid #87a96b"] {
    position: relative;
    overflow: hidden;
}

.project-card[style*="border: 2px solid #87a96b"] a[style*="border: 2px solid #87a96b"]:hover {
    background: linear-gradient(135deg, #87a96b 0%, #6a8554 100%) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(135, 169, 107, 0.3) !important;
}

/* アイコンのアニメーション */
.project-card[style*="border: 2px solid #87a96b"]:hover .fa-university {
    animation: buildingShake 0.6s ease;
}

@keyframes buildingShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

.project-card[style*="border: 2px solid #87a96b"]:hover .fa-landmark {
    animation: landmarkRotate 0.6s ease;
}

@keyframes landmarkRotate {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(10deg); }
}

.project-card[style*="border: 2px solid #87a96b"]:hover .fa-check-circle {
    animation: checkBounce 0.5s ease;
}

@keyframes checkBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* フィーチャーリストのスタイルエンハンス */
.project-card[style*="border: 2px solid #87a96b"] ul.project-features li {
    transition: all 0.3s ease;
}

.project-card[style*="border: 2px solid #87a96b"]:hover ul.project-features li {
    transform: translateX(5px);
}

/* 発行元セクションの背景アニメーション */
.project-card[style*="border: 2px solid #87a96b"] > a > div[style*="project-content"] > div[style*="margin-top: 1.5rem"] {
    transition: background 0.4s ease;
}

.project-card[style*="border: 2px solid #87a96b"]:hover > a > div[style*="project-content"] > div[style*="margin-top: 1.5rem"] {
    background: linear-gradient(135deg, #e8f5e0 0%, #ffffff 100%) !important;
}

/* カテゴリバッジの特別エフェクト */
.project-card[style*="border: 2px solid #87a96b"] .project-category {
    transition: all 0.3s ease;
}

.project-card[style*="border: 2px solid #87a96b"]:hover .project-category {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .project-card[style*="border: 2px solid #87a96b"]:hover {
        transform: translateY(-4px);
    }
}

/* アクセシビリティ: フォーカス時のスタイル */
.project-card[style*="border: 2px solid #87a96b"] a:focus {
    outline: 3px solid #87a96b;
    outline-offset: 4px;
}

/* プリント時の最適化 */
@media print {
    .project-card[style*="border: 2px solid #87a96b"] {
        box-shadow: none !important;
        border: 2px solid #87a96b !important;
    }
}
