@import url("../fonts/fonts.css");

body {
    margin: 0;
    padding: 0;
    font-family: "GrotleyRegular";
    background-color: #f4f4f5;
    overflow-x: hidden;
    /* border: 1px solid red; */
}

button:focus,
button:active {
    outline: none;
}

.mobile-only {
    display: none;
}

@media (max-width: 576px) {
    .mobile-only {
        display: block;
    }
}

.row_Header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(244, 244, 245, 0.8);
    padding: 20px 40px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.left_Header {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Align items to the left */
    justify-content: flex-start; /* Ensure content is at the top */
    font-size: 24px;
}

    .left_Header a {
        color: #000000;
    }

.logo {
    max-height: 25px;
    align-self: flex-start; /* Explicitly align the logo to the top */
}

.right_Header {
    flex: 1;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

    .right_Header a {
        text-decoration: none;
        font-weight: normal;
        letter-spacing: 1px;
        transition: color 0.3s ease;
        color: #000000;
        /* -webkit-text-stroke: 1px #000000; */
        font-style: italic;
        font-size: 24px;
    }

        .right_Header a:nth-child(2) {
            color: transparent;
            -webkit-text-stroke: 1px #000000;
        }

        .right_Header a:hover {
            color: #666666;
        }

.right_Header_mobile {
    display: none;
}

@media (max-width: 576px) {
    .right_Header {
        display: none;
    }

    .right_Header_mobile {
        display: block;
    }

        .right_Header_mobile img {
            width: 70px;
            height: 70px;
            cursor: pointer;
        }
}

.row_Center_logo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.center_logo img {
    max-width: 100%;
    height: auto;
}

.row_Header_Center {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    width: 100%;
    padding: 20px 40px;
    background-color: transparent;
    z-index: 999;
    font-family: "HelveticaNeue";
    box-sizing: border-box;
}

.left_Header_Center {
    position: absolute;
    left: 40px;
    bottom: 20px;
    font-weight: bold;
}

    .left_Header_Center p {
        font-size: 14px;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        line-height: 1.4;
    }

.down_arrow {
    position: absolute;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
}

    .down_arrow svg {
        width: 30px;
        height: 30px;
        display: block;
    }

.right_Header_Center_Center {
    position: absolute;
    right: 40px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

    .right_Header_Center_Center img {
        max-height: 30px;
        margin-bottom: 5px;
        display: block;
    }

    .right_Header_Center_Center p {
        font-size: 12px;
        font-weight: bold;
        margin: 0;
        line-height: 1.4;
        white-space: nowrap;
    }

@media (max-width: 576px) {
    .row_Header {
        padding: 5px;
        padding-left: 10px;
        /*        padding-left:10px;*/
    }

    .row_Header_Center {
        padding: 10px 15px;
    }

    .left_Header_Center {
        left: 15px;
        bottom: 10px;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

        .left_Header_Center p {
            font-size: 8px;
            line-height: 1.2;
            -webkit-transform: translateZ(0);
            transform: translateZ(0);
        }

    .down_arrow {
        bottom: 10px;
        -webkit-transform: translate(-50%, 0);
        transform: translate(-50%, 0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }

        .down_arrow svg {
            width: 20px;
            height: 20px;
            -webkit-transform: translateZ(0);
            transform: translateZ(0);
        }

    .right_Header_Center_Center {
        right: 15px;
        bottom: 10px;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

        .right_Header_Center_Center img {
            max-height: 20px;
            margin-bottom: 3px;
            -webkit-transform: translateZ(0);
            transform: translateZ(0);
        }

        .right_Header_Center_Center p {
            font-size: 8px;
            line-height: 1.2;
            -webkit-transform: translateZ(0);
            transform: translateZ(0);
        }
}

/* Enhanced Safari mobile specific fixes */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 576px) {
        .row_Header_Center {
            bottom: env(safe-area-inset-bottom, 10px);
            padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
            -webkit-transform: translate3d(0,0,0);
            transform: translate3d(0,0,0);
        }

        .left_Header_Center {
            bottom: calc(10px + env(safe-area-inset-bottom, 0px));
            -webkit-transform: translate3d(0,0,0);
            transform: translate3d(0,0,0);
        }

        .down_arrow {
            bottom: calc(10px + env(safe-area-inset-bottom, 0px));
            -webkit-transform: translate3d(-50%,0,0);
            transform: translate3d(-50%,0,0);
            z-index: 1;
        }

        .right_Header_Center_Center {
            bottom: calc(10px + env(safe-area-inset-bottom, 0px));
            -webkit-transform: translate3d(0,0,0);
            transform: translate3d(0,0,0);
            z-index: 1;
        }

        /* Force hardware acceleration for smoother rendering */
        .left_Header_Center,
        .down_arrow,
        .right_Header_Center_Center {
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
            -webkit-perspective: 1000;
            perspective: 1000;
            -webkit-transform-style: preserve-3d;
            transform-style: preserve-3d;
        }

            /* Prevent text scaling */
            .left_Header_Center p,
            .right_Header_Center_Center p {
                -webkit-text-size-adjust: none;
                text-size-adjust: none;
            }
    }
    /* Additional iPad fixes */
    @media (min-width: 768px) and (max-width: 1024px) {
        .row_Header_Center {
            bottom: env(safe-area-inset-bottom, 20px);
        }

        .left_Header_Center,
        .down_arrow,
        .right_Header_Center_Center {
            bottom: calc(20px + env(safe-area-inset-bottom, 0px));
        }
    }
}

/* ///////////////////////////////////////////////////////////////////////////////// */
.row_Try_Me {
    text-align: center;
    font-size: 28px;
    /* font-weight: bold; */
    /* padding: 100px 0; */
    /* border: 1px solid red; */
    height: 100px;
}

.row_Space_Animation {
    display: flex;
    justify-content: center;
    align-items: center;
}

/*#myCanvas { 
    display: block;
    margin: 0 auto; 
    cursor: default;

}
*/

#myCanvas {
    width: 100% !important;
    height: auto; /* Let height adjust, or set a specific height if desired */
    display: block;
    margin: 0 auto;
    cursor: default;
}

/* A simple row container for scattered text */
.text-row {
    position: relative;
    width: 100%;
    height: 200px; /* adjust as needed */
    margin: 50px 0; /* spacing between rows */
    overflow: hidden;
}

    /* The 'anchor' helps center our scattered letters in each row */
    .text-row .anchor {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

/* Each letter is absolutely positioned around the anchor,
       starts off transparent, and animates to final scattered position. */
.letter {
    position: absolute;
    font-size: 2rem;
    font-family: sans-serif;
    color: #111;
    opacity: 0;
    transform: translate(var(--offsetX), var(--offsetY)) rotate(var(--rot));
    animation: floatIn 1.2s ease forwards;
}

/* Keyframes: float in from center (0,0) with 0deg rotation + opacity 0,
       to the scattered offsets & rotation + opacity 1. */
@keyframes floatIn {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }

    100% {
        transform: translate(var(--offsetX), var(--offsetY)) rotate(var(--rot));
        opacity: 1;
    }
}

/* ----------------- timeline -------------------------------------*/

.row_time_line {
    position: relative;
    width: 100%;
    height: 600px; /* Adjust as needed */
    overflow: hidden;
    margin-top: 50px; /* space above, optional */
    text-align: center;
}

/*#timelineCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-align: center;
}
*/

#timelineCanvas {
    width: 100% !important;
    height: auto; /* Let height adjust, or set a specific height if desired */
    display: block;
    margin: 0 auto;
}

/* ----------------- footer -------------------------------------*/

/* The footer container */
.row_Footer {
    width: 100%;
    min-height: 400px;
    height: auto;
    background-color: black;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 40px;
    position: relative;
    font-family: Arial, sans-serif;
}

/* Left side: vertical text */
.footer-left {
    flex: 1;
    height: 100%;
    width: 50%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-right: 150px;
}

    .footer-left img {
        width: 50%;
        max-height: 100%;
        object-fit: contain;
    }

/* Right side: contact form */
.footer-right {
    width: 50%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-right-header {
    width: 100%;
}

.contact-section {
    width: 100%;
}

.contact-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.contact-image {
    width: 60%;
}

.us-image {
    width: 15%;
}

.form-and-logo-row {
    width: 100%;
}

.contactFormContainer_input {
    width: 50%;
    -webkit-overflow-scrolling: touch;
}

#contactFormContainer {
    width: 100%;
    background-color: black;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    -webkit-overflow-scrolling: touch;
}

    #contactFormContainer input {
        width: 100%;
        padding: 8px 0;
        margin-bottom: 20px;
        border: none;
        border-bottom: 1px solid #fff;
        background-color: transparent;
        color: #fff;
        font-size: 1rem;
        -webkit-appearance: none;
        appearance: none;
        border-radius: 0;
    }

.button-row {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-top: 20px;
    gap: 40px;
}

#btnSubmit {
    height: 40px;
    width: 160px;
    background-color: transparent;
    color: #fff;
    border: 1px solid #fff;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-transform: capitalize;
    font-size: 1rem;
    font-family: "GrotleyRegular";
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0;
    flex-shrink: 0;
}

.box8-link {
    width: 150px;
    display: block;
    margin-left: auto;
    flex-shrink: 0;
}

/* Mobile adjustments */
@media (max-width: 576px) {
    .row_Footer {
        flex-direction: column;
        padding: 20px;
        min-height: calc(100vh - 90px);
        -webkit-overflow-scrolling: touch;
    }

    .footer-left {
        width: 100%;
        height: auto;
        padding-right: 0;
        margin-bottom: 30px;
    }

        .footer-left img {
            width: 100%;
            height: auto;
        }

    .footer-right {
        width: 100%;
        padding: 0;
        -webkit-transform: translate3d(0,0,0);
        transform: translate3d(0,0,0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }

    .footer-right-header {
        flex-direction: column;
        width: 100%;
    }

    .contact-row {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        margin-bottom: 20px;
        width: 100%;
        gap: 10px;
    }

    .contact-image {
        width: 55%;
        margin-bottom: 0;
    }

    .us-image {
        width: 15%;
        margin-bottom: 0;
        padding-left: 10px;
    }

    #contactFormContainer {
        width: 100%;
        padding: 10px 0;
        align-items: center;
        -webkit-transform: translate3d(0,0,0);
        transform: translate3d(0,0,0);
    }

        #contactFormContainer input {
            width: 90%;
            font-size: 16px !important;
        }

    .button-row {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .box8-link {
        width: 120px;
        margin-left: 0;
    }
}

/* Safari-specific fixes */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 576px) {
        .row_Footer {
            min-height: -webkit-fill-available;
            padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
        }

        .footer-right {
            width: 100%;
            -webkit-transform: translate3d(0,0,0);
            transform: translate3d(0,0,0);
            padding-bottom: env(safe-area-inset-bottom, 0px);
        }

        #contactFormContainer {
            width: 100%;
            -webkit-transform: translate3d(0,0,0);
            transform: translate3d(0,0,0);
        }

            #contactFormContainer input {
                -webkit-appearance: none;
                appearance: none;
                font-size: 16px !important;
                width: 90%;
            }
    }
}

/* Optional: if you want the text "LET'S GET IN TOUCH" truly vertical,
       you could do something more stylized, e.g., each letter on its own line.
       The example below just stacks words. Feel free to adapt. */

#pnlfloatingShapesCanvas {
    position: relative;
    width: 100%;
    overflow: hidden;
    z-index: -1;
    border: 1px solid red;
}

#floatingShapesCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Example media query for mobile adjustments */
@media (max-width: 576px) {
    #pnlfloatingShapesCanvas {
        height: 300px;
    }

    .row_time_line {
        height: 400px; /* Adjust timeline height on mobile */
    }
}

.geometric-shapes {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    height: 100vh;
    padding: 300px 20px;
    position: relative;
    flex-wrap: wrap;
}

.shape {
    position: relative;
    width: 220px;
    height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
}

    .shape img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

@media (max-width: 576px) {
    .geometric-shapes {
        gap: 10px;
        padding: 60px 15px;
        height: calc(100vh - 100px);
        -webkit-flex-direction: row;
        flex-direction: row;
        -webkit-flex-wrap: nowrap;
        flex-wrap: nowrap;
        width: 100%;
        -webkit-justify-content: center;
        justify-content: center;
        -webkit-align-items: center;
        align-items: center;
        margin-bottom: 60px;
    }

    .shape {
        width: 60px;
        height: 60px;
        -webkit-flex: 0 0 auto;
        flex: 0 0 auto;
    }

        .shape img {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

    .row_Try_Me {
        font-size: 20px;
        height: 60px;
        margin-top: 20px;
    }

    /* Adjust the content to fit above down arrow */
    .row_Header_Center {
        height: calc(100vh - 60px);
        overflow: hidden;
    }

    .down_arrow {
        bottom: 20px;
        -webkit-transform: translate(-50%, 0);
        transform: translate(-50%, 0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
}

@supports (-webkit-touch-callout: none) {
    @media (max-width: 576px) {
        .geometric-shapes {
            height: calc(100vh - 120px - env(safe-area-inset-bottom, 0px));
            margin-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
        }

        .row_Header_Center {
            height: calc(100vh - 60px - env(safe-area-inset-bottom, 0px));
        }

        .down_arrow {
            bottom: calc(20px + env(safe-area-inset-bottom, 0px));
        }
    }
}

/* 移動端選單樣式 */
.mobile_menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background-color: #f4f4f5;
    z-index: 2000;
    transition: right 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

    .mobile_menu.active {
        right: 0;
        opacity: 1;
    }

.mobile_menu_content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 60px 40px;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.mobile_menu.active .mobile_menu_content {
    opacity: 1;
    transform: translateX(0);
}

.mobile_menu_close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 32px;
    cursor: pointer;
}

.mobile_menu_links {
    display: flex;
    flex-direction: column;
    margin-top: 100px;
}

    .mobile_menu_links a {
        text-decoration: none;
        color: #000000;
        font-size: 28px;
        font-style: italic;
        margin-bottom: 30px;
        transition: color 0.3s ease;
        opacity: 0;
        transform: translateY(10px);
        transition: color 0.3s ease, opacity 0.5s ease, transform 0.5s ease;
    }

.mobile_menu.active .mobile_menu_links a {
    opacity: 1;
    transform: translateY(0);
}

    .mobile_menu.active .mobile_menu_links a:nth-child(1) {
        transition-delay: 0.1s;
    }

    .mobile_menu.active .mobile_menu_links a:nth-child(2) {
        transition-delay: 0.2s;
    }

    .mobile_menu.active .mobile_menu_links a:nth-child(3) {
        transition-delay: 0.3s;
    }

.mobile_menu_links a:nth-child(2) {
    color: transparent;
    -webkit-text-stroke: 1px #000000;
}

.mobile_menu_links a:hover {
    color: #666666;
}

/* Default (Desktop View) */
.sphere_text_title {
    white-space: nowrap; /* Prevent line breaks */
}

    .sphere_text_title .line1,
    .sphere_text_title .line2 {
        display: inline; /* Keep lines on the same line */
    }

/* Mobile View (Max Width 576px) */
@media (max-width: 576px) {
    .sphere_text_title {
        white-space: normal; /* Allow line breaks */
        text-align: center; /* Optional: Center-align text */
    }

        .sphere_text_title .line1,
        .sphere_text_title .line2 {
            display: block; /* Stack lines vertically */
        }

    .sphere_text_description {
        text-align: center; /* Optional: Center-align text */
    }

    .footer-right form {
        margin-left: 0; /* Align form properly */
    }

    .footer-right {
        position: relative;
        z-index: 100; /* Ensure it's above other elements */

        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }

    .footer-left img {
        position: relative; /* Change from absolute to relative */
        width: 100%; /* Adjust width to fit the container */
        height: auto; /* Maintain aspect ratio */
    }
}

/* Mobile adjustments */
@media (max-width: 576px) {
    .contactFormContainer_input {
        width: 100%;
        -webkit-transform: translate3d(0,0,0);
        transform: translate3d(0,0,0);
    }

    #contactFormContainer input {
        width: 90%;
        font-size: 16px !important;
        -webkit-appearance: none;
        appearance: none;
        border-radius: 0;
    }
}

/* Safari-specific fixes */
@supports (-webkit-touch-callout: none) {
    .contactFormContainer_input {
        -webkit-overflow-scrolling: touch;
    }

    #contactFormContainer input {
        font-size: 16px !important;
        -webkit-appearance: none;
        appearance: none;
        border-radius: 0;
    }

    @media (max-width: 576px) {
        .contactFormContainer_input {
            width: 100%;
            -webkit-transform: translate3d(0,0,0);
            transform: translate3d(0,0,0);
        }

        #contactFormContainer input {
            width: 90%;
            -webkit-appearance: none;
            appearance: none;
            border-radius: 0;
            padding: 8px 0;
        }
    }
}
