/************************************************************************************
 GLASSMORPHISM & RESPONSIVE DESIGN - MM Material
 毛玻璃拟态 + 响应式布局
 2025-05-07
*************************************************************************************/

/* ========== 1. CSS Variables ========== */
:root {
    /* Glass effect */
    --glass-bg: rgba(255, 255, 255, 0.18);
    --glass-bg-strong: rgba(255, 255, 255, 0.28);
    --glass-border: 1px solid rgba(255, 255, 255, 0.3);
    --glass-blur: 18px;
    --glass-shadow: 0 8px 32px rgba(0, 60, 40, 0.12);
    --glass-radius: 16px;

    /* Brand colors */
    --brand-primary: #007a51;
    --brand-primary-light: #00a86b;
    --brand-primary-dark: #005a3c;
    --brand-accent: #ffa607;
    --brand-bg-start: #e8f5e9;
    --brand-bg-mid: #d0e8d4;
    --brand-bg-end: #c8e6c9;

    /* Text */
    --text-primary: #1a1a2e;
    --text-secondary: #444;
    --text-light: #fff;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;

    /* Font sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.25rem;
    --text-xl: 1.5rem;
    --text-2xl: 2rem;
}

/* ========== 2. Global Background ========== */
body {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 35%, #a5d6a7 65%, #e0f2f1 100%);
    background-attachment: fixed;
    font-family: "Segoe UI", "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
    color: var(--text-primary);
    min-height: 100vh;
}

/* ========== 3. Glass Base Class ========== */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: var(--glass-border);
    border-radius: var(--glass-radius);
    box-shadow: var(--glass-shadow);
}

.glass-strong {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--glass-radius);
    box-shadow: 0 8px 32px rgba(0, 60, 40, 0.15);
}

/* ========== 4. Header / TopNav ========== */
.header {
    position: relative;
    z-index: 100;
    margin-bottom: 10px;
}

.topnav {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    height: 32px;
    line-height: 32px;
    border-radius: 0 0 12px 12px;
}

.topnav a { color: var(--text-primary); transition: color 0.2s; }
.topnav a:hover { color: var(--brand-primary); text-decoration: none; }

.headermain {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--glass-radius);
    margin: 10px 0;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.headerlogo h1, .headerlogo h2, .headerlogo h3 { margin: 0; }
.headerimgtel span { display: block; padding: 2px 0; color: var(--text-secondary); }
.headerimgtel .email a,
.headerimgtel .tel a { color: var(--brand-primary); font-weight: 600; }

/* ========== 5. Navigation Menu ========== */
.menu {
    background: rgba(0, 122, 81, 0.75) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 12px !important;
    overflow: visible !important;
    box-shadow: 0 4px 24px rgba(0, 60, 40, 0.2);
}

.menu li a {
    color: #fff !important;
    font-weight: 600;
    transition: background 0.25s, color 0.25s;
    border-radius: 8px;
    margin: 4px 2px;
}

.menu li a:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}

.menu li ul {
    background: rgba(0, 122, 81, 0.92) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.menu li ul a { border-radius: 0; margin: 0; }
.menu li ul a:hover { background: rgba(255,255,255,0.15) !important; }

/* ========== 6. Main Container / Content ========== */
.wrap {
    max-width: 1200px;
    padding: 0 20px;
    margin: 0 auto;
}

.container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* ========== 7. Left Sidebar ========== */
.leftsidebar {
    width: 22%;
    min-width: 200px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--glass-radius);
    padding: 0 0 16px 0;
    box-shadow: var(--glass-shadow);
    flex-shrink: 0;
}

.leftsidebar > span {
    display: block;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-light));
    color: #fff;
    font-weight: 700;
    font-size: var(--text-lg);
    padding: 12px 16px;
    border-radius: var(--glass-radius) var(--glass-radius) 0 0;
    letter-spacing: 0.5px;
}

.leftsidebar h4 {
    background: rgba(0, 122, 81, 0.7) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff !important;
    padding: 10px 16px !important;
    margin: 8px 10px 0 10px !important;
    border-radius: 10px;
    font-size: var(--text-base) !important;
    border: none !important;
}

.leftsidebar h4 a { color: #fff !important; }

.leftsidebar ul {
    margin: 0 10px !important;
    padding: 0;
}

.leftsidebar ul li {
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding: 10px 12px !important;
    border-radius: 8px;
    transition: background 0.2s;
    list-style: none;
}

.leftsidebar ul li:hover {
    background: rgba(0, 122, 81, 0.1);
}

.leftsidebar ul li a {
    color: var(--text-primary);
    font-weight: 500;
}
.leftsidebar ul li a:hover { color: var(--brand-primary); text-decoration: none; }

/* ========== 8. Right Container (Main Content) ========== */
.rightcontainer {
    width: 76%;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--glass-radius);
    padding: 20px;
    box-shadow: var(--glass-shadow);
    flex: 1;
}

/* Section titles */
.companyinfo h4,
.productui h4,
.newspage h1,
h4 {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-light)) !important;
    color: #fff !important;
    padding: 10px 16px !important;
    border-radius: 10px !important;
    border: none !important;
    font-size: var(--text-lg) !important;
    font-weight: 700 !important;
    margin: 0 0 16px 0 !important;
}

/* ========== 9. Product Grid ========== */
.productui {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.productui .span4,
.span4 {
    width: calc(25% - 12px);
    min-width: 160px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transition: transform 0.25s, box-shadow 0.25s;
    text-align: center;
}

.productui .span4:hover,
.span4:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0, 60, 40, 0.15);
}

.productui .span4 img,
.span4 img {
    border-radius: 10px;
    width: 100%;
    height: auto;
}

.productui .span4 strong,
.span4 strong {
    display: block;
    margin-top: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--text-sm);
}

.productui .span4 a,
.span4 a { text-decoration: none; }

/* ========== 10. Product Detail Page ========== */
.productwrap {
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: var(--glass-radius);
    box-shadow: var(--glass-shadow);
    padding: 20px;
}

.productinfo { display: flex; gap: 20px; flex-wrap: wrap; }
.productinfo .picture { flex: 1; min-width: 280px; }
.productinfo .contactus {
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    background: rgba(255,255,255,0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 16px !important;
}

/* Product table */
.product-Param-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 16px;
}

.product-Param-table tr td {
    padding: 8px 12px;
    background: rgba(255,255,255,0.25);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.product-Param-table tr.emp td,
.product-Param-table tr td.emp {
    background: rgba(0, 122, 81, 0.8) !important;
    color: #fff;
    font-weight: 700;
}

/* ========== 11. News Page ========== */
.newsitem {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 16px !important;
    margin-bottom: 12px !important;
    transition: background 0.2s;
}

.newsitem:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* ========== 12. Contact Page ========== */
.contactpage {
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--glass-radius);
    padding: 24px !important;
    box-shadow: var(--glass-shadow);
}

/* Buttons */
a.button,
.button {
    background: linear-gradient(135deg, var(--brand-accent), #ffb733) !important;
    border: none !important;
    color: #fff !important;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(255, 166, 7, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: inline-block;
}

a.button:hover,
.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 166, 7, 0.45);
    background: linear-gradient(135deg, #ffb733, var(--brand-accent)) !important;
    text-decoration: none;
}

/* ========== 13. Footer ========== */
.footer {
    background: rgba(0, 60, 40, 0.55) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255,255,255,0.85) !important;
    margin-top: 40px;
}

.footer .widget-title {
    color: #fff !important;
    font-weight: 700;
    font-size: var(--text-lg);
    margin-bottom: 12px;
}

.footer .widget-content a { color: rgba(255,255,255,0.8); transition: color 0.2s; }
.footer .widget-content a:hover { color: #fff; }

.footer .wf-cell {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 20px !important;
    margin: 0 11px;
}

.copyright {
    border-top: 1px solid rgba(255,255,255,0.15) !important;
    color: rgba(255,255,255,0.7);
    padding: 16px 0 !important;
}

.copyright a { color: rgba(255,255,255,0.85); }
.copyright img { opacity: 0.85; transition: opacity 0.2s; }
.copyright img:hover { opacity: 1; }

/* ========== 14. Google Translate Widget ========== */
#google_translate_element {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    padding: 2px 8px;
}

/* ========== 15. Back-to-Top Button ========== */
#scroll {
    background: rgba(0, 122, 81, 0.8) !important;
    backdrop-filter: blur(12px);
    border-radius: 50%;
    width: 48px !important;
    height: 48px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.2s;
}
#scroll:hover { transform: scale(1.1); }

/* ========== 16. Form / Dialog ========== */
#dialog-form {
    background: rgba(255,255,255,0.35);
    backdrop-filter: blur(20px);
    border-radius: var(--glass-radius);
    padding: 20px;
}

input.text, textarea.text {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 10px;
    background: rgba(255,255,255,0.5);
    font-size: var(--text-base);
    transition: border-color 0.2s;
}

input.text:focus, textarea.text:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(0, 122, 81, 0.15);
}

/* ========== 17. RESPONSIVE DESIGN ========== */

/* --- Tablet: <= 1024px --- */
@media screen and (max-width: 1024px) {
    .wrap { max-width: 100%; padding: 0 16px; }
    .container { flex-direction: column; }
    .leftsidebar { width: 100%; min-width: auto; }
    .rightcontainer { width: 100% !important; }
    .productui .span4,
    .span4 { width: calc(33.333% - 12px); }
    .headerimgtel { display: none; }
    .mobile-menu-toggle { display: flex !important; }
}

/* --- Mobile: <= 768px --- */
@media screen and (max-width: 768px) {
    .topnav ul { display: none; }
    .topnav { height: auto; padding: 6px 10px; }
    .mobile-menu-toggle { display: flex !important; }
    .menu { display: none; flex-direction: column; }
    .menu.active { display: flex !important; }
    .menu li { float: none !important; width: 100%; }
    .menu li ul { position: static !important; width: 100% !important; background: rgba(0,122,81,0.5) !important; }
    .headermain { flex-direction: column; text-align: center; }
    .headerlogo { width: 100% !important; text-align: center; }
    .productui .span4,
    .span4 { width: calc(50% - 12px); }
    .wf-1-4 { width: 50% !important; }
    .footer .wf-cell { margin-bottom: 12px; }
    .productinfo { flex-direction: column; }
    .contactpage ul { width: 100% !important; margin: 0 !important; padding: 0 !important; }
}

/* --- Small Mobile: <= 420px --- */
@media screen and (max-width: 420px) {
    .productui .span4,
    .span4 { width: 100%; }
    .wf-1-4 { width: 100% !important; }
    .wrap { padding: 0 8px; }
    h1 { font-size: 1.5rem !important; }
    h2 { font-size: 1.25rem !important; }
}

/* ========== 18. Mobile Menu Toggle Button ========== */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 10px;
    cursor: pointer;
    padding: 8px;
    margin: 6px 10px;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--brand-primary);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.mobile-menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ========== 19. Utility ========== */
.clear { clear: both; }

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* Image responsive */
img { max-width: 100%; height: auto; }

/* Links */
a { color: var(--brand-primary); transition: color 0.2s; }
a:hover { color: var(--brand-primary-light); text-decoration: none; }

/* Headings */
h1, h2, h3, h4, h5, h6 { color: var(--text-primary); line-height: 1.4; }
