/*
 * =======================================================
 * 秀徹オフィシャルサイト - Sidebar Layout CSS
 * パンクロック × すっきりデザイン
 * =======================================================
 */

/* =======================================================
 * 1. リセット・ベース（WordPress互換性のため!important使用）
 * ======================================================= */

/* 背景を強制的に白にする */
body,
html,
#page,
#shutetsu-cool-page,
.site,
.site-content,
.entry-content,
.ast-container,
.site-primary,
.site-main,
article {
    background-color: #ffffff !important;
    background-image: none !important;
}

#shutetsu-cool-page *,
#shutetsu-cool-page *::before,
#shutetsu-cool-page *::after {
    box-sizing: border-box !important;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif !important;
    line-height: 1.8 !important;
    color: #1a1a1a !important;
    background-color: #ffffff !important;
}

/* =======================================================
 * 2. レイアウト構造（サイドバー + メインコンテンツ）
 * ======================================================= */
#shutetsu-cool-page {
    display: flex !important;
    min-height: 100vh !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* --- サイドバー --- */
.sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 280px !important;
    height: 100vh !important;
    background-color: #f8f8f8 !important;
    border-right: 4px solid #000000 !important;
    box-shadow: 4px 0 0 #000000 !important;
    overflow-y: auto !important;
    z-index: 1000 !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* サイドバーのスクロールバー */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* --- メインコンテンツ --- */
.main-content {
    flex: 1 !important;
    margin-left: 280px !important;
    min-height: 100vh !important;
    background-color: #ffffff !important;
    padding: 0 !important;
}

/* =======================================================
 * 3. サイドバー内コンポーネント
 * ======================================================= */

/* --- ヘッダー（タイトル） --- */
.sidebar-header {
    padding: 25px 20px 20px !important;
    text-align: center !important;
    background-color: #ffffff !important;
    border-bottom: 3px solid #000000 !important;
    position: relative !important;
}

.sidebar-header::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 20px;
    right: 20px;
    height: 3px;
    background-color: #cc0000;
    transform: rotate(-1deg);
}

/* ロゴリンク */
.site-logo-link {
    text-decoration: none;
    display: block;
    transition: opacity 0.2s ease;
}

.site-logo-link:hover {
    opacity: 0.8;
}

.site-title {
    font-size: 2.2em !important;
    font-weight: 900 !important;
    color: #000000 !important;
    letter-spacing: 0.1em !important;
    line-height: 1 !important;
    margin-bottom: 8px !important;
}

.site-tagline {
    font-size: 0.75em !important;
    font-weight: 700 !important;
    color: #333333 !important;
    letter-spacing: 0.05em !important;
    font-style: italic !important;
}

/* --- ナビゲーション --- */
.sidebar-nav {
    padding: 20px 0 !important;
    border-bottom: 2px solid #e0e0e0 !important;
}

.sidebar-nav ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.sidebar-nav li {
    border-bottom: 1px solid #eee !important;
}

.sidebar-nav li:last-child {
    border-bottom: none !important;
}

.sidebar-nav a {
    display: block !important;
    padding: 14px 25px !important;
    color: #1a1a1a !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 0.95em !important;
    letter-spacing: 0.02em !important;
    transition: all 0.2s ease !important;
    position: relative !important;
}

.sidebar-nav a::before {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 4px !important;
    background-color: transparent !important;
    transition: background-color 0.2s ease !important;
}

.sidebar-nav a:hover {
    background-color: #000000 !important;
    color: #ffffff !important;
}

.sidebar-nav a:hover::before {
    background-color: #cc0000 !important;
}

/* --- SNSリンク --- */
.sidebar-social {
    padding: 15px 20px;
    border-bottom: 2px solid #e0e0e0;
}

.sidebar-social ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.sidebar-social a {
    display: inline-block;
    padding: 6px 14px;
    background-color: #ffffff;
    border: 2px solid #000000;
    color: #000000;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.8em;
    transition: all 0.2s ease;
}

.sidebar-social a:hover {
    background-color: #000000;
    color: #ffffff;
    transform: translate(-2px, -2px);
    box-shadow: 2px 2px 0 #cc0000;
}

/* --- バナーエリア --- */
.sidebar-banners {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.banner-item {
    width: 100%;
}

/* noteカード */
.note-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 80px;
    padding: 12px 10px;
    text-decoration: none;
    border: 2px solid #000000;
    box-shadow: 3px 3px 0px #000000;
    background-color: #ffffff;
    transition: all 0.2s ease;
    position: relative;
}

.note-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0px #cc0000;
}

.note-card-title {
    font-size: 0.75em;
    font-weight: 700;
    color: #000000;
    text-align: center;
    line-height: 1.3;
    word-break: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    padding-right: 35px;
}

.note-card-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: #41c9b4;
    color: #ffffff;
    padding: 2px 6px;
    font-size: 0.6em;
    font-weight: 900;
    border-radius: 2px;
}

/* Amazonカード */
.amazon-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 80px;
    padding: 10px;
    text-decoration: none;
    border: 2px solid #000000;
    box-shadow: 3px 3px 0px #000000;
    background-color: #ffffff;
    transition: all 0.2s ease;
    position: relative;
}

.amazon-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0px #ff9900;
}

.amazon-card-img {
    max-width: 100%;
    max-height: 50px;
    object-fit: contain;
}

.amazon-card-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: #ff9900;
    color: #000000;
    padding: 2px 6px;
    font-size: 0.6em;
    font-weight: 900;
    border-radius: 2px;
}

.amazon-card-icon {
    font-size: 2em;
}

.amazon-card--simple {
    background-color: #fff8e1;
}

/* =======================================================
 * 4. メインコンテンツ内のスタイル
 * ======================================================= */

/* --- お知らせバナー（メインコンテンツ最上部・スクロール時固定） --- */
.main-news-banner {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: #cc0000;
    color: #ffffff;
    padding: 12px 40px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.main-news-banner .news-badge {
    background-color: #ffffff;
    color: #cc0000;
    padding: 4px 12px;
    font-weight: 900;
    font-size: 0.8em;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.main-news-banner .news-content {
    font-size: 0.95em;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* お知らせ内のリンク色 */
.main-news-banner a {
    color: #ffff00 !important;
    /* 黄色で目立たせる */
    text-decoration: underline !important;
}

.main-news-banner a:hover {
    color: #ffffff !important;
    text-decoration: none !important;
}

/* --- セクション --- */
.section {
    padding: 60px 40px;
    border-bottom: 1px solid #eeeeee;
    max-width: 900px;
    margin: 0 auto;
}

.section:last-of-type {
    border-bottom: none;
}

/* --- セクション見出し --- */
.section-title {
    font-size: 1.8em;
    font-weight: 900;
    color: #000000;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
    padding: 0 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 12px;
    background-color: #f0f0f0;
    z-index: -1;
    transform: rotate(-1deg);
}

/* --- 会員システムカード --- */
.membership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.membership-card {
    padding: 25px;
    border: 3px solid #000000;
    box-shadow: 6px 6px 0px #000000;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.membership-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 9px 9px 0px #000000;
}

.membership-card--online {
    background-color: #fffae6;
}

.membership-card--personal {
    background-color: #e8f4ff;
}

.membership-card__title {
    font-size: 1.2em;
    font-weight: 900;
    color: #000000;
    margin-bottom: 12px;
    border-bottom: 2px solid #000000;
    padding-bottom: 10px;
}

.membership-card__tagline {
    font-size: 0.9em;
    font-weight: 700;
    color: #cc0000;
    margin-bottom: 12px;
}

.membership-card__body {
    font-size: 0.9em;
    color: #333333;
    margin-bottom: 15px;
    line-height: 1.7;
}

.membership-card__points {
    list-style: none;
    margin-bottom: 20px;
    flex: 1;
}

.membership-card__points li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 0.85em;
    color: #333333;
}

.membership-card__points li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #cc0000;
    font-weight: 900;
}

.membership-card__button {
    margin-top: auto;
}

/* --- 会員比較テーブル --- */
.membership-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.membership-compare-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
    border: 3px solid #000000;
}

.membership-compare-table thead {
    background-color: #000000;
}

.compare-th {
    padding: 14px 18px;
    font-weight: 900;
    font-size: 1.05em;
    text-align: left;
    color: #ffffff;
    letter-spacing: 0.02em;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.compare-th:last-child {
    border-right: none;
}

.compare-th--label {
    width: 14%;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7);
}

.compare-th--honbu,
.compare-th--shibu,
.compare-th--online {
    width: 28.6%;
}

.membership-compare-table tbody tr {
    border-bottom: 2px solid #000000;
}

.membership-compare-table tbody tr:last-child {
    border-bottom: none;
}

.membership-compare-table td {
    padding: 16px 18px;
    font-size: 0.92em;
    line-height: 1.7;
    vertical-align: top;
    color: #333333;
    border-right: 1px solid #d0d0d0;
}

.membership-compare-table td:last-child {
    border-right: none;
}

.compare-label {
    font-weight: 700;
    color: #000000;
    white-space: nowrap;
}

.compare-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.compare-list li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 4px;
    font-size: 0.95em;
}

.compare-list li::before {
    content: '・';
    position: absolute;
    left: 0;
    color: #cc0000;
    font-weight: 700;
}

/* --- ボタン --- */
.button {
    display: inline-block;
    padding: 14px 28px;
    background-color: #ffffff;
    color: #000000;
    border: 3px solid #000000;
    box-shadow: 4px 4px 0px #000000;
    font-weight: 900;
    font-size: 0.95em;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.button:hover {
    background-color: #000000;
    color: #ffffff;
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px #cc0000;
}

/* --- 情報カード --- */
.info-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 35px;
    border-radius: 0;
}

.button-wrapper {
    text-align: center;
    margin-bottom: 25px;
}

.notice {
    background-color: #f9f9f9;
    border-left: 4px solid #000000;
    padding: 15px 20px;
    margin-bottom: 25px;
    font-size: 0.95em;
    color: #333333;
}

/* --- テーブル --- */
.table-wrapper {
    overflow-x: auto;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    border: 3px solid #000000;
    min-width: 500px;
}

.custom-table th {
    background-color: #000000;
    color: #ffffff;
    padding: 15px;
    text-align: left;
    font-weight: 700;
    font-size: 0.95em;
    width: 30%;
    vertical-align: top;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.custom-table td {
    padding: 15px;
    border-bottom: 2px solid #000000;
    font-size: 0.95em;
    line-height: 1.7;
    vertical-align: top;
}

.custom-table tr:last-child td {
    border-bottom: none;
}

.custom-table .important {
    color: #cc0000;
    font-weight: 700;
}

.membership-fee-note {
    font-size: 0.85em;
    opacity: 0.8;
    font-weight: normal;
    margin-left: 4px;
}

.membership-benefits {
    margin: 12px 0;
    padding-left: 20px;
}

.membership-benefits li {
    margin: 6px 0;
}

.schedule-note {
    margin-bottom: 12px;
}

/* --- オンライン案内ボックス --- */
.notice-box {
    border: 3px solid #cc0000;
    background-color: #fff5f5;
    color: #cc0000;
    padding: 20px;
    margin-bottom: 25px;
    font-weight: 700;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.7;
}

/* --- 秀徹についてセクション --- */
.about-banner {
    background-color: #cc0000;
    border: 4px solid #000000;
    box-shadow: 6px 6px 0px #000000;
    padding: 22px 30px;
    margin-bottom: 35px;
    position: relative;
    overflow: hidden;
}

.about-banner::before {
    content: '';
    position: absolute;
    top: -5px;
    right: -20px;
    width: 80px;
    height: 120%;
    background-color: rgba(0, 0, 0, 0.15);
    transform: rotate(8deg);
}

.about-banner__text {
    font-size: 1.25em;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.05em;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.about-content {
    max-width: 750px;
}

.about-lead {
    font-size: 1.3em;
    font-weight: 800;
    margin-bottom: 25px;
    color: #000000;
}

.about-text {
    margin-bottom: 20px;
    font-size: 0.95em;
    line-height: 1.9;
    color: #333333;
}

.about-text--large {
    margin-bottom: 35px;
}

.about-text--bold {
    font-weight: 700;
}

.about-list {
    margin: 25px 0;
    padding: 25px 25px 25px 45px;
    background-color: #f9f9f9;
    border-left: 4px solid #000000;
}

.about-list li {
    margin-bottom: 18px;
    line-height: 1.7;
}

.about-list li:last-child {
    margin-bottom: 0;
}

.about-subtitle {
    font-size: 1.2em;
    font-weight: 900;
    color: #000000;
    border-left: 5px solid #cc0000;
    padding-left: 15px;
    margin-top: 45px;
    margin-bottom: 20px;
}

/* --- プロフィール --- */
.profile-wrapper {
    max-width: 600px;
}

.profile-details {
    line-height: 2.2;
    font-size: 1em;
}

/* --- フッター --- */
.site-footer {
    text-align: center;
    padding: 40px 20px;
    background-color: #f8f8f8;
    border-top: 3px solid #000000;
}

.footer-text {
    font-size: 0.85em;
    color: #666666;
    font-weight: 600;
}

/* --- 動的リンク --- */
.dynamic-link {
    color: #cc0000;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.2s ease;
}

.dynamic-link:hover {
    color: #990000;
    text-decoration: none;
}

/* =======================================================
 * 5. レスポンシブ対応（モバイル時は上部配置）
 * ======================================================= */
@media (max-width: 900px) {
    #shutetsu-cool-page {
        flex-direction: column !important;
    }

    /* サイドバーを上部に */
    .sidebar {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        border-right: none !important;
        border-bottom: 4px solid #000000 !important;
        box-shadow: 0 4px 0 #000000 !important;
        overflow-y: visible !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    /* メインNEWSバナーのモバイル対応 */
    .main-news-banner {
        padding: 10px 15px !important;
        flex-wrap: wrap !important;
    }

    .main-news-banner .news-badge {
        font-size: 0.7em !important;
        padding: 3px 8px !important;
    }

    .main-news-banner .news-content {
        font-size: 0.85em !important;
    }

    /* バナーを横スクロール */

    /* バナーを2番目に表示 */
    .sidebar-banners {
        order: -1 !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        padding: 8px 10px !important;
        gap: 8px !important;
        -webkit-overflow-scrolling: touch !important;
        background-color: #000000 !important;
        border-bottom: none !important;
    }

    .banner-item {
        flex: 0 0 100px !important;
        width: 100px !important;
    }

    .note-card,
    .amazon-card {
        min-height: 70px !important;
        padding: 6px !important;
        border-width: 2px !important;
        box-shadow: 2px 2px 0px #333 !important;
    }

    .note-card-title {
        font-size: 0.65em !important;
        -webkit-line-clamp: 2 !important;
        padding-right: 0 !important;
    }

    .note-card-badge,
    .amazon-card-badge {
        font-size: 0.5em !important;
        padding: 1px 4px !important;
    }

    .amazon-card-img {
        max-height: 40px !important;
    }

    /* ヘッダー調整 - order: 0（3番目） */
    .sidebar-header {
        padding: 15px !important;
        order: 0 !important;
    }

    .site-title {
        font-size: 1.6em !important;
    }

    .site-tagline {
        font-size: 0.7em !important;
    }

    /* ナビゲーション横並び - order: 1（4番目） */
    .sidebar-nav {
        padding: 8px 10px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        order: 1 !important;
    }

    .sidebar-nav ul {
        display: flex !important;
        gap: 5px !important;
        flex-wrap: nowrap !important;
        min-width: max-content !important;
    }

    .sidebar-nav li {
        border-bottom: none !important;
    }

    .sidebar-nav a {
        padding: 6px 12px !important;
        font-size: 0.75em !important;
        white-space: nowrap !important;
        background-color: #ffffff !important;
        border: 2px solid #000000 !important;
    }

    .sidebar-nav a::before {
        display: none !important;
    }

    .sidebar-nav a:hover {
        background-color: #000000 !important;
        color: #ffffff !important;
    }

    /* SNSリンク - order: 2（5番目） */
    .sidebar-social {
        padding: 8px 10px !important;
        order: 2 !important;
    }

    .sidebar-social ul {
        justify-content: center !important;
        flex-wrap: nowrap !important;
        gap: 6px !important;
    }

    .sidebar-social a {
        white-space: nowrap !important;
        padding: 5px 10px !important;
        font-size: 0.75em !important;
    }

    /* お知らせ（最下部） */
    .sidebar-news {
        padding: 10px 15px;
        order: 3;
    }

    .news-badge {
        font-size: 0.65em;
        padding: 2px 8px;
    }

    .news-content {
        font-size: 0.8em;
    }

    /* セクション調整 */
    .section {
        padding: 40px 20px;
    }

    .section-title {
        font-size: 1.5em;
        margin-bottom: 30px;
    }

    /* 会員カード */
    .membership-grid {
        grid-template-columns: 1fr;
    }

    .membership-card {
        box-shadow: 4px 4px 0px #000000;
    }

    .membership-card:hover {
        transform: none;
        box-shadow: 4px 4px 0px #000000;
    }

    /* テーブルカード化 */
    .table-wrapper {
        overflow-x: visible;
    }

    .custom-table {
        min-width: 0;
        display: block;
        border: none;
    }

    .custom-table tbody {
        display: block;
    }

    .custom-table tr {
        display: block;
        margin-bottom: 20px;
        border: 2px solid #000000;
        background-color: #ffffff;
    }

    .custom-table th,
    .custom-table td {
        display: block;
        width: 100%;
    }

    .custom-table th {
        background-color: #f0f0f0;
        color: #000000;
        font-size: 1em;
        padding: 12px 15px;
        border-bottom: 1px solid #000000;
    }

    .custom-table td {
        padding: 15px;
        font-size: 0.9em;
        border-bottom: none;
    }

    /* 情報カード */
    .info-card {
        padding: 20px 15px;
    }

    /* ボタン */
    .button {
        padding: 12px 20px;
        font-size: 0.9em;
        width: 100%;
        max-width: 280px;
    }

    /* 秀徹について */
    .about-subtitle {
        font-size: 1.1em;
        margin-top: 35px;
    }

    .about-lead {
        font-size: 1.1em;
    }

    .about-list {
        padding: 20px 20px 20px 35px;
    }
}

/* さらに小さい画面 */
@media (max-width: 480px) {
    .sidebar-header {
        padding: 15px 10px;
    }

    .site-title {
        font-size: 1.5em;
    }

    .site-tagline {
        font-size: 0.7em;
    }

    .sidebar-nav a {
        padding: 6px 10px;
        font-size: 0.75em;
    }

    .section {
        padding: 30px 15px;
    }

    .section-title {
        font-size: 1.3em;
    }

    .membership-card {
        padding: 20px 15px;
    }

    .membership-card__title {
        font-size: 1.1em;
    }
}