/*
 * ジムDB TOPページ CSS（完全版）
 * ジム検索サイトに特化したデザイン
 */

/* ========================================
   ヒーローセクション
======================================== */
.hero-section {
    position: relative;
    /* グラデーションを削除してコメントアウト */
    /* background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%); */
    background-image: url('https://gym.ohakacm.xyz/wp-content/uploads/2025/12/a-scaled.jpg');
    background-size: cover;
    background-position: center;
    padding: 100px 20px 80px;
    color: #fff;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* オーバーレイを濃くして文字を読みやすく */
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 48px;
    font-weight: bold;
    margin: 0 0 16px;
    text-align: center;
    line-height: 1.3;
}

.hero-subtitle {
    font-size: 18px;
    margin: 0 0 40px;
    text-align: center;
    opacity: 0.95;
}

/* 検索ボックス */
.hero-search-box {
    max-width: 800px;
    margin: 0 auto 30px;
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.search-main {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 16px;
    color: #999;
}

.search-main-input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-main-input:focus {
    outline: none;
    border-color: #3498db;
}

.search-main-button {
    padding: 16px 40px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
}

.search-main-button:hover {
    background: #2980b9;
}

.search-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.search-option-select {
    flex: 1;
    min-width: 150px;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
}

.search-option-more {
    padding: 12px 24px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
}

.search-option-more:hover {
    background: #e9ecef;
}

.search-advanced {
    display: none;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

.advanced-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.advanced-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
    color: #333;
}

.advanced-checkbox:hover {
    background: #e9ecef;
}

.advanced-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ヒーロータグ */
.hero-tags {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-tag-label {
    font-size: 14px;
    opacity: 0.9;
}

.hero-tag {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s;
}

.hero-tag:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ========================================
   セクション共通
======================================== */
.feature-search-section,
.category-gyms-section,
.prefecture-section,
.tips-section,
.faq-section {
    padding: 80px 20px;
}

.feature-search-section {
    background: #fff;
}

.category-gyms-section {
    position: relative;
    padding: 80px 20px;
    background-image: url('http://gym.ohakacm.xyz/wp-content/uploads/2025/12/b-scaled.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* パララックス効果 */
}

.category-gyms-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    z-index: 1;
}

.category-gyms-section .l-container {
    position: relative;
    z-index: 2;
}

.prefecture-section {
    background: #fff;
}

.tips-section {
    position: relative;
    padding: 80px 20px;
    background-image: url('http://gym.ohakacm.xyz/wp-content/uploads/2025/12/c-scaled.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* パララックス効果 */
}

.tips-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(248, 249, 250, 0.95);
    z-index: 1;
}

.tips-section .section-header,
.tips-section .tips-grid {
    position: relative;
    z-index: 2;
}

/* ========================================
   レスポンシブ対応（画像用）
======================================== */
@media (max-width: 768px) {
    /* モバイルではパララックス効果を無効化（パフォーマンス向上） */
    .category-gyms-section,
    .tips-section {
        background-attachment: scroll;
    }
}

.faq-section {
    background: #fff;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-size: 32px;
    font-weight: bold;
    margin: 0 0 12px;
    color: #333;
}

.section-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* ========================================
   特徴別で探す
======================================== */
.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 20px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s;
}

.feature-card:hover {
    border-color: #3498db;
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.feature-card-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.feature-card-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 8px;
    color: #333;
}

.feature-card-text {
    font-size: 13px;
    color: #666;
    margin: 0;
}

/* ========================================
   条件別おすすめ
======================================== */
.category-block {
    margin-bottom: 60px;
}

.category-block:last-child {
    margin-bottom: 0;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e0e0e0;
}

.category-title {
    font-size: 24px;
    font-weight: bold;
    margin: 0;
    color: #333;
}

.category-more {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    transition: color 0.3s;
}

.category-more:hover {
    color: #2980b9;
}

.gym-grid-category {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* ========================================
   都道府県タブ
======================================== */
.prefecture-tabs {
    max-width: 1200px;
    margin: 0 auto;
}

.prefecture-tab {
    margin-bottom: 8px;
}

.prefecture-tab input[type="radio"] {
    display: none;
}

.tab-label {
    display: block;
    padding: 16px 24px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.tab-label:hover {
    background: #f0f7ff;
    border-color: #3498db;
}

.prefecture-tab input[type="radio"]:checked + .tab-label {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

.tab-content {
    display: none;
    padding: 24px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    margin-top: -8px;
}

.prefecture-tab input[type="radio"]:checked ~ .tab-content {
    display: block;
}

.prefecture-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.prefecture-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: #f8f9fa;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
}

.prefecture-card:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.prefecture-name {
    font-weight: 500;
    font-size: 15px;
}

.prefecture-count {
    font-size: 13px;
    color: #999;
    background: #fff;
    padding: 4px 10px;
    border-radius: 12px;
}

/* ========================================
   ジム選びのポイント
======================================== */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.tip-card {
    background: #fff;
    padding: 28px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

.tip-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.tip-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: #3498db;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    font-weight: bold;
    margin-bottom: 16px;
}

.tip-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 12px;
    color: #333;
}

.tip-text {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.7;
}

/* ========================================
   FAQ
======================================== */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.3s;
}

.faq-item.active {
    border-color: #3498db;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    color: #333;
    transition: background 0.3s;
}

.faq-question:hover {
    background: #f8f9fa;
}

.faq-icon {
    font-size: 24px;
    color: #3498db;
    transition: transform 0.3s;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    display: none;
    padding: 0 24px 20px;
    font-size: 14px;
    color: #666;
    line-height: 1.7;
}

/* ========================================
   ジムグリッド
======================================== */
.gym-grid-front {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ========================================
   レスポンシブ
======================================== */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 16px 50px;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 15px;
    }
    
    .hero-search-box {
        padding: 20px;
    }
    
    .search-main {
        flex-direction: column;
    }
    
    .search-main-button {
        width: 100%;
    }
    
    .search-options {
        flex-direction: column;
    }
    
    .search-option-select,
    .search-option-more {
        width: 100%;
    }
    
    .feature-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .gym-grid-category {
        grid-template-columns: 1fr;
    }
    
    .prefecture-grid {
        grid-template-columns: 1fr;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .category-title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .feature-cards {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .gym-grid-category {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .prefecture-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .tips-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}