/*paddingやborderを含めてサイズ計算をするため*/
* {
    box-sizing: border-box;
}

/*スクロールされたときの動きが滑らかになる*/
html {
    scroll-behavior: smooth;
}

/*日本語フォント代替用*/
/* 更新時2秒間フェードイン */
body {
    font-family: "Hiragino Kaku Gothic ProN", sans-serif;
    animation: fadeIn 2s;
}

/* 更新時に画面をフェードイン */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* CSSリセット(初期化) */
html,body,
ul, ol, li,
h1, h2, h3, h4, h5, h6, p,
form, input, div,header,footer {
    margin: 0;
    padding: 0;
}

/* ヘッダー */
header {
    /*背景:黒　文字の色:白　縦:100　横：画面に合わせる*/
    background-image:url(image/header_background_1.jpg);
    background-size: cover;      /* 画像を要素いっぱいに広げる*/
    background-repeat: no-repeat;/* 画像を繰り返さない */
    background-position: center; /* 画像の表示位置を中央にする */
    background-blend-mode: overlay;
    background-color: rgba(255, 255, 255, 0.5);/* 半透明の白色 */
    color:black;
    height:100px;
    width: 100%;
    position: fixed;/* 画面に固定される */
    display: flex;  /* 要素を横並びにする */
    align-items: center;/* 縦方向の中央揃え */
    z-index: 2;/* 画面の一番先頭に持ってくる */
    padding: 20px;
    justify-content: space-between;
}

header input {
    margin-left: 5px;
}

.menuToggle {
    display: none;
}

.headerRight {
    gap: 10px; /*少しだけ隙間を用意 */
    display: flex;
}

.search {
    display: flex;
    align-self: flex-end;
    align-items: center;
}

#scrollTarget {
    scroll-margin-top: 100px;/* ヘッダーの高さ分ずらす */
}

/* メインビュー */
.mainviewWrapper {
    background-image:url(image/black_background.jpg);
    background-size: cover;      /* 要素全て埋める*/
    background-repeat: no-repeat;/* 繰り返さない */
    background-position: center;
    width: 100%;
    display: flex;
    flex-direction: column;/* 画像やボタンを縦に並べる */
    align-items: center;/* 中央揃え */
    padding-top: 100px;/* ヘッダー分下にずらす */
}

.mainviewWrapper img {
    width: 70%;/* 横幅に合わせてサイズを変更 */
    max-width: 1000px;
    height:auto;
    margin: 20px auto;
    border-style: ridge;
}

.mainviewWrapper button {
    width: 50%;
    height: 80px;
    background-color: #a08ed1;
    color: white;
    font-size: 30px;
    border-style: none;
    border-radius:  20px;
}

/* 入力フォーム */
.formWrapper {
    background-image:url(image/japanese_background_2.jpg);
    background-size: cover;      /* ← これが重要 */
    background-repeat: no-repeat;/* 繰り返さない */
    background-position: center;
    height: auto;
    display: flex;
    align-items: center;/* 中央揃え */
    flex-direction: column;/* 要素を縦に並べる */
    padding-top: 20px;
}

.container {
    width: 70%;
    height: auto;
    max-width: 1000px; /* 横に広がりすぎないように制御 */
    margin: 20px 0;
}

.applyItem {
    width: 100%;
    height: auto;
    background-color: #C9B4D5;
    border-style: double;
    border-radius:  10px;
    border-color: black;
    padding-left: 10px;
    margin: 10px 0;
}

.wrapper {
    position: relative;/* アラートを出すための基準として用意 */
    width: fit-content;
}

.alert {
    position: absolute;/* 自由に配置 */
    color:red;
    top: -1rem;/* 入力要素の上に配置 */
    left: -10px;
    font-size: 0.8rem;
    white-space: nowrap; /* 追加：改行を防ぐ */
}

.phoneInfo {
    display: flex;/* 電話番号情報を文章の横に並べるため */
    gap: 20px;
}

.container h3 {
    padding-left: 10px;
}

.container p {
    margin-left: 20px;
}

.apply {
    margin-bottom: 20px;
}

.infoFlex {
    height:auto;
    display: flex;
    justify-content: space-between; /* 左にラベル右に入力欄を設置 */
    border-top:1px solid darkgreen;
    padding: 20px 0 10px 0;
}

.infoNoBorder {
    height:auto;
    display: flex;
    justify-content: space-between; /* 左にラベル右に入力欄を設置 */
    padding: 20px 0 10px 0;
}

.formIndent {
    width: 30%;
    height: auto;
    display: flex;
}

.inputIndent {
    width: 70%;
    height: auto;
    display: flex;
    align-items: flex-end;
}

/* 氏名や郵便番号などinput要素の前にlabelがあるタイプ用のcss */
.formIndentLabel {
    width: 28.5%;
    height: auto;
    display: flex;
}

/* 氏名や郵便番号などinput要素の前にlabelがあるタイプ用のcss */
.inputIndentLabel {
    width: 71.5%;
    height: auto;
    display: flex;
    align-items: flex-end;
}

.inputIndentLabel input,
.inputIndent input ,
.inputIndent select,
.inputIndent textarea {
    margin: 0 10px;
}

.marginLeft {
    margin-left: 50px;
}

.focusFont {
    color: red;
    font-size: 1.5rem;
}/* エラーメッセージ用 */

/* rangeタイプのinput要素を横方向の中心に持っていくため */
.positionCenter {
    width: 100%;
    display: flex;
    justify-content: center;
}

select:invalid {
    color: #777;
}

option {
    color: black;
}

#submitBtn {
    width: 150px;
    height: auto;
    font-size: 20px;
    margin: 50px;
    border-style: none;
    color: white;
    background-color: darkslategrey;
    border-radius:  20px;
}

/* ボタンにフォーカスされたときに分かりやすくするため */
button:hover {
    filter: brightness(0.7);
    cursor: pointer;
}

/* 入力欄レイアウト */
input,select {
    height: 25px;
}

input,select,textarea {
    border-radius: 5px;
    border:0.1rem solid black;
    padding-left: 1px;
}

#familyName, #lastName {
    width:150px;
}

#prefecture {
    width:110px;
}

#year {
    width:70px;
}

#month,#date {
    width: 40px;
}

/* 長く書く必要がある場所用に設定(市区町村・丁目番地・建物名・メールアドレス) */
.textLength {
    width: 250px;
}

/* 必要以上に大きく＆小さくなりすぎないように制御 */
#inquiryDetails {
    max-width: 70%;
    max-height: 150px;
    min-width: 70%;
    min-height: 150px;
}

.rangeLength {
    width:70%;
}

.inputIndent select {
    width:50px;
}

/* フッター */
footer {
    background-color: rgb(0, 43, 9);
    width: 100%;
    color: white;
    height: 50px;
    text-align: center;
}

footer p {
    padding-top: 10px;
}

/* 検索時のハイライト用 */
.highlight {
    background-color: yellow;
    color:black;/* 白文字用に黒色に変換 */
}