:root {
    --header-bar: 60px;
    --font-stack-text: "Inter", "Helvetica Neue", Arial, sans-serif;
    --font-stack-heading: "Red Hat Text", "Helvetica Neue", Arial, sans-serif;

    /* Desktop */
    --custom-title-1-default: 2.888rem;
    --custom-title-2-default: 2.444rem;
    --custom-title-3-default: 2.222rem;
    --custom-title-4-default: 1.222rem;

    /* Tablet */
    --custom-title-1-1365-max: 2.824rem;
    --custom-title-2-1365-max: 2.444rem;
    --custom-title-3-1365-max: 2.118rem;
    --custom-title-4-1365-max: 1.176rem;

    /* Mobile */
    --custom-title-1-767-max: 2.25rem;
    --custom-title-2-767-max: 2rem;
    --custom-title-3-767-max: 1.5rem;
    --custom-title-4-767-max: 1.125rem;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: var(--font-stack-text);
    font-size: 18px;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    font-weight: 400;
    line-height: 1.5em;
    color: black;
    background: #ffffff;

}

@media screen and (max-width: 1365px) {

    html,
    body {
        font-size: 17px;
    }
}

@media screen and (max-width: 767px) {

    html,
    body {
        font-size: 16px;
    }
}

@media screen and (max-width: 767px) {
    :root {
        --header-bar: 48px;
    }


}


p,
input,
textarea,
button,
form,
label,
option,
select {
    outline: 0;
    font-size: 1rem;
}

.elementor-editor-active p {
    /* body font in elementor needs this */
    font-size: 1rem;
}

p {
    margin: 0 0 1rem 0;
}

b,
bold,
strong {
    font-weight: 700;

}

.light {
    font-weight: 300 !important;
}

a:focus {
    outline: none;
    box-shadow: none;
}

blockquote {
    background-color: black;
    color: white;
    padding: 10px;
}

/* Some sites might need this for the overflow problem */
body>div[data-elementor-post-type="page"] {
    overflow-x: hidden;
}

/* Make hero 100% on mobile */
@media screen and (max-width: 767px) {
    .hero-section {
        height: calc(100svh - var(--header-bar));
        min-height: 0;
    }
}

/* Headings style */
.custom-title-1 h1,
.custom-title-1 h2,
.custom-title-1 h3,
.custom-title-1 h4,
.custom-title-1 h5,
.custom-title-1 h6,
.custom-title-1 span,
.custom-title-1 p {
    font-size: var(--custom-title-1-default);
    font-weight: 500;
    line-height: 1.2em !important;
    font-family: var(--font-stack-heading);
}

.custom-title-2 h1,
.custom-title-2 h2,
.custom-title-2 h3,
.custom-title-2 h4,
.custom-title-2 h5,
.custom-title-2 h6,
.custom-title-2 span,
.custom-title-2 p {
    font-size: var(--custom-title-2-default);
    font-weight: 500;
    line-height: 1.2em !important;
    font-family: var(--font-stack-heading);
}

.custom-title-3 h1,
.custom-title-3 h2,
.custom-title-3 h3,
.custom-title-3 h4,
.custom-title-3 h5,
.custom-title-3 h6,
.custom-title-3 span,
.custom-title-3 p {
    font-size: var(--custom-title-3-default);
    font-weight: 500;
    line-height: 1.5em !important;
    font-family: var(--font-stack-heading);
}

.custom-title-4 h1,
.custom-title-4 h2,
.custom-title-4 h3,
.custom-title-4 h4,
.custom-title-4 h5,
.custom-title-4 h6,
.custom-title-4 span,
.custom-title-4 p {
    font-size: var(--custom-title-4-default);
    font-weight: 400;
    line-height: 1.5em !important;
    font-family: var(--font-stack-heading);
}

@media screen and (max-width: 1365px) {

    .custom-title-1 h1,
    .custom-title-1 h2,
    .custom-title-1 h3,
    .custom-title-1 h4,
    .custom-title-1 h5,
    .custom-title-1 h6,
    .custom-title-1 span,
    .custom-title-1 p {
        font-size: var(--custom-title-1-1365-max);
    }

    .custom-title-2 h1,
    .custom-title-2 h2,
    .custom-title-2 h3,
    .custom-title-2 h4,
    .custom-title-2 h5,
    .custom-title-2 h6,
    .custom-title-2 span,
    .custom-title-2 p {
        font-size: var(--custom-title-2-1365-max);
    }

    .custom-title-3 h1,
    .custom-title-3 h2,
    .custom-title-3 h3,
    .custom-title-3 h4,
    .custom-title-3 h5,
    .custom-title-3 h6,
    .custom-title-3 span,
    .custom-title-3 p {
        font-size: var(--custom-title-3-1365-max);
    }

    .custom-title-4 h1,
    .custom-title-4 h2,
    .custom-title-4 h3,
    .custom-title-4 h4,
    .custom-title-4 h5,
    .custom-title-4 h6,
    .custom-title-4 span,
    .custom-title-4 p {
        font-size: var(--custom-title-4-1365-max);
    }
}

@media screen and (max-width: 767px) {

    .custom-title-1 h1,
    .custom-title-1 h2,
    .custom-title-1 h3,
    .custom-title-1 h4,
    .custom-title-1 h5,
    .custom-title-1 h6,
    .custom-title-1 span,
    .custom-title-1 p {
        font-size: var(--custom-title-1-767-max);
    }

    .custom-title-2 h1,
    .custom-title-2 h2,
    .custom-title-2 h3,
    .custom-title-2 h4,
    .custom-title-2 h5,
    .custom-title-2 h6,
    .custom-title-2 span,
    .custom-title-2 p {
        font-size: var(--custom-title-2-767-max);
    }

    .custom-title-3 h1,
    .custom-title-3 h2,
    .custom-title-3 h3,
    .custom-title-3 h4,
    .custom-title-3 h5,
    .custom-title-3 h6,
    .custom-title-3 span,
    .custom-title-3 p {
        font-size: var(--custom-title-3-767-max);
		line-height: 1.2em !important;
    }
	
	.custom-title-3 {
		margin-top: 10px;
	}

    .custom-title-4 h1,
    .custom-title-4 h2,
    .custom-title-4 h3,
    .custom-title-4 h4,
    .custom-title-4 h5,
    .custom-title-4 h6,
    .custom-title-4 span,
    .custom-title-4 p {
        font-size: var(--custom-title-4-767-max);
    }
}

/*GSAP triggered Animations- add animate & fadeinleft classes*/
/*simple fade in based on class*/
.animate.fadein {
    transform: translateX(0%);
    transition: all 1.5s ease-in-out;
    opacity: 0;
}

.animate.fadeinleft {
    transform: translateX(-20%);
    transition: all 1.5s ease-in-out;
    opacity: 0;
}

.animate.fadeinright {
    transform: translateX(20%);
    transition: all 1.5s ease-in-out;
    opacity: 0;
}

.animate.fadein.active,
.animate.fadeinleft.active,
.animate.fadeinright.active {
    transform: translateX(0%);
    opacity: 1;
}

.elementor-element-edit-mode.animate.fadein,
.elementor-element-edit-mode.animate.fadeinright,
.elementor-element-edit-mode.animate.fadeinleft {
    opacity: 1;
    transform: translateX(0px);
}

/*simple zoomin based on animate class , can't use transform because of smoothscroller data speed*/
.animate.zoomin .elementor-widget-container img {
    transform: scale(0);
    opacity: 0;
    transition: all 1.5s ease-in-out;
}

.animate.zoomin.active .elementor-widget-container img {
    transform: scale(1);
    opacity: 1;
}

.elementor-element-edit-mode .animate.zoomin .elementor-widget-container img {
    transform: scale(1);
    opacity: 1;
}

/*kenburn animation on single image*/
.elementor-widget-image.animate.kenburn.active .elementor-widget-container {
    overflow: hidden;
}

.elementor-widget-image.animate.kenburn.active picture,
.elementor-widget-image.animate.kenburn.active img {
    animation: kenburns 20s ease-in-out both;
}

@keyframes kenburns {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.2);
    }
}

.floating-buttons {
    position: fixed;
    right: 1rem;
    bottom: 90px;
    gap: 12px;
    display: flex;
    flex-direction: column;
    width: fit-content;
    opacity: 0;
    visibility: hidden;
    transition: all .25s ease-in;
    z-index: 100;
}



.floating-buttons.active {
    opacity: 1;
    visibility: visible;
}

.floating-buttons #go-up,
.floating-buttons #ai-chat {
    width: 55px;
    height: 55px;
    background-size: 24px;
    background-position: 50% 50%;
    border-radius: 50%;
    background-repeat: no-repeat;
    cursor: pointer;
    border: 1px solid black;
}

.floating-buttons #go-up {
    background-color: white;
    background-image: url(../svg/arrow-menu-child-red-vector.svg);
}

.floating-buttons #ai-chat {
    background-color: var(--e-global-color-accent);
    background-image: url(../svg/ai-chat.svg);
    border-color: var(--e-global-color-accent);
}

@media screen and (max-width: 1024px) {
    .floating-buttons {
        bottom: 88px;
    }

    .floating-buttons #go-up,
    .floating-buttons #ai-chat {
        width: 50px;
        height: 50px;
    }
}

div#chatbase-message-bubbles {
    right: 75px !important;
    bottom: 50px !important;
}

/*Header & Menu*/

.sh-divider .elementor-divider::before {
    content: "";
    width: 12px;
    height: 12px;
    background: white;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
}

div[data-elementor-type="header"].sticky .sh-header {
    background-color: white;
}

div[data-elementor-type="header"].sticky {
    transition: transform 0.3s ease-in-out;
}

body.slider-pinned div[data-elementor-type="header"],
div[data-elementor-type="header"].hide {
    transform: translateY(-125%);
}

.sh-header {
    height: var(--header-bar);
}

.elementor-location-header {
    position: fixed;
    width: 100%;
    z-index: 9999;
}

#menu-improved__overlay {
    z-index: 10;
}

#menu-improved__trigger {
    z-index: 11;
}

/*mobile menu*/
@media screen and (max-width: 1024px) {
    #menu-improved__overlay {
        background: none;
    }

    #menu-improved__overlay #menu-improved__content {
        top: 0;
        max-width: 100%;
        width: 100%;
        padding: 0px 25px;
    }

    /* need to increase the width by 50px to make sub menu full width */
    #menu-improved__content .sub-menu {
        width: calc(100% + 50px) !important;
        margin-left: -25px !important;
        padding-top: 0px !important;
        height: 100vh !important;
    }

    .sh-header .sh-black-logo {
        position: relative;
    }

    #menu-improved__overlay {
        height: 100vh;
    }

    #menu-mobile-menu {
        padding-top: 60px !important;
    }

    #menu-improved__content.menu-improved__multistep .close-submenu {
        top: 0 !important;
        display: flex;
        align-items: center;
        gap: 10px;
        height: 50px;
        left: 0 !important;
        padding-left: 15px;
        width: 50%;
        position: sticky !important;
        z-index: 100;
    }

    #menu-improved__content .menu-improved-nav li .sub-menu li a {
        gap: 20px;
        height: 100px;
        min-height: 84px;
        padding: 0px 20px;
    }

    #menu-improved__content .menu-improved-nav li .sub-menu li:not(.contact-menu) a .menu-item-icon {
        width: 60px;
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        border: 2px black solid;
        border-radius: 8px;
        margin-right: 0;
    }

    .menu-item-icon svg {
        width: 36px;
    }


    #menu-improved__content .menu-improved-nav li .sub-menu li .submenu-heading {
        border-bottom: 1px #CCCCCC solid;
        display: block;
        width: calc(100% - 40px);
        padding-bottom: 10px;
        margin: 20px;
        color: black;
    }

    #menu-improved__content .menu-improved-nav li .sub-menu li a .menu-item-label {
        font-size: .8rem;
        font-weight: 400;
        display: flex;
        flex-direction: column;
        line-height: 1.5;
        color: black;
    }

    #menu-improved__content .menu-improved-nav li .sub-menu li a .menu-item-label>span.arrow {
        font-size: 1rem;
        font-weight: 500;
        display: flex;
        align-items: center;
    }

    #menu-improved__content .menu-improved-nav li .sub-menu li a .menu-item-label>span.arrow::after {
        content: "";
        background-image: url(../svg/arrow-menu-child-red-vector.svg);
        background-size: contain;
        background-repeat: no-repeat;
        width: 12px;
        height: 6px;
        display: block;
        transform: rotate(90deg);
        margin-left: 5px;
    }

    #menu-improved__content #menu-mobile-menu>li.contact-menu {
        border-bottom: 0 !important;
    }

    #menu-improved__content .contact-menu>a {
        gap: 12px;
    }

    #menu-improved__content .close-submenu::before,
    #menu-improved__content::before {
        content: "";
        border-top: 50px solid var(--e-global-color-126235a);
        border-left: 0px solid transparent;
        border-right: 25px solid transparent;
        height: 0;
        width: 200px;
        position: absolute;
        left: 0;
        top: 0;
        z-index: -1;
    }

    #menu-improved__content .sub-menu .contact-menu>a {
        height: 54px !important;
        min-height: 54px !important;
        line-height: 54px !important;
        gap: 10px;
        justify-content: center;
    }

    #menu-improved__content .sub-menu .contact-menu>a .menu-item-label {
        font-size: 1rem !important;
        font-weight: 500 !important;
    }

    #menu-improved__content .contact-menu>a .menu-item-icon {
        width: 20px;
        height: 20px;
        border: 1px black solid;
        order: 2;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
    }

    #menu-improved__content .menu-improved-nav>li:not(.menu-item-html) {
        border-bottom: 1px var(--e-global-color-secondary) solid;
        color: black;
    }

    #menu-improved__content .menu-improved-nav li a {
        font-size: 1rem;
    }

    input#menu-toggle:not(:checked)+.hamburger.hamburger--beauty .line {
        stroke: white;
    }

    /* When sub menu is not open */
    #menu-improved__content {
        overflow-y: scroll;
        overflow-x: hidden;
        max-height: 100dvh;
    }

    /* When sub menu open */
    #menu-improved__content:has(#menu-mobile-menu > li.is-active) ul.sub-menu {
        overflow-y: scroll;
        max-height: 100dvh !important;
    }
}

/* Override menu improved */
.hamburger:hover {
    opacity: 1;
}

@media screen and (min-width: 768px) and (max-width: 1024px) {
    #menu-improved__content .sub-menu {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: 60px repeat(auto-fill, 100px);
    }

    #menu-improved__content .sub-menu .menu-item:has(.submenu-heading) {
        grid-column: 1 / 3;
    }
}

/*logo*/
.sh-black-logo img {
    transform: translateY(30%);
    transition: transform 0.3s ease-in-out;
}

@media screen and (min-width: 768px) and (max-width: 1024px) {
    .sh-black-logo img {
        transform: translateY(20%);
    }
}

.sticky .sh-black-logo img {
    transform: translateY(0%);
}

/*add arrow to menu itmes with child elements*/
.pc-menu li {
    height: var(--header-bar);
    display: flex;
    align-items: center;
}

.pc-menu li.menu-item {
    margin-right: 20px;
}

.pc-menu li.menu-item a {
    color: inherit;
}

.pc-menu .has-child label {
    position: relative;
    padding-right: 20px;
    cursor: pointer;
}

.pc-menu .has-child label:after {
    content: "";
    width: 12px;
    height: 12px;
    background-image: url(../svg/arrow-menu-child-vector.svg);
    background-size: contain;
    position: absolute;
    top: calc(50% - 4px);
    right: 0px;
    background-repeat: no-repeat;
    background-position: center;
}

/* Change arrow when the checkbox is checked */
.mega-menu-toggle:checked+label:after {
    background-image: url(../svg/arrow-menu-child-red-vector.svg);
}

.heading-black {
    color: var(--e-global-color-text);
}

/* Header & Menu */
.sh-header {
    box-shadow: 0 2px 8px 2px rgba(0, 0, 0, .2);
}

.sh-black-logo img {
    filter: drop-shadow(0px 2px 2px rgba(0, 0, 0, 0.2));
}

.pc-menu .menu-item label,
.pc-menu .menu-item a,
.menu-item,
.lang-switch span {
    font-family: var(--font-stack-heading);
    font-size: 0.888rem;
    font-weight: 500;
    /*   line-height: 1.25em; */
    color: var(--e-global-color-text);
}

.pc-menu .menu-item label,
.pc-menu li.menu-item a,
.menu-item.sep-line a,
.lang-switch,
.nav-search-btn search,
.nav-search-btn form .elementor-search-form__toggle {
    display: flex;
    align-items: center;
    height: 100%;
}

.menu-item.sep-line .elementor-widget-container {
    display: flex;
}

.menu-item.sep-line a,
.nav-search-btn .elementor-search-form__toggle {
    padding: 0px 20px;
}

.menu-item.sep-line a:after,
a.lang-switch:after,
.nav-search-btn .elementor-search-form__toggle:after {
    content: "";
    position: absolute;
    right: 0;
    display: block;
    width: 1px;
    height: 24px;
    background: var(--e-global-color-secondary);
}

.nav-search-btn search .e-font-icon-svg-container {
    background-color: transparent !important;
}

.nav-search-btn form {
    display: flex;
    height: 100%;
}

.nav-search-btn search svg {
    width: 16px !important;
    height: 16px !important;
}

.mb-menu .elementor-widget-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mb-menu #menu-improved__trigger {
    padding: 0px 0px 0px 20px;
}

.mb-menu #menu-improved__trigger svg {
    width: 32px;
    height: 32px;
}

@media screen and (min-width: 1025px) {
    .nav-search-btn .elementor-search-form__toggle:after {
        display: none;
    }
}

@media screen and (max-width: 1024px) {
    .mb-menu #menu-improved__trigger {
        padding: 0px 40px 0px 16px;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media screen and (max-width: 767px) {
    .nav-search-btn .elementor-search-form__toggle {
        padding: 0px 16px;
    }

    .mb-menu #menu-improved__trigger {
        padding: 0px 20px 0px 16px;
    }
}

/*=======語系============*/
a.lang-switch {
    color: #000000;
    transition: all .3s;
}

a.lang-switch svg {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    fill: #000000;
}

a.lang-switch {
    display: flex;
    padding: 0 20px;
}

@media screen and (max-width: 767px) {
    a.lang-switch {
        display: flex;
        padding: 0 16px;
    }
}

.lang-switch span {
    display: flex;
    flex-direction: row;
    align-items: center;
    color: #000;
    height: 25px;
}

a.lang-switch:hover span,
a.lang-switch:hover svg {
    color: #D7000F;
    fill: #D7000F;
}

.popup-style {
    position: fixed;
    width: 100%;
    height: 120vh;
    background: rgba(0, 0, 0, .8);
    left: 0;
    top: 0;
    z-index: 999;
}

.close-popup {
    color: #3f444b;
    cursor: pointer;
}

.popup-text {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100vh;
    align-items: center;
    justify-content: center;
}

.flag-text {
    padding: 20px 30px 30px 30px;
    gap: 20px;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.flag-text a {
    display: flex;
    flex-direction: row;
    align-items: center;
    color: #000;
    font-size: 0.9rem;
    border: solid;
    padding: 5px 10px;
    border-radius: 50px;
    border-width: 1.5px;
}

.flag-text a:hover {
    color: #D7000F !Important;
}

.flag-text img {
    height: 1rem !important;
    width: 30px;
    margin-right: 10px;
}

.flag-bg {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: auto;
    max-width: 100%;
	min-width: 340px;
    max-height: 100%;
    padding: 20px;
    border-radius: 10px 10px 10px 10px;
    box-shadow: 2px 8px 23px 3px rgba(0, 0, 0, 0.2);
    background-color: var(--e-global-color-126235a);
}

.flag-text .custom-title-4 {
  font-family: var(--font-stack-heading);
  font-weight: 500;
}

/* Adjust the menu on small laptops */
@media screen and (min-width: 1025px) and (max-width: 1260px) {

    .menu-improved__desktop,
    .menu-improved__horizontal {
        gap: 4px;
    }

    .lang-switch span.en {
        display: none;
    }

    a.lang-switch svg {
        margin-right: 0;
    }

    .sh-header {
        padding-left: 10px;
        padding-right: 0;
    }
}



/*parallax images*/

.parallax-img-wrapper img {
    transform: scale(1.2);
}

@media screen and (min-width: 1025px) and (max-width: 1366px) {
    .parallax-img-wrapper img {
        transform: scale(1.5);
    }
}

@media screen and (max-width: 1024px) {

    .parallax-img-wrapper>.e-con-inner,
    .parallax-img-wrapper .elementor-widget-image,
    .parallax-img-wrapper .parallax-img-overlay,
    .parallax-img-wrapper .elementor-widget-container {
        height: 100%;
    }
}

/*Footer css Nathan*/

@media only screen and (max-width: 767px) {
    /* Make the main heading clickable with pointer only if it has children */
    .fmm-has-child {
        cursor: pointer;          
    }
	.footer-menu-list {
		width: 100%;
	}

    .fmm-has-child .elementor-heading-title::after {
		content: '+';
		font-size: 1.5rem;
		transition: transform 0.3s ease;
		position: absolute;
		right: 0;
	}

	.fmm-has-child.active .elementor-heading-title::after {
		content: '-';
	}

    /* Initially hide the submenu */
    .footer-menu-sub-wrap {
        max-height: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column; /* Stack items vertically */
        flex-wrap: nowrap; /* Prevent wrapping of submenu items */
        transition: max-height 0.3s ease-out;
    }


    /* Ensure each widget container in the submenu takes the full width */
    .footer-menu-sub-wrap .elementor-widget-container {
        display: block; /* Each link takes up its own line */
		padding: 10px 0px!important;
    }
}



/*adding hover to menu pc*/

.pc-menu .menu-item a:hover,
.pc-menu .has-child label:hover,
form.elementor-search-form:hover svg,
.sh-header.red-header .lang-switch:hover path,
.sh-header.red-header .lang-switch:hover span,
.c-h-b a:hover{
	color: #d8d8d8 !important;
	fill:#d8d8d8 !important;
}

.sh-black-logo{
	transition: all 0.3s ease-out;
}

.sh-black-logo:hover {
    transform: scale(0.9);
}

/* standardize the copyrights */
.sh-copyright .small-txt,
.sh-copyright .small-title  {
	font-weight: 400;
	color: var(--e-global-color-45d5549);
	font-size: .75rem;
    font-family: var(--font-stack-text);
}
.globalsense-text {
	color: var(--e-global-color-45d5549);
    margin: 10px 0;
}
.globalsense-text a {
	color: var(--e-global-color-primary);
}

/* fix for headings */
@media screen and (max-width: 480px) {
	.text-reveal .light {
		font-weight: 500 !important;
	}

	.small-title span {
		font-weight: 400 !important;
	}
}