/*
Theme Name: 杜の都 相続・終活まるごとサポート
Author: 杜の都
Description: 杜の都 相続・終活まるごとサポート専用のオリジナルテーマです。
Version: 1.3.3
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: morinomiyako
*/

/* WordPressが出力する要素を既存デザインになじませるための補助スタイル */
.site-nav .current-menu-item > a,
.site-nav a.current-menu-item,
.site-nav a[aria-current="page"] {
  color: var(--color-primary);
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
}

.pagination .page-numbers.current {
  color: var(--color-white);
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.detail-body img {
  width: auto;
  max-width: 100%;
  height: auto;
}

.contact-message {
  padding: 16px 20px;
  margin-bottom: 24px;
  border-radius: 4px;
}

.contact-message.is-error {
  color: #8a1f1f;
  background: #fff1f1;
  border: 1px solid #e6a0a0;
}

.contact-form-container .send-btn {
  display: block;
  margin: 24px auto 0;
}

.contact-form-container .wpcf7,
.contact-form-container .wpcf7-form-control-wrap {
  display: block;
  width: 100%;
}

.contact-form-container .wpcf7-submit.send-btn {
  border: 0;
  cursor: pointer;
  appearance: none;
  font: inherit;
}

.contact-form-container .wpcf7-not-valid-tip {
  margin-top: 6px;
  color: #8a1f1f;
  font-size: 13px;
}

.contact-form-container .wpcf7 form .wpcf7-response-output {
  margin: 24px 0 0;
  padding: 12px 16px;
}

.contact-form-container .wpcf7-spinner {
  display: none;
}

.contact-form-container .wpcf7-form.submitting .wpcf7-spinner {
  display: block;
  margin: 10px auto 0;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* AUN review adjustments (2026-07-24) */
.btn:hover {
  opacity: 1;
}

.btn-tell:hover {
  background-color: #358b00;
}

.btn-mail:hover {
  background-color: #c87200;
}

.btn-tell p,
.btn-tell span {
  white-space: nowrap;
}

.home .mv-text h2 {
  font-weight: 700;
}

/* TOP review 2026-09-14: photograph and editable proof text are separate. */
.home .hero-proof-list {
  position: absolute;
  top: 62.8%;
  left: 43.0368%;
  width: 44.3845%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3.2389%;
}

.home .hero-proof {
  --proof-unit: 1cqw;
  container-type: inline-size;
  position: relative;
  aspect-ratio: 1;
  background-image: url(assets/images/hero-badge-fill.svg), url(assets/images/hero-badge-outline.svg);
  background-size: 100% 100%;
  border-radius: 50%;
  box-shadow: 0 4px 6px rgb(0 0 0 / 20%);
  font-family: "Morinomiyako Proof Sans", "Noto Sans JP", sans-serif;
  text-align: center;
  line-height: 1.4;
}

.home .hero-proof-top {
  position: absolute;
  inset: 0 0 50%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 2% 5.1948%;
  color: var(--color-gold);
  font-size: calc(9.7403 * var(--proof-unit));
  font-weight: 700;
  white-space: nowrap;
}

.home .hero-proof-bottom {
  position: absolute;
  inset: 50% 0 0;
  padding-top: 3.2468%;
  font-weight: 500;
  white-space: nowrap;
}

.home .hero-proof-bottom strong {
  display: block;
  color: #fbff13;
  font-size: calc(15.5844 * var(--proof-unit));
  font-weight: 500;
}

.home .hero-proof-1 strong {
  font-family: "Morinomiyako Proof Number", "Outfit", sans-serif;
  font-size: calc(19.4805 * var(--proof-unit));
}

.home .hero-proof-2 strong {
  padding-top: 1.5%;
  font-size: calc(12.987 * var(--proof-unit));
  line-height: 1.6;
}

.home .hero-proof-unit,
.home .hero-proof-suffix {
  font-family: "Morinomiyako Proof Sans", "Noto Sans JP", sans-serif;
  font-size: calc(11.6883 * var(--proof-unit));
  font-weight: 500;
}

.home .hero-proof-suffix {
  display: block;
  color: #fff;
}

.home .profile {
  gap: 48px;
}

.office .profile-image-wrap img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 11 / 12;
  object-fit: cover;
  object-position: center 15%;
}

.home .profile-portrait {
  flex: 0 0 264px;
  align-self: flex-start;
  width: 264px;
  aspect-ratio: 240 / 264;
  overflow: hidden;
  border-radius: 8px;
}

.home .profile-portrait .profile-img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  object-position: 50% 20%;
  transform: scale(1.08);
}

.home .profile-content {
  min-width: 0;
  flex: 1;
}

/* Match apparent head size and top clearance across the supplied portraits. */
.home .profile-card-1 .profile-img {
  object-position: 50% 13%;
  transform: scale(1.18);
}

.home .profile-responsibility {
  margin-bottom: 8px;
  color: var(--color-primary);
  font-size: 17px;
  font-weight: 700;
}

.home .profile-text p + p {
  margin-top: 1em;
}

.home .service-office-photo {
  height: auto;
  aspect-ratio: 1094 / 821;
  align-self: flex-start;
  object-fit: contain;
}

.home .service-text-box {
  align-self: flex-start;
}

.home .step {
  gap: 36px;
}

.home .step-card:not(:last-child)::before {
  bottom: -26px;
}

body.thanks {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.thanks #main-content {
  flex: 1 0 auto;
}

body.thanks .site-footer {
  flex: 0 0 auto;
}

/* PC hero: match the Keiei 1440 x 500 proportional visual baseline. */
@media (min-width: 768px) {
  .home .mv {
    height: auto;
  }

  .home .mv-inner {
    --hero-unit: 1cqw;
    container-type: inline-size;
    width: 100%;
    max-width: none;
    margin-right: 0;
    margin-left: 0;
    height: auto;
    aspect-ratio: 1440 / 500;
  }

  .home .mv-text {
    margin-left: calc(9.7222 * var(--hero-unit));
  }

  .home .mv-image {
    top: 0;
    right: auto;
    left: calc(22.7083 * var(--hero-unit));
    width: calc(77.2917 * var(--hero-unit));
    height: calc(34.7222 * var(--hero-unit));
  }

  .home .mv-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .home .mv-text h2 {
    font-size: calc(3.6111 * var(--hero-unit));
    letter-spacing: calc(0.3611 * var(--hero-unit));
  }

  .home .mv-sub-text {
    margin-top: calc(1.1111 * var(--hero-unit));
    font-size: calc(1.25 * var(--hero-unit));
  }

  .home .mv-sub-text span {
    margin-right: calc(0.5556 * var(--hero-unit));
    padding: 0 calc(0.9722 * var(--hero-unit)) calc(0.1389 * var(--hero-unit));
    font-size: calc(1.3889 * var(--hero-unit));
  }

  .home .mv-text .cta-note {
    margin: calc(2.7778 * var(--hero-unit)) calc(10.0694 * var(--hero-unit)) calc(1.1111 * var(--hero-unit));
    font-size: calc(1.25 * var(--hero-unit));
  }

  .home .mv-text .cta-note span,
  .home .mv-text .cta-note::before,
  .home .mv-text .cta-note::after {
    font-size: calc(1.3889 * var(--hero-unit));
  }

  .home .mv-text .cta-note::before {
    right: calc(-1.3889 * var(--hero-unit));
  }

  .home .mv-text .cta-note::after {
    left: calc(-1.3889 * var(--hero-unit));
  }

  .home .mv-text .cta-btn {
    gap: calc(1.1111 * var(--hero-unit));
  }

  .home .mv-text .btn.large {
    width: calc(18.3333 * var(--hero-unit));
    height: calc(5 * var(--hero-unit));
    padding: 0 calc(1.1111 * var(--hero-unit));
    border-radius: calc(0.4167 * var(--hero-unit));
    font-size: calc(1.5278 * var(--hero-unit));
  }

  .home .mv-text .btn.large p {
    padding-left: calc(2.5 * var(--hero-unit));
  }

  .home .mv-text .btn.large p::before {
    width: calc(2.2222 * var(--hero-unit));
    height: calc(2.2222 * var(--hero-unit));
  }

  .home .mv-text .btn-tell.large span {
    font-size: calc(0.9722 * var(--hero-unit));
  }
}

/* Keep the complete desktop composition proportional on tablet widths. */
@media (min-width: 768px) and (max-width: 1199px) {
  html {
    overflow-x: hidden;
  }

  body {
    --tablet-scale: calc(100vw / 1440px);
    width: 1440px;
    zoom: var(--tablet-scale);
  }

  .site-header .header-inner {
    width: calc(100% - 32px);
  }

  /* WebKit may preserve a minimum readable text size after zoom. Give the
     full hours label enough physical room instead of clipping its text. */
  .site-header .btn-tell {
    width: max(200px, calc(152px / var(--tablet-scale)));
  }

  /* The 1440px canvas is already scaled by body zoom. Resolve lengths on
     that canvas, avoiding WebKit's second scaling of container query units. */
  .home .mv-inner {
    --hero-unit: 14.4px;
  }

  .home .hero-proof {
    --proof-unit: 1.54px;
  }
}

.no-posts {
  padding: 32px 0;
  text-align: center;
}

.generic-page-inner {
  max-width: 900px;
}

.search-form {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 32px;
}

.search-form label {
  flex: 1;
}

.search-form .search-field {
  width: 100%;
  height: 100%;
}

.search-form .send-btn {
  min-width: 120px;
}

@media (max-width: 767px) {
  .home .specialty-title h2 {
    font-size: 24px;
    letter-spacing: 0;
    text-wrap: balance;
  }

  .home .hero-proof-list {
    top: 71.7391%;
    left: 4.8718%;
    width: 90.2564%;
    gap: 2.2727%;
  }

  .home .profile-portrait {
    flex-basis: auto;
    width: 220px;
    margin: 0 auto 24px;
  }

  .home .profile-responsibility {
    font-size: 15px;
  }

  .home .mv-inner {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    padding: 0;
  }

  /* The photograph defines row 1; the CTA follows it in normal flow.
     Do not position the CTA with percentage margins tied to viewport width. */
  .home .mv-text,
  .home .mv-image {
    grid-area: 1 / 1;
    min-width: 0;
  }

  .home .mv-text {
    align-self: start;
    padding: 12px 20px;
    z-index: 1;
  }

  .home .mv-image {
    position: relative;
    z-index: 0;
  }

  .home .mv-image img.sp {
    aspect-ratio: 390 / 460;
  }

  .home .mv-mobile-actions {
    grid-area: 2 / 1;
    min-width: 0;
    padding: 24px 20px 12px;
  }

  .home .mv-mobile-actions .cta-note {
    display: table;
    margin: 0 auto 16px;
    white-space: nowrap;
    isolation: isolate;
  }

  /* Keep the complete FV support copy on one line down to iPhone SE width. */
  .home .mv-sub-text {
    display: flex;
    width: 100%;
    align-items: center;
    flex-wrap: nowrap;
    gap: 3px;
    font-size: clamp(10.5px, 3.467vw, 13px);
    letter-spacing: 0;
    white-space: nowrap;
  }

  .home .mv-sub-text span {
    margin-right: 0;
    padding-right: clamp(5px, 2vw, 7.5px);
    padding-left: clamp(5px, 2vw, 7.5px);
    flex: 0 0 auto;
    font-size: clamp(13px, 4vw, 15px);
  }

  .home .step {
    gap: 32px;
  }

  .home .step-card:not(:last-child)::before {
    bottom: -24px;
  }

  .home .reasons-section {
    background: var(--color-bg-light);
  }

  .pagination {
    margin-top: 24px;
  }

  .pagination .page-numbers {
    min-width: 36px;
    min-height: 36px;
  }

  .search-form {
    flex-direction: column;
  }

}
