/* ベース設定 */
:root {
    --primary-color: #1e3a8a; /* 深い青（夜をイメージ） */
    --primary-light: #e0e7ff; /* 淡い青 */
    --secondary-color: #3b82f6; /* 明るい青 */
    --accent-color: #f59e0b; /* 月や星のような温かい黄色 */
    --text-main: #334155;
    --text-muted: #64748b;
    --bg-color: #f8fafc;
    --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, #f8fafc 0%, #e0e7ff 100%);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3, h4, 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: 3rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    overflow: hidden;
    border-radius: 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #f0f9ff 100%);
    box-shadow: var(--shadow-lg);
}

.hero-content {
    position: relative;
    z-index: 2;
    flex: 1;
    max-width: 500px;
}

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

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.hero-content h2 {
    font-size: 2.5rem;
    line-height: 1.3;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

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

.btn-primary {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-weight: 700;
    box-shadow: 0 4px 14px 0 rgba(30, 58, 138, 0.39);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.5);
    background: var(--secondary-color);
}

.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.5;
}

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

.shape-2 {
    width: 250px;
    height: 250px;
    background: var(--accent-color);
    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 solid var(--primary-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.1rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

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

.mechanism-box {
    background: var(--primary-light);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

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

.citation {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: right;
}

.info-box {
    background: #fff;
    border: 1px solid #10b981;
    padding: 1.5rem;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.info-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: #10b981;
}

.info-box strong {
    color: #059669;
    font-size: 1.2rem;
}

/* 治療薬セクション */
.section-title-wrapper {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title-wrapper h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.treatment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.category-header {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    color: #fff;
    text-align: center;
}

.category-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.medicine-item {
    margin-bottom: 1.5rem;
}

.medicine-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.medicine-name h4 {
    font-size: 1.2rem;
    color: var(--text-main);
}

.medicine-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.medicine-features {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.medicine-features li {
    background: var(--primary-light);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 700;
}

/* アクセス案内 */
.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;
}

.access-map img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

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

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

/* 院長メッセージフッター */
.director-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}
.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;
}

/* 予約ボタン */
.btn-reserve {
    padding: 0.6rem 5rem;
    font-size: 1.15rem;
    font-weight: 700;
    background-color: #0ea5e9;
    border: none;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.4);
    display: inline-block;
}
.btn-reserve:hover {
    background-color: #0284c7;
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5);
    transform: translateY(-2px);
}

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

/* レスポンシブ対応（スマホ最適化） */
@media (max-width: 768px) {
    .pc-br { display: none; }
    .sp-br { display: block; }
    
    .header {
        position: relative;
    }
    
    .header-container {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem 1.25rem;
    }
    
    .hero {
        margin: 1.5rem 1rem;
        padding: 2rem 1.5rem;
        border-radius: 20px;
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content h2 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }

    .hero-content p {
        font-size: 0.95rem;
    }

    .main-content {
        padding: 0 1rem 3rem;
    }

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

    .section-header h2 {
        font-size: 1.35rem;
    }
    
    .mechanism-grid {
        grid-template-columns: 1fr;
    }

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

    .director-footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }
    .director-name-area {
        width: 100%;
    }
    .director-name {
        text-align: center;
    }

    .btn-primary {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
        width: 100%;
        box-sizing: border-box;
        text-align: center;
        display: block;
    }

    .btn-reserve {
        padding: 0.8rem 1.5rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    .access-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .footer {
        padding: 2rem 1rem;
    }
}

/* アコーディオン (診療の流れ) */
.accordion-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.accordion-item {
    background: #fff;
    border: 1px solid rgba(30, 58, 138, 0.08);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px -2px rgba(30, 58, 138, 0.04), 0 2px 6px -1px rgba(30, 58, 138, 0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.accordion-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px -5px rgba(30, 58, 138, 0.08), 0 8px 16px -6px rgba(30, 58, 138, 0.04);
    border-color: rgba(30, 58, 138, 0.15);
}
.accordion-item[open] {
    border-color: rgba(30, 58, 138, 0.15);
    box-shadow: 0 12px 30px -5px rgba(30, 58, 138, 0.08), 0 8px 20px -6px rgba(30, 58, 138, 0.04);
    transform: translateY(0); /* 開いているときは固定 */
}
.accordion-header {
    display: flex;
    align-items: center;
    padding: 1.35rem 1.75rem;
    cursor: pointer;
    background: #fff;
    list-style: none;
    position: relative;
    user-select: none;
    outline: none;
}
.accordion-header::-webkit-details-marker {
    display: none;
}
.pattern-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-color);
    flex: 1;
    line-height: 1.4;
    transition: color 0.2s ease;
}
.accordion-item:hover .pattern-title {
    color: var(--secondary-color);
}
.accordion-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}
.accordion-icon::before {
    content: '';
    width: 6px;
    height: 6px;
    border-right: 2px solid var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}
.accordion-item[open] .accordion-icon {
    background: var(--primary-color);
}
.accordion-item[open] .accordion-icon::before {
    border-color: #fff;
    transform: translateY(1px) rotate(-135deg);
}
.accordion-content {
    padding: 0.5rem 1.75rem 1.75rem;
    background: #fff;
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.flow-list {
    margin: 0.5rem 0 0 0;
    padding-left: 1.5rem;
    line-height: 1.85;
}
.flow-list li {
    margin-bottom: 0.75rem;
    color: var(--text-main);
}
.flow-list li:last-child {
    margin-bottom: 0;
}
.flow-intro {
    margin-bottom: 2rem;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-main);
    background: #eff6ff;
    padding: 1.5rem 1.75rem;
    border-radius: 16px;
    border-left: 4px solid var(--secondary-color);
}
