/**
 * Common Pages UI Enhancements
 * Version: 1.0.0
 * 
 * Applies to: doctor, faq, news, philosophy, nad-therapy, nutrition-therapy, testimonials, reserve, price
 * 
 * Features:
 * - Doctor profile cards
 * - FAQ accordion animations
 * - News card effects
 * - Philosophy storytelling
 * - Therapy detail cards
 * - Testimonial cards
 * - Reserve form enhancements
 * - Price table animations
 */

/* ========================================
   1. 医師プロフィールカード (doctor-card)
   ======================================== */

.doctor-card-common {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.doctor-card-common::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(79, 209, 197, 0.1), transparent);
    transition: left 0.8s ease;
}

.doctor-card-common:hover::before {
    left: 100%;
}

.doctor-card-common:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 35px rgba(44, 122, 123, 0.15);
}

.doctor-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #4FD1C5;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(79, 209, 197, 0.3);
}

.doctor-card-common:hover .doctor-photo {
    transform: scale(1.05);
    border-color: #2C7A7B;
    box-shadow: 0 8px 25px rgba(44, 122, 123, 0.4);
}

/* ========================================
   2. FAQアコーディオン (faq-item)
   ======================================== */

.faq-item-common,
.faq-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 2px solid #E2E8F0;
    transition: all 0.3s ease;
    overflow: hidden;
}

.faq-item-common:hover,
.faq-item:hover {
    border-color: #4FD1C5;
    box-shadow: 0 4px 16px rgba(79, 209, 197, 0.15);
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    color: #2D3748;
    transition: all 0.3s ease;
    user-select: none;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    font-size: inherit;
    font-family: inherit;
    position: relative;
    z-index: 1;
}

.faq-question * {
    pointer-events: none;
}

.faq-question:hover {
    background: linear-gradient(135deg, #E6FFFA, #B2F5EA);
    color: #2C7A7B;
}

.faq-question .faq-icon {
    font-size: 1.5rem;
    color: #4FD1C5;
    transition: transform 0.3s ease;
}

.faq-item-common.active .faq-question .faq-icon,
.faq-item.active .faq-question .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0 !important;
    overflow: hidden !important;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 1.5rem !important;
}

.faq-item-common.active .faq-answer,
.faq-item.active .faq-answer {
    max-height: 2000px !important;
    padding: 0 1.5rem 1.5rem !important;
}

/* ========================================
   3. ニュースカード (news-card)
   ======================================== */

.news-card-common {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid #4FD1C5;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: block;
}

.news-card-common:hover {
    transform: translateX(8px);
    box-shadow: 0 6px 20px rgba(79, 209, 197, 0.2);
    border-left-color: #2C7A7B;
}

.news-date {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.news-card-common:hover .news-date {
    color: #2C7A7B;
}

.news-category {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.news-category.important {
    background: linear-gradient(135deg, #FED7AA, #FFF5E6);
    color: #C05621;
}

.news-category.update {
    background: linear-gradient(135deg, #B2F5EA, #E6FFFA);
    color: #2C7A7B;
}

.news-card-common:hover .news-category {
    transform: scale(1.05);
}

/* ========================================
   4. 医療哲学セクション (philosophy-section)
   ======================================== */

.philosophy-block {
    background: linear-gradient(135deg, #ECFDF5, #D1FAE5);
    padding: 3rem;
    border-radius: 20px;
    border-left: 6px solid #10B981;
    margin-bottom: 2.5rem;
    transition: all 0.4s ease;
}

.philosophy-block:hover {
    transform: translateX(10px);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.2);
}

.philosophy-icon {
    font-size: 3rem;
    color: #10B981;
    margin-bottom: 1.5rem;
    display: inline-block;
    transition: all 0.4s ease;
}

.philosophy-block:hover .philosophy-icon {
    transform: scale(1.2) rotate(5deg);
    filter: drop-shadow(0 4px 12px rgba(16, 185, 129, 0.4));
}

/* ========================================
   5. 療法詳細カード (therapy-detail-card)
   ======================================== */

.therapy-detail-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-top: 5px solid #4FD1C5;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 2rem;
}

.therapy-detail-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(44, 122, 123, 0.15);
}

.therapy-feature-list {
    list-style: none;
    padding: 0;
}

.therapy-feature-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #E2E8F0;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 2rem;
}

.therapy-feature-list li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: #10B981;
    transition: all 0.3s ease;
}

.therapy-feature-list li:hover {
    padding-left: 2.5rem;
    color: #2C7A7B;
}

.therapy-feature-list li:hover::before {
    transform: scale(1.2);
    color: #2C7A7B;
}

/* ========================================
   6. お客様の声カード (testimonial-card)
   ======================================== */

.testimonial-card-common {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-card-common::before {
    content: '\f10d';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 3rem;
    color: #E6FFFA;
    position: absolute;
    top: 1rem;
    right: 1rem;
    opacity: 0.5;
    transition: all 0.4s ease;
}

.testimonial-card-common:hover::before {
    color: #4FD1C5;
    opacity: 1;
    transform: scale(1.2);
}

.testimonial-card-common:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(79, 209, 197, 0.15);
}

.testimonial-rating {
    color: #F6AD55;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.testimonial-rating i {
    transition: transform 0.2s ease;
}

.testimonial-card-common:hover .testimonial-rating i {
    transform: scale(1.2);
}

/* ========================================
   7. 予約フォーム強化 (reserve-form)
   ======================================== */

.reserve-form-field {
    margin-bottom: 1.5rem;
}

.reserve-form-field label {
    display: block;
    font-weight: 600;
    color: #2D3748;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.reserve-form-field input,
.reserve-form-field select,
.reserve-form-field textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #E2E8F0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.reserve-form-field input:focus,
.reserve-form-field select:focus,
.reserve-form-field textarea:focus {
    outline: none;
    border-color: #4FD1C5;
    box-shadow: 0 0 0 3px rgba(79, 209, 197, 0.1);
}

.reserve-form-field input:focus + label,
.reserve-form-field select:focus + label,
.reserve-form-field textarea:focus + label {
    color: #2C7A7B;
}

.btn-reserve-submit {
    background: linear-gradient(135deg, #2C7A7B, #4FD1C5);
    color: white;
    padding: 1.25rem 3rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(44, 122, 123, 0.3);
}

.btn-reserve-submit:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(44, 122, 123, 0.4);
    background: linear-gradient(135deg, #234E52, #2C7A7B);
}

/* ========================================
   8. 料金テーブル (price-table)
   ======================================== */

.price-table-common {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.price-table-common thead tr {
    background: linear-gradient(135deg, #2C7A7B, #4FD1C5);
    color: white;
}

.price-table-common thead th {
    padding: 1.25rem;
    font-weight: 600;
    text-align: left;
}

.price-table-common tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #E2E8F0;
}

.price-table-common tbody tr:hover {
    background: linear-gradient(135deg, #E6FFFA, #B2F5EA);
    transform: scale(1.02);
}

.price-table-common tbody td {
    padding: 1rem 1.25rem;
}

.price-amount {
    font-size: 1.3rem;
    font-weight: 700;
    color: #C05621;
}

/* ========================================
   9. スクロールアニメーション（共通）
   ======================================== */

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

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

.fade-in-common {
    opacity: 0;
    transition: opacity 0.7s ease;
}

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

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

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

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

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

.scale-up-common {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

@media (max-width: 768px) {
    .doctor-card-common {
        padding: 1.5rem;
    }

    .doctor-photo {
        width: 120px;
        height: 120px;
    }

    .philosophy-block {
        padding: 2rem;
    }

    .therapy-detail-card {
        padding: 1.5rem;
    }

    .testimonial-card-common {
        padding: 1.5rem;
    }

    .btn-reserve-submit {
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    .price-table-common {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .doctor-photo {
        width: 100px;
        height: 100px;
    }

    .philosophy-icon {
        font-size: 2.5rem;
    }

    .faq-question {
        padding: 1rem;
        font-size: 0.95rem;
    }

    .news-card-common {
        padding: 1rem;
    }

    .price-table-common thead th,
    .price-table-common tbody td {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
}

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

@media print {
    .doctor-card-common,
    .news-card-common,
    .testimonial-card-common,
    .therapy-detail-card {
        box-shadow: none !important;
        border: 1px solid #CBD5E0 !important;
    }

    .faq-answer {
        max-height: none !important;
        display: block !important;
    }

    .btn-reserve-submit {
        background: #2C7A7B !important;
        color: white !important;
    }
}
