@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700;900&display=swap');

:root {
    --primary-color: #0e335f;
    --secondary-color: #286fb7;
    --accent-color: #147b7c;
    --bg-light: #f8f9fa;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --white: #ffffff;
    --transition-speed: 0.3s;
}

body {
    font-family: "Noto Sans TC", "Helvetica Neue", sans-serif;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
}

/* Global Typography & Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
}

.section-title {
    color: var(--primary-color);
    position: relative;
    padding-bottom: 12px;
    margin-bottom: 30px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--secondary-color);
    border-radius: 2px;
}

.section-title.center::after {
    left: 50%;
    transform: translateX(-50%);
}

.text-accent {
    color: var(--accent-color) !important;
}

.text-secondary-color {
    color: var(--secondary-color) !important;
}

.text-primary-color {
    color: var(--primary-color) !important;
}

.bg-primary-color {
    background-color: var(--primary-color) !important;
}

.bg-secondary-color {
    background-color: var(--secondary-color) !important;
}

.bg-accent-color {
    background-color: var(--accent-color) !important;
}

/* Page Transition Fade-In */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar Styling */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    padding: 6px 0;
}

.navbar-brand img {
    transition: transform var(--transition-speed);
}

.navbar-brand:hover img {
    transform: scale(1.03);
}

.navbar-nav .nav-link {
    color: var(--primary-color);
    font-weight: 500;
    padding: 8px 16px !important;
    position: relative;
    transition: color var(--transition-speed);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width var(--transition-speed), left var(--transition-speed);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--secondary-color);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
    left: 10%;
}

.navbar-toggler {
    border: none;
    padding: 0;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%230e335f' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Hero Section with Canvas Background */
.hero-section {
    position: relative;
    padding: 180px 0 120px 0;
    overflow: hidden;
    background-color: var(--primary-color);
}

.hero-canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#hero-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Gradient Overlay to soften Canvas edges */
.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(14, 51, 95, 0.4) 0%, rgba(14, 51, 95, 0.1) 70%, rgba(14, 51, 95, 0.8) 100%);
    pointer-events: none;
    z-index: 2;
}

.hero-content-wrapper {
    position: relative;
    z-index: 3;
    /* Render content in front of canvas */
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 24px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }
}

.hero-subtitle {
    font-size: 1.20rem;
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 40px;
    line-height: 1.85;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-cta {
    background-color: var(--secondary-color);
    color: var(--white);
    font-weight: 600;
    padding: 12px 35px;
    border-radius: 50px;
    border: 2px solid transparent;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 4px 15px rgba(40, 111, 183, 0.3);
}

.btn-cta:hover {
    background-color: var(--accent-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(20, 123, 124, 0.4);
}

/* Inner Page Header (For pages other than index.html) */
.inner-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 140px 0 60px 0;
    position: relative;
    overflow: hidden;
}

.inner-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 80% 20%, rgba(20, 123, 124, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50px;
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s, background-color 0.3s;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--accent-color);
    color: var(--white);
    transform: scale(1.05);
}

/* Sections Padding */
.page-section {
    padding: 80px 0;
}

/* About Us Card layouts */
.about-intro-text {
    line-height: 1.85;
    font-size: 1.05rem;
    color: var(--text-dark);
}

.purpose-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    transition: all var(--transition-speed) ease;
    height: 100%;
    background-color: var(--white);
}

.purpose-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(14, 51, 95, 0.08);
}

.purpose-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 50px;
    background-color: rgba(40, 111, 183, 0.1);
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.purpose-card:nth-child(even) .purpose-icon-wrapper {
    background-color: rgba(20, 123, 124, 0.1);
    color: var(--accent-color);
}

.purpose-title {
    color: var(--primary-color);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.purpose-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Highlight Ribbon */
.highlight-ribbon {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 50px 0;
    text-align: center;
    position: relative;
    z-index: 1;
}

.highlight-ribbon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 10% 50%, rgba(20, 123, 124, 0.15) 0%, transparent 40%);
    pointer-events: none;
}

.highlight-text {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin: 0;
}

@media (max-width: 768px) {
    .highlight-text {
        font-size: 1.35rem;
        line-height: 1.5;
    }
}

/* Technical Skills Card Styling */
.skill-card {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 12px;
    padding: 30px;
    height: 100%;
    transition: all var(--transition-speed) ease;
}

.skill-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 25px rgba(20, 123, 124, 0.1) !important;
}

.skill-icon {
    font-size: 2.2rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    transition: transform var(--transition-speed) ease;
}

.skill-card:hover .skill-icon {
    transform: scale(1.1);
}

.skill-title {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.skill-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* Products & Solutions Styling */
.product-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    background: var(--white);
    height: 100%;
    border-top: 4px solid var(--secondary-color);
}

.solution-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    background: var(--white);
    height: 100%;
    border-top: 4px solid var(--accent-color);
    transition: transform var(--transition-speed) ease;
}

.solution-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(20, 123, 124, 0.08);
}

.list-group-item-custom {
    border: none;
    padding: 12px 15px;
    margin-bottom: 8px;
    background-color: var(--bg-light);
    border-radius: 8px !important;
    font-weight: 500;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    transition: all var(--transition-speed) ease;
}

.list-group-item-custom:hover {
    background-color: rgba(40, 111, 183, 0.08);
    transform: translateX(4px);
}

.list-group-item-custom i {
    color: var(--secondary-color);
    margin-right: 12px;
    font-size: 1.1rem;
}

/* Case Studies Styling */
.case-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    height: 100%;
    background-color: var(--white);
    transition: all var(--transition-speed) ease;
}

.case-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(14, 51, 95, 0.08);
}

.case-img-placeholder {
    height: 180px;
    background: linear-gradient(135deg, rgba(14, 51, 95, 0.05) 0%, rgba(40, 111, 183, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--secondary-color);
}

.badge-custom {
    padding: 6px 12px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.75rem;
}

.badge-sys {
    background-color: rgba(14, 51, 95, 0.1);
    color: var(--primary-color);
}

.badge-ai {
    background-color: rgba(20, 123, 124, 0.1);
    color: var(--accent-color);
}

.badge-trans {
    background-color: rgba(40, 111, 183, 0.1);
    color: var(--secondary-color);
}

/* Contact & Careers Styling */
.form-control:focus,
.form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.25rem rgba(40, 111, 183, 0.15);
}

.contact-info-box {
    background-color: var(--bg-light);
    border-radius: 12px;
    padding: 30px;
    height: 100%;
}

.contact-info-item {
    display: flex;
    margin-bottom: 20px;
}

.contact-info-item i {
    font-size: 1.3rem;
    color: var(--secondary-color);
    margin-right: 15px;
    margin-top: 3px;
}

.traffic-guide-box {
    margin-top: 25px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 20px;
}

/* Footer Section */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 60px 0 30px 0;
    font-size: 0.95rem;
}

footer a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color var(--transition-speed);
}

footer a:hover {
    color: var(--white);
}

.footer-link-security {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 0.9rem;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 15px;
    margin-left: 15px;
}

.footer-link-security:hover {
    color: var(--white) !important;
}

/* Security Page Styling overrides */
.security-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    margin-bottom: 30px;
    background-color: var(--white);
    border-left: 5px solid var(--secondary-color);
}

.security-card:nth-child(2) {
    border-left-color: var(--accent-color);
}

.security-card:nth-child(3) {
    border-left-color: var(--primary-color);
}

.security-card-title {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.security-list {
    padding-left: 20px;
}

.security-list li {
    margin-bottom: 12px;
    line-height: 1.7;
    color: var(--text-dark);
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.9) !important;
}

.text-accent01 {
    color: #1e9ea0 !important;

}