﻿:root {
    --primary-color: #0078D4;
    --primary-dark: #002A54;
    --accent-color: #2C3E50;
    --background-light: #FAFDFF;
    --hover-bg: #9EC3DD;
    --text-color: #2d4783;
    --link-color: #0066cc;
    --white-color: #ffffff;
}
body {
    font-family: 'Lato', 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: white;
    padding-top: 5rem;
}

.page-wrapper {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
}

.finance, .tw-relations {
    flex: 1;
}

.page-wrapper-co {
    min-height: 65vh;
    display: flex;
    flex-direction: column;
}

a {
    color: #0066cc;
    text-decoration: none;
}

    a:hover {
        color: #0066cc;
        font-weight: bold;
    }
/* CSS/ 導覽列 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    padding: 15px 0px;
    color: #0078D4;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.logo img {
    width: 300px;
    height: auto;
    padding-left: 100px;
}
.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
}
.nav-links {
    list-style: none;
    display: flex;
    gap: 10px;
    padding: 0;
    margin: 0;
    padding-right: 60px;
}
    .nav-links li {
        position: relative;
    }

    .nav-links a {
        text-decoration: none;
        color: var(--text-color);
        padding: 10px;
        display: block;
        font-size: 18px;
        font-weight: 550;
        transition: color 0.3s ease;
    }
        .nav-links a::after {
            content: '';
            position: absolute;
            left: 0;
            bottom: 0;
            width: 100%;
            height: 2px;
            background-color: #0078D4;
            transform: scaleX(0);
            transform-origin: bottom left;
            transition: transform 0.3s ease;
        }
        .nav-links a:hover {
            color: #0078D4;
        }
            .nav-links a:hover::after {
                transform: scaleX(1);
            }
/* Mega dropdown 3 欄專用 */
.mega-menu {
    position: fixed;
    top: 8%;
    left: 0;
    width: 100%;
    background-color: var(--background-light);
    backdrop-filter: blur(5px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    padding: 40px 0;
    z-index: 998;
}

.dropdown:hover > .mega-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0) translateY(0);
}
.mega-container {
    width: 100%;
    max-width: 800px;
    margin: 0 0 0 auto;
    margin-right: 200px;
    display: flex;
    justify-content: space-between;
    gap: 30px;
    padding: 0 20px;
}
.dropdown:hover > .mega-menu,
.mega-menu:hover {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.mega-column {
    flex: 1;
    min-width: 180px;
    display: flex;
    flex-direction: column;
}
.mega-column h4 {
        font-size: 18px;
        font-weight: bold;
        color: var(--primary-color);
        margin-bottom: 10px;
        border-left: 3px solid var(--primary-color);
        padding-left: 8px;
    }
    .mega-column a {
        text-decoration: none;
        color: var(--primary-color);
        padding: 6px 0;
        font-size: 17px;
        transition: color 0.2s ease;
    }
.te a {
    font-size: 17px;
    color: var(--primary-color);
    margin-top: 10px;
    border-left: 3px solid var(--primary-color);
    padding-left: 8px;
    font-weight: bold;
}
.mega-column a:hover {
    background-color: #FFFFFF;
    color: #0078D4;
}
.dropdown {
    position: relative;
}
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 200px;
    background-color: #EFF9FF;
    list-style: none;
    padding: 5px 0;
    margin: 0;
    border-radius: 4px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(10px);
    transition: max-height 0.4s ease, opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 1000;
}
.dropdown:hover .dropdown-menu {
    max-height: 500px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.dropdown-menu li:last-child {
    border-bottom: none;
}
.dropdown-menu li a {
    color: #0078D4;
    padding: 10px 15px;
    display: block;
    text-decoration: none;
    transition: background 0.2s ease;
    font-size: 16px;
}
    .dropdown-menu li a:hover {
        background-color: #FFFFFF;
    }
.nav-links .dropdown-submenu {
    position: relative;
}
    .nav-links .dropdown-submenu > .dropdown-menu {
        top: 0;
        left: 100%;
        margin-left: 1px;
    }
.twbanner {
    width: 100%;
    height: 92vh;
    position: relative;
    overflow: hidden;
}
.twbanner-container {
    position: relative;
    width: 100%;
    height: 100%;
}
.slide {
    transition: transform 6s ease, opacity 1.2s ease-in-out;
    transform: scale(1);
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    will-change: transform, opacity;
}
    .slide.active {
        opacity: 1;
        z-index: 1;
        transform: scale(1.08);
    }
@media (max-width: 1400px) {

    .dropdown-menu {
        display: none;
        position: static;
        background-color: #f0f8ff;
        width: 100%;
    }
    .dropdown.open .dropdown-menu {
        display: block;
    }
    .mega-container {
        display: flex;
        flex-direction: column;
        gap: 20px;
        padding: 0 20px;
    }
    .mega-column {
        width: 100%;
        border-bottom: 1px solid #ddd;
        padding-bottom: 10px;
    }
        .mega-column h4 {
            font-size: 18px;
            margin-bottom: 8px;
            color: var(--text-color);
            border-left: 3px solid var(--primary-color);
            padding-left: 8px;
        }
        .mega-column a {
            display: block;
            padding: 8px 0;
            font-size: 16px;
            color: #2c2c2c;
            text-decoration: none;
        }
            .mega-column a:hover {
                background-color: #FFFFFF;
            }
    .logo {
        flex: 1;
        text-align: center;
    }
        .logo img {
            padding-left: 0px;
        }
    .menu-toggle {
        display: block;
        padding-right: 20px;
    }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        background-color: white;
        width: 100%;
        text-align: center;
        box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.2);
    }
        .nav-links.active {
            display: flex;
        }
        .nav-links li {
            width: 100%;
            border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        }
        .nav-links a {
            padding: 15px;
            display: block;
        }
    .dropdown-menu {
        display: none;
        position: static;
        width: 100%;
        text-align: center;
        background-color: #f0f8ff;
        box-shadow: none;
    }
        .dropdown-menu li {
            width: 100%;
        }
    .mega-menu {
        display: none;
        position: static;
    }
    .dropdown.open .mega-menu {
        display: block;
    }
}
@media (min-width: 1401px) {
    .dropdown:hover .dropdown-menu {
        display: block;
    }

    .mega-menu {
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
        .mega-menu.active {
            opacity: 1;
            pointer-events: auto;
            transform: translateY(0);
        }
}
@media (max-width: 850px) {
    .twbanner {
        height: 50vh;
    }
}.tw-container {
    width: 100%;
    background-color: #EAF2FA;
    padding: 40px 0;
}
@media (max-width: 1200px) {
    .tw-container img {
        display: block;
        margin-left: auto;
        margin-right: auto;
        width: 60%;
        margin-bottom: 50px;
    }
}
.tw-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}
.tw-content {
    width: 50%;
    padding: 40px;
    text-align: left;
    color: black;
    text-align: center;
}

    .tw-content h2 {
        font-size: 40px;
        font-weight: bold;
        margin-bottom: 10px;
    }

.tw-subtitle {
    font-size: 18px;
    font-weight: 500;
    opacity: 0.8;
    margin-bottom: 12px;
}
.tw-content p {
    font-size: 18px;
    line-height: 2;
    margin-bottom: 12px;
}
.tw-content .tw-button {
    margin-top: 10px;
}
.tw-image {
    width: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}
    .tw-image img {
        max-width: 650px;
        height: auto;
        object-fit: cover;
        border-radius: 5px;
    }
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
    .fade-in.active {
        opacity: 1;
        transform: translateY(0);
    }
@media (max-width: 1024px) {
    .tw-row {
        flex-direction: column;
        text-align: center;
    }

    .tw-content, .tw-image {
        width: 90%;
        padding: 20px;
    }
}
.tw-footer {
    background-color: var(--primary-dark);
    color: white;
    padding: 10px 0;
    font-size: 16px;
}
.tw-footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.tw-footer-logo img {
    width: 250px;
    display: block;
    margin: 0 auto;
}
.tw-footer-info {
    text-align: center;
}
.tw-footer-info, .tw-footer-logo p {
    margin: 5px 0;
    opacity: 0.9;
    font-size: 14px;
}
@media (max-width: 768px) {
    .tw-footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .tw-footer-info {
        text-align: center;
        margin-top: 20px;
    }
}
@media (max-width: 768px) {
    .tw-footer-links {
        flex-direction: column;
        gap: 10px;
    }

    .tw-footer-info p {
        font-size: 12px;
    }
}
.tw-inbanner {
    width: 100%;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: #EAF2FA;
}
    .tw-inbanner img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }
@media (max-width: 1024px) {
    .tw-inbanner {
        height: 300px;
    }
}
@media (max-width: 768px) {
    .tw-inbanner {
        height: 250px;
    }
}
.tw-business-banner img {
    width: 100%;
    height: auto;
    display: block;
}
.tw-intitle {
    font-size: 36px;
    font-weight: 600;
    color: #2c3e91;
    text-align: center;
    display: inline-block;
    padding: 15px 0px;
}
.twline-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 90%;
    margin: 0 auto;
    min-height: 70vh;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
    .twline-content.active {
        opacity: 1;
        transform: translateY(0);
    }
    .twline-content.reverse {
        flex-direction: row-reverse;
    }
.twline-image, .twline-box {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.twline-image img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: cover;
    border-radius: 8px;
}
.twline-box {
    flex-direction: column;
    text-align: left; 
    display: flex;
    align-items: flex-start; 
    justify-content: flex-start; 
    color: var(--accent-color);
    margin: 0 auto;
    padding: 3rem;
}
    .twline-box img {
        max-width: 25rem;
        margin-bottom: 3.125rem;
    }
    .twline-box h2 {
        font-size: 40px;
        font-weight: 600;
        color: var(--primary-dark);
        line-height: 1.8;
        margin: 30px 0;
        text-align: justify;
        width: 100%;
    }
    .twline-box p {
        font-size: 18px;
        font-weight: 600;
        color: var(--accent-color);
        line-height: 1.8;
        margin: 15px 0;
        text-align: justify;
        width: 100%;
        line-height: 1.6em;
        word-break: break-word;
    }
    .twline-box .tw-button {
        margin-top: 50px;
        border: 2px solid var(--accent-color);
        background-color: #FBFDFF;
        color: var(--accent-color);
        padding: 20px 60px;
        font-size: 18px;
        border-radius: 5px;
        cursor: pointer;
        transition: all 0.3s ease;
        align-self: flex-start;
        font-weight: bold;
    }
        .twline-box .tw-button:hover {
            border: 2px solid #ffffff;
            background-color: var(--hover-bg);
            color: #ffffff;
        }
@media (max-width: 850px) {
    .twline-box img {
        max-width: 20rem;
    }
}
@media (max-width: 1300px) {
    .twline-content,
    .twline-content.reverse {
        flex-direction: column;
    }
    .twline-image {
        padding: 20px;
    }
    .twline-box {
        padding: 16px;
    }
        .twline-box p {
            font-size: 14px;
            font-weight: 600;
            white-space: normal;
        }
        .twline-box .tw-button {
            padding: 14px 28px;
            font-size: 16px;
        }
        .twline-box h2 {
            font-size: 25px;
            font-weight: 600;
            color: var(--primary-dark);
            line-height: 1.8;
            margin: 30px 0;
            text-align: justify;
            width: 100%;
        }
}
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
    .fade-in.active {
        opacity: 1;
        transform: translateY(0);
    }
