/* ========================================
   診療内容ページ - Enhanced UI/UX CSS
   Version: 10.0.1 (2025 Redesign)
   ======================================== */

/* ========================================
   基本レイアウト修正
   ======================================== */

* {
    box-sizing: border-box;
}

html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    position: relative;
    left: 0;
    right: 0;
}

/* ========================================
   アニメーション定義
   ======================================== */

@keyframes gradient-shift-subtle {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(201, 169, 97, 0.4); }
    50% { box-shadow: 0 0 40px rgba(201, 169, 97, 0.8); }
}

@keyframes slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================
   ページヘッダー（ヒーロー）Enhanced
   ======================================== */

.page-header {
    position: relative;
    background: linear-gradient(135deg, #0A3D3D 0%, #1a5555 50%, #4A6B5B 100%);
    background-size: 200% 200%;
    padding: 120px 0 100px 0;
    overflow: hidden;
    width: 100%;
    max-width: 100vw;
    margin: 0;
    left: 0;
    right: 0;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(201, 169, 97, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(74, 107, 91, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

/* ヒーローボタンのエンハンスメント */
.hero-btn {
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.hero-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.hero-btn:hover::before {
    width: 300px;
    height: 300px;
}

.hero-btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 32px rgba(201, 169, 97, 0.6);
}

.hero-btn-secondary:hover {
    transform: translateY(-3px) scale(1.05);
    background: linear-gradient(135deg, #C9A961 0%, #E8D4A0 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 12px 32px rgba(201, 169, 97, 0.5);
}

/* ========================================
   コンセプトセクション Enhanced
   ======================================== */

.concept-section {
    background: linear-gradient(to bottom, #ffffff 0%, #F9FAFB 100%);
    position: relative;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.concept-section::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, rgba(10, 61, 61, 0.03) 0%, transparent 100%);
}

/* ========================================
   治療カテゴリーカード Enhanced
   ======================================== */

.category-card {
    position: relative;
    overflow: hidden;
    background: white !important;
}

.category-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(201, 169, 97, 0.1) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.6s ease;
}

.category-card:hover::before {
    transform: scale(1);
}

.category-card:hover {
    transform: translateY(-10px) !important;
    box-shadow: 0 20px 40px rgba(10, 61, 61, 0.2) !important;
}

.category-icon {
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.category-card:hover .category-icon {
    transform: rotate(360deg) scale(1.1);
}

/* ========================================
   点滴療法カード Enhanced
   ======================================== */

.infusion-card {
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.infusion-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    border-radius: 16px;
}

.infusion-card:hover::after {
    opacity: 1;
}

.infusion-card:hover {
    transform: translateY(-12px) rotateX(2deg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

/* ========================================
   比較テーブル Enhanced
   ======================================== */

.comparison-table {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.comparison-table thead th {
    background: linear-gradient(135deg, #0A3D3D 0%, #4A6B5B 100%);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
}

.comparison-table tbody tr {
    transition: all 0.3s ease;
}

.comparison-table tbody tr:hover {
    background: linear-gradient(to right, rgba(201, 169, 97, 0.05) 0%, transparent 100%);
    transform: translateX(4px);
}

/* ========================================
   治療詳細セクション Enhanced
   ======================================== */

.treatment-detail {
    position: relative;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.section {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.treatment-detail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 600px;
    height: 1px;
    background: linear-gradient(to right, transparent 0%, #E2E8F0 50%, transparent 100%);
}

/* ボタンエンハンスメント */
.btn-teal-modern,
.btn-accent-modern,
#nad-therapy-btn,
#orthomolecular-btn,
#nutrition-therapy-btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-teal-modern::after,
.btn-accent-modern::after,
#nad-therapy-btn::after,
#orthomolecular-btn::after,
#nutrition-therapy-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn-teal-modern:hover::after,
.btn-accent-modern:hover::after,
#nad-therapy-btn:hover::after,
#orthomolecular-btn:hover::after,
#nutrition-therapy-btn:hover::after {
    width: 400px;
    height: 400px;
}

/* ========================================
   ステータスバッジ
   ======================================== */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #C9A961 0%, #E8D4A0 100%);
    color: white;
    border-radius: 24px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(201, 169, 97, 0.3);
    animation: pulse-glow 2s ease-in-out infinite;
}

/* ========================================
   アイコングリッド
   ======================================== */

.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.icon-grid-item {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 2px solid #F0F4F1;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.icon-grid-item:hover {
    border-color: #C9A961;
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(201, 169, 97, 0.15);
}

.icon-grid-item i {
    font-size: 3rem;
    background: linear-gradient(135deg, #0A3D3D 0%, #4A6B5B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: 1rem;
}

/* ========================================
   インフォグラフィックボックス
   ======================================== */

.info-box {
    background: linear-gradient(135deg, #F0F4F1 0%, #D5E3DA 100%);
    padding: 2rem;
    border-radius: 16px;
    border-left: 5px solid #4A6B5B;
    position: relative;
    overflow: hidden;
}

.info-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 60%);
    animation: float 6s ease-in-out infinite;
}

.info-box-gold {
    background: linear-gradient(135deg, #FFF5E6 0%, #FFE5CC 100%);
    border-left-color: #C9A961;
}

/* ========================================
   レスポンシブデザイン
   ======================================== */

@media (max-width: 768px) {
    .page-header {
        padding: 80px 0 60px 0;
    }
    
    .hero-cta-buttons {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .hero-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .treatment-categories {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .category-card {
        max-width: 100%;
    }
    
    .comparison-table {
        font-size: 0.85rem;
    }
    
    /* リプログラミング発毛療法セクション - モバイル対応 */
    .treatment-header {
        grid-template-columns: 1fr !important;
        gap: 2.5rem !important;
        padding: 2.5rem 1.5rem !important;
    }
    
    .treatment-header-image {
        order: 1 !important;
    }
    
    .treatment-header-content {
        order: 2 !important;
    }
    
    /* 3つのメカニズムカード - モバイルで1列表示 */
    div[style*="grid-template-columns: repeat(auto-fit, minmax(250px, 1fr))"] {
        grid-template-columns: 1fr !important;
    }
    
    .comparison-table td,
    .comparison-table th {
        padding: 1rem 0.5rem !important;
    }
    
    .icon-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    /* リプログラミング発毛療法セクション */
    .treatment-header {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        padding: 2rem !important;
    }
    
    .treatment-header-image {
        order: 1 !important;
    }
    
    .treatment-header-content {
        order: 2 !important;
    }
}

@media (max-width: 480px) {
    .icon-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header h1 {
        font-size: 1.8rem !important;
    }
    
    .page-header p {
        font-size: 0.95rem !important;
    }
}

/* ========================================
   アクセシビリティ強化
   ======================================== */

.hero-btn:focus,
.category-card:focus,
.btn-teal-modern:focus,
.btn-accent-modern:focus {
    outline: 3px solid #C9A961;
    outline-offset: 4px;
}

/* ========================================
   ダークモード対応（将来的拡張）
   ======================================== */

@media (prefers-color-scheme: dark) {
    .page-header {
        background: linear-gradient(135deg, #0A3D3D 0%, #1a5555 50%, #0A3D3D 100%);
    }
}

/* ========================================
   印刷スタイル
   ======================================== */

@media print {
    .page-header {
        background: #0A3D3D;
        animation: none;
    }
    
    .hero-cta-buttons,
    .btn-teal-modern,
    .btn-accent-modern {
        display: none;
    }
    
    .infusion-card,
    .category-card {
        break-inside: avoid;
    }
}
