/* 医師紹介ページ - プレミアムアニメーションシステム v1.0.0 */

/* ========================================
   1. スクロールアニメーション基盤
======================================== */

/* フェードイン上昇 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* フェードイン左から */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* フェードイン右から */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* スケールイン */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* シマーエフェクト */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* パルス */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* フロート */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ライン描画 */
@keyframes slideLineRight {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* グロー */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.5),
                    0 0 10px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.8),
                    0 0 30px rgba(255, 215, 0, 0.4);
    }
}

/* リップル */
@keyframes ripple {
    from {
        transform: scale(0);
        opacity: 1;
    }
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ========================================
   2. ページヘッダーアニメーション
======================================== */

.page-header {
    position: relative;
    overflow: hidden;
}

/* 動的シマーオーバーレイ */
.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    animation: shimmer 3s infinite;
}

/* ========================================
   3. セクションタイトルアニメーション
======================================== */

.section-title {
    position: relative;
}

.section-title h2 {
    position: relative;
    display: inline-block;
}

/* アニメーション付きアンダーライン */
.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #FFD700, transparent);
    animation: slideLineRight 1s ease-out forwards;
}

.section-title.active h2::after {
    animation: slideLineRight 1s ease-out forwards;
}

/* ========================================
   4. 医師カードアニメーション（上品・控えめ）
======================================== */

.doctor-profile {
    opacity: 0;
    animation: gentleFadeIn 0.8s ease-out forwards;
    position: relative;
    overflow: hidden;
}

/* 上品なフェードインアニメーション */
@keyframes gentleFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 遅延アニメーション（控えめ） */
.doctor-profile:nth-child(1) { animation-delay: 0.15s; }
.doctor-profile:nth-child(2) { animation-delay: 0.25s; }
.doctor-profile:nth-child(3) { animation-delay: 0.35s; }
.doctor-profile:nth-child(4) { animation-delay: 0.45s; }

/* 上品なホバーエフェクト - 左側に微かなアクセントライン */
.doctor-profile::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(180deg, #0A3D3D 0%, #4A6B5B 50%, #FFD700 100%);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
    pointer-events: none;
}

.doctor-profile:hover::before {
    width: 4px;
}

/* カード内要素を前面に */
.doctor-profile > * {
    position: relative;
    z-index: 1;
}

/* ========================================
   5. バッジスタイル（静的・上品）
======================================== */

.doctor-badge {
    /* アニメーションなし - 静的な表示 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.doctor-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

/* ========================================
   6. 関連コンテンツカードアニメーション
======================================== */

.related-content-card {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* リップルエフェクト準備 */
.related-content-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(10, 61, 61, 0.1), transparent);
    transition: width 0.6s ease, height 0.6s ease;
    pointer-events: none;
}

.related-content-card:hover::before {
    width: 500px;
    height: 500px;
}

/* アイコン回転 */
.related-content-card:hover .card-icon i {
    transform: rotate(360deg);
}

.related-content-card .card-icon i {
    transition: transform 0.6s ease;
}

/* ========================================
   7. CTAセクションアニメーション
======================================== */

.cta-section {
    position: relative;
    overflow: hidden;
}

/* パララックス背景 */
.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(255, 215, 0, 0.1) 0%,
        transparent 70%
    );
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
}

/* CTAボタンパルス */
.cta-section .btn-accent-modern {
    animation: glow 2s ease-in-out infinite;
}

/* ========================================
   8. スクロールリビールクラス
======================================== */

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* 左からリビール */
.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

/* 右からリビール */
.scroll-reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* ========================================
   9. リップルエフェクト (クリック時)
======================================== */

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(10, 61, 61, 0.3), transparent);
    transform: scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

/* ========================================
   10. レスポンシブ対応
======================================== */

@media (max-width: 768px) {
    /* モバイルではアニメーション軽減 */
    .page-header::before,
    .doctor-profile::before {
        animation-duration: 5s;
    }
    
    .section-title h2::after {
        animation-duration: 0.8s;
    }
    
    .scroll-reveal,
    .scroll-reveal-left,
    .scroll-reveal-right {
        transform: translateY(15px);
    }
}

/* ========================================
   11. アクセシビリティ - モーション軽減
======================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .scroll-reveal,
    .scroll-reveal-left,
    .scroll-reveal-right {
        opacity: 1;
        transform: none;
    }
}
