/*Loading*/
.letter-image {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    transform: translate(-50%, -50%);
    opacity: 1;
}
.isLoad .letter-image {
    opacity: 1;
}
.animated-mail {
    position: absolute;
    height: 150px;
    width: 200px;
    animation: animatedmail 0.4s forwards, opacity-envelope 2s 1.5s forwards;
}
.animated-mail .body {
    position: absolute;
    bottom: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 100px 200px;
    border-color: transparent transparent #cbbaa9 transparent;
    z-index: 2;
}
.animated-mail .top-fold {
    position: absolute;
    top: 50px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 50px 100px 0 100px;
    transform-origin: 50% 0%;
    border-color: #bcaa97 transparent transparent transparent;
    z-index: 2;
    animation: topfold 0.5s forwards;
}
.animated-mail .back-fold {
    position: absolute;
    bottom: 0;
    width: 200px;
    height: 100px;
    background: #bcaa97;
    z-index: 0;
}
.animated-mail .left-fold {
    position: absolute;
    bottom: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 50px 0 50px 100px;
    border-color: transparent transparent transparent #c6b6a6;
    z-index: 2;
}
.animated-mail .letter {
    left: 20px;
    bottom: 0px;
    position: absolute;
    width: 160px;
    height: 60px;
    background: white;
    z-index: 1;
    overflow: hidden;
    box-shadow: 0 -2px 10px 2px rgba(0, 0, 0, 0.08);
    animation: animated-mail-letter 0.5s 0.2s forwards;
}
.letter-shadow {
    position: absolute;
    top: 200px;
    left: 50%;
    width: 400px;
    height: 30px;
    transition: 0.4s;
    transform: translateX(-50%);
    border-radius: 100%;
    background: radial-gradient(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0), rgba(0, 0, 0, 0));
    animation: lettershadow 1.5s forwards;
}
@keyframes animatedmail {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(50px);
    }
}
@keyframes topfold {
    0% {
        transform: rotateX(0deg);
        z-index: 2;
    }
    100% {
        transform: rotateX(180deg);
        z-index: 0;
    }
}
@keyframes animated-mail-letter {
    0% {
        height: 60px;
    }
    100% {
        height: 180px;
    }
}
@keyframes lettershadow {
    0% {
        width: 400px;
        opacity: 1;
    }
    60% {
        width: 250px;
        opacity: 1;
    }
    100% {
        width: 100px;
        opacity: 0;
    }
}
@keyframes opacity-envelope {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
}

body {
    display: flex;
    flex-direction: column;
}

body, html {
    height: 100%;
    margin: 0;
}

@media (min-width: 768px) and (hover: none) and (orientation: portrait) {
    main {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        flex: 1;
        min-height: 50vh;
        max-height: 90vh;
    }

    #form {
        width: 100%;
        margin: auto;
        border-radius: 8px;
    }
    body, html {
        height: 100%;
        margin: 0;
    }
    
    body {
        display: flex;
        flex-direction: column;
    }
    
    footer {
        bottom: 0;
    }
}
@media (min-width: 1000px) and (hover: none) and (orientation: landscape) {
    main {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        flex: 1;
        min-height: 50vh;
        max-height: 90vh;
    }

    #form {
        width: 100%;
        margin: auto;
        border-radius: 8px;
    }
    body, html {
        height: 100%;
        margin: 0;
    }
    
    body {
        display: flex;
        flex-direction: column;
    }
    
    footer {
        bottom: 0;
    }
}
/*form*/
.contact-wrap {
    padding-top: 160px;
    position: relative;
    z-index: 8;
    display: none;
}
.contact-wrap.show {
    display: block;
}
.contact {
    width: 100%;
    max-width: 900px; /* 最大寬度 */
    margin: 0 auto; /* 居中對齊 */
    padding: 20px;
    position: relative; /* 使 .contact 的定位基於 .contact-wrap */
}
.contact:before {
    position: absolute;
    content: "Contact";
    text-align: center;
    width: 100%;
    top: -25px; /* 根據需求調整位置 */
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px; /* 調整字體大小 */
    font-family: "Calistoga", serif;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 2px;
    color: #8A663F; /* 調整字體顏色 */
    z-index: 10; /* 確保文字顯示在圓形背景上方 */
}
.contact:after {
    position: absolute;
    content: "";
    background: #FFFFFF;
    border-radius: 50%;
    box-shadow: 0 4px 8px 3px rgba(0, 0, 0, 0.1);
    width: 220px;
    height: 190px;
    top: -50px; /* 調整頂部距離 */
    left: 50%;
    transform: translateX(-50%);
    z-index: 0; /* 使圓形背景在 .contact 的後面 */
}
.contact-box {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 4px 8px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}
.contact-box:before {
    position: absolute;
    content: "";
    background: #FFFFFF;
    width: 209.5px;
    height: 8px;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}
.contact .txt {
    position: relative;
    text-align: center;
    z-index: 10;
    cursor: default;
}
.contact .txt .txt-zh {
    color: #8A663F;
    font-size: 14px;
    font-family: "Noto Sans TC", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 3px;
}
.contact .txt .txt-zh .txt-zh_submit {
    font-family: "Roboto", sans-serif;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 2px;
}
.contact .txt .txt-zh p {
    margin-bottom: 12px;
}
.contact .txt .txt-en {
    color: #B2A89C;
    font-size: 12px;
    font-family: "Roboto", sans-serif;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 1.2px;
}
.contact .txt .txt-en p {
    margin-bottom: 4px;
}
.form-wrap {
    margin-top: 20px;
}
.c-form_item {
    margin-bottom: 20px;
}
.c-form_item .text {
    color: #8A663F;
    font-size: 14px;
    letter-spacing: 2px;
}
.c-form_label {
    display: flex;
    margin-bottom: 5px;
    align-items: center;
    font-family: "Roboto", sans-serif;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 1.8px;
}
.c-form_required {
    display: inline-block;
    background: #AD9378;
    color: #FFFFFF;
    padding: 3px 7.2px;
    margin-right: 10px;
    border-radius: 20px;
    width: 75px;
    font-size: 12px;
    font-weight: normal;
}
.c-form_non-required {
    display: inline-block;
    background: #FFFFFF;
    color: #AD9378;
    border: 2px solid #AD9378;
    padding: 3px 6.5px;
    margin-right: 10px;
    border-radius: 20px;
    width: 75px;
    font-size: 12px;
    font-weight: normal;
}
.c-form_input {
    width: 100%;
    padding: 10px;
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 1.2px solid #8A663F;
    font-family: "Roboto", "Noto Sans TC", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 2px;
    font-size: 14px;
}
.c-form_input[type="text"] {
    height: 40px;
    color: #8A663F;
}
.c-form_input[type="email"] {
    height: 40px;
    color: #8A663F;
}
.c-form_input[type="textarea"] {
    height: 42px;
    color: #8A663F;
    resize:none;
}
.c-form_input[type="textarea"]:focus {
    height: 60px;
    color: #8A663F;
}
.c-form_input:focus {
    outline: solid #8A663F;
}
.form-wrap input::placeholder {
    color: #DACDC3;
    font-family: "Noto Sans TC", sans-serif;
    font-optical-sizing: auto;
    font-weight: 300;
    font-style: normal;
    letter-spacing: 3px;
}
.form-wrap textarea::placeholder {
    color: #DACDC3;
    font-family: "Noto Sans TC", sans-serif;
    font-optical-sizing: auto;
    font-weight: 300;
    font-style: normal;
    letter-spacing: 3px;
}
.form-wrap #field-mail::placeholder {
    font-family: "Roboto", sans-serif;
    font-weight: 300;
    font-style: normal;
    letter-spacing: 2px;
}
.c-form_submit {
    text-align: center;
    font-family: "Roboto", sans-serif;
    font-weight: 400;
    font-style: normal;
}
.c-form_submit button {
    letter-spacing: 2px;
    font-size: 15px;
    background-color: #FFFFFF;
    color: #8A663F;
    border: 2px solid #8A663F;
    padding: 10px 30px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.5s ease-in-out;
}
.c-form_submit button:hover {
    background-color: #8A663F;
    color: #FFFFFF;
}