/* ===== HERO ===== */
/* ヒーローセクション */
.hero {
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 100px 0;
    position: relative;
    text-align: left; /* 左寄せ */
}
.hero.lazyloaded {
    background-image: url('../image/hero_section.jpg'); /* 仮画像 */
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2); /* オーバーレイ */
}

.hero .container {
    position: relative;
    z-index: 1;
    width: 95%;
}

.hero-content {
    max-width: 60%; /* 左側にコピースペース */
}

.hero-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
}

.hero .cta-buttons .cta-button {
    margin: 5px;
}

.cta-buttons .cta-button.secondary {
    background-color: var(--main-color);
    color: #fff;
}

.hero .cta-buttons .cta-button.secondary:hover {
    background-color: #ca613e;
    color: #000;
}

/* ===== MESSAGE ===== */
/* メッセージセクション */
.message {
    padding: 60px 0;
    text-align: center;
    background-color: #f9f9f9;
}

.message h3 {
    font-size: 32px;
    color: var(--main-color);
    margin-bottom: 40px;
}

.message p {
    font-size: 18px;
    margin-bottom: 20px;
}

.message-content {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-top: 40px;
    text-align: left;
}

.message-image img {
    width: 300px;
    height: auto;
    display: block;
    border-radius: 0; /* 角張デザイン */
}

.message-text h4 {
    font-size: 24px;
    color: var(--main-color);
    margin: 10px 0;
    line-height: 1.5;
}

.message-text p {
    font-size: 16px;
    margin-bottom: 15px;
    line-height: 1.6;
}

/* ===== COMPARISON TABLE ===== */
/* 比較表セクション */
.comparison-table {
    padding: 60px 0;
    background-color: #fff;
}

.comparison-table h3 {
    font-size: 32px;
    color: var(--main-color);
    margin-bottom: 40px;
    text-align: center;
}

/* --- 新しいカードベース比較 --- */
.comparison-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: stretch;
}

.compare-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(13, 26, 56, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(13, 26, 56, 0.06);
}

.compare-card__header {
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.compare-card--before .compare-card__header {
    background: #d9534f;
    color: #fff;
}

.compare-card--after .compare-card__header {
    background: #83ca23;
    color: #fff;
}

.compare-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.25);
}

.compare-card__header h4 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.compare-card__body {
    padding: 24px;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.compare-conditions {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px dashed #ddd;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.compare-conditions p {
    margin: 0 0 8px;
    font-size: 14px;
    color: var(--main-color);
}

.compare-conditions ul {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    color: #555;
    line-height: 1.7;
}

.compare-rows {
    display: grid;
    grid-auto-rows: 1fr;
    gap: 0;
    margin-bottom: 20px;
}

.compare-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.compare-row__label {
    flex: 1 1 140px;
    font-size: 14px;
    color: #555;
    min-width: 140px;
}

.compare-row__amount {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    text-align: right;
    min-width: 120px;
}

.compare-row__note {
    flex: 1 1 100%;
    font-size: 12px;
    color: #888;
}

.compare-row--important {
    background: #fff9e6;
    margin: 0 -12px;
    padding: 10px 12px;
    border-radius: 8px;
    border-bottom: none;
}

.compare-row--important .compare-row__label {
    color: var(--main-color);
    font-weight: 700;
}

.compare-row--important .compare-row__amount {
    font-size: 18px;
    color: var(--main-color);
}

.compare-highlight {
    margin-top: auto;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    color: #fff;
}

.compare-highlight--before {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.compare-highlight--after {
    background: linear-gradient(135deg, #83ca23 0%, #5a9e0a 100%);
}

.compare-highlight__label {
    margin: 0 0 6px;
    font-size: 13px;
    opacity: 0.9;
}

.compare-highlight__value {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.compare-highlight__note {
    margin: 6px 0 0;
    font-size: 12px;
    opacity: 0.85;
}

.compare-card__footer {
    padding: 0 24px 24px;
}

.compare-card__footer .fancy-card {
    margin: 0;
}

/* --- 旧テーブル比較（互換性） --- */
.comparison-table table {
    max-width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
    border: 1px solid #ddd;
}

.comparison-table th,
.comparison-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.comparison-table th {
    background-color: var(--main-color);
    color: #FFF;
}

.comparison-table .note {
    font-size: 14px;
    color: #888;
    margin-top: 20px;
}

.comparison-table .simulation-conditions {
    list-style: disc;
    padding-left: 20px;
    text-align: left;
}

.comparison-table .simulation-conditions li {
    margin-bottom: 5px;
}

/* 前提条件を左右に並べるコンテナ */
.simulation-conditions-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
    margin-bottom: 24px;
}
.simulation-conditions-left,
.simulation-conditions-right {
    text-align: left;
}

/* 比較テーブル：等高にする設定 */
.comparison-tables-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    grid-auto-rows: 1fr;
}

.comparison-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: stretch;
    grid-auto-rows: auto 1fr;
    grid-template-areas:
        "cond-left cond-right"
        "table-left table-right";
}

.condition.left { grid-area: cond-left; }
.condition.right { grid-area: cond-right; }

.comparison-table-wrapper.left { grid-area: table-left; }
.comparison-table-wrapper.right { grid-area: table-right; }

.comparison-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
}

.comparison-column .comparison-table-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.comparison-table-wrapper {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.comparison-table-wrapper h4 {
    font-size: 24px;
    color: var(--main-color);
    margin-bottom: 20px;
}

.comparison-table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    border: 1px solid #ddd;
    flex: 1 1 auto;
}

.comparison-table-wrapper th,
.comparison-table-wrapper td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
}

.comparison-table-wrapper th {
    background-color: var(--main-color);
    color: #FFF;
}

.comparison-table-wrapper ul {
    list-style: disc;
    padding-left: 20px;
}

.comparison-table-wrapper li {
    margin-bottom: 5px;
}

.comparison-table-wrapper .summary {
    margin-top: auto;
}

/* ===== FANCY CARD / FANCY LIST ===== */
/* --- モダンなカード（fancy-card / fancy-list）--- */
.fancy-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,252,255,0.98));
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(13,26,56,0.06);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(13,26,56,0.05);
  margin: 20px 0px;
}

/* 左のアクセントライン */
.fancy-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: #83ca23;
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

/* 赤ライン（A先生の課題用）*/
.fancy-card.fancy-card--danger::before {
  background: #e74c3c;
}

/* カードヘッダー */
.fancy-card-header {
  font-size: 16px;
  color: var(--main-color);
  font-weight: 700;
  margin-bottom: 12px;
  padding-left: 6px; /* アクセントライン分の余白を確保 */
}

/* fancy-list（アイコン付き） */
.fancy-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fancy-list li {
  position: relative;
  line-height: 1.7;
  transition: transform 0.18s ease, background-color 0.18s ease;
  border-radius: 8px;
}

/* 強調部分の色 */
.fancy-list li strong {
  color: var(--main-color);
  font-weight: 700;
}

/* ===== CASES ===== */
/* 事例セクション */
.cases {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #0d1a38; /* 背景色 */
}

.cases .case-content {
    display: flex;
    width: 100%;
    height: 100%;
}

.cases .case-image {
    display: flex;
    justify-content: center;
    width: 33%;
}

.cases .case-text-container {
    flex: 1;
    background-color: #003366; /* メインカラー */
    color: #fff;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cases h3{
    text-align: center;
    font-size: 36px;
    color: #FFF;
    margin-top: 10px;
    margin-bottom: 0px;
}

.cases .case-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cases .card {
    background-color: #fff;
    color: #333;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    text-align: left;
}

.cases .card p {
    font-size: 18px;
    margin: 5px 10px;
    line-height: 1.5;
}

.cases .card span {
    font-size: 14px;
    color: #666;
    display: block;
    text-align: right;
}

/* ===== BENEFITS ===== */
/* メリットセクション */
.benefits {
    padding: 60px 0;
    background-color: #fff;
    text-align: center;
}

.benefits h3 {
    font-size: 32px;
    color: var(--main-color);
    margin-bottom: 40px;
}

.benefits .benefit-items {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 50px;
    margin-bottom: 50px;
}

.benefits .benefit-item {
    width: 25%;
    text-align: center;
}

.benefits .benefit-item i {
    font-size: 80px;
    color: var(--main-color);
    margin-bottom: 20px;
    display: block;
    margin: 0 auto;
}

.benefits .benefit-item h4 {
    font-size: 18px;
    color: #FFF;
    margin-bottom: 10px;
    padding: 8px 0px;
    background-color: var(--main-color);
}

.benefits .benefit-item p {
    font-size: 16px;
    color: #555;
}

/* ===== MIDDLE CTA ===== */
/* 中間CTAセクション */
.middle-cta {
    background-color: var(--main-color); /* プライマリーカラー：紺色 */
    color: #fff;
    padding: 80px 0;
    text-align: center;
}

.middle-cta h3 {
    font-size: 36px;
    margin-bottom: 40px;
}

.middle-cta .services {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 50px;
}

.middle-cta .service-item {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    width: 25%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-align: center;
}

.middle-cta .service-item i {
    font-size: 48px; /* アイコンのサイズ */
}

.middle-cta .service-item h4 {
    font-size: 24px;
    margin-bottom: 15px;
}

.middle-cta .service-item p {
    font-size: 16px;
}

/* ===== ACHIEVEMENTS ===== */
/* 実績セクション */
.achievements {
    padding: 60px 0;
    background-color: #f9f9f9;
    text-align: center;
}

.achievements h3 {
    font-size: 32px;
    color: var(--main-color);
    margin-bottom: 40px;
}

.achievements .stats {
    display: flex;
    justify-content: center;
    gap: 50px;
}

.achievements .stat-item {
    background-color: #fff;
    padding: 20px; /* パディングを減らす */
    border-radius: 8px; /* 角を丸くする */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* 影を追加 */
    text-align: center;
    width: 45%; /* 幅を柔軟に */
    max-width: 250px; /* 最大幅を設定 */
}

.achievements .stat-item i {
    font-size: 60px; /* アイコンのサイズを大きく */
    color: var(--main-color); /* メインカラーを適用 */
    margin-bottom: 15px;
}

.achievements .stat-item h4 {
    font-size: 20px; /* 項目名のフォントサイズを調整 */
    color: #555;
    margin: 5px;
}

.achievements .stat-item h3 {
    font-size: 36px; /* 数字のフォントサイズを調整 */
    color: var(--main-color);
    margin: 10px;
}

.achievements .stat-item p {
    font-size: 14px; /* 説明文のフォントサイズを調整 */
    color: #888;
}

/* ===== MEDICAL CASES ===== */
/* 診療科目別導入事例セクション */
.medical-cases {
    padding: 60px 0;
    background-color: #fff;
    text-align: center;
}

.medical-cases h3 {
    font-size: 32px;
    color: var(--main-color);
    margin-bottom: 40px;
}

.medical-cases .case-cards {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.medical-cases .card {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    width: calc(33% - 20px); /* 3列表示でギャップを考慮 */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
}

.medical-cases .card img {
    width: 100%;
    height: auto;
    border-radius: 0; /* 角張デザイン */
    margin-bottom: 20px;
}

.medical-cases .card h4 {
    font-size: 24px;
    color: var(--main-color);
    margin: 10px;
}

.medical-cases .card p {
    font-size: 14px;
    color: #555;
    margin: 10px;
    text-align: left;
}

/* ===== PARTNERS ===== */
/* 提携専門家セクション */
.partners {
    padding: 60px 0;
    background-color: #f9f9f9;
    text-align: center;
}

.partners h3 {
    font-size: 32px;
    color: var(--main-color);
    margin-bottom: 0px;
}

.partners .partner-cards {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap; /* 横1列にする */
    gap: 30px;
}

.partners .card {
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 20px;
    width: calc(25% - 20px); /* 3列表示でギャップを考慮 */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.partners .card img {
    width: 120px;
    height: 120px;
    border-radius: 0; /* 角張デザイン */
    margin-bottom: 10px;
}

.partners .card h4 {
    font-size: 24px;
    color: var(--main-color);
    margin: 10px;
}

.partners .card p {
    font-size: 16px;
    color: #555;
    margin-bottom: 5px;
}

/* ===== FAQ & ACCORDION ===== */
/* FAQセクション */
.faq {
    padding: 60px 0;
    background-color: #fff;
}

.faq h3 {
    font-size: 28px;
    color: var(--main-color);
    margin-bottom: 0px;
    text-align: center;
}

.faq .faq-item {
    text-align: left;
    margin-bottom: 30px;
    border: 1px solid #ddd;
    padding: 20px;
}

.faq .faq-item h4 {
    font-size: 20px;
    color: var(--main-color);
    margin-bottom: 10px;
}

.faq .faq-item p {
    font-size: 16px;
    color: #555;
}

/* アコーディオンのスタイル */
.accordion-item {
    border: 1px solid #ddd;
    margin-bottom: 10px;
}

.accordion-header {
    background-color: #f2f2f2;
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-header h4 {
    margin: 0;
    font-size: 20px;
    color: var(--main-color);
}

.accordion-header::after {
    content: '+';
    font-size: 24px;
    color: var(--main-color);
    transition: transform 0.3s ease;
}

.accordion-header.active::after {
    content: '-';
    transform: rotate(180deg);
}

.accordion-content {
    padding: 15px 20px;
    background-color: #fff;
    border-top: 1px solid #eee;
    display: none; /* デフォルトで非表示 */
    overflow: hidden;
}

.accordion-content p {
    margin: 0;
}

/* ===== RESPONSIVE (mobile) ===== */
/* モバイル表示 */
@media (max-width: 768px) {
    .comparison-tables-container,
    .comparison-columns,
    .comparison-cards {
        grid-template-columns: 1fr; /* 縦に並べる */
        grid-template-areas:
            "cond-left"
            "table-left"
            "cond-right"
            "table-right";
        grid-auto-rows: auto; /* モバイルでは自動高さ */
    }

    .compare-highlight__value {
        font-size: 24px;
    }

    .compare-row__label,
    .compare-row__amount {
        flex: 1 1 100%;
        text-align: left;
    }

    .hero {
        padding: 50px 0;
    }

    .hero-content {
        max-width: 100%;
        text-align: center;
    }

    .hero-content h2 {
        font-size: 30px;
    }

    .hero-content p {
        font-size: 18px;
    }

    .hero.lazyloaded {
        background-image: url('../image/hero_section_mobile.jpg');
    }

    .hero .cta-buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .hero .cta-buttons .cta-button {
        margin: 0px;
    }

    .message-content {
        flex-direction: column;
        gap: 20px;
    }

    .message h3 {
        font-size: 20px;
    }

    .message-image,
    .message-text {
        flex: none;
    }

    .message-text h4 {
        font-size: 18px;
    }

    .comparison-table h3 {
        font-size: 22px;
    }

    .fancy-card { 
        padding: 14px; border-radius: 10px; 
    }

    .fancy-list li::before { 
        width: 30px; 
        height: 30px; 
        left: 10px; 
        background-size: 60%; 
    }

    .cases .case-image {
        display: none;
    }

    .cases .case-text-container {
        padding: 20px;
    }

    .cases .case-cards,
    .achievements .stats { 
        flex-direction: column;
        align-items: center;
    }

    .cases .card  {
        flex-direction: column;
        align-items: center;
    }

    .benefits h3 {
        font-size: 22px;
    }

    .benefits .benefit-item {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    .middle-cta h3 {
        font-size: 24px;
    }

    .middle-cta .services {
        flex-direction: column;
        align-items: center;
    }

    .middle-cta .service-item {
        width: 95%;
    }

    .achievements h3 {
        font-size: 24px;
    }

    .achievements .stat-item {
        max-width: none;
        width: 95%;
    }

    .partners .partner-cards,
    .medical-cases .case-cards {
        flex-direction: column;
        align-items: center;
    }

    .partners .card,
    .medical-cases .card {
        width: 95%;
    }
}

/* ===== ANIMATION ===== */
/* アニメーション用クラス */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px); /* 下から少しスライドする効果 */
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

