/* 改善版: ゴルフページ用動的ニュース読み込みスタイル - FOUC対策版 */

/* 📍 改善ポイント1: 基本的な表示制御 */
.golf-page #announce .announce-list {
    transition: opacity 0.3s ease;
    min-height: 20px; /* 最小限の高さでレイアウトシフト防止 */
}

/* 📍 改善ポイント2: スムーズなアニメーション */
.golf-page .announcement-item-link {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInGolfNews 0.5s ease forwards;
}

.golf-page .announcement-item-link:nth-child(1) { animation-delay: 0.0s; }
.golf-page .announcement-item-link:nth-child(2) { animation-delay: 0.1s; }
.golf-page .announcement-item-link:nth-child(3) { animation-delay: 0.2s; }
.golf-page .announcement-item-link:nth-child(4) { animation-delay: 0.3s; }

@keyframes fadeInGolfNews {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 📍 改善ポイント3: ゴルフカテゴリー専用スタイル */
.golf-page .announce-item-category p[data-category="tournament"] {
    color: #f57c00;
    font-weight: 500;
}

.golf-page .announce-item-category p[data-category="course"] {
    color: #388e3c;
    font-weight: 500;
}

.golf-page .announce-item-category p[data-category="lesson"] {
    color: #1976d2;
    font-weight: 500;
}

.golf-page .announce-item-category p[data-category="event"] {
    color: #c2185b;
    font-weight: 500;
}

.golf-page .announce-item-category p[data-category="maintenance"] {
    color: #f9a825;
    font-weight: 500;
}

.golf-page .announce-item-category p[data-category="promotion"] {
    color: #7b1fa2;
    font-weight: 500;
}

.golf-page .announce-item-category p[data-category="information"] {
    color: #388e3c;
    font-weight: 500;
}

/* 📍 改善ポイント4: 記事がない場合のスタイル */
.golf-page .no-announcements {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.golf-page .no-announcements::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: golfShimmerEffect 2s infinite;
}

@keyframes golfShimmerEffect {
    0% { left: -100%; }
    100% { left: 100%; }
}

.golf-page .no-announcements p {
    margin: 0;
    font-style: italic;
    color: #6c757d;
    font-size: 16px;
    z-index: 1;
    position: relative;
}

/* 📍 改善ポイント5: ゴルフページ専用ホバー効果 */
.golf-page .announcement-item-link {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.golf-page .announcement-item-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 📍 改善ポイント6: レスポンシブ対応 */
@media screen and (max-width: 768px) {
    .golf-page .no-announcements {
        min-height: 100px;
        padding: 30px 15px;
    }
    
    .golf-page .no-announcements p {
        font-size: 14px;
    }
    
    .golf-page .announcement-item-link {
        animation-duration: 0.3s;
    }
}

@media screen and (max-width: 480px) {
    .golf-page .no-announcements {
        min-height: 80px;
        padding: 20px 10px;
    }
    
    .golf-page .no-announcements p {
        font-size: 13px;
    }
}

/* 📍 改善ポイント7: プリファレンス対応 */
@media (prefers-reduced-motion: reduce) {
    .golf-page .announcement-item-link {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .golf-page .no-announcements::before {
        animation: none;
    }
    
    .golf-page .announcement-item-link:hover {
        transform: none;
    }
}

/* 📍 改善ポイント8: ダークモード対応 */
@media (prefers-color-scheme: dark) {
    .golf-page .no-announcements {
        background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
        border-color: #444;
    }
    
    .golf-page .no-announcements p {
        color: #ccc;
    }
    
    .golf-page .announcement-item-link:hover {
        box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
    }
}