/* HTMLの修正アプローチ */
@media (max-width: 768px) {
    .white-pattern-area .nav-item {
        width: 100%;
        box-sizing: border-box;
    }
}

/* テキスト選択を防止 */
.white-pattern-area .nav-item {
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none;   /* Safari */
    -khtml-user-select: none;    /* Konqueror HTML */
    -moz-user-select: none;      /* Firefox */
    -ms-user-select: none;       /* Internet Explorer/Edge */
    user-select: none;           /* Non-prefixed version */
}

/* 追加の対策 - クリックエフェクトの問題解決 */
.white-pattern-area a.nav-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    z-index: -1;
    border-radius: 20px;
}

.white-pattern-area a.nav-item:active::before {
    background-color: #1b5e20 !important;
}

/* JavaScriptイベント中にボタンテキストが消えないようにする対策 */
.white-pattern-area a {
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}/* ボタンが消える問題を修正するためのCSS */
.white-pattern-area .nav-item::after {
    content: attr(href);
    visibility: hidden;
    position: absolute;
    left: -9999px;
}

/* アクティブ状態のボタンの内部テキストを保持 */
.white-pattern-area .nav-item > span {
    position: relative;
    z-index: 2;
    pointer-events: none; /* テキスト上のクリックイベントを無効化 */
}

/* クリック時のフラッシュ防止 */
.white-pattern-area a.nav-item:active {
    opacity: 1 !important;
    color: white !important;
    background-color: #1b5e20 !important;
}

/* もしJavaScriptが影響している場合の対策 */
.white-pattern-area a.nav-item * {
    color: white !important;
}/* 基本スタイル */
.white-pattern-area .section,
.white-pattern-area .header,
.white-pattern-area .nav,
.white-pattern-area .link-card,
.white-pattern-area .back-to-top {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    line-height: 1.6;
    color: #333;
    font-size: 14px; /* 文字サイズを少し小さくしました */
}

.white-pattern-area a {
    text-decoration: none;
}

.white-pattern-area .link-url,
.white-pattern-area .nav-item,
.white-pattern-area .request-link {
    color: #2e7d32 !important; /* 青から緑に変更、!importantで優先度を上げる */
    transition: color 0.2s;
}

.white-pattern-area .link-url:hover,
.white-pattern-area .request-link:hover {
    color: #1b5e20 !important; /* ホバー時の色も緑の濃い色に変更 */
}

/* ヘッダー */
.white-pattern-area .header {
    text-align: center;
    margin: 30px 0;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
}

.white-pattern-area .page-title {
    font-size: 26px !important; /* 少し小さくしました */
    color: #2e7d32 !important; /* 青から緑に変更 */
    margin-bottom: 15px;
}

.white-pattern-area .description {
    font-size: 15px !important; /* 少し小さくしました */
    margin-bottom: 30px;
    line-height: 1.8;
}

/* ナビゲーション */
.white-pattern-area .nav {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 30px;
}

.white-pattern-area .nav-title {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 10px;
}

.white-pattern-area .nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ナビゲーションボタンのアクティブ状態でも文字が見えるように修正 */
.white-pattern-area .nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    position: relative;
    z-index: 5;
}

/* ナビゲーションボタンのスタイルをすべての状態で統一 */
.white-pattern-area .nav-item,
.white-pattern-area a.nav-item:link,
.white-pattern-area a.nav-item:visited,
.white-pattern-area a.nav-item:hover,
.white-pattern-area a.nav-item:active,
.white-pattern-area a.nav-item:focus {
    background-color: #2e7d32 !important; /* 緑色の背景 */
    padding: 5px 12px;
    border-radius: 20px;
    color: white !important; /* 文字色を白に固定 */
    text-decoration: none !important;
    font-size: 13px !important; /* 少し小さく */
    transition: background-color 0.2s;
    display: inline-block;
    position: relative;
    z-index: 1;
    text-align: center;
    /* 下記の設定でテキストが消えないようにする */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    outline: none;
}

.white-pattern-area a.nav-item:hover,
.white-pattern-area a.nav-item:active,
.white-pattern-area a.nav-item:focus {
    background-color: #1b5e20 !important; /* ホバー時の色も緑の濃い色に */
    color: white !important; /* ホバー時も文字色を白に保つ */
}

/* セクション */
.white-pattern-area .section {
    margin-bottom: 40px;
}

.white-pattern-area .section-title {
    font-size: 20px !important; /* 少し小さくしました */
    color: #2e7d32 !important; /* 青から緑に変更 */
    padding-bottom: 10px;
    border-bottom: 2px solid #2e7d32 !important; /* 青から緑に変更 */
    margin-bottom: 20px;
}

/* リンクグリッド */
.white-pattern-area .link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.white-pattern-area .link-card {
    border: 1px solid #eaeaea;
    border-radius: 5px;
    padding: 15px;
    transition: box-shadow 0.3s;
    background-color: #ffffff;
}

.white-pattern-area .link-card:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.white-pattern-area .link-title {
    font-size: 17px !important; /* 少し小さくしました */
    font-weight: bold;
    margin-bottom: 10px;
}

.white-pattern-area .link-description {
    font-size: 13px !important; /* 少し小さくしました */
    color: #666;
    margin-bottom: 15px;
}

.white-pattern-area .link-url {
    font-size: 13px !important; /* 少し小さくしました */
    word-break: break-all;
    color: #2e7d32 !important; /* 青から緑に変更 */
    display: inline-block;
}

.white-pattern-area .link-url:hover {
    text-decoration: underline;
}

.white-pattern-area .link-category {
    display: inline-block;
    background-color: #e8f5e9 !important; /* 青系から緑系に変更 */
    color: #2e7d32 !important; /* 青から緑に変更 */
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px !important; /* 少し小さくしました */
    margin-bottom: 10px;
}

/* 相互リンク申し込み */
.link-request {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 5px;
    margin: 40px 0;
}

.link-request-title {
    font-size: 20px;
    margin-bottom: 15px;
}

.request-link {
    color: #2e7d32; /* 青から緑に変更 */
    font-weight: bold;
}

.request-link:hover {
    text-decoration: underline;
}

/* フッター */
.footer {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #eaeaea;
    text-align: center;
    font-size: 14px;
    color: #666;
}

/* トップに戻るボタン */
.white-pattern-area .back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #2e7d32 !important; /* 青から緑に変更 */
    color: white !important;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none; /* JavaScriptで表示・非表示を制御 */
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: background-color 0.2s;
    z-index: 1000; /* 他の要素より前面に表示 */
}

.white-pattern-area .back-to-top:hover {
    background-color: #1b5e20 !important; /* ホバー時の色も緑の濃い色に変更 */
}

/* ホバーエフェクト */
.white-pattern-area .link-card {
    position: relative;
    overflow: hidden;
}

.white-pattern-area .link-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #2e7d32 !important; /* 青から緑に変更 */
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.white-pattern-area .link-card:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .white-pattern-area .link-grid {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    }
    
    .white-pattern-area .nav-list {
        flex-direction: column;
        gap: 8px;
    }
    
    .white-pattern-area .nav-item {
        text-align: center;
    }
}

/* アニメーション効果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.white-pattern-area .section {
    animation: fadeIn 0.6s ease-in-out;
}
