/* ==========================================================================
   top.css — トップページ専用スタイル（p-top- 接頭辞）
   ========================================================================== */

/* ---------- Hero ---------- */
.p-top-hero {
  position: relative;
  padding: calc(var(--header-total-height) + 32px) 0 48px;
  background-color: var(--color-primary-tint);
  background-image:
    linear-gradient(rgba(244, 249, 248, .72), rgba(244, 249, 248, .72)),
    url('../img/top/kv_bg01.webp');
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  box-shadow: inset 0 -1px 0 var(--color-border);
}
.p-top-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "head"
    "photo"
    "body";
  row-gap: 28px;
}
.p-top-hero__head {
  grid-area: head;
}
.p-top-hero__photo {
  grid-area: photo;
  position: relative;
}
.p-top-hero__body {
  grid-area: body;
}
.p-top-hero__eyebrow {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--color-primary);
  margin-bottom: 16px;
}
.p-top-hero__title {
  font-size: 27px;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: -.01em;
  color: var(--color-text);
}
.p-top-hero__text {
  font-size: 15px;
  color: var(--color-text-muted);
  max-width: 42em;
  margin-bottom: 28px;
}
.p-top-hero__cta {
  display: flex;
}
.p-top-hero__cta .cmn-btn {
  width: 100%;
}
.p-top-hero__cta-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  text-align: left;
}
.p-top-hero__cta-sub {
  font-size: 11px;
  font-weight: 500;
  opacity: .85;
}
.p-top-hero__cta-main {
  font-size: 15.5px;
  font-weight: 700;
}
.p-top-hero__photo {
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.p-top-hero__photo img {
  width: 100%;
  height: auto;
}

@media (min-width: 768px) {
  .p-top-hero__title {
    font-size: 36px;
  }
  .p-top-hero__text {
    font-size: 16px;
  }
}
@media (min-width: 1024px) {
  .p-top-hero {
    padding: calc(var(--header-total-height) + 56px) 0 72px;
  }
  .p-top-hero__inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    grid-template-areas:
      "head  photo"
      "body  photo";
    column-gap: 56px;
    row-gap: 24px;
    align-items: center;
  }
  .p-top-hero__title {
    font-size: 42px;
  }
}


/* ---------- 診療時間（FV内の小窓） ---------- */
.p-top-hero__hours {
  padding: 14px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
}
.p-top-hero__hours-label {
  display: inline-flex;
  font-family: var(--font-label);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #fff;
  background: var(--color-primary);
  padding: 3px 11px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.p-top-hero__hours-table-wrap {
  overflow-x: auto;
}
.p-top-hero__hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}
.p-top-hero__hours-table th,
.p-top-hero__hours-table td {
  border: 1px solid var(--color-border);
  padding: 7px 4px;
  text-align: center;
  color: var(--color-text);
}
.p-top-hero__hours-table thead th,
.p-top-hero__hours-table tbody th {
  background: var(--color-primary-tint);
  font-weight: 700;
  color: var(--color-primary-deep);
}
.p-top-hero__hours-note {
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.7;
  color: var(--color-text-muted);
}
.p-top-hero__hours-note a {
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
/* ---------- お知らせ ---------- */
.p-top-news {
  padding: 32px 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.p-top-news .cmn-section-title {
  margin-bottom: 0;
}
.p-top-news__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}
.p-top-news__col-head {
  margin-bottom: 14px;
}
.p-top-news__more {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
  text-align: left;
}
.p-top-news__more:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.p-top-news__list-frame {
  position: relative;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-s);
  box-shadow: var(--shadow-card);
  padding: 8px;
}
.p-top-news__list-frame::after {
  content: '';
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 9px;
  height: 28px;
  background: linear-gradient(to bottom, rgba(247, 249, 248, 0), var(--color-surface-alt));
  border-radius: 0 0 calc(var(--radius-s) - 2px) calc(var(--radius-s) - 2px);
  pointer-events: none;
}
.p-top-news__list {
  max-height: 300px;
  overflow-y: auto;
}
.p-top-news__list li {
  border-bottom: 1px solid var(--color-border);
}
.p-top-news__list li:last-child {
  border-bottom: none;
}
.p-top-news__list a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 12px;
}
.p-top-news__list time {
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary);
}
.p-top-news__title {
  font-size: 13.5px;
  color: var(--color-text);
  transition: color .2s var(--ease);
}
.p-top-news__list a:hover .p-top-news__title {
  color: var(--color-primary);
}
@media (min-width: 768px) {
  .p-top-news__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }
  .p-top-news__list {
    max-height: 224px;
  }
  .p-top-news__list a {
    flex-direction: row;
    align-items: baseline;
    gap: 16px;
  }
  .p-top-news__list time {
    flex-shrink: 0;
    width: 6.5em;
  }
}

/* ---------- 訪問診療バッジ + 写真 ---------- */
.p-top-visit__feature {
  margin-bottom: 32px;
}
.p-top-visit__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.p-top-visit__badges li {
  padding: 8px 14px;
  background: var(--color-primary-light);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-primary-deep);
}
@media (min-width: 768px) {
  .p-top-visit__feature {
    display: flex;
    align-items: center;
    gap: 32px;
  }
  .p-top-visit__feature-content {
    flex: 0 0 300px;
  }
  .p-top-visit__badges {
    flex-direction: column;
  }
  .p-top-visit__badges li {
    width: 100%;
  }
  .p-top-visit__feature-content .p-top-visit__cta .cmn-btn {
    width: 100%;
  }
}
/* ---------- 診療案内（共通イントロ + グループ分け） ---------- */
.p-top-medical__intro {
  font-size: 15px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}
.p-top-medical__group {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 20px;
}
.p-top-medical__group + .p-top-medical__group {
  margin-top: 56px;
}
.p-top-medical__group-side {
  flex-shrink: 0;
  width: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.p-top-medical__group-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  flex-shrink: 0;
  box-shadow: var(--shadow-card);
}
.p-top-medical__group-title {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: .16em;
  color: var(--color-primary-deep);
  background: var(--color-surface-alt);
  padding: 10px 4px;
  border-radius: var(--radius-s);
  margin: 0;
  flex-shrink: 0;
}
.p-top-medical__group-side::after {
  content: '';
  flex: 1;
  width: 2px;
  min-height: 24px;
  background: rgba(0, 112, 24, .3);
}
.p-top-medical__group-content {
  flex: 1;
  min-width: 0;
}
.p-top-medical__group#visit .p-top-medical__group-content {
  background: var(--color-primary-tint);
  padding: 20px 16px;
  border-radius: var(--radius-m);
}
@media (min-width: 768px) {
  .p-top-medical__group-side {
    width: 52px;
    gap: 18px;
  }
  .p-top-medical__group-icon {
    width: 52px;
    height: 52px;
  }
  .p-top-medical__group-title {
    font-size: 19px;
  }
  .p-top-medical__group#visit .p-top-medical__group-content {
    padding: 28px 24px;
  }
}
/* ---------- 訪問診療（グループ1） ---------- */
.p-top-visit__lead {
  font-size: 15.5px;
  color: var(--color-text-muted);
  margin-bottom: 32px;
}
.p-top-visit__photo {
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 32px;
}
.p-top-visit__photo img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center 25%;
}

.p-top-visit__cta {
  text-align: center;
}
.p-top-visit__cta .cmn-btn {
  width: 100%;
}

@media (min-width: 768px) {
  .p-top-visit__cta .cmn-btn {
    width: auto;
  }
}
@media (min-width: 768px) {
  .p-top-visit__photo {
    flex: 1;
    margin-bottom: 0;
    max-width: 480px;
  }
}
/* ---------- 診療案内セクション本体 / 外来診療（グループ2） ---------- */
.p-top-medical {
  padding: 64px 0;
  background: var(--color-surface-alt);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.p-top-medical__lead {
  font-size: 14.5px;
  color: var(--color-text-muted);
  margin-bottom: 28px;
}
.p-top-outpatient__photo {
  display: none;
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 28px;
}
.p-top-outpatient__photo img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
}
@media (min-width: 1024px) {
  .p-top-outpatient__feature .p-top-medical__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.p-top-medical__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.p-top-medical__grid li {
  display: flex;
}
.p-top-medical__card {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 20px 22px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-m);
  cursor: pointer;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.p-top-medical__card:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-tint);
}
.p-top-medical__card:hover .p-top-medical__card-arrow {
  transform: translateX(3px);
}
.p-top-medical__card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  flex-shrink: 0;
}
.p-top-medical__card-body {
  flex: 1;
  min-width: 0;
}
.p-top-medical__card h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--color-text);
}
.p-top-medical__card p {
  font-size: 13.5px;
  color: var(--color-text-muted);
}
.p-top-medical__card-arrow {
  flex-shrink: 0;
  color: var(--color-primary);
  transition: transform .2s var(--ease);
}
@media (min-width: 640px) {
  .p-top-medical__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- 院長紹介 ---------- */
.p-top-doctor {
  padding: 64px 0;
}
.p-top-doctor__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}
.p-top-doctor__photo {
  position: relative;
  width: 168px;
  border-radius: 50%;
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid var(--color-border);
  background: var(--color-primary-light);
  flex-shrink: 0;
}
.p-top-doctor__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}
.p-top-doctor__certs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.p-top-doctor__certs li {
  font-family: var(--font-label);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 6px 12px;
  border-radius: 999px;
}
.p-top-doctor__career {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}
.p-top-doctor__career > div {
  display: flex;
  gap: 16px;
  font-size: 13.5px;
  color: var(--color-text-muted);
  padding: 6px 0;
}
.p-top-doctor__career dt {
  flex-shrink: 0;
  width: 4.5em;
  text-align: right;
  font-family: var(--font-label);
  font-weight: 600;
  color: var(--color-text);
}
.p-top-doctor__name {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
}
.p-top-doctor__name-badge {
  font-family: var(--font-label);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 5px 12px;
  border-radius: 999px;
}
.p-top-doctor__text {
  font-size: 15px;
  color: var(--color-text-muted);
  text-align: left;
}
.p-top-doctor__body {
  flex: 1;
  min-width: 0;
}
@media (min-width: 768px) {
  .p-top-doctor__inner {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: 40px;
  }
  .p-top-doctor__photo {
    flex-shrink: 0;
  }
  .p-top-doctor__name {
    justify-content: flex-start;
  }
}

/* ---------- YouTube ---------- */
.p-top-youtube {
  padding: 64px 0;
}
.p-top-youtube__lead {
  font-size: 14.5px;
  color: var(--color-text-muted);
  margin-bottom: 28px;
}
.p-top-youtube__scroll {
  position: relative;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-card);
  padding: 20px;
  margin-bottom: 16px;
}
.p-top-youtube__scroll::after {
  content: '';
  position: absolute;
  top: 1px;
  right: 1px;
  bottom: 1px;
  width: 48px;
  border-radius: 0 var(--radius-m) var(--radius-m) 0;
  background: linear-gradient(to right, rgba(247, 249, 248, 0), var(--color-surface-alt));
  pointer-events: none;
  transition: opacity .2s var(--ease);
}
.p-top-youtube__scroll.is-end::after {
  opacity: 0;
}
.p-top-youtube__list {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.p-top-youtube__list::-webkit-scrollbar {
  display: none;
}
.p-top-youtube__item {
  flex: 0 0 calc(100% - 56px);
  scroll-snap-align: start;
}
.p-top-youtube__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-m);
  overflow: hidden;
  background: var(--color-primary-deep);
  border: 1px solid var(--color-border);
}
.p-top-youtube__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.p-top-youtube__frame--soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255, 255, 255, .65);
  background: var(--color-primary-deep);
}
.p-top-youtube__frame--soon span {
  font-family: var(--font-label);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .08em;
}
.p-top-youtube__caption {
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--color-text-muted);
}
@media (min-width: 640px) {
  .p-top-youtube__item {
    flex-basis: calc((100% - 20px) / 2);
  }
}
.p-top-youtube__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
}
.p-top-youtube__footer .p-top-news__more {
  margin-top: 0;
}
.p-top-youtube__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.p-top-youtube__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-primary-deep);
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.p-top-youtube__arrow:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.p-top-youtube__arrow:disabled {
  opacity: .35;
  pointer-events: none;
}
.p-top-youtube__counter {
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--color-text-muted);
}

/* ---------- アクセス ---------- */
.p-top-access {
  padding: 64px 0;
  background: var(--color-surface-alt);
  border-top: 1px solid var(--color-border);
}
.p-top-access__grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.p-top-access__map {
  border-radius: var(--radius-m);
  overflow: hidden;
  border: 1px solid var(--color-border);
}
.p-top-access__map iframe {
  width: 100%;
  height: 260px;
  border: none;
  display: block;
}
.p-top-access__map-card {
  margin-bottom: 24px;
  padding: 22px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-m);
}
.p-top-access__map-card-badge {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.p-top-access__map-image-wrap {
  position: relative;
  margin-bottom: 16px;
  border: 1px solid var(--color-border-strong);
  border-radius: 0;
  overflow: hidden;
}
.p-top-access__map-card-img {
  width: 100%;
  height: auto;
  display: block;
}
.p-top-access__map-card p {
  font-size: 14px;
  color: var(--color-text-muted);
}
.p-top-access__map-card strong {
  color: var(--color-text);
}
@media (min-width: 1024px) {
  .p-top-access__grid {
    flex-direction: row;
  }
  .p-top-access__map {
    flex: 1;
  }
  .p-top-access__map iframe {
    height: 100%;
    min-height: 440px;
  }
  .p-top-access__info {
    flex: 1;
  }
}

/* ---------- 採用情報 ---------- */
.p-top-recruit {
  position: relative;
  padding: 64px 0;
  background: var(--color-primary-deep);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  overflow: hidden;
  isolation: isolate;
}
.p-top-recruit__deco {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(55% 65% at 100% 0%, rgba(255, 255, 255, .07), transparent 70%),
    radial-gradient(45% 55% at 0% 100%, rgba(255, 255, 255, .05), transparent 70%);
}
.p-top-recruit__inner {
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.p-top-recruit__main {
  min-width: 0;
}
.p-top-recruit__text {
  font-size: 14.5px;
  color: rgba(255, 255, 255, .78);
  max-width: 56em;
  margin-bottom: 24px;
}
.p-top-recruit__text-phrase {
  display: inline-block;
}
.p-top-recruit__contact {
  flex-shrink: 0;
  padding: 24px 28px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius-l);
}
.p-top-recruit__tel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-label);
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}
@media (hover: none) {
  .p-top-recruit__tel {
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}
.p-top-recruit__contact-note {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, .7);
}
@media (min-width: 768px) {
  .p-top-recruit__inner {
    flex-direction: row;
    align-items: center;
    gap: 48px;
  }
  .p-top-recruit__main {
    flex: 1;
  }
  .p-top-recruit__contact {
    min-width: 300px;
  }
}

/* ---------- Scroll reveal ---------- */
.js-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
.js-reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js-reveal {
    opacity: 1;
    transform: none;
  }
}
