/* index.css - Modern Enterprise Styling */

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #f97316;
    --dark: #0f172a;
    --light: #f8fafc;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --white: #ffffff;
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 40px -10px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--dark);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

.bg-light {
    background-color: var(--light);
}

.box-shadow {
    box-shadow: var(--shadow);
    border-radius: 8px;
}

/* Typography & Titles */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
}

.underline {
    height: 4px;
    width: 60px;
    background: var(--primary);
    margin: 0 auto;
    border-radius: 2px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar.scrolled {
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-text {
    display: inline-block;
    font-size: 1.25rem;
    font-weight: 800;
    /* Modern corporate multi-color gradient */
    background: linear-gradient(90deg, #1e3a8a, var(--primary), #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    letter-spacing: 1px;
    white-space: nowrap;
}

.logo-en-main {
    font-size: 1.05em;
}

.logo-en-sub {
    font-size: 0.75em;
    font-weight: 600;
}

.logo-zh-sub {
    font-size: 0.9em;
}

.nav-links {
    display: flex;
    gap: 1.2rem;
    align-items: center;
}

.nav-links a {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    position: relative;
    padding: 0.3rem 0;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.btn-lang {
    background: none;
    border: 1px solid var(--primary);
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--primary);
    font-weight: 600;
    font-family: var(--font-main);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle .bar {
    height: 2px;
    width: 100%;
    background-color: var(--dark);
    border-radius: 2px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background-color: var(--dark);
    color: var(--white);
    text-align: center;
    margin-top: 0;
    overflow: hidden;
}

.hero-bg-slider {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg-slider .slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: heroSlider 15s ease-in-out infinite;
}

.hero-bg-slider .slide-1 {
    background-image: url('static/image/top/01.png');
    animation-delay: 0s;
}

.hero-bg-slider .slide-2 {
    background-image: url('static/image/top/02.png');
    animation-delay: 5s;
}

.hero-bg-slider .slide-3 {
    background-image: url('static/image/top/03.png');
    animation-delay: 10s;
}

@keyframes heroSlider {
    0% {
        opacity: 0;
        transform: scale(1);
    }

    10% {
        opacity: 1;
    }

    33.33% {
        opacity: 1;
    }

    43.33% {
        opacity: 0;
    }

    100% {
        opacity: 0;
        transform: scale(1.05);
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(59, 130, 246, 0.7));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.mobile-br {
    display: none;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    border: 2px solid var(--primary);
}

.btn-primary:hover {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    color: var(--gray);
    text-align: justify;
}

.about-images {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about-images>img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.about-certs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.cert-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.cert-stack img {
    flex: 1;
    object-fit: cover;
    min-height: 0;
}

.about-certs img {
    width: 100%;
    border-radius: 6px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.about-certs img:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* Products Section */
.products-wrapper {
    width: 100%;
    overflow-x: auto;
    padding: 1rem 0 2rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--gray-light);
    -webkit-overflow-scrolling: touch;
}

.products-wrapper::-webkit-scrollbar {
    height: 10px;
}

.products-wrapper::-webkit-scrollbar-track {
    background: var(--gray-light);
    border-radius: 10px;
}

.products-wrapper::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.products-grid {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    grid-auto-flow: column;
    grid-auto-columns: 260px;
    gap: 2rem;
}

.product-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-light);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.product-img {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    overflow: hidden;
    border-radius: 8px;
}

.product-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: var(--transition);
}

.product-card:hover .product-img img {
    transform: scale(1.1);
}

.product-card h3 {
    font-size: 1.1rem;
    color: var(--dark);
    font-weight: 600;
}

/* Equipment Section */
.equipment-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.tab-btn {
    padding: 0.8rem 2rem;
    border: 2px solid var(--gray-light);
    background: transparent;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray);
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-main);
}

.tab-btn.active,
.tab-btn:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.eq-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.eq-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.eq-card img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.eq-card h4 {
    padding: 1.5rem;
    text-align: center;
    font-size: 1.1rem;
    color: var(--dark);
    border-top: 1px solid var(--gray-light);
}

/* Service Section */
.service-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
}

.service-img {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.service-img::after {
    content: '';
    position: absolute;
    inset: 0;
    /* background: rgba(0, 64, 255, 0.3); */
    /* backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px); */
    pointer-events: none;
}

.service-img img {
    width: 100%;
    display: block;
    border-radius: 12px;
}

.service-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.service-list li {
    font-size: 1.1rem;
    color: var(--gray);
    position: relative;
    padding-left: 2rem;
}

.service-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--primary);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Culture Section */
.culture-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.culture-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--gray-light);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.culture-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
    z-index: -1;
}

.culture-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.culture-card:hover::before {
    transform: scaleX(1);
}

.culture-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.culture-card p {
    color: var(--gray);
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    background: var(--white);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--primary-dark);
}

.contact-info p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--gray);
    display: flex;
    align-items: flex-start;
}

.contact-info strong {
    color: var(--dark);
    min-width: 80px;
    display: inline-block;
}

.contact-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* Footer */
.footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 4rem 0 2rem;
    text-align: center;
}

.footer p {
    margin-bottom: 1rem;
}

.footer-link {
    color: var(--primary);
}

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

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .nav-container {
        gap: 0.5rem;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-right {
        gap: 0.5rem;
    }

    .menu-toggle.is-active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle.is-active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.is-active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        gap: 0;
        backdrop-filter: blur(10px);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--gray-light);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        display: block;
        padding: 1.2rem;
    }

    .nav-links a::after {
        display: none;
    }

    .logo {
        flex: 1;
        min-width: 0;
        margin-right: 0;
    }

    .logo-text {
        font-size: clamp(0.9rem, 4vw, 1rem);
        white-space: normal;
        line-height: 1.25;
        letter-spacing: 0;
        overflow-wrap: break-word;
    }

    .logo-zh-sub {
        font-size: 0.75em;
    }

    .hero-title {
        font-size: 1.8rem;
        white-space: normal;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .mobile-br {
        display: block;
    }

    .about-grid,
    .service-content,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 4rem 0;
    }
}