/* =============================================================================
   お問い合わせページ専用スタイル (contact.css)
   ============================================================================= */

/* ヒーローセクション */
.contact-hero {
    position: relative;
    height: 289px;
    background: url('../images/contact-hero-bg.png') center/cover no-repeat;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(35, 35, 35, 0.3);
    z-index: 1;
}

.contact-hero .container {
    position: relative;
    z-index: 2;
    height: 100%;
}

/* ナビゲーション */
.hero-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 44px;
    padding-left: 51px;
    padding-right: 51px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.nav-logo img {
    width: 39.317px;
    height: 31.899px;
}

.nav-company-name img {
    width: 172.077px;
    height: 20.345px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 154px;
    height: 50px;
    font-family: 'Toppan Bunkyu Mincho', serif;
    font-size: 15px;
    color: white;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s ease;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-contact {
    border: 0.5px solid white;
    width: 137px;
    margin-left: 17px;
}

/* メインコンテンツ */
.contact-content {
    padding: 57px 0;
    background-color: #f8f8f8;
}

.contact-content .container {
    max-width: 960px;
}

/* フォームセクション */
.contact-form-section {
    width: 100%;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 38px;
}

/* フォームグループ */
.form-group {
    position: relative;
    display: grid;
    /* grid-template-columns: max-content; */
    grid-template-rows: max-content;
    place-items: start;
    /* width: 880px; */
}

/* ラベル */
.form-label {
    grid-area: 1 / 1;
    font-family: 'Toppan Bunkyu Mincho', serif;
    font-size: 16px;
    color: #232323;
    margin: 10px 0 0 0;
    white-space: nowrap;
}

/* 必須バッジ */
.required-badge {
    grid-area: 1 / 1;
    background-color: #d98507;
    color: white;
    font-family: 'Noto Sans', 'Noto Sans JP', sans-serif;
    font-weight: bold;
    font-size: 10px;
    text-align: center;
    width: 34px;
    height: 16px;
    line-height: 14px;
    margin: 13px 0 0 121px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* フォームコントロール */
.wpcf7-form-control-wrap {
    grid-area: 1 / 1;
    width: calc(100% - 273px);
    margin-left: 273px;
}

.form-group .form-control {
    background: white;
    border: 1px solid grey;
    font-family: 'Toppan Bunkyu Mincho', serif;
    font-size: 16px;
    padding: 8px;
    margin: 0;
    width: 100%;
    height: 42px;
    box-sizing: border-box;
}

.form-group .form-control:focus {
    outline: none;
    border-color: #d98507;
}

/* 郵便番号入力 */
.postal-input {
    color: #c1c1c1;
}

.postal-input:focus,
.postal-input:not(:placeholder-shown) {
    color: #232323;
}

/* 都道府県セレクト */
.select-control {
    width: 300px;
    color: #c1c1c1;
    background-image: url('../images/contact-arrow.svg');
    background-repeat: no-repeat;
    background-position: calc(100% - 16px) center;
    background-size: 12px 9px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.select-control:focus,
.select-control:not([value=""]) {
    color: #232323;
}

/* 市区町村入力 */
.city-input {
    width: 553px;
    height: 40px;
}

/* テキストエリア */
.form-group .form-control.message-textarea {
    /* width: 553px; */
    height: 117px;
    resize: vertical;
    padding: 8px;
}

/* フォーム区切り線 */
.form-divider {
    grid-area: 1 / 1;
    width: 880px;
    height: 1px;
    background-image: url('../images/contact-divider.svg');
    background-repeat: no-repeat;
    background-size: 100% 1px;
    margin-top: 74px;
}

.form-group:has(.message-textarea) .form-divider {
    margin-top: 158px;
}

/* 送信ボタン */
.wpcf7-submit {
    background-color: #d98507;
    color: white;
    font-family: 'Toppan Bunkyu Mincho', serif;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    padding: 12px 40px;
    width: 120px;
    height: 45px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px auto 0;
}

.wpcf7-submit:hover {
    background-color: #b8720a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(217, 133, 7, 0.3);
}

.wpcf7-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(217, 133, 7, 0.3);
}

.wpcf7-submit:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(217, 133, 7, 0.3);
}

/* 送信中のスピナー */
.wpcf7-submit.has-spinner {
    position: relative;
}

.wpcf7-submit.has-spinner:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
    transform: none;
}

.wpcf7-submit.has-spinner:disabled::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid #666;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.wpcf7 form .wpcf7-response-output {
    border: none;
    text-align: center;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* フッター */
.contact-footer {
    background-color: #232323;
    padding: 129px 0 91px;
}

.contact-footer .container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 105px;
}

/* レスポンシブ対応 */
@media (max-width: 1200px) {
    /* .contact-content .container {
        padding: 0 140px;
    } */

    .form-group {
        /* width: 700px; */
    }

    .form-group .form-control {
        margin: 0;
    }

    .postal-input {
        /* width: 180px; */
    }

    .select-control {
        width: 240px;
    }

    .city-input,
    .message-textarea {
        width: 450px;
    }

    .form-divider {
        width: 700px;
    }
}

@media (max-width: 968px) {
    .hero-nav {
        flex-direction: column;
        gap: 20px;
        padding: 30px 20px 0;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .nav-link {
        width: 120px;
        font-size: 14px;
    }

    .nav-contact {
        width: 110px;
        margin-left: 0;
    }

    /* .contact-content .container {
        padding: 0 60px;
    } */

    .form-group {
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .form-label {
        grid-area: 1 / 1;
        margin: 0;
    }

    .required-badge {
        grid-area: 2 / 1;
        margin: 5px 0 0 0;
        justify-self: start;
    }

    .wpcf7-form-control-wrap {
        grid-area: 3 / 1;
        width: 100%;
        margin-left: 0;
    }

    .form-group .form-control {
        margin: 10px 0 0 0;
        width: 100%;
    }

    .postal-input,
    .select-control,
    .city-input,
    .message-textarea {
        width: 100%;
        /* max-width: 400px; */
    }

    .form-divider {
        grid-area: 4 / 1;
        width: 100%;
        margin-top: 20px;
    }

    .wpcf7-submit {
        margin: 20px auto 0;
        width: 100px;
        height: 40px;
        font-size: 14px;
        padding: 10px 30px;
    }

    .contact-footer .container {
        padding: 0 30px;
    }
}

@media (max-width: 768px) {
    .contact-hero {
        height: 220px;
    }

    .nav-brand {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .nav-menu {
        display: none;
    }

    /* .contact-content .container {
        padding: 0 30px;
    } */

    .contact-content {
        padding: 40px 0;
    }

    .wpcf7-submit {
        width: 90px;
        height: 38px;
        font-size: 13px;
        padding: 8px 20px;
    }

    .contact-footer {
        padding: 60px 0 40px;
    }
}

@media (max-width: 480px) {
    .contact-hero {
        height: 180px;
    }

    /* .contact-content .container {
        padding: 0 20px;
    } */

    .postal-input,
    .select-control,
    .city-input,
    .message-textarea {
        /* max-width: 280px; */
    }

    .contact-form {
        gap: 30px;
    }
}