/**
 * お知らせセクション スタイルシート
 * wp-content/themes/ryuji01/css/components/news-section.css
 */

/* ==========================================
   お知らせセクション
   ========================================== */
   .news-section {
    padding: 80px 0;
    background: #ffffff;
    position: relative;
    overflow: hidden;
     background: #373f56;
}

/* 格子模様の背景 */
.news-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(0, 123, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 123, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
    z-index: 0;
}

/* コンテンツを前面に */
.news-section .container {
    position: relative;
    z-index: 1;
}

/* セクションヘッダー */
.news-section .section-header {
    text-align: center;
    margin-bottom: 50px;
}

.news-section .section-label {
    display: inline-block;
    color: #007bff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.news-section .section-title {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

/* ニュースリスト */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ニュースアイテム */
.news-item {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 123, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 16px;
}

.news-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 123, 255, 0.2);
}

.news-link {
    display: flex;
    align-items: center;
    padding: 24px 30px;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.3s ease;
}

.news-link:hover {
    background-color: rgba(0, 123, 255, 0.02);
}

/* 日付表示 */
.news-date {
    flex-shrink: 0;
    width: 80px;
    text-align: center;
    padding-right: 30px;
    border-right: 2px solid rgba(0, 123, 255, 0.1);
}

.news-year {
    display: block;
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 4px;
}

.news-month-day {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #007bff;
}

/* ニュースコンテンツ */
.news-content {
    flex: 1;
    padding-left: 30px;
}

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

/* カテゴリーラベル */
.news-category {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    color: #ffffff;
    background-color: #6c757d;
}

.news-category.category-news { background-color: #007bff; }
.news-category.category-update { background-color: #28a745; }
.news-category.category-event { background-color: #ffc107; color: #1a1a1a; }
.news-category.category-important { background-color: #dc3545; }
.news-category.category-system { background-color: #6f42c1; }

/* NEWバッジ */
.news-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 4px;
}

.news-badge.new {
    background-color: #ff4757;
    color: #ffffff;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ニュースタイトル */
.news-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.5;
}

/* ニュース抜粋 */
.news-excerpt {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
    line-height: 1.6;
}

/* 矢印アイコン */
.news-arrow {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #007bff;
    transition: transform 0.3s ease;
}

.news-item:hover .news-arrow {
    transform: translateX(5px);
}

/* 全て見るボタン */
.news-footer {
    text-align: center;
    margin-top: 40px;
}

.btn-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background-color: #007bff;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.btn-view-all:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.3);
}

.btn-view-all svg {
    transition: transform 0.3s ease;
}

.btn-view-all:hover svg {
    transform: translateX(3px);
}

/* 空の状態 */
.news-empty {
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 123, 255, 0.1);
    border-radius: 12px;
}

.news-empty p {
    color: #6c757d;
    font-size: 16px;
    margin: 0;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .news-section {
        padding: 60px 0;
    }
    
    /* モバイルでは格子を大きく */
    .news-section::before {
        background-size: 40px 40px;
    }
    
    .news-section .section-title {
        font-size: 28px;
    }
    
    .news-link {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }
    
    .news-date {
        width: auto;
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid rgba(0, 123, 255, 0.1);
        padding-bottom: 12px;
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .news-year,
    .news-month-day {
        display: inline;
        margin: 0;
    }
    
    .news-content {
        padding-left: 0;
    }
    
    .news-title {
        font-size: 16px;
    }
    
    .news-arrow {
        display: none;
    }
    
    .btn-view-all {
        padding: 12px 24px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .news-item {
        margin-bottom: 12px;
    }
    
    .news-meta {
        flex-wrap: wrap;
    }
    
    .news-category {
        font-size: 11px;
        padding: 3px 10px;
    }
}

/* ダークモード対応（オプション） */
@media (prefers-color-scheme: dark) {
    .news-section {
        background: #373f56;
    }
    
    .news-section::before {
        background-image: 
            linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    }
    
    .news-item {
        background: rgba(42, 42, 42, 0.9);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .news-link:hover {
        background-color: rgba(255, 255, 255, 0.02);
    }
    
    .news-date {
        border-right-color: rgba(255, 255, 255, 0.1);
    }
    
    .news-title {
        color: #ffffff;
    }
    
    .news-excerpt {
        color: #adb5bd;
    }
    
    .news-empty {
        background: rgba(42, 42, 42, 0.9);
        border-color: rgba(255, 255, 255, 0.1);
    }
}