/* サブナビゲーション（タイトル下配置） */
.sub-navigation {
    background-color: #e8f2ff;
    border-bottom: 1px solid #b3d9ff;
    padding: 10px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

/* リンクスタイル（header-linksのスタイルを流用） */
.sub-navigation a {
    display: flex;
    align-items: center;
    padding: 5px 10px;
    background-color: #f0f7ff;
    border-radius: 20px;
    color: #1e3a8a;
    text-decoration: none;
    font-size: 0.85em;
    transition: all 0.3s ease;
    border: 1px solid #93c5fd;
}

.sub-navigation a:hover {
    background-color: #dbeafe;
    box-shadow: 0 2px 5px rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
    border-color: #60a5fa;
}

/* アクティブ状態（現在のページ） */
.sub-navigation a.active {
    background-color: #1e40af; /* 理研風の深い青 */
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.3);
    border-color: #1e40af;
}

.sub-navigation a.active:hover {
    background-color: #1e3a8a;
    transform: none;
    border-color: #1e3a8a;
}

.sub-navigation a.active i {
    color: white;
}

/* アイコンスタイル */
.sub-navigation a i {
    margin-right: 5px;
    font-size: 0.9em;
}

/* RSSリンクの特別スタイル（テキストなし） */
.sub-navigation .rss-link span {
    display: none;
}

/* サブナビとメインコンテンツの間隔 */
.sub-navigation + .main-container,
.sub-navigation + .content-wrapper,
.sub-navigation + main {
    padding-top: 15px;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 10px;
        gap: 3px;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .sub-navigation a {
        padding: 6px 8px;
        font-size: 0.8em;
        flex-shrink: 0;
    }
    
    /* モバイルではテキストを非表示にしてアイコンのみ表示 */
    .sub-navigation a span {
        display: none;
    }
    
    .sub-navigation a {
        width: 35px;
        height: 35px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .sub-navigation a i {
        margin-right: 0;
        font-size: 1.1em;
    }
}

/* 小さいモバイル */
@media (max-width: 480px) {
    .sub-navigation a {
        width: 32px;
        height: 32px;
    }
    
    .sub-navigation a i {
        font-size: 1em;
    }
}
