/**
 * NEWSページ用スタイル
 */

/* WHAT'S UPパネル（右パネル） */
.whats-up-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 20px;
}

.whats-up-item {
    display: flex;
    gap: 12px;
    padding: 4px 0;
    padding-left: 16px;
    transition: opacity 0.2s;
    align-items: flex-start;
}

.whats-up-item:hover {
    opacity: 0.7;
}

.whats-up-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 6px;
    background: #f5f5f5;
}

.whats-up-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.whats-up-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.whats-up-date {
    font-size: 10px;
    color: #ffffff;
}

.whats-up-title {
    font-size: 12px;
    color: #ffffff;
    line-height: 1.5;
    font-weight: 500;
}

.news-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 40px;
    position: relative;
}

/* 装飾用罫線は削除済み */

.news-section .section-title {
    text-align: center;
    margin-top: 0;
    margin-bottom: 40px;
}

.news-section .section-title h2 {
    font-size: 2.75rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 30px;
}

.news-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

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

.news-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    background: #f5f5f5;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-card-image img {
    transform: scale(1.05);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.news-card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-card-source {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 12px;
    color: #666;
}

.source-icon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    background: #f0f0f0;
    color: #333;
}

.source-name {
    font-weight: 500;
    color: #333;
}

.source-time {
    color: #999;
}

.news-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.news-card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s ease;
    font-size: 12px;
    color: #666;
}

.action-btn:hover {
    background: #f5f5f5;
}

.action-icon {
    font-size: 16px;
}

.action-count {
    font-size: 12px;
    font-weight: 500;
}

.trending-badge {
    margin-left: auto;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 4px;
}

.trending-badge::before {
    content: '↑';
    color: #FF6B35;
    font-size: 12px;
}

.no-news {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
}

.news-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    padding: 20px 0;
}

/* NEWSモーダル */
.news-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-modal.active {
    display: flex;
    opacity: 1;
}

.news-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.news-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    max-width: 500px;
    max-height: 85vh;
    width: 80%;
    overflow: hidden;
    z-index: 1001;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: newsModalSlideIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

@keyframes newsModalSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.news-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
    transition: all 0.3s ease;
}

.news-modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.news-modal-image {
    width: 100%;
    padding: 0;
    margin: 0;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.news-modal-image img,
.news-modal-image video {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    display: block;
}

.news-modal-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.6) 50%, transparent 100%);
    padding: 20px 16px 16px 16px;
    z-index: 10;
    text-align: center;
}

.news-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.4;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.news-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.news-modal-header {
    display: none;
}

.news-modal-text {
    font-size: 14px;
    line-height: 1.7;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
    text-align: left;
    padding: 0;
    margin: 0;
}

.news-modal-text p {
    margin: 0 0 16px 0;
}

.news-modal-text p:last-child {
    margin-bottom: 0;
}

.pagination-btn {
    background: #ffffff;
    border: 2px solid #4CAF50;
    color: #4CAF50;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    background: #4CAF50;
    color: #ffffff;
}

.pagination-current {
    background: #4CAF50;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

/* Instagram List (ALBUMスタイル) */
.instagram-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0 10px;
}

.instagram-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.instagram-item:hover {
    background: rgba(131, 58, 180, 0.08);
}

.instagram-icon {
    width: 70px;
    height: 70px;
    min-width: 70px;
    background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 15px rgba(131, 58, 180, 0.3);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.instagram-item:hover .instagram-icon {
    box-shadow: 0 6px 20px rgba(131, 58, 180, 0.5);
    transform: scale(1.05);
}

.instagram-icon svg {
    width: 36px;
    height: 36px;
}

.instagram-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.instagram-name {
    font-size: 14px;
    font-weight: 600;
    color: #999;
}

.instagram-desc {
    font-size: 12px;
    color: #fff;
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.instagram-item:hover .instagram-name {
    color: #833ab4;
}

/* NEWS詳細表示（中央パネル） */
.news-detail {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}

.news-detail-image {
    width: 100%;
    max-height: 300px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 16px;
    background: #f5f5f5;
}

.news-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-detail-header {
    margin-bottom: 8px;
}

.news-detail-date {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}

.news-detail-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    line-height: 1.4;
    margin: 0;
    padding: 0;
    display: inline-block;
    margin-right: 12px;
}

.news-translate-button-container {
    display: inline-block;
    vertical-align: middle;
    margin-top: 4px;
}

.news-translate-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.news-translate-button:hover {
    background: #e8e8e8;
    border-color: #bbb;
    color: #333;
}

.news-translate-button svg {
    flex-shrink: 0;
}

/* Google翻訳ウィジェットのスタイル調整 */
#google_translate_element {
    display: inline-block;
    vertical-align: middle;
}

#google_translate_element .goog-te-combo {
    font-size: 12px;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    width: auto !important;
    min-width: 120px;
}

#google_translate_element .goog-te-combo option {
    padding: 4px;
}

#google_translate_element .goog-te-banner-frame {
    display: none !important;
}

/* Google翻訳バナーを非表示 */
.goog-te-banner-frame {
    display: none !important;
}

body {
    top: 0 !important;
}

/* 翻訳対象の要素を保護 */
.news-detail {
    position: relative;
}

.news-detail-content {
    font-size: 14px;
    line-height: 1.7;
    color: #333;
    white-space: normal;
    word-wrap: break-word;
    max-height: none;
    overflow-y: visible;
    margin: 0;
    padding: 0;
}

/* コンテンツ内のリンクスタイル（共通） */
.news-detail-content a.news-link,
.news-detail-content a.content-link,
.news-modal-text a.news-link,
.news-modal-text a.content-link,
.calendar-info-text a.content-link,
a.content-link {
    color: #1a73e8;
    text-decoration: underline;
    word-break: break-all;
    transition: color 0.2s ease;
}

.news-detail-content a.news-link:hover,
.news-detail-content a.content-link:hover,
.news-modal-text a.news-link:hover,
.news-modal-text a.content-link:hover,
.calendar-info-text a.content-link:hover,
a.content-link:hover {
    color: #0d47a1;
}

.news-detail-content p {
    margin: 0 0 12px 0;
}

.news-detail-content p:last-child {
    margin-bottom: 0;
}

/* NEWSページの終了グラデーション帯を画面最下部に配置 */
/* 内容が少ない場合のみ、min-heightを適用 */
#mainContent:has(.news-section) {
    display: flex;
    flex-direction: column;
}

#mainContent:has(.news-section) > .news-section {
    flex: 0 0 auto;
}

#mainContent:has(.news-section) > .page-end-gradient-band {
    margin-top: auto;
    flex-shrink: 0;
}

/* 内容が少ない場合のみ、min-heightを適用（JavaScriptでクラスを追加） */
#mainContent.news-page-short:has(.news-section) {
    min-height: calc(100vh - 200px);
}

#mainContent.news-page-short:has(.news-section) > .news-section {
    flex: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .news-section {
        padding: 15px;
    }
    
    /* NEWS詳細ページの左右余白0（section 15px + container 15px = 30pxに統一） */
    .news-detail {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    section.news-section .section-title h2,
    .news-section .section-title h2,
    .section.news-section .section-title h2,
    section.section.news-section .section-title h2,
    .section.news-section .container .section-title h2 {
        font-size: 1.5rem !important;
        max-width: 100% !important;
    }
    
    .news-detail-title {
        font-size: 1rem !important;
    }
    
    .news-detail-content {
        font-size: 0.85rem !important;
        line-height: 1.6 !important;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-card-image {
        height: 180px;
    }
    
    .news-card-title {
        font-size: 15px;
    }
    
    .news-card-actions {
        flex-wrap: wrap;
    }
    
    .news-pagination {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .pagination-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
}