/**
 * Fan Portal 関連コンテンツスタイル（改善版）
 * 
 * @package Fan_Portal
 * @since 1.0.0
 */

/* ========================================
   関連コンテンツセクション
======================================== */
.fp-next-section {
    margin-top: 50px;
    padding: 0;
    position: relative;
}

/* 区切り線 */
.fp-next-section::before {
    content: '';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #f47920, #ff9547);
    border-radius: 2px;
}

/* ========================================
   メインコンテナ
======================================== */
.fp-next-contents {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    padding: 40px 20px;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   タイトル
======================================== */
.fp-next-title {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin: 0 0 30px;
    position: relative;
}

.fp-next-title .emoji {
    font-size: 24px;
    vertical-align: middle;
    margin-right: 8px;
    display: inline-block;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { 
        transform: scale(1) rotate(0deg); 
    }
    50% { 
        transform: scale(1.2) rotate(5deg); 
    }
}

/* ========================================
   カードグリッド
======================================== */
.fp-next-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   カード本体
======================================== */
.fp-next-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    padding: 20px;
    min-height: 100px;
    text-decoration: none;
    color: #333;
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ホバー効果 */
.fp-next-card:hover {
    transform: translateY(-3px);
    text-decoration: none;
    color: #333;
}

/* 投稿タイプ別のホバー効果 */
.fp-next-card--poll:hover {
    border-color: #3498db;
    box-shadow: 0 10px 25px rgba(52, 152, 219, 0.15);
}

.fp-next-card--quiz:hover {
    border-color: #27ae60;
    box-shadow: 0 10px 25px rgba(39, 174, 96, 0.15);
}

.fp-next-card--shindan:hover {
    border-color: #9b59b6;
    box-shadow: 0 10px 25px rgba(155, 89, 182, 0.15);
}

/* 左側のアクセントライン */
.fp-next-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #ddd;
    transition: all 0.3s;
}

.fp-next-card--poll::before {
    background: linear-gradient(180deg, #3498db, #2980b9);
}

.fp-next-card--quiz::before {
    background: linear-gradient(180deg, #27ae60, #229954);
}

.fp-next-card--shindan::before {
    background: linear-gradient(180deg, #9b59b6, #8e44ad);
}

/* ========================================
   バッジ
======================================== */
.fp-next-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: linear-gradient(135deg, #ff6b6b, #ff8787);
    color: white;
    padding: 4px 12px;
    border-radius: 0 10px 0 10px;
    font-size: 11px;
    font-weight: bold;
    line-height: 1.2;
    text-transform: uppercase;
    z-index: 1;
}

.fp-next-badge--next {
    background: linear-gradient(135deg, #4ecdc4, #44a3aa);
}

.fp-next-badge--hot {
    background: linear-gradient(135deg, #ff6b6b, #ff8787);
}

.fp-next-badge--popular {
    background: linear-gradient(135deg, #ffd43b, #fab005);
}

.fp-next-badge--new {
    background: linear-gradient(135deg, #51cf66, #37b24d);
}

.fp-next-badge--recommend {
    background: linear-gradient(135deg, #74c0fc, #339af0);
}

/* ========================================
   コンテンツタイプ表示
======================================== */
.fp-next-type {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.fp-next-type-icon {
    font-size: 16px;
}

.fp-next-type-label {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

/* タイプ別の色 */
.fp-next-card--poll .fp-next-type {
    color: #3498db;
}

.fp-next-card--quiz .fp-next-type {
    color: #27ae60;
}

.fp-next-card--shindan .fp-next-type {
    color: #9b59b6;
}

/* ========================================
   タイトル
======================================== */
.fp-next-card-title {
    flex: 1;
    font-size: 15px;
    font-weight: bold;
    line-height: 1.4;
    margin: 0 0 auto 0;
    color: #333;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ========================================
   メタ情報
======================================== */
.fp-next-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #eee;
    font-size: 12px;
}

.fp-next-count {
    color: #f47920;
    font-weight: bold;
}

/* 矢印アイコン */
.fp-next-arrow {
    width: 24px;
    height: 24px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 14px;
    color: #666;
}

.fp-next-card:hover .fp-next-arrow {
    background: #f47920;
    color: white;
    transform: translateX(2px);
}

/* ========================================
   モバイル対応
======================================== */
@media (max-width: 600px) {
    .fp-next-section {
        margin-top: 40px;
    }
    
    .fp-next-section::before {
        top: -20px;
    }
    
    .fp-next-contents {
        padding: 30px 15px;
        border-radius: 12px;
    }
    
    .fp-next-title {
        font-size: 18px;
        margin-bottom: 25px;
    }
    
    .fp-next-title .emoji {
        font-size: 20px;
    }
    
    .fp-next-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    
    .fp-next-card {
        padding: 16px;
        min-height: 90px;
    }
    
    .fp-next-card-title {
        font-size: 14px;
    }
}

/* ========================================
   アニメーション
======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fp-next-section {
    animation: fadeInUp 0.6s ease-out;
}

.fp-next-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.fp-next-card:nth-child(1) {
    animation-delay: 0.1s;
}

.fp-next-card:nth-child(2) {
    animation-delay: 0.2s;
}

.fp-next-card:nth-child(3) {
    animation-delay: 0.3s;
}

.fp-next-card:nth-child(4) {
    animation-delay: 0.4s;
}

/* ========================================
   カラフルなホバーエフェクト
======================================== */
.fp-next-card {
    background-image: linear-gradient(135deg, transparent 0%, transparent 100%);
    background-size: 100% 100%;
    background-position: 0 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fp-next-card--poll:hover {
    background-image: linear-gradient(135deg, rgba(52, 152, 219, 0.05) 0%, rgba(52, 152, 219, 0.02) 100%);
}

.fp-next-card--quiz:hover {
    background-image: linear-gradient(135deg, rgba(39, 174, 96, 0.05) 0%, rgba(39, 174, 96, 0.02) 100%);
}

.fp-next-card--shindan:hover {
    background-image: linear-gradient(135deg, rgba(155, 89, 182, 0.05) 0%, rgba(155, 89, 182, 0.02) 100%);
}

/* ========================================
   優先度確保
======================================== */
.fp-next-section * {
    box-sizing: border-box;
}

.fp-next-card,
.fp-next-card:hover,
.fp-next-card:focus {
    outline: none;
    text-decoration: none !important;
}