/* ==============================================
   施設詳細ページ用CSS
   デザインガイドライン Section 5 準拠
   ============================================== */

/* ========== ベース ========== */

.facility-detail {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-lg) var(--space-md);
    font-family: var(--font-body);
    color: var(--color-text);
    line-height: 1.75;
}

@media (max-width: 768px) {
    .facility-detail {
        padding-bottom: 80px;
    }
}

/* ========== セクション共通 ========== */

.facility-section {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

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

.facility-section__title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: var(--space-md);
    padding-left: 12px;
    border-left: 4px solid var(--color-primary);
    color: var(--color-text);
}

@media (min-width: 769px) {
    .facility-section__title {
        font-size: 20px;
    }
}

/* ========== プランラベル ========== */

.facility-plan-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
}

.facility-plan-label--premium {
    background: linear-gradient(135deg, #FFF8E7 0%, #FFF0C2 100%);
    color: #8B6914;
    border: 1px solid #D4A017;
}

.facility-plan-label--basic {
    background: #EBF4FF;
    color: #2B6CB0;
    border: 1px solid #90CAF9;
}

/* ========== 1. ヘッダー ========== */

.facility-header {
    text-align: center;
    padding-bottom: var(--space-lg);
    margin-bottom: 0;
}

.facility-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: var(--space-sm);
}

.facility-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    margin: var(--space-sm) 0;
    line-height: 1.35;
}

@media (min-width: 769px) {
    .facility-title {
        font-size: 26px;
    }
}

.facility-area {
    color: var(--color-text-secondary);
    font-size: 14px;
}

/* ========== 2. クイックアクションCTA ========== */

.facility-quick-actions {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

.quick-action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 14px var(--space-md);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 700;
    transition: background 0.2s, box-shadow 0.2s;
}

.quick-action:hover {
    text-decoration: none;
}

.quick-action--phone {
    background: var(--color-primary);
    color: #fff;
}

.quick-action--phone:hover {
    background: var(--color-primary-dark);
    color: #fff;
    box-shadow: 0 2px 8px rgba(67, 160, 71, 0.3);
}

.quick-action--form {
    background: var(--color-secondary);
    color: #fff;
}

.quick-action--form:hover {
    background: var(--color-secondary-dark);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.quick-action__icon {
    font-size: 20px;
    flex-shrink: 0;
}

.quick-action__text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.quick-action__label {
    font-size: 14px;
    font-weight: 700;
}

.quick-action__number {
    font-size: 13px;
    font-weight: 400;
    opacity: 0.9;
}

/* ========== 3. 施設写真ギャラリー ========== */

/* ヒーロー写真（Premium: メイン1枚目） */
.gallery-hero {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-sm);
}

.gallery-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 写真グリッド（サブ写真） */
.gallery-grid {
    display: grid;
    gap: var(--space-sm);
}

.gallery-grid--premium {
    grid-template-columns: repeat(4, 1fr);
}

.gallery-grid--basic {
    grid-template-columns: repeat(3, 1fr);
}

.gallery-grid__item {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.gallery-grid__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-grid__item:hover img {
    transform: scale(1.05);
}

@media (max-width: 600px) {
    .gallery-grid--premium {
        grid-template-columns: repeat(2, 1fr);
    }
    .gallery-grid--basic {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========== 4. 施設メッセージ ========== */

.message-box {
    background: var(--color-secondary-light);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    font-size: 15px;
    line-height: 1.8;
}

/* ========== 5. 基本情報テーブル ========== */

.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table th,
.info-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
    font-size: 15px;
}

.info-table th {
    width: 35%;
    background: var(--color-surface-alt);
    font-weight: 500;
    color: var(--color-text-secondary);
    font-size: 14px;
}

.info-table td {
    color: var(--color-text);
}

.info-table td a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 500;
}

.info-table td a:hover {
    text-decoration: underline;
}

/* テーブル角丸 */
.info-table tr:first-child th {
    border-radius: var(--radius-md) 0 0 0;
}

.info-table tr:first-child td {
    border-radius: 0 var(--radius-md) 0 0;
}

.info-table tr:last-child th {
    border-radius: 0 0 0 var(--radius-md);
    border-bottom: none;
}

.info-table tr:last-child td {
    border-radius: 0 0 var(--radius-md) 0;
    border-bottom: none;
}

/* ========== ミニCTA ========== */

.facility-mini-cta {
    text-align: center;
    margin-bottom: var(--space-xl);
}

/* ========== 6. 対応情報（タグ）========== */

.tax-group {
    margin-bottom: var(--space-md);
}

.tax-group:last-child {
    margin-bottom: 0;
}

.tax-group__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* tag は components.css で基本定義済み。ここで施設詳細用の上書き */
.facility-taxonomy .tag {
    font-size: 13px;
    padding: 4px 12px;
}

/* ========== 7-9. プログラム・一日の流れ・年間行事 ========== */

.program-content,
.daily-flow-content,
.events-content {
    background: var(--color-bg);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    font-size: 15px;
    line-height: 1.8;
}

.program-content p {
    margin-bottom: var(--space-md);
}

.program-content p:last-child {
    margin-bottom: 0;
}

/* ========== 10. Google Map ========== */

.facility-map__address {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
}

.map-container {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.map-container iframe {
    display: block;
}

/* ========== 11. 大きなCTAセクション ========== */

.facility-cta {
    text-align: center;
    background: var(--color-surface-alt);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl) var(--space-lg);
    margin-bottom: var(--space-xl);
}

.facility-cta__title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.facility-cta__desc {
    color: var(--color-text-secondary);
    font-size: 14px;
    margin-bottom: var(--space-lg);
}

.facility-cta__buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    align-items: center;
}

@media (min-width: 769px) {
    .facility-cta__buttons {
        flex-direction: row;
        justify-content: center;
    }
}

.facility-cta__phone-number {
    display: block;
    font-size: 13px;
    font-weight: 400;
    opacity: 0.9;
    margin-top: 2px;
}

/* ========== 12. 近隣施設 ========== */

.nearby-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

@media (max-width: 600px) {
    .nearby-grid {
        grid-template-columns: 1fr;
    }
}

.nearby-card {
    display: block;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    text-decoration: none;
    color: var(--color-text);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.nearby-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
    color: var(--color-text);
    text-decoration: none;
}

.nearby-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 6px;
}

.nearby-card__title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.4;
}

.nearby-card__address {
    font-size: 12px;
    color: var(--color-text-tertiary);
}

/* ========== 施設向けアップセルバナー ========== */

.facility-upsell {
    background: linear-gradient(135deg, #FFF8E7 0%, #FFF0C2 100%);
    border: 2px solid #D4A017;
    border-radius: var(--radius-lg);
    padding: var(--space-2xl) var(--space-lg);
    text-align: center;
    margin-bottom: var(--space-xl);
}

.facility-upsell__icon {
    font-size: 40px;
    margin-bottom: var(--space-sm);
}

.facility-upsell__title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: #8B6914;
    margin-bottom: var(--space-sm);
}

.facility-upsell__text {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
}

.facility-upsell__features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.facility-upsell__feature {
    font-size: 13px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-sm);
    color: #8B6914;
    font-weight: 500;
}

/* ========== バッジ（施設詳細用） ========== */

.badge--small {
    padding: 2px 8px;
    font-size: 11px;
}

/* ========== レスポンシブ ========== */

@media (max-width: 768px) {
    .facility-title {
        font-size: 20px;
    }

    .facility-quick-actions {
        flex-direction: column;
    }

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

    .info-table th {
        border-bottom: none;
        padding-bottom: 4px;
        border-radius: 0 !important;
    }

    .info-table td {
        padding-top: 0;
        border-radius: 0 !important;
    }
}
