/* =====================================================================
   medical-detail.css — 診療案内・詳細3ページ共通スタイル
   （site/medical/dental.html・neutering.html・prevention.html が読み込む）
   宍戸動物病院 / V3 下層ページ
   ・3ページで一致する共通ルールのみをここに集約（common.css には無いもの）
   ・ページ固有・ページ差のあるルールは各ページのインライン <style> に残す
   ・各ページは <link common.css> → <link medical-detail.css> → <style> の順で読み込み、
     インライン側が上書きできる順序にする
   ===================================================================== */

  /* =====================
     CSS Variables
  ===================== */
  :root {
    --color-main:          #5A3838;
    --color-main-dark:     #3f2929;
    --color-accent:        #C9923F;
    --color-accent-light:  #e7c27a;

    --color-bg:            #FCFAF6;
    --color-surface:       #ffffff;
    --color-bg-soft:       #faf6ef;
    --color-bg-section:    #F2EBDD;
    --color-bg-cta:        #C9923F;

    --color-border:        #e6d8c6;
    --color-border-strong: #d1b78f;

    --color-text:          #2C2017;
    --color-text-muted:    #8B7F70;
    --color-text-body: #6B5D4F;
    --color-text-light:    #ffffff;

    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;

    --container-max: 1160px;
    --container-pc:  28px;
    --container-sp:  20px;

    --section-y-pc: 88px;
    --section-y-sp: 56px;

    --gap-sm: 16px;
    --gap-md: 24px;
    --gap-lg: 40px;
  }

  body {
    font-family: 'Noto Sans JP', sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 17px;
    line-height: 1.8;
    font-weight: 400;
    /* clip = スクロール演出(translateX)の横はみ出しを切る。hidden にすると fixed ヘッダーが効かなくなるので不可 */
    overflow-x: clip;
    padding-top: 96px; /* fixed ヘッダーぶん本文を下げる。トップ v3-home.css と同値 */
  }

  .section--surface { background: var(--color-surface); }

  .section--warm { background: var(--color-bg-section); }

@media (max-width: 767px) {

    body { font-size: 16px; }
}

  .header-logo img {
    width: clamp(180px, 12vw, 210px);
    height: auto;
    transition: width 0.25s ease, opacity 0.25s ease;
  }

@media (max-width: 767px) {

    body { padding-top: 72px; }

    .global-nav,
    .header-contact,
    .header-reserve-btn { display: none; }

    .header-logo img { width: 160px; }
}

@media (min-width: 768px) and (max-width: 1023px) {

    .global-nav,
    .header-contact,
    .header-reserve-btn { display: none; }

    .header-logo img { width: 170px; }
}

  .page-hero__lead {
    font-size: 16px;
    color: var(--color-text-body);
    line-height: 1.95;
  }

@media (max-width: 767px) {

    .page-hero__lead {
      font-size: 15px;
    }
}

  /* =====================
     Policy Lead
  ===================== */
  .policy-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.75fr);
    gap: 48px;
    align-items: center;
  }

  .policy-points {
    background: var(--color-bg-soft);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 28px 30px;
  }

@media (max-width: 767px) {

    .policy-layout {
      grid-template-columns: 1fr;
      gap: 28px;
    }

    .policy-points {
      padding: 24px 20px;
    }
}

  /* =====================
     Animals
  ===================== */
  .animal-stage {
    position: relative;
    padding: 24px 34px 22px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(252, 250, 246, 0.92)),
      var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 30px rgba(90, 56, 56, 0.045);
    overflow: hidden;
  }

  .animal-stage::before {
    content: '';
    position: absolute;
    left: 36px;
    right: 36px;
    bottom: 72px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border), transparent);
  }

  .animal-stage::after {
    content: '';
    position: absolute;
    left: 8%;
    right: 8%;
    bottom: 48px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(139, 127, 112, 0.12), rgba(139, 127, 112, 0));
    pointer-events: none;
  }

  .animal-stage__image {
    position: relative;
    z-index: 1;
    width: min(68%, 600px);
    margin-inline: auto;
  }

  .animal-stage__image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: brightness(1.03) contrast(0.96) saturate(0.96);
  }

  .animal-stage__labels {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.35fr 1.15fr 0.9fr 0.9fr 0.8fr;
    gap: 10px;
    width: min(100%, 620px);
    margin: 8px auto 0;
  }

  .animal-stage__labels span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    justify-self: center;
    padding: 4px 12px;
    background: var(--color-bg-soft);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    color: var(--color-main);
    font-size: 13px;
    font-weight: 500;
  }

@media (max-width: 767px) {

    .animal-stage {
      padding: 20px 14px 18px;
    }

    .animal-stage::before {
      left: 16px;
      right: 16px;
      bottom: 64px;
    }

    .animal-stage__image {
      width: 64%;
      max-width: none;
    }

    .animal-stage__labels {
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 6px;
      margin-top: 6px;
    }

    .animal-stage__labels span {
      min-height: 26px;
      padding-inline: 4px;
      font-size: 11px;
      white-space: nowrap;
    }
}

  /* =====================
     Anchor Nav
  ===================== */
  .medical-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .medical-nav-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 30px 32px;
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 24px;
    align-items: center;
    box-shadow: 0 2px 8px rgba(90, 56, 56, 0.05);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  }

  .medical-nav-card:hover {
    transform: translateY(-3px);
    border-color: var(--color-accent);
    box-shadow: 0 8px 24px rgba(90, 56, 56, 0.1);
  }

  .medical-nav-card__icon {
    width: 92px;
    height: 92px;
    object-fit: contain;
    mix-blend-mode: multiply;
  }

  .medical-nav-card__sub {
    margin-bottom: 8px;
  }

  .medical-nav-card h3 {
    font-family: 'Noto Serif JP', serif;
    font-size: 20px;
    color: var(--color-main);
    margin-bottom: 10px;
  }

  .medical-nav-card p {
    font-size: 14px;
    color: var(--color-text-body);
    line-height: 1.8;
    margin-bottom: 16px;
  }

  .medical-nav-card__link {
    font-size: 13px;
    color: var(--color-main);
    font-weight: 500;
  }

  .medical-nav-card__link span {
    display: inline-block;
    transition: transform 0.2s;
  }

  .medical-nav-card:hover .medical-nav-card__link span {
    transform: translateX(3px);
  }

@media (max-width: 1023px) {

    .medical-nav {
      grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {

    .medical-nav-card {
      grid-template-columns: 74px 1fr;
      gap: 18px;
      padding: 22px 20px;
    }

    .medical-nav-card__icon {
      width: 74px;
      height: 74px;
    }

    .medical-nav-card h3 {
      font-size: 18px;
    }
}

  /* =====================
     Facility
  ===================== */
  .facility-layout {
    display: grid;
    grid-template-columns: 42% 1fr;
    gap: 48px;
    align-items: center;
  }

  .facility-photo {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius-md);
  }

  .facility-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .facility-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .facility-item {
    border-top: 1px solid var(--color-border);
    padding-top: 18px;
  }

  .facility-item h3 {
    font-family: 'Noto Serif JP', serif;
    font-size: 16px;
    color: var(--color-main);
    margin-bottom: 8px;
  }

  .facility-item p {
    font-size: 13px;
    color: var(--color-text-body);
    line-height: 1.8;
  }

@media (max-width: 767px) {

    .facility-layout {
      grid-template-columns: 1fr;
      gap: 28px;
    }

    .facility-photo {
      aspect-ratio: 3 / 2;
    }

    .facility-list {
      grid-template-columns: 1fr;
    }
}

  .hours-table-wrap {
    border-top: 1px solid var(--color-border);
    padding-top: 32px;
  }

  .hours-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
  }

  .hours-table th,
  .hours-table td {
    border: 1px solid var(--color-border);
    padding: 10px 8px;
    text-align: center;
    color: var(--color-text);
  }

  .hours-table tbody th {
    background: var(--color-bg-soft);
    font-size: 11px;
    font-weight: 500;
    color: var(--color-text-muted);
    white-space: nowrap;
    padding: 10px 6px;
  }

  .hours-table .dot { color: var(--color-accent); font-size: 10px; }

@media (max-width: 767px) {

    .hours-table-wrap {
      overflow-x: auto;
      padding-top: var(--gap-md);
    }
}

  /* =====================
     Medical Page V4
  ===================== */
  .medical-page {
    background: var(--color-bg);
  }

@media (min-width: 768px) {

    .medical-page .container {
      max-width: 1160px;
      padding-inline: 28px;
    }
}

  .medical-page p,
  .medical-page a,
  .medical-page h2,
  .medical-page h3,
  .medical-page span {
    overflow-wrap: anywhere;
  }

  /* アンカー着地が固定ヘッダーに隠れないように */
  .medical-page .section[id] {
    scroll-margin-top: 96px;
  }

  /* 目次アンカーのラッパー（ヒーロー直下の最上部に配置） */
  .medical-contents {
    padding-block: 32px;
  }

  .medical-contents__label {
    margin-bottom: 12px;
    color: var(--color-accent);
  }

@media (max-width: 767px) {

    .medical-contents {
      padding-block: 28px;
    }
}

  .quick-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }

  .quick-card {
    min-height: 150px;
    padding: 22px 18px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    min-width: 0;
  }

  .quick-card__sub {
    margin-bottom: 8px;
    color: var(--color-accent);
  }

  .quick-card h3 {
    margin-bottom: 8px;
    color: var(--color-main);
    font-family: 'Noto Serif JP', serif;
    font-size: 17px;
  }

  .quick-card p {
    color: var(--color-text-body);
    font-size: 13px;
    line-height: 1.75;
  }

  .quick-card a {
    display: inline-flex;
    margin-top: 12px;
    color: var(--color-main);
    font-size: 13px;
    font-weight: 500;
  }

  .symptom-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 260px));
    justify-content: center;
    gap: 20px;
  }

  .medical-item-groups {
    display: grid;
    gap: 18px;
  }

  .medical-item-group {
    display: grid;
    grid-template-columns: minmax(170px, 0.24fr) minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    padding: 26px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    min-width: 0;
  }

  .medical-item-group:nth-child(even) {
    background: rgba(250, 246, 239, 0.72);
  }

  .medical-item-group__head {
    min-width: 0;
  }

  .medical-item-group__head h3 {
    color: var(--color-main);
    font-family: 'Noto Serif JP', serif;
    font-size: 23px;
    line-height: 1.5;
  }

  .medical-item-group__head p {
    max-width: 220px;
    margin-top: 10px;
    color: var(--color-text-body);
    font-size: 14px;
    line-height: 1.85;
  }

  .medical-item-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    min-width: 0;
  }

  .symptom-card,
  .medical-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    min-width: 0;
  }

  .symptom-card {
    min-height: 300px;
    padding: 34px 18px 30px;
    display: grid;
    align-content: start;
    justify-items: center;
    text-align: center;
    box-shadow: 0 8px 22px rgba(90, 56, 56, 0.04);
  }

  .symptom-card__icon {
    width: 96px;
    height: 96px;
    display: grid;
    place-items: center;
    margin-bottom: 26px;
    border-radius: 50%;
    background: var(--color-bg-soft);
    border: 1px solid rgba(201, 146, 63, 0.24);
  }

  .symptom-card__icon img {
    width: 82px;
    height: 82px;
  }

  .symptom-card h3 {
    color: var(--color-main);
    font-family: 'Noto Serif JP', serif;
    font-size: 20px;
    line-height: 1.5;
  }

  .symptom-card p {
    margin-top: 14px;
    color: var(--color-text-body);
    font-size: 14px;
    line-height: 1.8;
  }

  .symptom-note {
    margin-top: 20px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-body);
    font-size: 12px;
    line-height: 1.8;
  }

  .symptom-card img,
  .medical-item img,
  .detail-card img,
  .facility-row img {
    object-fit: contain;
    mix-blend-mode: multiply;
  }

  .medical-item h3 {
    color: var(--color-main);
    font-family: 'Noto Serif JP', serif;
    font-size: 19px;
    line-height: 1.45;
    font-weight: 600;
  }

  .medical-item {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 16px;
    align-items: center;
    min-height: 108px;
    padding: 18px;
    text-align: left;
  }

  .medical-item img {
    width: 70px;
    height: 70px;
    margin: 0;
    padding: 2px;
    background: #fffaf2;
    border: 1px solid rgba(201, 146, 63, 0.24);
    border-radius: 50%;
  }

  .medical-item p {
    margin-top: 6px;
    color: var(--color-text-body);
    font-size: 14px;
    line-height: 1.7;
  }

  .schedule-box {
    margin-bottom: 28px;
    padding: 22px 24px 26px;
    overflow-x: auto;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
  }

  .schedule-grid {
    display: grid;
    grid-template-columns: 154px repeat(12, minmax(48px, 1fr));
    row-gap: 12px;
    min-width: 780px;
    align-items: center;
  }

  .schedule-month {
    color: var(--color-text-muted);
    font-family: 'Lora', 'Noto Sans JP', sans-serif;
    font-size: 13px;
    line-height: 1;
    text-align: center;
  }

  .schedule-row__label {
    padding-right: 16px;
    color: var(--color-main);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
  }

  .schedule-timeline {
    position: relative;
    grid-column: 2 / -1;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: center;
    height: 42px;
  }

  .schedule-timeline::before {
    content: '';
    position: absolute;
    inset: -8px 0;
    background-image: repeating-linear-gradient(
      to right,
      rgba(139, 127, 112, 0.18) 0,
      rgba(139, 127, 112, 0.18) 1px,
      transparent 1px,
      transparent calc(100% / 12)
    );
    pointer-events: none;
  }

  .schedule-track,
  .schedule-segment {
    position: relative;
    z-index: 1;
    grid-row: 1;
    height: 30px;
    clip-path: polygon(0 50%, 10px 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 10px 100%);
  }

  .schedule-track {
    grid-column: 1 / 13;
    background: rgba(242, 235, 221, 0.72);
  }

  .schedule-segment {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-inline: 14px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
  }

  .schedule-note {
    position: absolute;
    z-index: 2;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    color: var(--color-main);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
  }

  .schedule-segment--filaria {
    grid-column: 2 / 11;
    background: #b8945e;
  }

  .schedule-segment--flea {
    grid-column: 1 / 11;
    background: #7f9a76;
  }

  .schedule-segment--rabies {
    grid-column: 1 / 13;
    justify-content: flex-start;
    padding-left: calc((100% / 12) * 5.6);
    background: #b88372;
  }

  .schedule-segment--vaccine {
    grid-column: 1 / 13;
    justify-content: flex-start;
    padding-left: calc((100% / 12) * 5.6);
    background: #8d6f5a;
  }

  .schedule-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--color-main);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
  }

  .detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .detail-card {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 18px;
    align-items: start;
    padding: 22px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    min-width: 0;
  }

  .detail-card img {
    width: 78px;
    height: 78px;
  }

  .detail-card h3 {
    margin-bottom: 8px;
    color: var(--color-main);
    font-family: 'Noto Serif JP', serif;
    font-size: 17px;
  }

  .detail-card p {
    color: var(--color-text-body);
    font-size: 13px;
    line-height: 1.8;
  }

  .facility-rows {
    display: grid;
    gap: 12px;
  }

  .facility-row {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
  }

  .facility-row summary {
    display: grid;
    grid-template-columns: 56px 1fr 18px;
    gap: 16px;
    align-items: center;
    padding: 18px 22px;
    cursor: pointer;
    color: var(--color-main);
    font-family: 'Noto Serif JP', serif;
    font-size: 16px;
    font-weight: 600;
    list-style: none;
  }

  .facility-row summary::-webkit-details-marker {
    display: none;
  }

  .facility-row summary::after {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 1px solid var(--color-main);
    border-bottom: 1px solid var(--color-main);
    transform: rotate(45deg);
    transition: transform 0.2s;
  }

  .facility-row[open] summary::after {
    transform: rotate(225deg);
  }

  .facility-row img {
    width: 56px;
    height: 56px;
  }

  .facility-row p {
    padding: 0 22px 20px 94px;
    color: var(--color-text-body);
    font-size: 13px;
    line-height: 1.8;
  }

@media (max-width: 1023px) {

    .quick-grid,
    .symptom-grid,
    .medical-item-list {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {

    .medical-page .container {
      width: 100%;
      max-width: 100%;
    }

    .quick-card,
    .symptom-card,
    .medical-item,
    .detail-card {
      width: 100%;
      max-width: 100%;
    }

    .quick-grid,
    .symptom-grid,
    .medical-item-list,
    .detail-grid {
      grid-template-columns: minmax(0, 1fr);
    }

    .page-hero__lead,
    .medical-page p,
    .medical-page a,
    .medical-page h2,
    .medical-page h3 {
      line-break: anywhere;
      word-break: break-all;
    }

    .symptom-grid {
      gap: 14px;
    }

    #symptoms .section-head {
      margin-bottom: 22px;
    }

    #symptoms .section-head h2 {
      font-size: 23px;
      line-height: 1.55;
    }

    #symptoms .medical-panel__lead {
      margin-bottom: 22px;
      font-size: 14px;
      line-height: 1.9;
    }

    .symptom-card {
      grid-template-columns: 58px 1fr;
      gap: 14px;
      align-items: center;
      padding: 16px 14px;
      min-height: 0;
      justify-items: stretch;
      align-content: center;
      text-align: left;
    }

    .symptom-card__icon {
      width: 58px;
      height: 58px;
      margin-bottom: 0;
      border-color: rgba(201, 146, 63, 0.32);
      background: #fffaf2;
    }

    .symptom-card__icon img {
      width: 50px;
      height: 50px;
    }

    .symptom-card h3 {
      font-size: 15px;
    }

    .symptom-card p {
      margin-top: 3px;
      font-size: 12px;
      line-height: 1.6;
    }

    .symptom-note {
      padding: 13px 14px;
      background: rgba(255, 255, 255, 0.78);
    }

    .medical-item-groups {
      gap: 14px;
    }

    .medical-item-group {
      grid-template-columns: minmax(0, 1fr);
      gap: 16px;
      align-items: start;
      padding: 20px 16px;
    }

    .medical-item-group__head h3 {
      font-size: 18px;
    }

    .medical-item-group__head p {
      max-width: none;
      font-size: 13px;
      line-height: 1.8;
    }

    .medical-item-list {
      gap: 10px;
    }

    .medical-item {
      grid-template-columns: 62px 1fr;
      gap: 14px;
      padding: 16px;
    }

    .medical-item img {
      width: 62px;
      height: 62px;
      padding: 2px;
    }

    .medical-item h3 {
      font-size: 17px;
    }

    .detail-card {
      grid-template-columns: 68px 1fr;
      padding: 20px 18px;
    }

    .detail-card img {
      width: 68px;
      height: 68px;
    }

    .facility-row summary {
      grid-template-columns: 48px 1fr 18px;
      padding: 16px 18px;
    }

    .facility-row img {
      width: 48px;
      height: 48px;
    }

    .facility-row p {
      padding: 0 18px 18px;
    }
}
