/*
 * ジムカード CSS（完全版）
 * スマホ・PC完全対応、紫色なし
 */


/* エリアページ H2スタイル（シンプル版） */
.area-main h2 {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0 0 24px 0;
    padding-bottom: 12px;
    border-bottom: 3px solid #667eea;
}

@media (max-width: 768px) {
    .area-main h2 {
        font-size: 18px;
        margin: 0 0 20px 0;
    }
}

/* ========================================
   カード全体
======================================== */
.gym-card-modern {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.gym-card-modern:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* ========================================
   カードヘッダー
======================================== */
.gym-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.gym-header-info {
    flex: 1;
    min-width: 0;
}

.gym-name {
    font-size: 22px;
    font-weight: bold;
    margin: 0 0 8px;
    color: #222;
    line-height: 1.4;
}

.gym-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gym-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.rating-number {
    font-size: 18px;
    font-weight: bold;
    color: #ff8c00;
}

.rating-stars {
    color: #ffa500;
    font-size: 14px;
    letter-spacing: 1px;
}

.rating-reviews {
    color: #666;
    font-size: 12px;
}

/* 価格タグ */
.gym-price-tag {
    flex-shrink: 0;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    text-align: center;
    min-width: 120px;
}

.price-amount {
    font-size: 24px;
    font-weight: bold;
    line-height: 1.2;
}

.price-amount span {
    font-size: 14px;
    font-weight: normal;
}

.price-note {
    font-size: 11px;
    margin-top: 2px;
    opacity: 0.9;
}

/* ========================================
   メイン画像
======================================== */
.gym-main-image {
    position: relative;
    width: 100%;
    height: 280px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    background: #f5f5f5;
}

.gym-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gym-card-modern:hover .gym-main-image img {
    transform: scale(1.05);
}

.gym-tags {
    position: absolute;
    bottom: 12px;
    left: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.gym-tag {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.tag-24h {
    background: rgba(52, 152, 219, 0.9);
}

.tag-trial {
    background: rgba(46, 204, 113, 0.9);
}

/* ========================================
   説明文
======================================== */
.gym-description {
    font-size: 14px;
    line-height: 1.7;
    color: #555;
    margin-bottom: 20px;
    padding: 14px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #3498db;
}

/* ========================================
   基本情報テーブル
======================================== */
.gym-basic-info {
    margin-bottom: 24px;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.info-table tr {
    border-bottom: 1px solid #e5e7eb;
}

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

.info-table th {
    background: #f9fafb;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #666;
    font-size: 13px;
    width: 100px;
    vertical-align: top;
}

.info-table td {
    padding: 12px 16px;
    color: #333;
    font-size: 14px;
    line-height: 1.6;
}

.text-primary {
    color: #3498db;
    font-weight: bold;
}

.text-success {
    color: #27ae60;
    font-weight: bold;
}

/* ========================================
   セクション見出し
======================================== */
.section-heading {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #3498db;
}





/* ========================================
   設備○×表（修正版）
======================================== */
.gym-facilities-section {
    margin-bottom: 24px;
}

.facilities-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.facilities-table {
    width: 100%;
    table-layout: fixed; /* ← 追加：列幅を均等に */
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.facilities-table thead th {
    background: #f9fafb;
    padding: 12px 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    border-bottom: 2px solid #e5e7eb;
    width: 25%; /* ← 追加：4列なので25%ずつ */
}

.facilities-table tbody td {
    padding: 14px 8px;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    border-right: 1px solid #e5e7eb;
    width: 25%; /* ← 追加：4列なので25%ずつ */
}

.facilities-table tbody td:last-child {
    border-right: none;
}

.facilities-table .available {
    color: #27ae60;
}

.facilities-table .unavailable {
    color: #e74c3c;
}

/* ========================================
   マシン・トレーニング設備（修正版）
======================================== */
.gym-machines-section {
    margin-bottom: 24px;
}

.machines-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* ← 修正：均等4列 */
    gap: 12px;
}

.machine-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* ← 追加：縦方向も中央揃え */
    padding: 14px 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-align: center;
    transition: all 0.2s ease;
    min-height: 120px; /* ← 追加：最小高さを統一 */
}

.machine-item.has-machine {
    background: #f0f9ff;
    border-color: #3498db;
}

.machine-item.has-machine:hover {
    background: #e0f2fe;
    transform: translateY(-2px);
}

.machine-icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.machine-name {
    font-size: 11px;
    color: #555;
    margin-bottom: 4px;
    line-height: 1.3;
    min-height: 28px; /* ← 追加：テキスト高さを統一 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.machine-status {
    font-size: 16px;
    font-weight: bold;
}

.machine-item.has-machine .machine-status {
    color: #27ae60;
}

.machine-item.no-machine .machine-status {
    color: #e74c3c;
}


/* ========================================
   コース料金
======================================== */
.gym-course-pricing {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.pricing-box {
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
}

.price-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.price-display {
    font-size: 32px;
    font-weight: bold;
    color: #e74c3c;
    line-height: 1.2;
}

.tax-label {
    font-size: 14px;
    color: #999;
    font-weight: normal;
    margin-left: 4px;
}

.course-list {
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.course-name-label {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-bottom: 10px;
}

.course-item-box {
    background: #f9fafb;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
}

.enrollment-note {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
}

/* ========================================
   アクションボタン
======================================== */
.gym-actions {
    display: flex;
    gap: 12px;
}

.btn-official,
.btn-phone {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-official {
    background: #22c55e;
    color: #fff;
}

.btn-official:hover {
    background: #16a34a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-phone {
    background: #fff;
    color: #3498db;
    border: 2px solid #3498db;
}

.btn-phone:hover {
    background: #3498db;
    color: #fff;
}

.btn-official svg,
.btn-phone svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}



/* ========================================
   レスポンシブ（タブレット）
======================================== */
@media (max-width: 1024px) {
    .machines-grid {
        grid-template-columns: repeat(3, 1fr); /* 3列に */
    }
}

/* ========================================
   レスポンシブ（スマホ）
======================================== */
@media (max-width: 768px) {
    .facilities-table thead th {
        font-size: 11px;
        padding: 10px 4px;
        line-height: 1.3;
    }
    
    .facilities-table tbody td {
        padding: 12px 4px;
        font-size: 18px;
    }
    
    .machines-grid {
        grid-template-columns: repeat(2, 1fr); /* 2列に */
    }
    
    .machine-item {
        padding: 12px 6px;
        min-height: 110px;
    }
    
    .machine-icon {
        font-size: 24px;
    }
    
    .machine-name {
        font-size: 10px;
        min-height: 24px;
    }
}

@media (max-width: 480px) {
    .facilities-table thead th {
        font-size: 10px;
        padding: 8px 2px;
    }
    
    .facilities-table tbody td {
        padding: 10px 2px;
        font-size: 16px;
    }
    
    .machines-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .machine-item {
        padding: 10px 4px;
        min-height: 100px;
    }
    
    .machine-icon {
        font-size: 20px;
        margin-bottom: 4px;
    }
    
    .machine-name {
        font-size: 9px;
        min-height: 20px;
    }
    
    .machine-status {
        font-size: 14px;
    }
}

/* ========================================
   レスポンシブ（スマホ）
======================================== */
@media (max-width: 768px) {
    .gym-card-modern {
        padding: 16px;
    }
    
    .gym-card-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .gym-price-tag {
        width: 100%;
        min-width: auto;
    }
    
    .gym-name {
        font-size: 18px;
    }
    
    .gym-main-image {
        height: 200px;
    }
    
    .info-table th {
        width: 90px;
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .info-table td {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .facilities-table thead th {
        font-size: 11px;
        padding: 10px 4px;
        line-height: 1.3;
    }
    
    .facilities-table tbody td {
        padding: 12px 4px;
        font-size: 18px;
    }
    
    .machines-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .machine-item {
        padding: 12px 6px;
    }
    
    .machine-icon {
        font-size: 24px;
    }
    
    .machine-name {
        font-size: 10px;
    }
    
    .price-display {
        font-size: 28px;
    }
    
    .gym-actions {
        flex-direction: column;
    }
    
    .btn-official,
    .btn-phone {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .gym-name {
        font-size: 16px;
    }
    
    .price-amount {
        font-size: 20px;
    }
    
    .facilities-table thead th {
        font-size: 10px;
        padding: 8px 2px;
    }
    
    .facilities-table tbody td {
        padding: 10px 2px;
        font-size: 16px;
    }
    
    .machines-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .machine-item {
        padding: 10px 4px;
    }
    
    .machine-icon {
        font-size: 20px;
        margin-bottom: 4px;
    }
    
    .machine-name {
        font-size: 9px;
    }
    
    .machine-status {
        font-size: 14px;
    }
}

/* ========================================
   印刷用
======================================== */
@media print {
    .gym-card-modern {
        box-shadow: none;
        border: 1px solid #000;
        page-break-inside: avoid;
    }
    
    .btn-official,
    .btn-phone {
        display: none;
    }
}