* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans', Arial, sans-serif; /* Default to Noto Sans */
}

:lang(zh-SC), :lang(zh-TC) {
    font-family: 'Noto Sans SC', Arial, sans-serif; /* Chinese text */
}

:lang(zh-SC) *:not([lang="en"]), :lang(zh-TC) *:not([lang="en"]) {
    font-family: 'Noto Sans', Arial, sans-serif; /* Use Noto Sans for English characters */
}

:lang(en) {
    font-family: 'Noto Sans', Arial, sans-serif; /* English text */
}

body {
    background: linear-gradient(to bottom, #f0fdfa, #C2EADF);
    color: #1f2937;
}

header {
    background: linear-gradient(to right, #00795E, #009B78);
    color: white;
    padding: 1.5rem;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* hyperlinks */
a {
    color: #00795E;
    text-decoration: none;
}
.a:hover {
    filter: brightness(1.3) contrast(1.15);
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 3;
}


.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Desktop default: hide hamburger menu and mobile slide-in box.
   The hamburger is shown only inside the mobile media query. */
.hamburger-menu,
.menu__box {
    display: none;
}

h1 {
    font-size: 2rem;
    animation: fadeInDown 1s ease-out;
}

.headerlogo {
    height: 2.3rem;
    margin-right: 0.5rem;
    margin-top: 0.5rem;
    animation: fadeInDown 1s ease-out;
}

nav {
    margin-left: auto;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links, .language-buttons {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.nav-links a, .language-buttons a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    line-height: 1.5;
    vertical-align: middle;
    transition: color 0.3s, transform 0.3s;
}

.nav-links a:hover, .language-buttons a:hover {
    color: #C2EADF;
    transform: scale(1.1);
}


.language-buttons a.active {
    color: #C2EADF;
    font-weight: bold;
    background-color: rgba(194, 234, 223, 0.1); 
    text-decoration: underline; 
    border-radius: 4px; 
    padding: 2px 6px; 
}


#home {
  position: relative;
  padding: 6rem 0;
  text-align: center;
  color: white;
  overflow: hidden;
}


.background-blur {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../assets/images/herobackground.jpg') no-repeat center/cover;
  filter: blur(5px) brightness(1.2);
  transform: scale(1.05);
  z-index: 1;
}

.light-canvas {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 30% 40%, rgba(0,255,255,0.15), transparent 60%),
    radial-gradient(circle at 70% 60%, rgba(128,0,255,0.15), transparent 60%),
    radial-gradient(circle at 50% 50%, rgba(0,128,255,0.1), transparent 70%);
  filter: blur(80px);
  mix-blend-mode: screen;
  animation: organicFlow 15s ease-in-out infinite;
  z-index: 1;
  pointer-events: none;
}


/* Hero section background animation */


@keyframes organicFlow {
  0% {
    transform: translate(0%, 0%) scale(1) rotate(0deg);
  }
  25% {
    transform: translate(5%, -5%) scale(1.05) rotate(45deg);
  }
  50% {
    transform: translate(-5%, 5%) scale(1.1) rotate(90deg);
  }
  75% {
    transform: translate(5%, -5%) scale(1.05) rotate(45deg);
  }
  100% {
    transform: translate(0%, 0%) scale(1) rotate(0deg);
  }
}


.hero-content {
    background: rgba(255, 255, 255, 0.2); /* Fallback for frosted glass */
    backdrop-filter: blur(10px); /* Frosted glass effect */
    -webkit-backdrop-filter: blur(10px); /* Safari support */
    padding: 2rem;
    border-radius: 15px;
    max-width: 800px;
    margin: 0 auto;
}

#home h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out;
    text-shadow: 4px 4px 6px rgba(0,0,0,0.5);
}

#home p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1.2s ease-out;
    text-shadow: 2px 2px 3px rgba(0,0,0,0.5);
}

.btn {
    background: linear-gradient(to right, #00795E, #009B78);
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.2rem;
    transition: transform 0.3s, box-shadow 0.3s;
    display: inline-block;
    animation: fadeInUp 1s ease-out;
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

#about {
    padding: 6rem 0;
}

#about h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeIn 1s ease-out;
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    align-items: center;
}

.about-content img {
    max-width: 100%;
    width: 400px;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    animation: slideInLeft 1s ease-out;
}

.about-content p {
    font-size: 1.2rem;
    line-height: 1.8;
    flex: 1;
    animation: slideInRight 1s ease-out;
}

#services, #partners, #products, #product-detail {
    padding: 6rem 0;
    background: #f0fdfa;
}

.gallery {
    position: relative;
    width: 500px;
    height: 500px;
    margin: 0 auto 2rem;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    animation: slideInLeft 1s ease-out;
}

.gallery .image-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: none;
}

.gallery .image-container.active {
    display: block;
}

.gallery .image-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: blur(20px) brightness(0.9);
    object-fit: cover;
    z-index: 1;
}

.gallery img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 15px;
    z-index: 2;
}

.gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(to right, #a2a7a3, #c4c4c4);
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.5;
    transition: transform 0.3s, box-shadow 0.3s, opacity 0.3s;
    z-index: 3;
}

.gallery-btn:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    opacity: 0.9;
}

.gallery-btn.prev {
    left: 15px;
}

.gallery-btn.next {
    right: 15px;
}

.tabs {
    margin: 2rem 0;
    width: 100%;
}

.tab-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tab-buttons button {
    padding: 0.75rem 1.5rem;
    border: none;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1rem;
    color: #00795E;
    transition: background 0.3s, transform 0.3s;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.tab-buttons button.active {
    background: linear-gradient(to right, #00795E, #009B78);
    color: white;
    font-weight: bold;
}

.tab-buttons button:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.tab-content {
    display: none;
    padding: 2rem;
}

.tab-content.active {
    display: block;
}

.product-review-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    text-align: left;
    transition: transform 0.3s, box-shadow 0.3s;
    animation: fadeInUp 1s ease-out;
    margin-bottom: 2rem;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.product-review-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.product-review-card h4 {
    font-size: 1.2rem;
    color: #00795E;
    margin-bottom: 0.5rem;
}

.product-review-card p {
    font-size: 1.1rem;
    line-height: 1.6;
}

.product-review-card a {
    color: #00795E;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    margin-top: 0.8rem;
    display: inline-block; 
}

.product-review-card a:hover {
    color: #009B78;
}


#team {
    padding-bottom: 1.2rem;
    padding-top: 6rem;
    background: #f0fdfa;
}

#advisors {
    padding-top: 3rem;
    padding-bottom: 6rem;
    background: #f0fdfa;
}

#services h2, #team h2, #partners h2, #products h2, #product-detail h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeIn 1s ease-out;
}

#advisors h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeIn 1s ease-out;
}

#products h3 {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 3rem;
    margin-left: 6rem;
    margin-right: 6rem;
    animation: fadeIn 1s ease-out;
}

#partners h3 {
    font-size: 1.2rem;
    color: #00795E;
    margin-bottom: 1rem;
    animation: fadeIn 1s ease-out;
}

#products h4 {
    font-size: 1.5rem;
    color: #00795E;
    margin-bottom: 1rem;
}


.services-grid, .team-grid, .partners-grid, .products-grid, .advisors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card, .team-card, .partner-card, .product-card, .advisor-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    animation: fadeInUp 1s ease-out;
    animation-delay: calc(0.2s * var(--i));
    animation-fill-mode: both; /* Apply initial and final animation states */
    opacity: 0; /* Hide cards initially */
    will-change: opacity, transform; /* Optimize for animation */
}

.service-card:hover, .team-card:hover, .partner-card:hover, .product-card:hover, .advisor-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.service-card h3, .team-card h3, .advisor-card h3, .partner-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #00795E;
}

.product-card img {
    max-width: 80%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.product-card p {
    margin-bottom: 1.5rem; /* Space for button */
}

.product-card .learn-more {
    margin-top: 1rem; /* Ensure button is below text */
}

.team-card h4, .advisor-card h4, .founder-card h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.founder-card {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row;
    gap: 2rem;
    padding: 3rem;
    background: white;
    align-items: center;
}
.founder-photo {
    width: 300px;
    max-width: 100%;
    height: auto; /* Responsive height */
    object-fit: cover; /* Ensure image fits without distortion */
    border-radius: 15px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.founder-text {
    flex: 1;
    text-align: left; /* Left-align text */
}

.service-card p, .team-card p, .partner-card p, .product-card p, .advisor-card p, .founder-card p {
    font-size: 1.1rem;
    line-height: 1.6;
}

.partner-logo {
    height: 2.5rem;
    object-fit: contain; /* Preserve logo aspect ratio */
    margin-bottom: 1rem;
}

.partner-logo:hover {
    transform: scale(1.1);
    transition: transform 0.3s;
}

.product-detail-content {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    align-items: flex-start;
}

.product-detail-content img {
    max-width: 100%;
    width: 600px;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    animation: slideInLeft 1s ease-out;
}

.product-detail-text {
    flex: 1;
    animation: slideInRight 1s ease-out;
}

.product-detail-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #00795E;
}

.product-detail-text p {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.product-detail-text ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 1.5rem;
}

.product-detail-text li {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

#licenses {
    padding: 6rem 0;
}

#licenses h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeIn 1s ease-out;
}

#licenses p {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out;
}

ul {
    list-style-type: disc;
    padding-left: 20px;
}

li {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out;
    animation-delay: calc(0.2s * var(--i));
}

footer {
    background: linear-gradient(to right, #00795E, #009B78);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

footer h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    animation: fadeIn 1s ease-out;
}

footer p {
    margin-bottom: 1rem;
}

footer a {
    color: #C2EADF;
    text-decoration: none;
    font-size: 1.3rem;
    transition: transform 0.3s;
    margin-bottom: 1rem;
}

/* Icon styles */
footer a svg {
    display: inline-block;
    vertical-align: middle;
    transition: all 0.3s ease;
    width: 2rem;
    height: 2rem;
}

footer a:hover svg {
    transform: scale(1.1);
    filter: brightness(1.1);
}


/* Special styling for the paragraph containing SVG icons */
footer .footer-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.footer_copyright {
    font-size: 1rem;
    color: white;
    margin-bottom: 1rem;
}

.footer_copyright:hover {
    color: #C2EADF;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@media (max-width: 768px) {
    /* Header and navigation stack and shrink on mobile */
    header {
        padding: 1rem;
    }
    .header-content {
        flex-direction: row;
        flex-wrap: wrap; /* allow nav to wrap to next line */
        gap: 0.5rem;
        justify-content: center; /* center brand row */
        align-items: center;
    }

    nav {
        order: 2; /* move nav to the second row */
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
        margin-top: 0.5rem; /* spacing between brand row and nav */
    }

    /* Center logo and brand on a single row and keep space between them */
    .headerlogo {
        order: 1;
        display: inline-block;
        vertical-align: middle;
        margin-right: 0.75rem; /* preserved space between logo and brand */
        height: 2.3rem; /* ensure consistent sizing on mobile */
    }

    header h1 {
        order: 1;
        display: inline-block;
        vertical-align: middle;
        margin: 0; /* remove default margin so centering is precise */
        line-height: 1; /* tighten text alignment with logo */
    }

    /* Allow nav items to wrap and remain tappable */
    .nav-links, .language-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        text-align: center;
    }
    .nav-links a, .language-buttons a {
        padding: 0.5rem 0.75rem;
        font-size: 1rem;
    }

    /* Prevent the logo image from being stretched by flex container */
    .headerlogo {
        height: 2.3rem; /* keep the intended height */
        width: auto;    /* preserve aspect ratio */
        max-width: 85%; /* don't exceed available space */
        display: block; /* avoids inline whitespace issues */
    }

    /* Stack content areas */
    .about-content, .product-detail-content {
        flex-direction: column;
        text-align: center;
    }

    /* Make grid sections single column for narrow screens */
    .services-grid, .team-grid, .partners-grid, .products-grid, .advisors-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Remove/disable heavy animations on mobile and ensure visibility */
    .service-card, .team-card, .partner-card, .product-card, .advisor-card {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        box-shadow: 0 6px 12px rgba(0,0,0,0.08);
    }

    .hero-content {
        padding: 1rem;
    }

    /* Scale down hero text on phones */
    #home h2 { font-size: 2rem; }
    #home p { font-size: 1rem; }

    /* Buttons: bigger tap targets */
    .btn {
        padding: 0.9rem 1.4rem;
        font-size: 1rem;
        border-radius: 40px;
    }

    /* Founder card stacks and image scales */
    .founder-card {
        padding: 1.5rem;
        flex-direction: column;
        align-items: center;
    }
    .founder-photo {
        max-width: 300px;
        width: 50%;
        height: auto;
    }

    .partner-logo {
        height: 2.5rem;
    }

    .product-detail-content { flex-direction: column; text-align: center; }

    /* Gallery and images become fluid */
    .gallery {
        max-width: 100%;
        width: 100%;
        height: auto;
        margin-bottom: 1rem;
    }
    .gallery img, .gallery .image-background {
        width: 100%;
        height: auto;
        object-fit: cover;
        border-radius: 12px;
    }

    .product-review-card { animation: none !important; }
    .product-card img, .product-detail-content img { max-width: 80%; height: auto; }
    .product-card p, .service-card p, .team-card p, .partner-card p, .advisor-card p { font-size: 1rem; }

    /* Disable heavy background effects on mobile for performance */
    .light-canvas { display: none; }
    .background-blur {
        display: block;
        background-size: cover; 
        filter: blur(3px) brightness(1.08);
        transform: scale(1.02);
        opacity: 0.9;
        will-change: transform, filter, opacity; /* hint for smoother rendering */
    }

    /* Hamburger menu styles (mobile only) */
    .header-content > nav {
        display: none;
    }

    .hamburger-menu {
        display: flex;
        align-items: right;
        order: 1; /* keep brand and hamburger together in header row */
        position: relative;
        z-index: 30;
    }

    /* visually hide the checkbox but keep it accessible */
    #menu__toggle {
        position: absolute;
        left: -9999px;
    }

    .menu__btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        cursor: pointer;
        margin-left: 0.5rem;
    }

    .menu__btn > span,
    .menu__btn > span::before,
    .menu__btn > span::after {
        display: block;
        position: absolute;
        width: 20px;
        height: 2.5px;
        background-color: white; /* show white lines over the header gradient */
        transition-duration: .25s;
    }
    .menu__btn > span::before { content: ''; top: -7px; }
    .menu__btn > span::after { content: ''; top: 7px; }

    /* transform the icon into an X when checked */
    #menu__toggle:checked ~ .menu__btn > span { transform: rotate(45deg); }
    #menu__toggle:checked ~ .menu__btn > span::before { top: 0; transform: rotate(0); }
    #menu__toggle:checked ~ .menu__btn > span::after { top: 0; transform: rotate(90deg); }

    /* slide-in menu */
    .menu__box {
        display: block;
        position: fixed;
        visibility: visible;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100%;
        padding: 80px 0 0 0;
        margin: 0;
        list-style: none;
        background: white;
        box-shadow: 1px 0 12px rgba(0,0,0,0.15);
        transition: left .25s ease-in-out;
        z-index: 25;
    }

    /* open the slide-in menu when checked */
    #menu__toggle:checked ~ .menu__box {
        left: 0;
    }

    .menu__item {
        display: block;
        padding: 14px 24px;
        color: #00795E;
        font-family: 'Noto Sans', Arial, sans-serif;
        font-size: 1rem;
        font-weight: 600;
        text-decoration: none;
    }
    .menu__item:hover { background: rgba(0,0,0,0.03); }

    /* ensure language buttons style matches inside menu */
    .menu__box .menu__item[lang] { font-weight: 700; }

    /* close menu if viewport > 768px (safety) */
    @media (min-width: 769px) {
        .menu__box { display: none !important; }
        .hamburger-menu { display: none !important; }
        .header-content > nav { display: flex !important; }
    }

    /* Improve touch behaviour */
    a, button { touch-action: manipulation; -webkit-tap-highlight-color: rgba(0,0,0,0.05); }
}

/* Coarse pointers (touch devices) - increase minimum hit sizes and reduce motion */
@media (pointer: coarse) {
    .btn, .nav-links a, .language-buttons a { min-height: 44px; }
    .service-card, .team-card, .partner-card, .product-card, .advisor-card { animation: none !important; }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}
 