/* ========================================
   Contact Page Styles
   ======================================== */

/* 頁面底色：淺灰 */
body {
    background-color: #F4F4F4;
}

/* 驗證碼與送出按鈕同列（桌機：按鈕靠右） */
.captcha-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
}
.captcha-row .form-group {
    margin-bottom: 0;
}
.captcha-row .contact-submit-btn {
    margin-top: 0;
    flex-shrink: 0;
}

/* Hero：套用共通 .page-hero.hero-fullbleed，此處僅覆寫背景圖 */
#contact-hero.hero-fullbleed::before {
    background-image: url('../images/contact/contact-hero.jpg');
}

.contact-wrapper {
    position: relative;
    z-index: 1;
    padding-bottom: 100px;
    background-color: transparent;
}

.contact-container {
    max-width: var(--container-max-width);
    margin: 80px auto 0;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Left Sidebar - Info Block */
.contact-info-block {
    background-color: #F4F4F4;
    padding: 0;
    width: 40%;
    min-width: 300px;
    display: flex;
    flex-direction: column;
}

.contact-title {
    font-family: 'Chivo', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary-teal);
    margin-bottom: 60px;
    line-height: 1.2;
}

.contact-details {
    margin-top: auto;
    margin-bottom: auto;
}

.detail-group {
    margin-bottom: 40px;
}

.detail-label {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #666;
    margin-bottom: 10px;
    display: block;
}

.detail-text {
    font-size: 1.1rem;
    color: #333;
    line-height: 1.6;
}

/* 滿版地圖：填滿整個資訊區塊並隨表單高度放大 */
.contact-map-wrapper {
    flex: 1;
    width: 100%;
    margin: 0;
    display: flex;
}
.contact-map-wrapper iframe {
    width: 100%;
    height: 100%;
    min-height: 460px;
    border: 0;
    display: block;
}

/* Right Content - Form */
.contact-form-section {
    width: 60%;
    padding: 80px 60px;
    background-color: #fff;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 15px 20px;
    background-color: #F4F4F4;
    border: none;
    border-radius: 0;
    font-size: 1rem;
    color: #333;
    transition: background-color 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    background-color: #E6EBED;
}

.form-textarea {
    resize: vertical;
    min-height: 150px;
}

/* Submit Button */
.contact-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    border: none;
    background-color: transparent;
    width: 222.55px;
    height: 40px;
    min-width: unset;
    margin-top: 20px;
    text-decoration: none;
    z-index: 1;
    font-family: var(--font-family-chinese);
}

.contact-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-teal);
    z-index: -1;
    transition: 0.3s;
}

.contact-submit-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--hover-green);
    transition: width 0.3s ease;
    z-index: -1;
}

@media (hover: hover) {
    .contact-submit-btn:hover::after {
        width: 100%;
    }
}

.contact-submit-btn span {
    position: relative;
    z-index: 2;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 900px) {
    /* 手機：hero 緊接表單，地圖移到表單下方並緊接 footer */
    .contact-wrapper {
        padding-bottom: 0;
    }
    .contact-container {
        flex-direction: column;
        margin-top: 0;
    }

    .contact-form-section {
        width: 100%;
        padding: 40px 20px;
        order: 1;
    }

    .contact-info-block {
        width: 100%;
        padding: 0;
        order: 2;
    }

    /* 驗證碼與按鈕改直向堆疊，按鈕滿寬 */
    .captcha-row {
        flex-direction: column;
        align-items: stretch;
        gap: 36px;
    }
    .captcha-row .contact-submit-btn {
        width: 100%;
    }
}