/**
 * TOPページ カルーセルセクション スタイル
 */

/* セクション共通 */
.sugo-carousel-section {
    background: #fff;
    margin-bottom: 16px;
}

.sugo-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
}

.sugo-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sugo-section-title::before {
    content: '';
    width: 4px;
    height: 18px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    border-radius: 2px;
}

.sugo-section-more {
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.sugo-section-more:hover {
    color: #8b5cf6;
}

.sugo-section-more::after {
    content: '>';
    font-size: 14px;
}

/* カルーセルコンテナ */
.sugo-carousel-container {
    position: relative;
    overflow: hidden;
}

.sugo-carousel-track {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
}

.sugo-carousel-track::-webkit-scrollbar {
    display: none;
}

/* 自動スクロール */
.sugo-carousel-track.auto-scroll {
    animation: carousel-scroll var(--scroll-duration, 30s) linear infinite;
}

.sugo-carousel-track.auto-scroll:hover {
    animation-play-state: paused;
}

@keyframes carousel-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 6px)); }
}

/* 無限ループ用 */
.sugo-carousel-track.infinite {
    width: max-content;
}

/* =================================
   呟きカード
================================= */
.tweet-card {
    flex: 0 0 280px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
    scroll-snap-align: start;
    transition: transform 0.2s, box-shadow 0.2s;
}

.tweet-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tweet-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.tweet-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
}

.tweet-user-info {
    flex: 1;
    min-width: 0;
}

.tweet-user-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.tweet-user-name a {
    color: inherit;
    text-decoration: none;
}

.tweet-user-name a:hover {
    color: #8b5cf6;
}

.tweet-time {
    font-size: 12px;
    color: #9ca3af;
}

.tweet-content {
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =================================
   ライバーカード
================================= */
.profile-card {
    flex: 0 0 100px;
    text-align: center;
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
}

.profile-card:hover .profile-avatar {
    transform: scale(1.1);
    border-color: #8b5cf6;
}

.profile-avatar-wrap {
    position: relative;
    margin-bottom: 8px;
}

.profile-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e5e7eb;
    transition: transform 0.2s, border-color 0.2s;
    margin: 0 auto;
    display: block;
}

.profile-badge {
    position: absolute;
    bottom: 0;
    right: 10px;
    font-size: 16px;
}

.profile-name {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
    margin: 0 auto;
}

.profile-rank {
    font-size: 10px;
    color: #9ca3af;
    margin-top: 2px;
}

/* =================================
   カテゴリ記事カード
================================= */
.article-carousel-card {
    flex: 0 0 200px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.article-carousel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.article-carousel-thumb {
    aspect-ratio: 16/10;
    background: #f3f4f6;
    overflow: hidden;
}

.article-carousel-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-carousel-card:hover .article-carousel-thumb img {
    transform: scale(1.05);
}

.article-carousel-body {
    padding: 12px;
}

.article-carousel-cat {
    font-size: 10px;
    color: #8b5cf6;
    font-weight: 600;
    margin-bottom: 4px;
}

.article-carousel-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: #111827;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 6px;
}

.article-carousel-meta {
    font-size: 11px;
    color: #9ca3af;
}

/* =================================
   イベントカード
================================= */
.event-carousel-card {
    flex: 0 0 200px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.event-carousel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.event-carousel-thumb {
    position: relative;
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    overflow: hidden;
}

.event-carousel-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.event-carousel-card:hover .event-carousel-thumb img {
    transform: scale(1.05);
}

.event-carousel-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
}

.event-status {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
}

.event-status-upcoming {
    background: #fbbf24;
    color: #78350f;
}

.event-status-active {
    background: #10b981;
    color: #fff;
}

.event-status-ended {
    background: #6b7280;
    color: #fff;
}

.event-carousel-body {
    padding: 12px;
}

.event-carousel-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: #111827;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 6px;
}

.event-carousel-date {
    font-size: 11px;
    color: #9ca3af;
}

/* =================================
   レスポンシブ
================================= */
@media (max-width: 480px) {
    .tweet-card {
        flex: 0 0 250px;
    }
    
    .profile-card {
        flex: 0 0 80px;
    }
    
    .profile-avatar {
        width: 56px;
        height: 56px;
    }
    
    .article-carousel-card {
        flex: 0 0 160px;
    }
    
    .event-carousel-card {
        flex: 0 0 160px;
    }
}