/* index.html UI Enhancements */
/* Version 1.0.0 - トップページ専用UIエンハンスメント */

/* ========================================
   1. ヒーローセクション強化
   ======================================== */

.hero-enhanced {
    position: relative;
    overflow: hidden;
}

.hero-enhanced::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(79, 209, 197, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: hero-float 20s infinite ease-in-out;
    pointer-events: none;
}

@keyframes hero-float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(-50px, -30px) scale(1.1);
    }
}

.hero-title-animated {
    animation: hero-title-appear 1s ease-out;
}

@keyframes hero-title-appear {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle-animated {
    animation: hero-subtitle-appear 1s ease-out 0.3s backwards;
}

@keyframes hero-subtitle-appear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-cta-animated {
    animation: hero-cta-appear 1s ease-out 0.6s backwards;
}

@keyframes hero-cta-appear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ========================================
   2. 特徴カード (Features)
   ======================================== */

.feature-card-index {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.feature-card-index::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(44, 122, 123, 0.05) 0%, rgba(79, 209, 197, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.feature-card-index:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.feature-card-index:hover::before {
    opacity: 1;
}

.feature-icon-index {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2C7A7B, #4FD1C5);
    color: white;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 20px rgba(44, 122, 123, 0.3);
    transition: all 0.4s ease;
}

.feature-card-index:hover .feature-icon-index {
    transform: rotate(360deg) scale(1.15);
    box-shadow: 0 12px 30px rgba(44, 122, 123, 0.4);
}

/* ========================================
   3. クリニック紹介カード
   ======================================== */

.clinic-intro-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.clinic-intro-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #2C7A7B, #4FD1C5);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.clinic-intro-card:hover::after {
    transform: scaleX(1);
}

.clinic-intro-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.clinic-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
}

.clinic-image-wrapper img {
    transition: transform 0.6s ease;
}

.clinic-intro-card:hover .clinic-image-wrapper img {
    transform: scale(1.1);
}

/* ========================================
   4. サービスカード
   ======================================== */

.service-card-index {
    transition: all 0.3s ease;
    background: white;
    border-radius: 15px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.service-card-index::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.service-card-index:hover::before {
    left: 100%;
}

.service-card-index:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

.service-icon-index {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4FD1C5, #81E6D9);
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.service-card-index:hover .service-icon-index {
    transform: scale(1.1) rotate(5deg);
}

/* ========================================
   5. 統計・数値カード
   ======================================== */

.stats-card-index {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stats-card-index::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #2C7A7B, #4FD1C5, #F6AD55);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.stats-card-index:hover::before {
    transform: scaleX(1);
}

.stats-card-index:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.stats-number {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2C7A7B, #4FD1C5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: stats-count-up 2s ease-out;
}

@keyframes stats-count-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   6. CTAセクション強化
   ======================================== */

.cta-section-index {
    position: relative;
    background: linear-gradient(135deg, #2C7A7B, #1a5f61);
    overflow: hidden;
}

.cta-section-index::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(79, 209, 197, 0.1) 0%, transparent 50%);
    animation: cta-pulse 15s infinite;
}

@keyframes cta-pulse {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(10%, 10%) scale(1.1);
    }
}

.cta-btn-index {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #F6AD55, #FBD38D);
    color: white;
    border: none;
    padding: 1.2rem 3rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(246, 173, 85, 0.4);
    z-index: 1;
}

.cta-btn-index::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;
    z-index: -1;
}

.cta-btn-index:hover::before {
    width: 400px;
    height: 400px;
}

.cta-btn-index:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(246, 173, 85, 0.5);
}

/* ========================================
   7. スクロールアニメーション
   ======================================== */

.fade-in-up-index {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-up-index.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-index {
    opacity: 0;
    transition: opacity 0.8s ease;
}

.fade-in-index.visible {
    opacity: 1;
}

.slide-in-left-index {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.slide-in-left-index.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right-index {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.slide-in-right-index.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-up-index {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scale-up-index.visible {
    opacity: 1;
    transform: scale(1);
}

.zoom-in-index {
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.zoom-in-index.visible {
    opacity: 1;
    transform: scale(1);
}

/* ========================================
   8. セクションタイトル統一デザイン
   ======================================== */

.section-title-index {
    position: relative;
    padding-bottom: 25px;
    margin-bottom: 50px;
    text-align: center;
}

.section-title-index::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 5px;
    background: linear-gradient(90deg, #2C7A7B, #4FD1C5, #F6AD55);
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(44, 122, 123, 0.3);
}

.section-title-index h2 {
    font-size: 2.5rem;
    color: #2C7A7B;
    font-weight: 700;
    margin-bottom: 15px;
}

.section-title-index p {
    font-size: 1.1rem;
    color: #4A5568;
    line-height: 1.8;
}

/* ========================================
   9. ニュース・お知らせカード
   ======================================== */

.news-card-index {
    transition: all 0.3s ease;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border-left: 4px solid transparent;
}

.news-card-index:hover {
    transform: translateX(8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-left-color: #4FD1C5;
}

/* ========================================
   10. スライダー強化
   ======================================== */

.swiper-slide-enhanced {
    transition: all 0.3s ease;
}

.swiper-slide-enhanced:hover {
    transform: scale(1.02);
}

.swiper-pagination-bullet-active {
    background: linear-gradient(135deg, #2C7A7B, #4FD1C5) !important;
}

/* ========================================
   11. グリッドレイアウト
   ======================================== */

.features-grid-index {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 35px;
}

.services-grid-index {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.clinics-grid-index {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
}

.stats-grid-index {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

/* ========================================
   12. レスポンシブ調整
   ======================================== */

@media screen and (max-width: 768px) {
    .feature-card-index:hover {
        transform: translateY(-6px) scale(1.01);
    }
    
    .section-title-index h2 {
        font-size: 2rem;
    }
    
    .section-title-index::after {
        width: 80px;
        height: 4px;
    }
    
    .feature-icon-index {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
    
    .stats-number {
        font-size: 2.5rem;
    }
    
    .cta-btn-index {
        padding: 1rem 2.5rem;
        font-size: 1.1rem;
    }
    
    .features-grid-index,
    .services-grid-index,
    .clinics-grid-index {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

@media screen and (max-width: 480px) {
    .fade-in-up-index,
    .slide-in-left-index,
    .slide-in-right-index,
    .scale-up-index,
    .zoom-in-index {
        /* モバイルではアニメーション無効化 */
        opacity: 1 !important;
        transform: none !important;
    }
    
    .section-title-index h2 {
        font-size: 1.6rem;
    }
    
    .feature-icon-index {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .stats-number {
        font-size: 2rem;
    }
    
    .cta-btn-index {
        padding: 0.9rem 2rem;
        font-size: 1rem;
    }
    
    .stats-grid-index {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   13. パーティクル背景（オプション）
   ======================================== */

.particles-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.3;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #4FD1C5;
    border-radius: 50%;
    animation: particle-float 20s infinite;
}

@keyframes particle-float {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

/* ========================================
   14. アクセシビリティ改善
   ======================================== */

.feature-card-index:focus,
.clinic-intro-card:focus,
.service-card-index:focus,
.cta-btn-index:focus {
    outline: 3px solid #4FD1C5;
    outline-offset: 3px;
}

/* ========================================
   15. プリント対応
   ======================================== */

@media print {
    .feature-card-index,
    .clinic-intro-card,
    .service-card-index,
    .stats-card-index {
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
    
    .fade-in-up-index,
    .slide-in-left-index,
    .slide-in-right-index,
    .scale-up-index,
    .zoom-in-index {
        opacity: 1 !important;
        transform: none !important;
    }
}
