/* =============================================================
 * mailform.rousai.or.jp - メインサイト統一CSS
 *
 * メインサイト rousai.or.jp と統一感のあるヘッダー/フッターを実現。
 * 既存 CSS（c-header / c-footer / c-title など）を上書きする形。
 * フォーム要素（form, payment, c-section など）には影響しないように
 * 設計済み。フォーム本体の見た目は基本そのまま。
 * ============================================================= */

/* ----- 旧ヘッダー/フッター/タイトルを無効化（CSSで隠す） ----- */
.c-header { display: none !important; }
.c-footer { display: none !important; }
.c-title  { display: none !important; }

/* ----- ベース ----- */
.mf-body {
    margin: 0;
    padding: 0;
    background: #ffffff;
    color: #1f2937;
    font-family: 'Roboto', 'Hiragino Kaku Gothic Pro', 'ヒラギノ角ゴ Pro W3', メイリオ, Meiryo, sans-serif;
    line-height: 1.7;
}

/* セクション幅をメインサイトに合わせる */
.mf-body .c-section {
    max-width: 720px;
    width: calc(100% - 32px);
    margin: 32px auto 64px;
    padding: 0 8px;
}

/* =============================================================
   ヘッダー（ロゴのみ・センタリング）
   ============================================================= */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
.site-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.site-header__logo-link {
    display: inline-block;
    line-height: 0;
    transition: opacity 0.15s ease;
}
.site-header__logo-link:hover {
    opacity: 0.8;
}
.site-header__logo-link--disabled {
    pointer-events: none;
    cursor: default;
}
.site-header__logo {
    height: 44px;
    width: auto;
    display: block;
}

/* =============================================================
   ページタイトルバー（旧 .c-title 相当を統一感あるデザインで再現）
   ============================================================= */
.page-title-bar {
    background: linear-gradient(135deg, #0aa086 0%, #088e76 100%);
    padding: 32px 24px;
    text-align: center;
    color: #ffffff;
    position: relative;
}
.page-title-bar::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 16px;
    height: 16px;
    background: #088e76;
}
.page-title-bar__inner {
    max-width: 1200px;
    margin: 0 auto;
}
.page-title-bar__title {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.4;
    letter-spacing: 0.02em;
}

/* =============================================================
   フォームエリアのデザイン微調整（既存構造を尊重）
   ============================================================= */
.mf-body .form__cell--label {
    background-color: #f7fbf9;
    color: #1f2937;
    font-weight: 700;
    border-right: 1px solid #e5e7eb;
}
.mf-body .form__row {
    border-color: #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}
.mf-body .form__input,
.mf-body .form__textField {
    border: 1px solid #d1d5db;
    background-color: #ffffff;
    border-radius: 6px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.mf-body .form__input:focus,
.mf-body .form__textField:focus {
    outline: none;
    border-color: #0aa086;
    box-shadow: 0 0 0 3px rgba(10, 160, 134, 0.15);
}
.mf-body .form__required {
    background: #ef4444;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    margin-left: 12px;
}

/* 送信ボタン */
.mf-body .submit__btn {
    background-color: #0aa086;
    transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 2px 4px rgba(10, 160, 134, 0.2);
    font-weight: 700;
    cursor: pointer;
}
.mf-body .submit__btn:hover {
    background-color: #088e76;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(10, 160, 134, 0.3);
}

/* お支払額の強調表示 */
.mf-body .c-text__total {
    color: #0aa086 !important;
}

/* result（試算結果）エリアの色味調整 */
.mf-body .result {
    background-color: #f7fbf9;
    border-color: #d3ede4;
    border-radius: 8px;
}

/* =============================================================
   フッター（メインサイト準拠）
   ============================================================= */
.site-footer {
    background: #ffffff;
    margin-top: 64px;
    border-top: 1px solid #e5e7eb;
}

/* 上段：厚労省バナー */
.site-footer__top {
    text-align: center;
    padding: 32px 24px 24px;
    background: #ffffff;
}
.site-footer__mhlw-link {
    display: inline-block;
    line-height: 0;
}
.site-footer__mhlw-logo {
    max-width: 280px;
    height: auto;
    width: 100%;
    display: block;
    margin: 0 auto 8px;
}
.site-footer__mhlw-caption {
    font-size: 13px;
    color: #4b5563;
    margin: 8px 0 0;
    font-weight: 500;
}

/* 中段：会社情報のみ */
.site-footer__main {
    background: #f9fafb;
    padding: 32px 24px;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}
.site-footer__main-inner {
    max-width: 720px;
    margin: 0 auto;
}
.site-footer__company p {
    margin: 0 0 8px;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.7;
}
.site-footer__company-name {
    font-weight: 700;
    color: #1f2937 !important;
    font-size: 14px !important;
}
.site-footer__company-address {
    color: #4b5563;
}
.site-footer__tel-link {
    color: #0aa086;
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.site-footer__tel-link:hover {
    text-decoration: underline;
}
.site-footer__tel-icon {
    font-size: 14px;
}
.site-footer__tel-hours {
    color: #6b7280;
    font-size: 12px;
}
.site-footer__email-link {
    color: #0aa086;
    text-decoration: none;
}
.site-footer__email-link:hover {
    text-decoration: underline;
}

/* 下段：ポリシー＋コピーライト */
.site-footer__bottom {
    background: #ffffff;
    padding: 20px 24px;
}
.site-footer__bottom-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.site-footer__policies {
    display: flex;
    gap: 24px;
}
.site-footer__policy-link {
    color: #4b5563;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.15s ease;
}
.site-footer__policy-link:hover {
    color: #0aa086;
}
.site-footer__copyright {
    color: #9ca3af;
    font-size: 12px;
    margin: 0;
}

/* =============================================================
   レスポンシブ
   ============================================================= */
@media screen and (max-width: 900px) {
    .site-header__inner {
        padding: 14px 16px;
    }
    .site-header__logo {
        height: 36px;
    }
    .page-title-bar {
        padding: 24px 16px;
    }
    .page-title-bar__title {
        font-size: 18px;
    }
    .site-footer__bottom-inner {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    .site-footer__policies {
        justify-content: center;
        flex-wrap: wrap;
    }

    /* フォーム部分のモバイル最適化 */
    .mf-body .form__cell--label {
        width: 100% !important;
        display: block !important;
        padding: 10px 12px !important;
    }
    .mf-body .form__cell--input {
        width: 100% !important;
        display: block !important;
        padding: 10px 12px !important;
    }
    .mf-body .form__row {
        display: block !important;
    }
    .mf-body .submit__btn {
        width: 100% !important;
        max-width: 350px !important;
    }
}

@media screen and (max-width: 480px) {
    .site-header__logo {
        height: 32px;
    }
    .page-title-bar__title {
        font-size: 16px;
    }
    .site-footer__top {
        padding: 24px 16px 16px;
    }
    .site-footer__main {
        padding: 32px 16px;
    }
}
