/* News Section Styles */
/* Version: 1.0.0 - Created: 2025-01-23 - News section styles extracted from main CSS */

.news {
    padding: 4rem 0;
}

.news-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--border-color);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 色が適用されたフィルタボタン */
.filter-btn.filter-colored.active,
.filter-btn.filter-colored:hover {
    background: var(--filter-accent-color, var(--primary-color));
    color: white;
    border-color: var(--filter-accent-color, var(--primary-color));
}

.filter-btn.filter-colored {
    border-color: var(--filter-accent-color, var(--border-color));
    color: var(--filter-accent-color, var(--text-color));
}

.news-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.5rem !important;
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    opacity: 1 !important;
    visibility: visible !important;
}

.news-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transition: var(--transition);
    border: 1px solid rgba(255, 107, 107, 0.1);
    height: 240px !important;
    max-height: 240px !important;
    min-height: 240px !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative;
    overflow: hidden !important;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box !important;
    margin-bottom: 0;
    opacity: 1 !important;
    visibility: visible !important;
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6b6b, #ff8a80, #ff6b6b);
    border-radius: 15px 15px 0 0;
    transition: background 0.3s ease;
}

/* 色が適用されたカードのアクセントカラー */
.news-card.card-colored::before {
    background: linear-gradient(90deg, var(--card-accent-color), var(--card-accent-color-light), var(--card-accent-color));
}

.news-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 30px rgba(255, 107, 107, 0.15);
    border-color: var(--primary-color);
}

/* 色が適用されたカードのホバー効果 */
.news-card.card-colored:hover {
    box-shadow: 0 12px 30px var(--card-accent-color-shadow, rgba(255, 107, 107, 0.15));
    border-color: var(--card-accent-color, var(--primary-color));
}

.news-card:hover::before {
    background: linear-gradient(90deg, #ff5252, #ff6b6b, #ff8a80, #ff6b6b, #ff5252);
    background-size: 200% 100%;
    animation: gradientSlide 2s ease infinite;
}

/* 色が適用されたカードのホバー時グラデーション */
.news-card.card-colored:hover::before {
    background: linear-gradient(90deg, var(--card-accent-color), var(--card-accent-color-light), var(--card-accent-color));
    background-size: 200% 100%;
    animation: gradientSlide 2s ease infinite;
}

.news-card:hover .news-title {
    color: var(--primary-color);
    transition: color 0.3s ease;
}

/* 色が適用されたカードのタイトル色変更 */
.news-card.card-colored:hover .news-title {
    color: var(--card-accent-color, var(--primary-color));
    transition: color 0.3s ease;
}

.news-date {
    color: var(--primary-color);
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
    font-weight: 600;
    display: inline-block;
    background: rgba(255, 107, 107, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 107, 107, 0.2);
    transition: all 0.3s ease;
}

/* 色が適用されたカードの日付スタイル */
.news-card.card-colored .news-date {
    color: white;
    background: var(--card-accent-color, var(--primary-color));
    border-color: var(--card-accent-color, var(--primary-color));
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.news-title {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--text-color);
    min-height: 3.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    font-weight: 700;
    text-shadow: none !important;
}

.news-body {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    line-height: 1.5 !important;
    font-size: 1rem !important;
    flex: 1;
    position: relative;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    max-height: 3rem !important;
    min-height: 3rem !important;
    white-space: normal !important;
    text-overflow: ellipsis !important;
}

/* ニュースボディ内のすべての要素を絶対的に制御 */
.news-body * {
    display: inline !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    font-size: inherit !important;
    line-height: inherit !important;
    color: inherit !important;
    text-decoration: none !important;
    float: none !important;
    clear: none !important;
}

/* 絶対に表示しない要素 */
.news-body iframe,
.news-body video,
.news-body audio,
.news-body embed,
.news-body object,
.news-body canvas,
.news-body svg,
.news-body img,
.news-body picture {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    top: -99999px !important;
    left: -99999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

.news-expand-btn {
    display: none !important;
    visibility: hidden !important;
}

.news-tags {
    display: flex !important;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative;
    z-index: 1;
}

.tag {
    /* 背景色はHTMLのstyle属性で指定されるため、ここでは削除 */
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-block !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(78, 205, 196, 0.4);
}

/* ニュースモーダル */
.news-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.news-modal.active {
    opacity: 1;
    visibility: visible;
}

.news-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.news-modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 107, 107, 0.1);
    position: relative;
}

.news-modal.active .news-modal-content {
    transform: scale(1) translateY(0);
}

.news-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b, #ff8a80, #ff6b6b);
    border-radius: 20px 20px 0 0;
}

.news-modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 2px solid rgba(255, 107, 107, 0.1);
    position: relative;
}

.news-modal-title {
    font-size: 1.8rem;
    color: var(--text-color);
    margin: 0 0 0.5rem 0;
    font-weight: 700;
    line-height: 1.4;
    padding-right: 3rem;
}

.news-modal-date {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(255, 107, 107, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    display: inline-block;
    border: 1px solid rgba(255, 107, 107, 0.2);
}

.news-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.news-modal-close:hover {
    background: rgba(255, 107, 107, 0.1);
    color: var(--primary-color);
    transform: scale(1.1);
}

.news-modal-body {
    padding: 1.5rem 2rem 2rem;
    max-height: 60vh;
    overflow-y: auto;
    line-height: 1.8;
    color: var(--text-color);
    font-size: 1.1rem;
}

/* モーダル内のリッチテキストスタイル */
.news-modal-body p {
    margin-bottom: 1rem;
}

.news-modal-body a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.news-modal-body a:hover {
    color: #ff5252;
    border-bottom-color: #ff5252;
}

.news-modal-body strong,
.news-modal-body b {
    font-weight: 700;
    color: var(--text-color);
}

.news-modal-body ul,
.news-modal-body ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.news-modal-body li {
    margin-bottom: 0.5rem;
}

.news-modal-body h1,
.news-modal-body h2,
.news-modal-body h3,
.news-modal-body h4,
.news-modal-body h5,
.news-modal-body h6 {
    margin: 1.5rem 0 0.5rem;
    color: var(--text-color);
    font-weight: 700;
}

/* 埋め込みコンテンツのスタイル（モーダル内） */
.news-modal-body .embedded-youtube {
    margin: 1.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.news-modal-body .embedded-youtube iframe {
    width: 100%;
    height: 315px;
    border: none;
}

.news-modal-body .embedded-tweet {
    margin: 1.5rem 0;
    text-align: center;
}

/* スクロールバーのカスタマイズ */
.news-modal-body::-webkit-scrollbar {
    width: 8px;
}

.news-modal-body::-webkit-scrollbar-track {
    background: rgba(255, 107, 107, 0.1);
    border-radius: 4px;
}

.news-modal-body::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.news-modal-body::-webkit-scrollbar-thumb:hover {
    background: #ff5252;
}

/* ページネーション */
.news-pagination {
    margin-top: 3rem;
    text-align: center;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.pagination-btn {
    background: var(--primary-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.pagination-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.pagination-numbers {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination-number {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-color);
    padding: 0.6rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    border: 2px solid var(--border-color);
    transition: var(--transition);
    min-width: 40px;
    text-align: center;
}

.pagination-number:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.pagination-current {
    background: var(--primary-color);
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.pagination-dots {
    color: var(--text-light);
    padding: 0.6rem 0.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.pagination-info {
    color: var(--text-light);
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 15px;
    display: inline-block;
}

.news-body.expanded {
    max-height: none !important;
    display: block !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
}

.news-body.expanded::after {
    display: none;
}

/* リッチテキスト表示用スタイル */
.news-body a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.news-body a:hover {
    color: #ff5252;
    border-bottom-color: #ff5252;
}

.news-body strong,
.news-body b {
    font-weight: bold;
    color: var(--text-color);
}

.news-body em,
.news-body i {
    font-style: italic;
}

.news-body u {
    text-decoration: underline;
}

.news-body ul,
.news-body ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.news-body li {
    margin-bottom: 0.5rem;
}

.news-body p {
    margin-bottom: 1rem;
}

.news-body h1,
.news-body h2,
.news-body h3,
.news-body h4,
.news-body h5,
.news-body h6 {
    margin: 1rem 0 0.5rem;
    color: var(--text-color);
}

.news-body font[size="1"] { font-size: 0.8rem; }
.news-body font[size="3"] { font-size: 1rem; }
.news-body font[size="5"] { font-size: 1.2rem; }
.news-body font[size="7"] { font-size: 1.5rem; }

/* 続きを読むボタンを完全に非表示 */
.news-expand-btn {
    display: none !important;
    visibility: hidden !important;
}

/* ニュースカード内では埋め込みコンテンツを非表示（モーダルでのみ表示） */
.news-card .embedded-youtube,
.news-card .embedded-tweet,
.news-card iframe[src*="youtube"],
.news-card iframe[src*="twitter"],
.news-card iframe[src*="x.com"],
.news-card iframe,
.news-card .responsive-embed {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    top: -9999px !important;
    left: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    z-index: -1 !important;
    pointer-events: none !important;
    font-size: 0 !important;
    line-height: 0 !important;
}

/* アニメーション */
@keyframes gradientSlide {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.2rem !important;
    }
}

@media (max-width: 768px) {
    .news-modal-overlay {
        padding: 1rem;
    }
    
    .news-modal-content {
        max-height: 95vh;
        border-radius: 15px;
    }
    
    .news-modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .news-modal-title {
        font-size: 1.6rem;
        padding-right: 2.5rem;
        line-height: 1.4;
    }
    
    .news-modal-close {
        top: 1rem;
        right: 1.5rem;
        font-size: 1.5rem;
        width: 35px;
        height: 35px;
    }
    
    .news-modal-body {
        padding: 1rem 1.5rem 1.5rem;
        max-height: 65vh;
        font-size: 1.1rem;
        line-height: 1.7;
    }
    
    .news-modal-body .embedded-youtube iframe {
        height: 250px;
    }
    
    .news-grid {
        grid-template-columns: 1fr !important;
        gap: 1.2rem !important;
    }
    
    .news-card {
        height: 200px !important;
        max-height: 200px !important;
        min-height: 200px !important;
        padding: 1.5rem 1.2rem;
        margin-bottom: 0.8rem;
        overflow: hidden !important;
    }
    
    .news-title {
        font-size: 1.4rem;
        min-height: 2.8rem;
        line-height: 1.4;
        margin-bottom: 0.8rem;
        text-shadow: none !important;
    }
    
    .news-body {
        font-size: 1.05rem !important;
        max-height: 3.2rem !important;
        min-height: 3.2rem !important;
        line-height: 1.6 !important;
        -webkit-line-clamp: 2 !important;
    }
    
    .news-date {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .news-expand-btn {
        display: none !important;
        visibility: hidden !important;
    }

    .pagination {
        gap: 0.5rem;
    }

    .pagination-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }

    .pagination-number,
    .pagination-current {
        padding: 0.6rem 0.9rem;
        font-size: 0.9rem;
        min-width: 40px;
    }

    .pagination-info {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .news-filters {
        gap: 0.6rem;
    }

    .filter-btn {
        padding: 0.7rem 1.1rem;
        font-size: 0.9rem;
    }

    .news-grid {
        gap: 1rem !important;
    }
    
    .news-card {
        padding: 1.3rem 1rem;
        height: 190px !important;
        max-height: 190px !important;
        min-height: 190px !important;
        overflow: hidden !important;
    }
    
    .news-title {
        font-size: 1.3rem;
        min-height: 2.6rem;
        line-height: 1.4;
        margin-bottom: 0.7rem;
        text-shadow: none !important;
    }
    
    .news-date {
        font-size: 0.85rem;
        padding: 0.3rem 0.6rem;
        margin-bottom: 0.5rem;
    }
    
    .news-body {
        font-size: 1rem !important;
        max-height: 3rem !important;
        min-height: 3rem !important;
        line-height: 1.5 !important;
        -webkit-line-clamp: 2 !important;
    }
    
    .pagination-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .pagination-number,
    .pagination-current {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
        min-width: 38px;
    }

    .pagination-info {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
    
    .news-modal-title {
        font-size: 1.5rem;
        line-height: 1.4;
    }
    
    .news-modal-body {
        font-size: 1.05rem;
        line-height: 1.7;
    }
}

/* 🆕 個別ページが無効なニュースカードのスタイル */
.news-card.non-clickable {
    cursor: default;
    opacity: 0.85;
}

.news-card.non-clickable::before {
    background: linear-gradient(90deg, #94a3b8, #cbd5e1, #94a3b8);
}

.news-card.non-clickable:hover {
    transform: none;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

/* 🆕 詳細ページなしインジケーターのスタイル */
.no-detail-indicator {
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(148, 163, 184, 0.3);
}

.no-detail-indicator small {
    color: #64748b;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.no-detail-indicator i {
    color: #94a3b8;
}

.news-body img,
.modal-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.news-body figure,
.modal-body figure {
    margin: 1rem 0;
    text-align: center;
}

.news-body figcaption,
.modal-body figcaption {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
    font-style: italic;
} 