/* ベース設定 */
:root {
    --primary-color: #0ea5e9; /* 優しいブルー */
    --primary-light: #e0f2fe;
    --secondary-color: #38bdf8;
    --accent-color: #fb923c; /* あたたかいオレンジ（かわいらしさ・安心感） */
    --accent-light: #ffedd5;
    --text-main: #334155;
    --text-muted: #64748b;
    --bg-color: #fffaf5; /* ほんのり温かみのある背景 */
    --card-bg: rgba(255, 255, 255, 0.95);
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans JP', sans-serif;
    background: linear-gradient(135deg, #fffaf5 0%, #fff7ed 100%);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3, h4 {
    margin: 0;
}

p {
    margin: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ヘッダー */
.header {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-text-group {
    display: flex;
    flex-direction: column;
}

.clinic-name {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: color 0.3s;
}

.clinic-name:hover {
    color: var(--primary-color);
}

.logo h1 {
    font-size: 1.15rem;
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.2;
}

.nav {
    display: flex;
    gap: 1.5rem;
}

.nav a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    transition: color 0.3s;
}

.nav a:hover {
    color: var(--primary-color);
}

/* ヒーローセクション */
.hero {
    position: relative;
    max-width: 1000px;
    margin: 4rem auto;
    padding: 4rem 3rem;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-radius: 24px;
    background: linear-gradient(to right, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(5px);
}

.hero-content {
    position: relative;
    z-index: 2;
    flex: 1.2;
}

.hero-image {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    max-width: 110%;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.05));
    animation: float 6s ease-in-out infinite;
}

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

.hero-content h2 {
    font-size: 2.0rem;
    line-height: 1.4;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.hero-badge {
    display: inline-block;
    background-color: #10b981; /* 緑地 */
    color: #fef9c3; /* 薄黄色文字 */
    font-size: 2.0rem;
    padding: 0.25rem 1.25rem;
    border-radius: 9999px;
    margin-bottom: 0.75rem;
    font-weight: 700;
    line-height: 1.4;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-weight: 500;
}

.btn-primary {
    display: inline-block;
    background: var(--accent-color);
    color: #fff;
    padding: 1rem 2.5rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 14px 0 rgba(251, 146, 60, 0.4);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 146, 60, 0.6);
    background: #f97316;
}

.hero-shapes {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--primary-light);
    top: -50px;
    right: 10%;
}

.shape-2 {
    width: 250px;
    height: 250px;
    background: var(--accent-light);
    bottom: -50px;
    right: -5%;
}

/* メインコンテンツ */
.main-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.section {
    margin-bottom: 4rem;
}

.card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255,255,255,0.8);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px dashed var(--accent-light);
    padding-bottom: 1rem;
}

.section-icon {
    font-size: 2rem;
}

.section-header h2 {
    font-size: 1.75rem;
    color: var(--primary-color);
}

.highlight-text {
    font-size: 1.15rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.mechanism-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.mechanism-box {
    background: #fff;
    padding: 1.5rem;
    border-radius: 16px;
    border: 2px solid var(--primary-light);
    transition: transform 0.3s;
}

.mechanism-box:hover {
    transform: translateY(-5px);
}

.mechanism-box h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.target-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.target-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.target-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.info-box {
    background: var(--accent-light);
    border: 1px solid var(--accent-color);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}

/* 院長メッセージフッター */
.director-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-top: 1rem;
}

.director-name-area {
    flex: 1;
}

.director-name {
    text-align: right;
    font-size: 1.1rem;
    color: var(--text-main);
    font-weight: 700;
    margin: 0;
    padding-top: 10px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.director-image-area {
    flex-shrink: 0;
    text-align: right;
}

.director-image-area img {
    width: 120px;
    height: auto;
}

/* アコーディオン・治療の流れ (新) */
.flow-intro {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.flow-intro p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.flow-intro p:last-child {
    margin-bottom: 0;
}

.accordion-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.accordion-item {
    background: #fff;
    border: 2px solid var(--primary-light);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-item[open] {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.accordion-header {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    background: #fff;
    list-style: none; /* デフォルトの矢印を消す */
    position: relative;
    user-select: none;
}

.accordion-header::-webkit-details-marker {
    display: none; /* Safari向けのデフォルト矢印を消す */
}

.accordion-header:hover {
    background: var(--primary-light);
}

.pattern-badge {
    background: var(--primary-color);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 1rem;
    flex-shrink: 0;
}

.pattern-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    flex: 1;
}

.accordion-icon {
    width: 20px;
    height: 20px;
    position: relative;
    flex-shrink: 0;
}

.accordion-icon::before,
.accordion-icon::after {
    content: '';
    position: absolute;
    background-color: var(--primary-color);
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.accordion-icon::before {
    top: 0;
    left: 9px;
    width: 2px;
    height: 20px;
}

.accordion-icon::after {
    top: 9px;
    left: 0;
    width: 20px;
    height: 2px;
}

.accordion-item[open] .accordion-icon::before {
    transform: rotate(90deg);
}

.accordion-item[open] .accordion-icon::after {
    transform: rotate(180deg);
}

.accordion-content {
    padding: 0 1.5rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: #fafafa;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 受診カード */
.visit-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--accent-color);
}

.visit-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed var(--border-color);
}

.visit-badge {
    background: var(--accent-color);
    color: #fff;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.95rem;
}

.visit-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.visit-highlight {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 0.95rem;
}

.visit-list {
    margin: 0;
    padding-left: 1.5rem;
    list-style-type: disc;
}

.visit-list li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.visit-list li:last-child {
    margin-bottom: 0;
}

.visit-note {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.visit-text {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.visit-subtitle {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

/* パターンB・C用 ボックス */
.required-items {
    background: var(--accent-light);
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.required-title {
    color: var(--accent-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.case-box {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.case-box:last-child {
    margin-bottom: 0;
}

.case-title {
    color: var(--text-main);
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.case-next {
    margin-top: 0.75rem;
    font-weight: 700;
    color: var(--accent-color);
}

.case-note {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
}

.case-note h6 {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.score-items {
    background: rgba(255,255,255,0.6);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.score-items-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.must-bring {
    background: rgba(255,255,255,0.6);
    border-radius: 8px;
    padding: 1rem;
}

.must-bring-title {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.must-bring-list {
    margin: 0;
    padding-left: 1.5rem;
    font-weight: 700;
}

.must-bring-list li {
    margin-bottom: 0.5rem;
}

/* アクセス案内 */
.access-content {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.clinic-info {
    flex: 1;
}

.clinic-info h4 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.address {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.access-note {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.access-map {
    flex: 1.2;
}

/* フッター */
.footer {
    text-align: center;
    padding: 3rem 2rem;
    background: #0f172a;
    color: #cbd5e1;
}

.footer-note {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    color: #94a3b8;
}

/* Q&Aセクション */
.qa-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.qa-item {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.q-box {
    background: var(--primary-light);
    color: var(--primary-color);
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.q-icon {
    background: var(--primary-color);
    color: #fff;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.a-box {
    padding: 1.25rem 1.5rem;
    display: flex;
    gap: 0.75rem;
    color: var(--text-main);
    line-height: 1.7;
}

.a-icon {
    background: var(--accent-color);
    color: #fff;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.a-box > div {
    flex: 1;
}

.qa-list {
    margin: 0.75rem 0 0 0;
    padding-left: 1.5rem;
    list-style-type: disc;
}

.qa-list li {
    margin-bottom: 0.75rem;
}

.qa-list li:last-child {
    margin-bottom: 0;
}

/* 参考文献リンク */
.ref-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fff;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    transition: all 0.3s;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.ref-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(14,165,233,0.15);
    transform: translateX(4px);
}

.ref-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.ref-text {
    font-weight: 700;
    line-height: 1.4;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.3s;
}

.ref-link:hover .ref-text {
    text-decoration-color: var(--primary-color);
}

/* PC/SP改行コントロール */
.sp-br { display: none; }
.pc-br { display: block; }

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .pc-br { display: none; }
    .sp-br { display: block; }
    
    .header-container {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }

    .logo h1 {
        font-size: 1rem;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem 1rem;
    }

    .nav a {
        font-size: 0.85rem;
    }

    .access-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .hero {
        margin: 1.5rem 1rem;
        padding: 2rem 1.5rem;
        flex-direction: column;
    }
    
    .hero-content h2 {
        font-size: 1.4rem;
        text-align: center;
    }

    .hero-badge {
        font-size: 1.4rem;
        padding: 0.2rem 1rem;
    }

    .hero-content p {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .hero-image {
        margin-bottom: 2rem;
        order: -1; /* 画像をテキストの上に表示 */
    }

    .hero-image img {
        max-width: 80%;
    }

    
    .btn-primary {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }
    
    .mechanism-grid {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        padding: 0 1rem 3rem;
    }

    .section {
        margin-bottom: 2.5rem;
    }

    .card {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .section-header {
        margin-bottom: 1.25rem;
        padding-bottom: 0.75rem;
    }

    .section-header h2 {
        font-size: 1.4rem;
    }

    .section-icon {
        font-size: 1.5rem;
    }

    .highlight-text {
        font-size: 1.05rem;
    }

    .target-list li {
        font-size: 0.95rem;
        padding-left: 1.75rem;
    }

    .info-box {
        padding: 1.25rem;
    }

    .visit-card {
        padding: 1.25rem;
    }

    .pattern-badge {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }

    .pattern-title {
        font-size: 1.05rem;
    }

    .accordion-header {
        padding: 1rem;
    }

    .clinic-info h4 {
        font-size: 1.2rem;
    }

    .footer {
        padding: 2.5rem 1rem;
    }

    .director-footer {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .director-name {
        text-align: center;
    }

    .director-image-area {
        order: -1;
    }

    .q-box {
        padding: 1rem;
        font-size: 1.05rem;
    }

    .a-box {
        padding: 1rem;
    }
}
