/* ==========================================================================
   2026-11 表示改善（style.css / sp.css の後に読み込んで上書きする）
   元に戻すときは functions.php の improve-style の読み込みを外すだけでよい
   ========================================================================== */

/* ---------- 日本語の改行位置 ---------- */
/* 見出しなどは <span class="phrase"> で区切った単位でだけ改行する（語の途中で折り返さない） */
.phrase {
    display: inline-block;
}
/* 本文は最後の行に1〜2文字だけ残る「ぶら下がり」を避ける（対応ブラウザのみ） */
.about-description,
.service-description,
.service-main-description,
.about-image-text-box p,
.faq-answer p,
.pricing-note p,
.contact-info > p {
    text-wrap: pretty;
}
/* 文節単位の改行に対応したブラウザでは、見出しを文節で区切って行の長さもそろえる */
@supports (word-break: auto-phrase) {
    .section-title,
    .service-title,
    .pricing-title,
    .about-image-text-box h3,
    .about-image-text-box h4,
    .contact-info h3,
    .faq-question span {
        word-break: auto-phrase;
        text-wrap: balance;
    }
}

/* ---------- 写真（縦横比を保つ） ---------- */
.top-slider .swiper-slide img,
.about-us .about-image-text img {
    height: auto;
}

/* ---------- ヒーロー（最初の画面で見出しが全部見えるように） ---------- */
.hero-content .hero-lead {
    margin: 0;
    text-align: left;
    color: var(--text-white);
    font-weight: 700;
    font-size: clamp(13px, 1.5vw, 18px);
    line-height: 1.6;
    letter-spacing: 0.04em;
    text-shadow: 1px 1px 8px rgb(0 0 0 / 90%);
}
@media (min-width: 769px) {
    .hero {
        padding-bottom: 90px;
    }
    /* 英字の大きさを画面の高さに合わせて縮め、日本語の見出しを押し出さない */
    .hero-bg-text {
        font-size: min(11rem, 12.5vh);
    }
    .hero-content .hero-title {
        gap: 4px;
        margin-bottom: 12px;
    }
    .hero-content .hero-title .hero-title-main {
        font-size: clamp(24px, min(5vw, 5.5vh), 48px);
        line-height: 1.3;
    }
    .hero-content .hero-title .hero-title-sub {
        font-size: clamp(36px, min(7vw, 8vh), 72px);
        line-height: 1.3;
    }
}

/* ---------- 背景の大きな英字（本文に重なっても読めるように薄く） ---------- */
.services .services-bg-text,
.pricing .pricing-bg-text,
.media .media-bg-text,
.sns .sns-bg-text,
.faq .faq-bg-text,
.contact .contact-bg-text {
    color: rgb(0 0 0 / 6%);
}
/* 縦の位置は script.js が各セクションの見出しに合わせて決める（.is-anchored はそのときに付く）。
   以前の「top: 560%」のような固定値は、中身が増えると別の欄にはみ出すのでやめた */
.services,
.pricing,
.media,
.sns,
.faq,
.contact {
    isolation: isolate; /* 英字を「セクションの背景より前・中身より後ろ」に重ねるため */
}
.services .services-bg-text.is-anchored,
.pricing .pricing-bg-text.is-anchored,
.media .media-bg-text.is-anchored,
.sns .sns-bg-text.is-anchored,
.faq .faq-bg-text.is-anchored,
.contact .contact-bg-text.is-anchored {
    top: 0;
    z-index: -1;
}
/* スマホ（幅480px以下）は英字が画面幅に収まらず読みにくいので表示しない */
@media (max-width: 480px) {
    .services .services-bg-text,
    .pricing .pricing-bg-text,
    .media .media-bg-text,
    .sns .sns-bg-text,
    .faq .faq-bg-text,
    .contact .contact-bg-text {
        display: none;
    }
}

/* ---------- 3つの強み ---------- */
.about-us .swiper-wrapper {
    align-items: stretch;
}
.about-us .about-image-text .about-image-text-box {
    height: auto !important;
    justify-content: flex-start !important;
    gap: 0.75rem;
}
.about-us .about-image-text .about-image-text-box h3 {
    font-size: clamp(1.2rem, 6vw, 1.75rem) !important;
    line-height: 1.3 !important;
    margin-bottom: 0 !important;
}
.about-us .about-image-text .about-image-text-box h4 {
    font-size: clamp(0.95rem, 4.2vw, 1.2rem) !important;
    line-height: 1.45 !important;
    margin-bottom: 0 !important;
}
.about-us .about-image-text .about-image-text-box p {
    line-height: 1.7 !important;
}
/* 「01／03」の番号（数字が重なっていたので横並びの札にする） */
.about-us .swiper2 .swiper-pagination {
    top: 12px !important;
    left: 12px !important;
    bottom: auto !important;
    width: auto !important;
    height: auto !important;
}
.about-us .swiper2 .swiper-pagination .pagenation-wrapper {
    position: static !important;
    display: inline-flex;
    align-items: baseline;
    gap: 0.2em;
    height: auto !important;
    margin: 0 !important;
    padding: 0.2em 0.75em;
    border-radius: 999px;
    background: rgb(0 0 0 / 55%);
    font-size: 18px !important;
    line-height: 1.3;
    color: var(--text-white);
}
.about-us .swiper2 .pagenation-wrapper > div {
    position: static !important;
}
.about-us .swiper2 .swiper-pagination-current {
    color: var(--primary-color);
}

/* ---------- 募集バナー（閉じるボタン付き・必要なときだけ表示） ---------- */
.rectuit-link {
    bottom: max(16px, env(safe-area-inset-bottom));
    transition: transform 0.35s ease, opacity 0.35s ease;
}
.rectuit-link:not(.is-visible) {
    transform: translateY(160%);
    opacity: 0;
    pointer-events: none;
}
.rectuit-link .link-btn {
    width: min(92%, 980px);
    padding: 0.7rem 3.2rem 0.7rem 1.2rem;
    border-radius: 999px;
    box-shadow: 0 6px 20px rgb(0 0 0 / 15%);
}
.rectuit-link .rec-cap {
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
}
.rectuit-link .rec-more {
    margin-left: 0.4em;
    text-decoration: underline;
}
.rectuit-link .rec-close {
    position: absolute;
    top: 50%;
    right: calc((100% - min(92%, 980px)) / 2 + 8px);
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgb(0 0 0 / 8%);
    color: var(--text-dark);
    font-size: 22px;
    line-height: 36px;
    text-align: center;
    cursor: pointer;
}
.rectuit-link .rec-close:hover {
    background: rgb(0 0 0 / 16%);
}
@media (max-width: 480px) {
    .rectuit-link .link-btn {
        padding: 0.55rem 2.9rem 0.55rem 1rem;
        border-radius: 16px;
    }
    .rectuit-link .rec-cap {
        font-size: 13px;
    }
}

/* ---------- お問い合わせ ---------- */
.contact-info-value a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgb(0 0 0 / 25%);
}
.contact-info-value a:hover {
    border-bottom-color: var(--text-dark);
}
@media (max-width: 480px) {
    /* ラベルと値が左右に離れて読みにくかったので縦に並べる */
    .contact .container .contact-content .contact-info .contact-info-items .contact-info-item .contact-info-text {
        display: block;
    }
}
/* フォーム（Contact Form 7）を他のボタン・入力欄とそろえる */
#contact .wpcf7 .form-group p {
    margin: 0 0 1.2rem;
}
#contact .wpcf7 .form-group br {
    display: none;
}
#contact .wpcf7 label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 14px;
    font-weight: 700;
}
#contact .wpcf7 .required {
    color: #d93025;
}
#contact .wpcf7 input[type="text"],
#contact .wpcf7 input[type="email"],
#contact .wpcf7 input[type="tel"],
#contact .wpcf7 select,
#contact .wpcf7 textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: var(--bg-white);
    font-size: 16px; /* 16px未満だとiPhoneで入力時に画面が拡大される */
    line-height: 1.6;
    color: var(--text-dark);
}
#contact .wpcf7 input:focus,
#contact .wpcf7 select:focus,
#contact .wpcf7 textarea:focus {
    outline: 3px solid rgb(255 218 81 / 60%);
    border-color: var(--primary-dark);
}
#contact .wpcf7 .wpcf7-submit {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    padding: 1rem;
    border: 0;
    border-radius: 999px;
    background: var(--primary-color);
    color: var(--text-dark);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 5px 20px rgb(255 218 81 / 30%);
    transition: background-color 0.3s ease, transform 0.3s ease;
}
#contact .wpcf7 .wpcf7-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}
#contact .wpcf7 .wpcf7-spinner {
    display: block;
    margin: 0.6rem auto 0;
}

/* ---------- フッターの会社概要 ---------- */
.footer-company {
    margin-top: 1rem;
    font-style: normal;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-light);
}
.footer-company dl div {
    display: flex;
    gap: 0.8em;
    margin-bottom: 0.35rem;
}
.footer-company dt {
    flex: 0 0 4.5em;
    color: #bbb;
}
.footer-company dd {
    margin: 0;
}
.footer-company a {
    color: inherit;
}
.footer-link-group ul {
    padding-left: 0;
    list-style: none;
}
