/* News Categories Modern Design */

/* カテゴリーセクション全体 */
.news-categories-modern {
    margin: 80px 0;
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fc 0%, #ffffff 100%);
    border-radius: 30px;
    position: relative;
    overflow: hidden;
}

.news-categories-modern::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(102, 126, 234, 0.03) 0%, transparent 70%);
    animation: rotate-slow 30s linear infinite;
}

@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ヘッダー部分 */
.categories-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    z-index: 1;
}

.categories-title {
    font-size: 36px;
    font-weight: 700;
    color: #0f1932;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.title-icon {
    font-size: 32px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.categories-subtitle {
    font-size: 18px;
    color: #64748b;
    margin: 0;
}

/* カテゴリーグリッド */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* カテゴリーカード */
.category-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 30px;
    background: white;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 2px solid transparent;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(102, 126, 234, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.category-card:hover::before {
    opacity: 1;
}

/* カテゴリー別の色設定 */
.service-category {
    border-color: #e8f2ff;
}

.service-category:hover {
    border-color: #667eea;
}

.service-category .category-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.event-category {
    border-color: #fef3e8;
}

.event-category:hover {
    border-color: #ff9500;
}

.event-category .category-icon {
    background: linear-gradient(135deg, #ff9500 0%, #ffb347 100%);
}

.case-category {
    border-color: #e8fff8;
}

.case-category:hover {
    border-color: #00d4aa;
}

.case-category .category-icon {
    background: linear-gradient(135deg, #00d4aa 0%, #00e5cc 100%);
}

.notice-category {
    border-color: #ffe8e8;
}

.notice-category:hover {
    border-color: #e45834;
}

.notice-category .category-icon {
    background: linear-gradient(135deg, #e45834 0%, #ff6b4a 100%);
}

/* カテゴリーアイコン */
.category-icon {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.category-card:hover .category-icon {
    transform: rotate(-10deg) scale(1.1);
}

/* カテゴリーコンテンツ */
.category-content {
    flex: 1;
    min-width: 0;
}

.category-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: #0f1932;
    margin: 0 0 8px;
    transition: color 0.3s ease;
}

.category-card:hover .category-content h3 {
    color: #667eea;
}

.category-content p {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 10px;
    line-height: 1.5;
}

.category-count {
    display: inline-block;
    padding: 4px 12px;
    background: #f1f5f9;
    color: #475569;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.category-card:hover .category-count {
    background: #667eea;
    color: white;
}

/* 矢印アイコン */
.category-arrow {
    font-size: 24px;
    color: #cbd5e1;
    transition: all 0.3s ease;
    transform: translateX(0);
}

.category-card:hover .category-arrow {
    color: #667eea;
    transform: translateX(5px);
}

/* CTAセクション改善 */
.news-cta-section {
    margin-top: 100px;
    padding: 80px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.news-cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate-slow 20s linear infinite reverse;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    font-size: 36px;
    color: white;
    margin-bottom: 20px;
    font-weight: 700;
}

.cta-content p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 35px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.btn.btn-primary.btn-large {
    background: white;
    color: #667eea;
    padding: 18px 45px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn.btn-primary.btn-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
    background: #f8f9ff;
}

/* レスポンシブデザイン */
@media (max-width: 992px) {
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .news-categories-modern {
        padding: 60px 20px;
        margin: 60px 0;
    }
    
    .categories-title {
        font-size: 28px;
    }
    
    .categories-subtitle {
        font-size: 16px;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
        padding: 0;
    }
    
    .category-card {
        padding: 20px;
    }
    
    .category-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    
    .category-content h3 {
        font-size: 18px;
    }
    
    .news-cta-section {
        padding: 60px 30px;
        border-radius: 20px;
    }
    
    .cta-content h2 {
        font-size: 28px;
    }
    
    .cta-content p {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .categories-title {
        font-size: 24px;
        flex-direction: column;
        gap: 10px;
    }
    
    .title-icon {
        font-size: 28px;
    }
    
    .category-card {
        flex-direction: column;
        text-align: center;
    }
    
    .category-arrow {
        display: none;
    }
    
    .category-content {
        text-align: center;
    }
}

/* アニメーション追加 */
.category-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }
.category-card:nth-child(4) { animation-delay: 0.4s; }

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