/* ==========================================================
   眠れる森の歯科 渋谷院 TOPページの見た目の整え（2026-11-27 ソルティオ）
   方針：今のサイトの作り（原稿・段の並び・リンク・見出しの箱・蛍光ペンの下線・紫）はそのまま。
   直すのは、薄く敷いて読めなかった写真・空きすぎ／詰めすぎ・ばらばらの文字の大きさだけ。
   読み込み：index.php の <main> の直前。TOPだけに効く（main.p-top の中だけ）
   余白の基準：段の上下 PC 88px／スマホ 56px。幅は既存の width_60（最大1000px）。スマホの左右は 20px
   ========================================================== */

.p-top {
  --sec: 56px;
  --side: 20px;
  padding-top: 0 !important;          /* 既存の #main の上150pxをやめる（最初の画面をヘッダーのすぐ下から） */
  color: #333;
  font-feature-settings: "palt";
}
@media (min-width: 1024px) {
  .p-top {
    --sec: 88px;
    --side: 0px;
  }
}

/* ---------- 最初の画面：医院の看板の写真 ---------- */
.p-top-fv {
  margin-top: 60px;                   /* 固定ヘッダーのぶん（スマホ） */
  overflow: hidden;
  height: 240px;
}
.p-top-fv img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  animation: p-top-fv-in 1.4s ease-out both;
}
@media (min-width: 1024px) {
  .p-top-fv {
    margin-top: 88px;                 /* 固定ヘッダーのぶん（PC） */
    height: 440px;
  }
}
@keyframes p-top-fv-in {
  from { opacity: 0; transform: scale(1.04); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .p-top-fv img { animation: none; }
}

/* ---------- 冒頭の文と予約の3つ ---------- */
.p-top #top_section {
  margin-top: 0;                      /* 既存のロゴ演出用の上1,400〜1,700pxをやめる */
  padding: 48px var(--side) 0;
}
.p-top #top_section .main_text {
  font-size: 16px;
  line-height: 2;
  letter-spacing: .06em;
}
.p-top #top_section .free_text {
  margin-top: 24px;
  font-size: 20px;
  line-height: 1.6;
  letter-spacing: .06em;
}
.p-top #top_section .mutsu_btn_area {
  margin: 28px 0 0;
  text-align: center;
}
.p-top .mutsu_btn {
  display: inline-block;
  min-width: 220px;
  box-sizing: border-box;
  padding: 14px 24px;
  border-radius: var(--radius);
  background: var(--c-main);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.5;
  text-align: center;
  transition: opacity .2s;
}
.p-top .mutsu_btn:hover {
  opacity: .85;
}
@media (max-width: 1023px) {
  /* スマホ：中央ぞろえの複数行は行の切れ目がばらつくので、両端をそろえて流し込む（文言はそのまま） */
  .p-top #top_section .main_text {
    font-size: 15px;
    text-align: justify;
  }
}
@media (min-width: 1024px) {
  .p-top #top_section {
    padding-top: 64px;
  }
  .p-top #top_section .free_text {
    font-size: 24px;
  }
}
.p-top section.contact {
  padding: 0 var(--side);
}
.p-top section.contact .contact_content {
  margin-top: 32px;
}
.p-top section.contact .contact_btn_area,
.p-top section.contact .monshin_btn_area {
  margin-left: 0;
  margin-right: 0;
}
.p-top .bnr-line {
  margin-top: 8px;
  padding-inline: 0;
}

/* ---------- お知らせ：薄紫の箱は残し、行と余白を整える ---------- */
.p-top #news {
  padding: var(--sec) var(--side);
}
.p-top #news .main_title {
  margin-bottom: 0;
  font-size: 24px;
  letter-spacing: .1em;
  line-height: 1.5;
}
.p-top #news .news_ul {
  box-sizing: border-box;
  max-width: 800px;
  height: 288px;
  margin: 28px auto 0;
  padding: 4px 24px;
  border-radius: var(--radius-l);
  background-color: #f5eff6;
}
.p-top #news .news_li {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #e2d3e4;
}
.p-top #news .news_li a {
  display: block;
  padding: 14px 0;
  transition: color .2s;
}
.p-top #news .news_li a:hover {
  color: var(--c-main);
}
.p-top #news .news_date {
  margin: 0;
  font-size: 15px;
  letter-spacing: .08em;
  line-height: 1.4;
  color: var(--c-main);
}
.p-top #news .news_title {
  margin-top: 2px;
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: .04em;
}
@media (min-width: 768px) {
  .p-top #news .title_area {
    display: grid;
    grid-template-columns: 110px 1fr;
    align-items: baseline;
  }
  .p-top #news .news_title {
    margin-top: 0;
  }
}
@media (min-width: 1024px) {
  .p-top #news .main_title {
    font-size: 28px;
  }
}

/* ---------- 写真つきの段：写真を薄く敷くのをやめ、はっきり見せた写真の下に文を置く ---------- */
.p-top .item_section {
  padding: var(--sec) var(--side);
}
.p-top section.background_gray > .item_section {
  padding: var(--sec) var(--side);
}
.p-top [class*="bak_insert_img_"] {
  --photo-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  margin-top: 24px;
}
@media (min-width: 1024px) {
  .p-top [class*="bak_insert_img_"] {
    --photo-ratio: 5 / 2;
  }
}
.p-top [class*="bak_insert_img_"]::before {
  position: static;
  display: block;
  width: 100%;
  aspect-ratio: var(--photo-ratio);
  opacity: 1;
  z-index: auto;
  border-radius: var(--radius-l);
  background-size: cover;
  background-position: center;
}
/* 写真の割り当て（既存の写真のうち、白く飛ばしていない実写） */
.p-top .bak_insert_img_4::before { background-image: url('../images/entrance.jpg'); }
.p-top .bak_insert_img_5::before { background-image: url('../images/operationroom.jpg'); }
.p-top .bak_insert_img_6::before { background-image: url('../images/treatmentroom.jpg'); background-position: center 60%; }
.p-top .bak_insert_img_7::before { background-image: url('../images/reception.jpg'); }

/* 本文：太字をやめ、両端をそろえる。スマホはPC用の改行を持ち込まない（文言はそのまま） */
.p-top .item_section .text {
  margin: 0;
  padding: 24px 0 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 2;
  letter-spacing: .06em;
  text-align: justify;
}
@media (max-width: 1023px) {
  .p-top .item_section .text br {
    display: none;
  }
}
@media (min-width: 1024px) {
  .p-top .item_section .text {
    font-size: 16px;
  }
}
.p-top .item_section .lnk_btn_area {
  margin-top: 24px;
  text-align: left;
}
.p-top .item_section .lnk_btn_area .btn_design {
  margin-top: 0;
}

/* 最初の段「眠れる歯科治療 & 短期集中治療」：白い面を重ねる作りをやめ、写真→見出し→文 */
.p-top .item_section > .item_content {
  display: flex;
  flex-direction: column;
  margin-top: 0;
}
.p-top .item_content .center_setting {
  width: auto;
  margin: 0;
  padding: 0;
  background: none;
}
.p-top .item_content h1 {
  width: auto;
  margin-top: 28px;
  font-size: 24px;
  line-height: 1.6;
  letter-spacing: .06em;
}
@media (min-width: 1024px) {
  .p-top .item_content h1 {
    font-size: 28px;
  }
  .p-top .item_content h1 br {
    display: none;                    /* PCは「眠れる歯科治療 & 短期集中治療」を1行に */
  }
}

/* 見出しの箱（今のサイトの形）：黒い太枠を細くし、大きさをそろえる */
.p-top .section_title_2 {
  display: inline-block;
  margin: 0;
  padding: 16px 24px;
  border-width: 2px;
  font-size: 20px !important;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: .08em;
  text-align: left;
}
@media (min-width: 1024px) {
  .p-top .section_title_2 {
    font-size: 24px !important;
  }
}
.p-top .item_section h2 {
  margin-top: 24px;
  font-size: 18px;
  line-height: 1.8;
  letter-spacing: .04em;
}
@media (min-width: 1024px) {
  .p-top .item_section h2 {
    font-size: 20px;
  }
}

/* ---------- ドクターズファイル ---------- */
.p-top .item-doctorsfile {
  padding: var(--sec) var(--side);
}
.p-top .item-doctorsfile__title {
  margin-bottom: 16px;
  font-size: 22px;
  line-height: 1.6;
}
.p-top .item-doctorsfile__text {
  margin-bottom: 28px;
  line-height: 1.9;
}

/* ---------- 診療メニュー：影つきのグレーの箱を、白地に細い線のカードに（並び・アイコンはそのまま） ---------- */
.p-top #sinryo_menu {
  padding: var(--sec) var(--side);
}
.p-top #sinryo_menu .main_title {
  font-size: 24px;
  letter-spacing: .1em;
  line-height: 1.5;
}
.p-top #sinryo_menu ul {
  gap: 12px;
  margin: 28px auto 0;
}
.p-top #sinryo_menu li {
  padding: 16px 8px 12px;
  border-radius: var(--radius-l);
  background-color: #fff;
  box-shadow: inset 0 0 0 1px var(--c-line);
  text-align: center;
  transition: box-shadow .2s;
}
.p-top #sinryo_menu li:hover {
  box-shadow: inset 0 0 0 1px var(--c-main);
}
.p-top #sinryo_menu li > a {
  display: block;
  line-height: 0;
}
.p-top #sinryo_menu li > a img {
  width: 60%;
}
.p-top #sinryo_menu .flex {
  min-height: 40px;
  margin: 10px 0 0;
}
.p-top #sinryo_menu .li_title {
  margin-right: 6px;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: .02em;
  color: #333;
}
.p-top #sinryo_menu .li_arrow_img {
  width: 16px;
}
@media (min-width: 1024px) {
  .p-top #sinryo_menu .main_title {
    font-size: 28px;
  }
  .p-top #sinryo_menu ul {
    gap: 16px;
    margin-top: 36px;
  }
}

/* ---------- グリルズ ---------- */
.p-top .p-grillz {
  padding: var(--sec) var(--side);
}

/* ---------- 予約・当院について：フッターとの間を空けすぎない ---------- */
.p-top > .width_60:last-child #hospital {
  padding-bottom: 48px;
}
.p-top > .width_60:last-child #hospital li:last-child {
  padding-bottom: 0;
}

/* ---------- 見直し1回目 ---------- */
/* お知らせの次も白い段なので、間が二重に空かないよう下の余白をなくす */
.p-top #news {
  padding-bottom: 0;
}
/* PC：写真を大きく引き伸ばさない（元の写真が750px幅）。写真を左、文を右に並べる */
@media (min-width: 1024px) {
  .p-top [class*="bak_insert_img_"] {
    display: grid;
    grid-template-columns: 420px 1fr;
    column-gap: 48px;
    align-items: start;
  }
  .p-top [class*="bak_insert_img_"]::before {
    grid-row: 1 / span 3;
    aspect-ratio: 4 / 3;
  }
  .p-top .item_section .text {
    padding-top: 0;
  }
  /* 横に並べると行の幅が変わるので、PC用に入れていた改行で行がばらつかないよう流し込む（文言はそのまま） */
  .p-top [class*="bak_insert_img_"]:not(.item_content) .text br {
    display: none;
  }
  /* 最初の段は短い行で区切って読ませる文なので、改行はそのまま。写真の横で縦の真ん中に */
  .p-top .item_section > .item_content {
    display: grid;
    align-items: center;
  }
  .p-top .item_content .center_setting h1 {
    margin-top: 0;
  }
}

/* ---------- 見直し2回目 ---------- */
@media (min-width: 1024px) {
  /* 「詳しく見る」を写真の下ではなく、文の列の下にそろえる */
  .p-top .item_section .lnk_btn_area {
    padding-left: 468px;              /* 写真420px＋間48px */
  }
  /* 最初の段：見出しと文の間を空ける */
  .p-top .item_content .center_setting .text {
    padding-top: 16px;
  }
}

/* ---------- 見直し3回目 ---------- */
/* 最初の段は短い行で区切って読ませる文なので、スマホも元の改行のまま */
@media (max-width: 1023px) {
  .p-top .item_content .center_setting .text br {
    display: inline;
  }
  .p-top .item_content .center_setting .text br.sp_mode {
    display: none;
  }
  .p-top .item_content .center_setting .text {
    text-align: left;
  }
}

/* 罫線枠の見出し：PCは1行（入る幅なので）。スマホは入りきらないので元の改行位置で2行 */
@media (min-width: 1024px) {
  .p-top .section_title_2 br {
    display: none;
  }
}

/* ---------- 開いた直後：りんごのロゴ → 看板の写真（11/27 佐々木さん） ---------- */
/* 写真の段の上だけに白い面を重ね、ロゴを出してから面ごと消す。ヘッダー・ナビは最初から見える。約2秒で終わる */
.p-top-fv {
  position: relative;
}
.p-top-fv__intro {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  pointer-events: none;
  animation: p-top-intro-out .7s 1.5s ease-in-out both;
}
.p-top-fv__intro img {
  width: 96px;
  height: auto;
  animation: p-top-intro-logo .9s .1s cubic-bezier(.3, 1.4, .5, 1) both;
}
@media (min-width: 1024px) {
  .p-top-fv__intro img {
    width: 150px;
  }
}
.p-top-fv:not(.is-skip) > img {
  animation-delay: 1.5s;              /* 写真はロゴが消えるのに合わせて出す */
}
@keyframes p-top-intro-logo {
  from { opacity: 0; transform: translateY(12px) scale(.85); }
  to { opacity: 1; transform: none; }
}
@keyframes p-top-intro-out {
  to { opacity: 0; visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .p-top-fv__intro {
    display: none;
  }
}

/* 最初の画面の写真（受付）：看板が切れないよう、上寄りを見せる */
.p-top-fv > img {
  object-position: center 20%;
}
@media (min-width: 1024px) {
  .p-top-fv > img {
    object-position: center 8%;
  }
}

/* ---------- 11/27 佐々木さんの指摘 ---------- */
@media (min-width: 1024px) {
  /* メインの写真：受付全体が入る画角（横2：縦1）。高さは画面に収まるよう720pxまで */
  .p-top-fv {
    height: auto;
    aspect-ratio: 2 / 1;
    max-height: 720px;
  }
  .p-top-fv > img {
    object-position: center 30%;
  }
  /* 下線のコピー：PCは入る幅なので1行に。区切りは句読点 */
  .p-top .item_section h2 br {
    display: none;
  }
  /* 区切りは原稿の句読点で（11/27 佐々木さん指定）。字をあける指定はやめた */
}

/* グリルズ枠：ECサイトへの文字リンク（予約ボタンの下に控えめに） */
.p-grillz__ec {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: .04em;
  text-align: center;
}
.p-grillz__ec a {
  color: #666;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s;
}
.p-grillz__ec a::after {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 6px;
  vertical-align: -1px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M14 3h7v7h-2V6.41l-9.29 9.3-1.42-1.42 9.3-9.29H14V3zM5 5h6v2H7v10h10v-4h2v6H5V5z'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M14 3h7v7h-2V6.41l-9.29 9.3-1.42-1.42 9.3-9.29H14V3zM5 5h6v2H7v10h10v-4h2v6H5V5z'/></svg>") center / contain no-repeat;
}
.p-grillz__ec a:hover {
  color: var(--c-main);
}
