/* ==========================================================================
   Base Variables & Theming (Nordic / Modern Light)
   ========================================================================== */
:root {
    /* Color Palette */
    --bg-color: #f4f7fb;
    /* Soft bluish white */
    --bg-surface: rgba(255, 255, 255, 0.9);
    /* Translucent bright white */
    --bg-overlay: rgba(255, 255, 255, 0.85);

    --text-main: #0f172a;
    /* Very dark slate */
    --text-muted: #475569;
    /* Slate 600 */
    --border-color: rgba(226, 232, 240, 0.8);

    /* Vibrant Brand Colors */
    --brand-primary: #1e40af;
    /* Blue 800 */
    --brand-accent: #3b82f6;
    /* Bright Blue */
    --brand-accent-hover: #2563eb;
    --brand-vibrant: #8b5cf6;
    /* Purple */

    --gradient-primary: linear-gradient(135deg, #0284c7, #4f46e5, #9333ea);
    --gradient-text: linear-gradient(to right, #2563eb, #7c3aed, #db2777);
    --gradient-glow: linear-gradient(135deg, rgba(37, 99, 235, 0.4), rgba(147, 51, 234, 0.4));

    /* UI Elements (Solid/Opaque Glass for legibility) */
    --glass-bg: rgba(255, 255, 255, 0.98);
    --glass-border: rgba(255, 255, 255, 1);
    --glass-shadow: 0 8px 32px 0 rgba(79, 70, 229, 0.1);
    --card-shadow: 0 10px 40px -10px rgba(37, 99, 235, 0.15);

    /* Typography */
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Layout */
    --max-width: 1280px;
    --nav-height: 80px;

    /* Transitions */
    --transition-fast: 0.2s ease-out;
    --transition-normal: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
    /* Force white background to override browser dark mode settings */
    background-color: #ffffff !important;
}

body.light-theme {
    /* Force white background to override browser dark mode settings */
    background-color: #ffffff !important;
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
.logo-text {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-main);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography Utilities */
/* Gradient Text Base - Solid High-Contrast Colors */
.gradient-text {
    /* Critical fix: unset background-clip to prevent transparency on white backgrounds */
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: var(--brand-primary) !important;
    color: var(--brand-primary) !important;
    display: inline-block;
    font-weight: 700; /* Extra weight for readability */
}

/* Ensure sections have enough top margin for sticky header navigation */
section[id] {
    scroll-margin-top: 100px;
}

/* Global Floating Back Button */
#global-back-btn {
    position: fixed;
    bottom: 2rem;
    left: 1.5rem;
    z-index: 999;
    background: white;
    color: var(--brand-primary);
    border: 1.5px solid var(--border-color);
    border-radius: 9999px;
    padding: 0.6rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    backdrop-filter: blur(8px);
}

#global-back-btn:hover {
    background: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
    transform: translateX(-3px);
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.25);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: center;
    border: 1px solid transparent;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    min-width: 120px;
}

.btn-primary {
    background: var(--gradient-primary);
    background-size: 200% auto;
    color: white;
    box-shadow: 0 6px 20px 0 rgba(79, 70, 229, 0.3);
    border: none;
    transition: all 0.5s ease;
}

.btn-primary:hover {
    background-position: right center;
    /* Animate gradient */
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--brand-accent);
    color: var(--brand-accent);
    font-weight: 600;
}

.btn-outline:hover {
    background: var(--brand-accent);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}

.glass-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 60px -15px rgba(79, 70, 229, 0.2);
    border-color: rgba(255, 255, 255, 1);
}

.glass-card--padded {
    padding: 2.5rem;
}

@media (max-width: 768px) {
    .glass-card--padded {
        padding: 1.5rem;
    }
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    transition: all var(--transition-normal);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.lang-icon {
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    margin-right: -2px; /* Pull it slightly closer to the first link */
}

.lang-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
    cursor: pointer;
}

.lang-link:hover {
    color: var(--brand-primary);
}

.lang-link.active {
    color: var(--brand-primary);
    font-weight: 700;
    pointer-events: none;
}

/* Light color for hero section background */
.navbar:not(.scrolled) .lang-switcher {
    color: rgba(255, 255, 255, 0.7);
}

.navbar:not(.scrolled) .lang-link.active {
    color: #ffffff;
}

/* ── Standard Solid Background for non-hero pages ── */
body:not(.homepage) .navbar {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
}

/* ── Over dark hero: white text (ONLY when not scrolled) ── */
.navbar--hero:not(.scrolled) .logo-text {
    color: #ffffff !important;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.navbar--hero:not(.scrolled) .nav-links a {
    color: rgba(255, 255, 255, 0.80);
}

.navbar--hero:not(.scrolled) .nav-links a:hover,
.navbar--hero:not(.scrolled) .nav-links a.active {
    color: #ffffff;
}

.navbar--hero:not(.scrolled) .nav-links a::after {
    background: #ffffff;
}

.navbar--hero:not(.scrolled) .mobile-menu-btn span {
    background: #ffffff !important;
}

/* Dark opaque background when scrolled but still inside dark hero */
.navbar--hero.scrolled {
    background: rgba(4, 14, 45, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--brand-primary);
}

.logo-text .highlight {
    color: var(--brand-accent);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-main);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--brand-accent);
    transition: width var(--transition-fast);
    border-radius: 2px;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

    .mobile-menu-btn {
        display: block;
        background: transparent;
        border: none;
        cursor: pointer;
        width: 30px;
        height: 20px;
        position: relative;
        z-index: 1001;
        margin-right: 0; /* Removed fixed margin to prevent overflow */
    }

.mobile-menu-btn span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn span:nth-child(1) {
    top: 0;
}

.mobile-menu-btn span:nth-child(2) {
    top: 9px;
}

.mobile-menu-btn span:nth-child(3) {
    top: 18px;
}

.mobile-menu-btn.open span:nth-child(1) {
    top: 9px;
    transform: rotate(45deg);
}

.mobile-menu-btn.open span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.open span:nth-child(3) {
    top: 9px;
    transform: rotate(-45deg);
}

.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    z-index: 999;
    padding-top: var(--nav-height);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.mobile-nav.open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-links {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}

.mobile-links a {
    font-size: 1.5rem;
    font-weight: 600;
    font-family: var(--font-heading);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-height);
    overflow: hidden;
    background: #000;
}

/* Use ::before for the background so the zoom animation stays clipped inside the section */
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../assets/hero_banner.svg') no-repeat;
    background-size: cover;
    background-position: left bottom;
    animation: heroZoom 20s infinite alternate ease-in-out;
    z-index: 0;
}

@keyframes heroZoom {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.1);
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Light source in bottom-left, Dark towards top-right for text readability */
    background: linear-gradient(35deg, rgba(0, 0, 30, 0) 0%, rgba(0, 0, 20, 0.4) 45%, rgba(0, 0, 10, 0.8) 100%),
        linear-gradient(to right, rgba(0, 0, 0, 0.4) 0%, transparent 50%);
    z-index: 1;
    animation: overlayPulse 8s infinite alternate ease-in-out;
}

@keyframes overlayPulse {
    from {
        opacity: 0.85;
    }

    to {
        opacity: 1;
    }
}

.hero-particles {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(2px);
    will-change: transform, opacity;
}

.p1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 20%;
    animation: floatGlow 15s infinite alternate ease-in-out;
}

.p2 {
    width: 200px;
    height: 200px;
    top: 60%;
    left: 70%;
    animation: floatGlow 12s infinite alternate-reverse ease-in-out;
    animation-delay: -2s;
}

.p3 {
    width: 250px;
    height: 250px;
    top: 30%;
    left: 80%;
    animation: floatGlow 18s infinite alternate ease-in-out;
    animation-delay: -5s;
}

.p4 {
    width: 150px;
    height: 150px;
    top: 40%;
    left: 40%;
    animation: floatGlow 20s infinite alternate-reverse ease-in-out;
}

.p5 {
    width: 100px;
    height: 100px;
    top: 70%;
    left: 10%;
    animation: floatGlow 10s infinite alternate ease-in-out;
    animation-delay: -3s;
}

@keyframes floatGlow {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }

    50% {
        transform: translate(10%, 15%) scale(1.1);
        opacity: 0.5;
    }

    100% {
        transform: translate(-5%, 10%) scale(0.9);
        opacity: 0.3;
    }
}

.hero-content {
    position: absolute;
    bottom: 14%;
    right: 6%;
    z-index: 2;
    color: white;
    text-align: right;
    max-width: 950px;
    width: 90%;
    overflow: visible;
}

.hero-title {
    font-size: clamp(2.5rem, 5.2vw, 5.2rem);
    letter-spacing: -1.5px;
    margin-bottom: 2rem;
    line-height: 1.1;
    font-weight: 700;
}

.hero-section .hero-title {
    color: white !important;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.hero-title .gradient-text {
    /* Set to solid white for maximum visibility */
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: #fff !important;
    color: #fff !important;
}

.hero-link {
    display: inline-block;
    color: rgba(255, 255, 255, 0.90);
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    padding-bottom: 3px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.hero-link:hover {
    color: white;
    border-color: white;
}

.hero-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    z-index: 2;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 13px;
    margin: 8px auto 0;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: white;
    border-radius: 2px;
    animation: scrollMouse 2s infinite;
}

@keyframes scrollMouse {
    0% {
        transform: translate(-50%, 0);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, 12px);
        opacity: 0;
    }
}

/* ==========================================================================
   Page Headers (Subpages)
   ========================================================================== */
.page-header {
    padding: 160px 0 80px;
    text-align: center;
    background: linear-gradient(to bottom, #f1f5f9, var(--bg-color));
}

.page-header .hero-title {
    color: var(--text-main);
    width: 100%;
    box-sizing: border-box;
}

.detail-tag {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: rgba(30, 64, 175, 0.08);
    color: var(--brand-primary);
    border-radius: 99px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2rem;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(30, 64, 175, 0.1);
}

.page-header .hero-title .gradient-text {
    /* Force white for visibility as requested */
    background: none !important;
    -webkit-text-fill-color: #fff !important;
    color: #fff !important;
    text-shadow: 0 0 25px rgba(56, 189, 248, 0.4);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto;
}

/* ==========================================================================
   Sections General layout
   ========================================================================== */
.section-padding {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(1.8rem, 5vw, 3rem);
    margin-bottom: 1rem;
    scroll-margin-top: calc(var(--nav-height) + 2rem);
    word-break: keep-all;
    /* Prevent breaking in the middle of Chinese words */
    overflow-wrap: anywhere;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: min(600px, 90%);
    margin: 0 auto;
}

/* Features Component (Grid layout) */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    padding: 2.5rem 2rem;
    text-align: center;
}

.icon-wrapper {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(147, 51, 234, 0.1));
    color: var(--brand-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Products Layout */
.products-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    text-align: left;
}

.products-section .section-title {
    margin-bottom: 0;
}

.link-more {
    color: var(--brand-blue);
    font-weight: 500;
}

.link-more:hover {
    color: var(--brand-indigo);
    text-decoration: underline;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.product-card {
    display: flex;
    flex-direction: column;
}

.product-image {
    height: 240px;
    padding: 0;
    /* Remove padding to make images edge-to-edge */
    border-bottom: 1px solid var(--border-color);
    background: #f8fafc;
    overflow: hidden;
    /* To keep hover zoom inside */
}

.img-placeholder {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-card:hover .img-placeholder {
    transform: scale(1.08);
    /* Zoom effect on hover */
}

/* Beautiful vibrant gradients in case images fail to load */
.bg-gradient-1 {
    background: linear-gradient(135deg, #a8c0ff, #3f2b96);
}

.bg-gradient-2 {
    background: linear-gradient(135deg, #FFB75E, #ED8F03);
}

.bg-gradient-3 {
    background: linear-gradient(135deg, #00B4DB, #0083B0);
}

.product-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Layout for the product card button row */
.product-content .btn+.btn {
    margin-left: 0.75rem;
}

/* Make the buttons sit in a row */
.product-content>a.btn,
.product-content>a.btn+a.btn {
    display: inline-block;
}

.tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.25rem 0.75rem;
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    border-radius: 99px;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.product-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.product-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    flex: 1;
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(248, 250, 252, 0.8), transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
    z-index: 1;
}

.product-card:hover .card-glow {
    opacity: 1;
}

/* ==========================================================================
   About Us Section Grids
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.values-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* ── Certificate Gallery ── */
.cert-card {
    cursor: pointer;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cert-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.13);
}

.cert-thumb {
    position: relative;
    overflow: hidden;
    height: 200px;
    background: #f1f5f9;
}

.product-detail-image img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain;
    display: block;
}

.cert-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.35s ease;
    display: block;
}

.cert-card:hover .cert-thumb img {
    transform: scale(1.04);
}

.cert-zoom-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    background: rgba(15, 23, 42, 0.35);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.cert-card:hover .cert-zoom-icon {
    opacity: 1;
}

.cert-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-main);
    text-align: center;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-color);
    margin: 0;
}

@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 600px) {
    .values-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 80px 0 30px;
    background: #f8fafc;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 1rem;
    max-width: 300px;
}

.footer-links h3,
.footer-contact h3 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--brand-blue);
}

.footer-contact p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.5;
    flex-wrap: wrap;
}

.footer-contact p a {
    word-break: break-all;
    color: var(--brand-primary) !important;
    font-weight: 500;
}

.footer-contact .label {
    white-space: nowrap;
    color: var(--text-main);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ==========================================================================
   Responsive Design (Mobile & Tablet)
   ========================================================================== */
@media (max-width: 992px) {

    .features-grid,
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .nav-links,
    .nav-actions .btn {
        display: none !important;
    }

    .nav-actions {
        gap: 0.75rem; /* Reduced gap for mobile */
    }

    .lang-switcher {
        margin-right: 0; /* Remove extra margin on mobile */
        gap: 4px;
    }

    .mobile-menu-btn {
        display: block;
    }

    /* Hero section mobile adjustments */
    .hero-section::before {
        /* Ensure the far-left light source and bottom convergence are visible */
        background-position: left bottom;
    }

    .hero-overlay {
        /* Adjusted gradient for mobile: softer on the left to let the light shine through */
        background: linear-gradient(35deg, rgba(0, 0, 30, 0) 0%, rgba(0, 0, 20, 0.3) 40%, rgba(0, 0, 10, 0.7) 100%),
            linear-gradient(to right, rgba(0, 0, 0, 0.2) 0%, transparent 60%);
    }

    .container {
        padding: 0 1rem;
    }

    .hero-content {
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        padding: 0 1.2rem;
        text-align: center;
        box-sizing: border-box;
    }

    /* 移动端中文主页完全恢复原来41px字号 */
    .hero-title {
        font-size: 41px !important;
        letter-spacing: -0.5px;
        margin-bottom: 1.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        line-height: 1.2;
        width: 100%;
        box-sizing: border-box;
        padding: 0 0.5rem;
        max-width: 100%;
    }

    /* 仅英文页面使用缩小字号解决文字截断问题 */
    html[lang="en-US"] .hero-title,
    body.en-page .hero-title {
        font-size: clamp(1.1rem, 5.5vw, 1.8rem) !important;
        letter-spacing: -0.3px;
        line-height: 1.25;
        padding: 0 1rem;
    }

    .hero-link {
        font-size: 1rem;
    }

    .features-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }

    /* Reduce whitespace at the top of content */
    .hero-section {
        padding-top: 60px;
        /* Reduced from var(--nav-height) */
    }


    .page-header {
        padding: 100px 1.5rem 40px;
        /* Reduced padding */
    }

    .mobile-hide {
        display: none;
    }

    .logo-text {
        /* Force nowrap and use a smaller clamp for mobile to prevent pushing buttons off screen */
        font-size: clamp(1.2rem, 5vw, 1.5rem) !important;
        white-space: nowrap !important;
        letter-spacing: -0.5px;
    }

    .products-section .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ==========================================================================
   Product Card Navigation (Polished Hover & Click Area)
   ========================================================================== */
.product-card {
    position: relative;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* ==========================================================================
   Floating Contact Widget
   ========================================================================== */
.floating-contact {
    position: fixed;
    right: 30px;
    bottom: 30px;
    z-index: 9999;
    pointer-events: none; /* Container itself shouldn't block clicks */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.contact-close {
    pointer-events: auto;
    position: absolute;
    top: -10px;
    right: -10px;
    width: 26px;
    height: 26px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-main);
    border: 1.5px solid var(--border-color);
    border-radius: 50%;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 10000;
    transition: all 0.2s ease;
    opacity: 0.8;
}

.contact-close:hover {
    background: #ffffff;
    color: var(--brand-primary);
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.contact-card {
    pointer-events: auto; /* Re-enable for the button */
    display: flex;
    align-items: center;
    background: var(--gradient-primary);
    background-size: 200% auto;
    color: white !important;
    padding: 12px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(30, 64, 175, 0.3);
    text-decoration: none;
    transition: all var(--transition-normal);
    max-width: 56px; /* Icon only by default */
    height: 56px;
    overflow: hidden;
    white-space: nowrap;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-card:hover {
    max-width: 280px; /* Expand on hover */
    padding: 12px 24px 12px 16px;
    background-position: right center;
    box-shadow: 0 15px 40px rgba(30, 64, 175, 0.4);
    transform: translateY(-5px);
}

.contact-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 2px; /* Add some internal padding to prevent clipping edges */
}

.contact-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
}

.contact-info {
    display: flex;
    flex-direction: column;
    margin-left: 14px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

.contact-card:hover .contact-info {
    opacity: 1;
    transform: translateX(0);
}

.contact-label {
    font-size: 0.7rem;
    font-weight: 500;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
}

.contact-number {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-heading);
    line-height: 1.2;
}

/* Animations */
@keyframes pulseContact {
    0% { box-shadow: 0 0 0 0 rgba(30, 64, 175, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(30, 64, 175, 0); }
    100% { box-shadow: 0 0 0 0 rgba(30, 64, 175, 0); }
}

.contact-card {
    animation: pulseContact 2s infinite;
}

.contact-card:hover {
    animation: none;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .floating-contact {
        right: 20px;
        bottom: 20px;
    }
    
    .contact-card {
        padding: 11px;
        max-width: 56px;
        height: 56px;
        animation: pulseContact 2.5s infinite;
    }

    .contact-card:active {
        transform: scale(0.9);
    }
    
    .contact-info {
        display: none; /* Keep it simpler on mobile touch */
    }
}

