/* ============================================
   MT Tech - Enterprise Website Styles
   Tech-themed dark design with cyan/blue accents
   ============================================ */

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.03);
    --accent-cyan: #00d4ff;
    --accent-blue: #0ea5e9;
    --accent-purple: #8b5cf6;
    --accent-green: #10b981;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-glow: rgba(0, 212, 255, 0.3);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --gradient-primary: linear-gradient(135deg, #00d4ff 0%, #0ea5e9 50%, #8b5cf6 100%);
    --gradient-card: linear-gradient(145deg, rgba(17, 24, 39, 0.9) 0%, rgba(10, 14, 26, 0.9) 100%);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
    /* card hover: only border-color, NO box-shadow/transform (those cause repaint storms) */
    --card-transition: border-color 0.2s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Static grid background (simplified — no animation, single layer) */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.025) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
}

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #5ee8ff;
}

/* Prevent a:hover color from cascading into card links */
.product-card-link:hover, .news-card-link:hover {
    color: inherit;
}

/* ===== Container ===== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 14, 26, 0.95);
    border-bottom: 1px solid var(--border-subtle);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.nav-logo .logo-icon {
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #0a0e1a;
    font-weight: 900;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
    overflow: hidden;
    flex-shrink: 0;
}

.nav-logo .logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    position: relative;
    padding: 8px 0;
}

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

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: transform 0.3s ease;
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 70px;
}

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

.hero-bg::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-bg::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 50px;
    color: var(--accent-cyan);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 32px;
    animation: fadeInDown 0.8s ease;
}

.hero-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
}

.hero h1 {
    font-size: 64px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #f1f5f9 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease;
}

.hero h1 .highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    animation: fadeInUp 1.2s ease;
}

@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); }
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #0a0e1a;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
    color: #0a0e1a;
    opacity: 0.92;
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.btn-outline:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

/* ===== Section ===== */
.section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    padding: 4px 16px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 50px;
    color: var(--accent-cyan);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Stats Bar ===== */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 40px;
    background: var(--gradient-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    margin-top: -80px;
    position: relative;
    z-index: 2;
    box-shadow: var(--shadow-card);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 42px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

/* ===== Product Cards ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 28px;
}

.product-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--card-transition);
    position: relative;
    cursor: pointer;
    contain: layout style paint;
}

/* Removed ::before gradient bar + opacity animation (repaint cost) */

.product-card:hover {
    border-color: var(--border-glow);
    /* NO box-shadow on hover — 30px blur causes repaint storms on rapid hover */
}

.product-card-image {
    width: 100%;
    height: 200px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Removed transition: transform — no transform is applied on hover */
}

/* Removed hover opacity change on image — triggers recomposite */

.product-card-body {
    padding: 28px;
}

.product-category {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent-cyan);
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    margin-bottom: 12px;
}

.product-card-body h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.product-card-body .subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.product-feature {
    padding: 4px 10px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* ===== News Cards ===== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
}

.news-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--card-transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    contain: layout style paint;
}

.news-card:hover {
    border-color: var(--border-glow);
    /* NO box-shadow on hover — repaint storm fix */
}

.news-card-image {
    width: 100%;
    height: 200px;
    background: var(--bg-secondary);
    overflow: hidden;
    position: relative;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Removed transition: transform — no transform applied on hover */
}

/* Removed hover opacity change on image */

.news-category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    background: rgba(0, 212, 255, 0.9);
    color: #0a0e1a;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
}

.news-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card-body h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-body .summary {
    color: var(--text-secondary);
    font-size: 14px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== Contact Section ===== */
.contact-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 32px;
    transition: var(--card-transition);
}

.contact-card:hover {
    border-color: var(--border-glow);
}

.contact-card h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-card h3 i {
    color: var(--accent-cyan);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 15px;
}

.contact-info-item i {
    color: var(--accent-cyan);
    margin-top: 4px;
    width: 20px;
}

/* Sales contacts grid */
.sales-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.sales-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: var(--card-transition);
}

.sales-card:hover {
    border-color: var(--border-glow);
}

.sales-avatar {
    width: 64px;
    height: 64px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: #0a0e1a;
    margin: 0 auto 16px;
}

.sales-card h4 {
    font-size: 18px;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.sales-card .position {
    color: var(--accent-cyan);
    font-size: 13px;
    margin-bottom: 12px;
}

.sales-card .info {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* WeChat QR */
.wechat-qr-section {
    text-align: center;
    margin-top: 24px;
}

.wechat-qr {
    width: 180px;
    height: 180px;
    background: white;
    border-radius: 12px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px;
    box-sizing: border-box;
}

.wechat-qr img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.wechat-qr-placeholder {
    font-size: 60px;
    color: #07c160;
}

/* QR Codes Row (WeChat + Douyin side by side) */
.qr-codes-row {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.qr-codes-row > div {
    flex: 1;
    min-width: 180px;
}

.douyin-qr-section {
    text-align: center;
    margin-top: 24px;
}

.douyin-qr-section .wechat-qr {
    width: 180px;
    height: 180px;
    background: white;
    border-radius: 12px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px;
    box-sizing: border-box;
}

.douyin-qr-section .wechat-qr img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 320px;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 16px;
    line-height: 1.7;
}

.footer-col h4 {
    color: var(--text-primary);
    font-size: 16px;
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul a {
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-col ul a:hover {
    color: var(--accent-cyan);
}

.footer-bottom {
    border-top: 1px solid var(--border-subtle);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* ===== Page Header ===== */
.page-header {
    padding: 140px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 300px;
    background: radial-gradient(ellipse, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
    z-index: -1;
}

.page-header h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 18px;
}

/* ===== Detail Pages ===== */
.detail-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 140px 24px 80px;
}

.detail-header {
    margin-bottom: 40px;
}

.detail-header .breadcrumb {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.detail-header h1 {
    font-size: 36px;
    margin-bottom: 16px;
}

.detail-meta {
    display: flex;
    gap: 24px;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

.detail-image {
    width: 100%;
    height: 400px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 40px;
    background: var(--bg-secondary);
}

.detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-content {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text-secondary);
}

.detail-content p {
    margin-bottom: 20px;
}

.detail-content h2,
.detail-content h3 {
    color: var(--text-primary);
    margin: 32px 0 16px;
}

.detail-features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin: 32px 0;
}

.detail-feature-item {
    padding: 20px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-feature-item i {
    color: var(--accent-cyan);
    font-size: 20px;
}

/* ===== About Page ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h2 {
    font-size: 32px;
    margin-bottom: 20px;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.8;
}

.value-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 60px;
}

.value-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 32px;
    transition: var(--card-transition);
}

.value-card:hover {
    border-color: var(--border-glow);
}

.value-card .icon {
    width: 56px;
    height: 56px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--accent-cyan);
    margin-bottom: 20px;
}

.value-card h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.value-card p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        border-bottom: 1px solid var(--border-subtle);
    }

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

    .nav-toggle {
        display: flex;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero p {
        font-size: 16px;
    }

    .section-title {
        font-size: 28px;
    }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-section,
    .about-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

/* Card link styles (a tags wrapping cards) */
.product-card-link, .news-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
