@charset "utf-8";

/* PCヘッダー。SPは下の 767px 指定 */
.p-header {
  display: none;
}

.p-header[data-header="01"] {
  background: linear-gradient(to bottom, #e3cfa2 0%, rgba(185, 175, 148, 0) 100%);
}

.p-header[data-header="02"] {
  background: linear-gradient(to bottom, #29b4d6 0%, rgba(41, 179, 213, 0) 100%);
}

.p-header[data-header="03"] {
  background: linear-gradient(to bottom, #746250 0%, rgba(213, 187, 41, 0) 100%);
}

/* 下層。タイトル画像の .p-mv__bg::before（#6a6a6a / 0.53）に合わせたグラデ */
.p-header[data-header="sub"] {
  background: linear-gradient(to bottom, rgba(106, 106, 106, 0.53) 0%, rgba(106, 106, 106, 0) 100%);
}

@media screen and (min-width: 768px) {
  header,
  header.fixed {
    height: 218px;
    background: transparent !important;
    pointer-events: none;
  }

  header .inner,
  header h1,
  header.fixed h1,
  #navi_btn {
    display: none !important;
  }

  #sp_navi,
  .p-header__actions {
    pointer-events: auto;
  }

  .p-header {
    display: block;
    position: relative;
    height: 218px;
    pointer-events: none;
  }

  .p-header__logo {
    position: absolute;
    top: 47px;
    left: 51px;
    width: 400px;
    pointer-events: auto;
    line-height: 0;
  }

  .p-header__logo img {
    display: block;
    width: 100%;
    height: auto;
  }

  .p-header__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 130px;
  }

  .p-header__hours {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: max-content;
    margin-right: 20px;
    color: #fff;
  }

  .p-header__hours table {
    width: 0;
    min-width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    table-layout: fixed;
  }

  .p-header__hours th,
  .p-header__hours td {
    padding: 5px 0;
    border: 0;
    background: transparent;
    color: #fff;
    font-family: "HonokaMaru", sans-serif;
    font-size: 15px;
    font-weight: bold;
    line-height: 1;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    border-bottom: 1px solid #fff;
  }

  .p-header__hours-col-day {
    width: 37px;
  }

  .p-header__hours-col-sat {
    width: 42px;
  }

  .p-header__hours th:first-child {
    width: 100%;
    padding-left: 12px;
    text-align: left;
  }

  .p-header__hours thead th:not(:first-child):not(:last-child) {
    width: 37px;
  }

  .p-header__hours thead th:last-child,
  .p-header__hours tbody td:last-child {
    width: 42px;
    padding-right: 5px;
  }

  .p-header__hours td {
    font-size: 13px;
  }

  .p-header__hours-note {
    margin: 8px 0 0;
    padding: 0 12px;
    color: #fff;
    font-family: "HonokaMaru", sans-serif;
    font-size: 13px;
    font-weight: bold;
    line-height: 1;
    white-space: nowrap;
  }

  .p-header__tel {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    width: 315px;
    height: 130px;
    flex: 0 0 315px;
    padding-top: 12px;
    padding-bottom: 17px;
    overflow: hidden;
    background: #fff;
    border-radius: 0 0 0 20px;
    color: #2cb3d3;
    font-family: "HonokaMaru", sans-serif;
    font-weight: bold;
    line-height: 1;
  }

  .p-header__tel::before {
    content: "";
    position: absolute;
    inset: 0;
    box-sizing: border-box;
    border: 2px solid #3fadc7;
    border-radius: 0 0 0 18px;
    transform: translate(2px, -2px);
    pointer-events: none;
  }

  .p-header__tel-lead,
  .p-header__tel-number,
  .p-header__tel-number span,
  .p-header__tel-access,
  .p-header__tel-access span,
  .p-header__label,
  .p-header__label-en,
  .p-header__label-sub,
  .p-header__label-main {
    font-family: "HonokaMaru", sans-serif;
    font-weight: bold;
  }

  .p-header__tel-lead {
    font-size: 16px;
  }

  .p-header__tel-number {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
    color: #2cb3d3;
    font-size: 34px;
  }

  .p-header__tel-number:link,
  .p-header__tel-number:visited,
  .p-header__tel-number:hover,
  .p-header__tel-number:active {
    color: #2cb3d3;
  }

  .p-header__tel-access:link,
  .p-header__tel-access:visited,
  .p-header__tel-access:hover,
  .p-header__tel-access:active {
    color: #fff;
  }

  .p-header__tel-phone {
    display: block;
    width: 30px;
    height: 28px;
    flex: 0 0 30px;
  }

  .p-header__tel-access {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    box-sizing: border-box;
    width: 200px;
    height: 27px;
    margin-top: auto;
    border-radius: 14px;
    background: #2cb3d3;
    color: #fff;
    font-size: 15px;
  }

  .p-header__tel-pin {
    display: block;
    width: 12px;
    height: 18px;
    flex: 0 0 12px;
  }

  .p-header__reserve,
  .p-header__mail,
  .p-header__menu {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 130px;
    height: 130px;
    flex: 0 0 130px;
    padding: 0 8px;
    border: 0;
    font-family: "HonokaMaru", sans-serif;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
  }

  .p-header__reserve,
  .p-header__mail {
    flex-direction: column;
    justify-content: flex-end;
    gap: 7px;
    padding-bottom: 13px;
  }

  .p-header__menu {
    position: relative;
  }

  .p-header__dots {
    position: absolute;
    top: 39px;
    left: 50%;
    display: grid;
    grid-template-columns: repeat(3, 4px);
    grid-template-rows: repeat(3, 4px);
    gap: 8px;
    width: 28px;
    height: 28px;
    transform: translateX(-50%);
  }

  .p-header__menu .p-header__label {
    position: absolute;
    right: 0;
    bottom: 28px;
    left: 0;
  }

  .p-header__dots span {
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
  }

  .p-header__icon {
    display: block;
    width: 46px;
    height: 46px;
  }

  .p-header__label {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .p-header__label-en,
  .p-header__label-sub,
  .p-header__label-main {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    line-height: 1;
  }

  .p-header__label-en,
  .p-header__label-sub {
    height: 18px;
  }

  .p-header__label-en {
    font-size: 18px;
  }

  .p-header__label-sub,
  .p-header__label-main {
    font-size: 16px;
  }

  .p-header__reserve {
    background: #ecbf00;
    color: #fff;
  }

  .p-header__mail {
    background: #4fa9be;
    color: #fff;
  }

  .p-header__menu {
    background: linear-gradient(to bottom, #25b8db 0%, #b5e3d9 100%);
    color: #fff;
  }

  .p-header__reserve:link,
  .p-header__reserve:visited,
  .p-header__reserve:hover,
  .p-header__reserve:active {
    color: #fff;
  }

  .p-header__mail:link,
  .p-header__mail:visited,
  .p-header__mail:hover,
  .p-header__mail:active,
  .p-header__menu:hover,
  .p-header__menu:active {
    color: #fff;
  }
}

/* ロゴ（右端 451px）に重なる手前で、診療時間 → 電話 → 予約・メールの順に隠す */
@media screen and (max-width: 1570px) {
  .p-header__hours {
    display: none;
  }
}

@media screen and (max-width: 1190px) {
  .p-header__tel {
    display: none;
  }
}

@media screen and (max-width: 875px) {
  .p-header__reserve,
  .p-header__mail {
    display: none;
  }
}

/* SP。高さ218pxのグラデーションと白ロゴ。メニューは80×80 */
@media screen and (max-width: 767px) {
  header,
  header.fixed {
    height: 218px;
    background: transparent !important;
    pointer-events: none;
  }

  header .inner,
  header h1,
  header.fixed h1,
  #navi_btn {
    display: none !important;
  }

  #main_contents,
  .p-mv {
    margin-top: 0;
  }

  #sp_navi,
  .p-header__logo,
  .p-header__menu {
    pointer-events: auto;
  }

  .p-header {
    display: block;
    position: relative;
    width: 100%;
    height: 218px;
    pointer-events: none;
  }

  .p-header__logo {
    display: block;
    position: absolute;
    top: 27px;
    left: 17px;
    width: min(320px, calc(100% - 128px));
    line-height: 0;
  }

  .p-header__logo img {
    display: block;
    width: 100%;
    height: auto;
  }

  .p-header__actions {
    display: flex;
    justify-content: flex-end;
    height: 80px;
    pointer-events: none;
  }

  .p-header__menu {
    display: block;
    position: relative;
    width: 80px;
    height: 80px;
    flex: 0 0 80px;
    padding: 0;
    border: 0;
    pointer-events: auto;
    background: linear-gradient(to bottom, #25b8db 0%, #b5e3d9 100%);
    color: #fff;
    font-family: "HonokaMaru", sans-serif;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
  }

  .p-header__dots {
    position: absolute;
    top: 16px;
    left: 50%;
    display: grid;
    grid-template-columns: repeat(3, 4px);
    grid-template-rows: repeat(3, 4px);
    gap: 8px;
    width: 28px;
    height: 28px;
    transform: translateX(-50%);
  }

  .p-header__dots span {
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
  }

  .p-header__menu .p-header__label {
    position: absolute;
    right: 0;
    bottom: 12px;
    left: 0;
    display: flex;
    justify-content: center;
    font-family: "HonokaMaru", sans-serif;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
  }
}

/* ログイン中の管理バー（32px、782px以下は46px）の下に固定ヘッダーを置く */
body.admin-bar header {
  top: 32px;
}

body.admin-bar #sp_navi {
  height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
  body.admin-bar header {
    top: 46px;
  }

  body.admin-bar #sp_navi {
    height: calc(100vh - 46px);
  }
}
