* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body { 
    font-family: Arial, sans-serif;
}

.navbar {
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 80px;
    background: linear-gradient(to right, #00306A, #005FD0);
    box-sizing: border-box;
}

.nav-left {
    display: flex;
    align-items: center;
}
.nav-left p {
    color: #fff;
    margin: 0px 10px;
}
.Rimg{
    margin: 0px 20px 0px 10px;
}
.logo {
    width: 100%;
    height: auto; /* Adjust as needed */
    margin-right: 5px;
}

.nav-right-images {
    display: flex;
    align-items: center;
    gap: 15px;
}
.nav-image {
    height: 40px; /* Adjust as needed to fit within navbar */
}
.nav-home {
    color: white;
    font-size: 24px;
    text-decoration: none;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 60px;
}

.nav-button {
    height: 41px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    text-decoration: none;
    font-size: 18px;
    line-height: 100%;
}
.nav-button:hover {
    text-decoration: none;
    border-bottom: 2px solid white; /* Thick underline on hover */
}
.nav-button-1 {
    width: 113px;
    height: 41px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    text-decoration: none;
    border: 1px solid white;
    border-radius: 10px;
    font-size: 18px;
    line-height: 100%;
}
.lang-button {
    width: 53px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    text-decoration: none;
    font-size: 18px;
    line-height: 100%;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-menu {
    display: none;
    position: absolute;
    background: #f3FAFF;
    backdrop-filter: blur(10px);
    margin-top: 2px;
    border-radius: 5px;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
    opacity: 0.75;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-item,.nav-item {
    color: #00306A;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    opacity: 0.75;
}

.dropdown-item:hover {
    background-color: #BAE6FF;
    opacity: 0.75;
}

.nav-item:hover {
    background-color: #BAE6FF;
    opacity: 0.75;
}

.dropdown-sub {
    position: relative;
}

.submenu {
    display: none;
    position: absolute;
    background: #f3FAFF;
    backdrop-filter: blur(10px);
    border-radius: 5px;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    left: 100%;
    top: 0;
    opacity: 0.75;
}

.dropdown-sub:hover .submenu {
    display: block;
}

.submenu-item {
    color: #00306A;
    padding: 12px 12px;
    text-decoration: none;
    display: block;
}

.submenu-item:hover {
    background-color: #BAE6FF;
}

/* Reset opacity for all dropdown-items when a submenu is hovered */
.dropdown-menu:has(.submenu:hover) .dropdown-item {
    opacity: 0.3;
}

/* Retain opacity for the dropdown-item of the hovered submenu's parent */
.dropdown-menu:has(.submenu:hover) .dropdown-sub:has(.submenu:hover) .dropdown-item {
    opacity: 0.75;
    background-color: #BAE6FF;
}
/* Reset opacity for all nav-item when a submenu is hovered */
.dropdown-menu:has(.submenu:hover) .nav-item {
    opacity: 0.3;
}

/* Retain opacity for the nav-item of the hovered submenu's parent */
.dropdown-menu:has(.submenu:hover) .dropdown-sub:has(.submenu:hover) .nav-item {
    opacity: 0.75;
    background-color: #BAE6FF;
}
.footer {
    height: auto;
    padding: 0 300px;
    width: 100%;
    box-sizing: border-box;
    background-image: url(/static/images/Footer.svg);
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    z-index: 99;
}

.footer-left {
    display: flex;
    align-self: center;
    justify-self: center;
}

.footer-left p {
    color: #fff;
    margin: 0px 20px 0px 10px;
    font-size: 24px;
    line-height: 120%;
}
#footeraa{
    font-size: 36px;
}
.footer-image-small {
    width: 120%;
    height: auto;
}

.footer-logo-group {
    display: flex;
    align-items: center;
}

.footer-right {
    display: flex;
    flex-direction: column;
    gap: 30px; /* 三個圖文區塊之間的間距 */
}

.footer-icon-text {
    display: flex;
    align-items: center;
    gap: 10px; /* 圖片和文字之間的間距 */
}

.footer-icon {
    width: 40px; /* 圖標大小，可根據需求調整 */
    height: 40px;
}

.footer-icon-text p {
    color: #fff;
    margin: 0;
    font-size: 16px;
    line-height: 150%;
}

/* 更新 footer-top 樣式以適應新結構 */
.footer-top {
    display: flex;
    justify-content: center;
    height: auto; /* 改為 auto 以適應內容高度 */
    align-items: center; /* 讓內容從頂部對齊 */
    padding: 20px 0;
}

.footer-middle {
    width: 100%;
    padding: 0 300px;
    padding-bottom: 20px;
    background-image: url(/static/images/Footer2.svg);
}

.footer-middle img {
    max-width: 100%;
    height: auto;
}

.footer-text p {
    color: #fff;
    margin: 4px 0;
    font-size: 16px;
    line-height: 150%;
}

.footer-text-right {
    text-align: right;
}

.footer-text-right p {
    color: #fff;
    margin: 4px 0;
    font-size: 16px;
    line-height: 150%;
    text-align: left;
}

.footer-bottom {
    height: 72px;
    text-align: center;
    padding-top: 40px;
    background-image: url(/static/images/Footer2.svg);
    background-repeat: no-repeat;
    background-size: cover;
}

.footer-bottom-text {
    color: #FFF;
    margin: 0;
    font-size: 16px;
    line-height: 150%;
    background-color: red;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 8px; /* Adds spacing between the image and text */
}

.lang-button {
    text-decoration: none;
    color: white;
}

/* Hamburger Menu Styles */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 1010;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}
@media screen and (max-width: 1919px) {
    .nav-right{
        gap: 20px;
    }
    .navbar{
        padding: 0 30px;
    }
    .footer {
        padding: 0 40px;
    }
    .footer-middle{
        padding: 0 40px;
    }
}

/* Responsive Design - Mid-Large Screens and Tablet (max-width: 1024px) */
@media screen and (max-width: 1024px) {
    .navbar {
        flex-direction: row;
        height: auto;
        padding: 20px;
    }
    .nav-left {
        flex-direction: row;
        align-items: center;
    }
    .nav-right {
        display: none; /* Initially hidden */
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        width: 100%;
        background: linear-gradient(to right, #00306A, #005FD0);
        padding: 20px;
        position: absolute;
        top: 15px;
        left: 0;
        z-index: 1000;
    }
    .nav-right.active {
        display: flex; /* Show when hamburger is clicked */
    }
    .nav-button, .nav-button-1, .lang-button, .dropdown {
        width: 100%;
        text-align: left;
    }
    .dropdown:hover .dropdown-menu {
        display: none; /* Disable hover in hamburger mode */
    }
    .dropdown.active .dropdown-menu {
        display: block; /* Show when dropdown is clicked */
    }
    .dropdown-menu {
        position: static;
        width: 100%;
    }
    .dropdown-sub:hover .submenu {
        display: none; /* Disable hover in hamburger mode */
    }
    .dropdown-sub.active .submenu {
        display: block; /* Show when submenu is clicked */
    }
    .submenu {
        position: static;
        left: 0;
        margin-top: 10px;
    }
    .lang-switcher{
        width: 100%;
        display: block;
        text-align: center;
    }
    .hamburger {
        display: flex;
    }
    .footer {
        padding: 0 40px;
        height: auto;
        background-image: url(/static/images/Footer.svg);
        background-repeat: no-repeat;
        background-size: cover;
    }
    .footer-top {
        flex-direction: column;
        align-items: center;
        justify-self: center;
        gap: 20px;
    }
    .footer-left, .footer-right, .footer-text, .footer-text-right {
        text-align: center;
        width: 100%;
    }
    .footer-logo-group {
        justify-content: center;
    }
    .footer-right {
        align-items: center;
    }
    .footer-left {
        display: flex;
        flex-direction: column;
    }
    .footer-left p {
        margin: 10px 0;
        font-size: 20px;
    }
    .footer-text p, .footer-text-right p {
        text-align: center;
        margin: 8px 0;
        font-size: 14px;
    }
    .footer-bottom {
        padding-top: 10px;
        background-image: url(/static/images/Footer2.svg);
        background-repeat: no-repeat;
        background-size: cover;
    }
    .footer-middle {
        padding: 10px 0;
    }
    .footer-middle img {
        display: block;
        justify-self: center;
        width: 90%;
    }
}

/* Responsive Design - Mobile (below 768px) */
@media screen and (max-width: 768px) {
    .logo {
        width: 100%;
        height: auto; /* Adjust as needed */
        margin-right: 5px;
    }
    .logo2{
        width: 30%;
        height: auto; /* Adjust as needed */
        display: none;
    }
    .navbar {
        padding: 15px;
    }
    .nav-home {
        font-size: 18px;
    }
    .nav-left {
        display: list-item;
        flex-direction: row;
        align-items: center;
    }
    .Rimg{
        display: none;
    }
    .footer {
        padding: 0 20px;
    }
    .footer-image-small{
        width: 100%;
    }
    .footer-logo-group {
        flex-direction: column; /* 手機版上下排列 */
        text-align: center;
    }
    .footer-icon-text {
        flex-direction: column; /* 手機版圖標和文字上下排列 */
        text-align: center;
    }
    .footer-middle {
        padding: 10px 0;
    }
    .footer-middle img {
        width: 90%;
    }
}