/* Yueqing Zhengli Machinery — Enterprise Website Theme */
:root {
    --brand-primary: #0a7a38;
    --brand-primary-dark: #065a28;
    --brand-primary-light: #12a34d;
    --brand-accent: #e8a317;
    --brand-dark: #0f1923;
    --brand-gray: #5a6577;
    --brand-light: #f4f7f5;
    --brand-border: #e2e8e4;
    --shadow-sm: 0 2px 8px rgba(15, 25, 35, 0.06);
    --shadow-md: 0 8px 30px rgba(15, 25, 35, 0.1);
    --shadow-lg: 0 20px 60px rgba(15, 25, 35, 0.14);
    --radius: 12px;
    --transition: 0.25s ease;
}

* { box-sizing: border-box; }

body {
    font-family: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--brand-dark);
    background: #fff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a:hover { color: var(--brand-primary-dark); }

/* ── Top Bar ── */
.top-bar {
    background: var(--brand-dark);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8125rem;
    padding: 0.4rem 0;
}

.top-bar a {
    color: rgba(255, 255, 255, 0.85);
}

.top-bar a:hover { color: #fff; }

.top-bar .lang-switch a {
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    transition: background var(--transition);
}

.top-bar .lang-switch a.active,
.top-bar .lang-switch a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

/* ── Navbar ── */
.site-navbar {
    background: #fff;
    box-shadow: var(--shadow-sm);
    padding: 0.75rem 0;
    transition: box-shadow var(--transition), padding var(--transition);
}

.site-navbar.scrolled {
    box-shadow: var(--shadow-md);
    padding: 0.5rem 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--brand-dark) !important;
    line-height: 1.2;
}

.navbar-brand img { height: 48px; width: auto; }

.navbar-brand .brand-text small {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--brand-gray);
    letter-spacing: 0.02em;
}

.navbar-nav .nav-link {
    color: var(--brand-dark) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
    border-radius: 6px;
    transition: all var(--transition);
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--brand-primary) !important;
    background: rgba(10, 122, 56, 0.06);
}

.navbar-nav .nav-link.active::after {
    content: "";
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--brand-primary);
    border-radius: 2px;
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus { box-shadow: none; }

/* ── Hero ── */
.hero-section {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--brand-dark) 0%, #1a3a2a 50%, var(--brand-primary-dark) 100%);
    overflow: hidden;
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(10, 122, 56, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(232, 163, 23, 0.15) 0%, transparent 40%);
    pointer-events: none;
}

.hero-section::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    color: #fff;
    max-width: 680px;
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.25rem;
}

.hero-content p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-btns .btn {
    padding: 0.75rem 1.75rem;
    font-weight: 600;
    border-radius: 8px;
    margin-right: 0.75rem;
    margin-bottom: 0.5rem;
}

.btn-brand {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
}

.btn-brand:hover {
    background: var(--brand-primary-light);
    border-color: var(--brand-primary-light);
    color: #fff;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.15);
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-stat .number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--brand-accent);
}

.hero-stat .label {
    font-size: 0.8125rem;
    opacity: 0.75;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Page Header (inner pages) ── */
.page-header {
    background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-primary-dark) 100%);
    color: #fff;
    padding: 3rem 0 2.5rem;
    position: relative;
    overflow: hidden;
}

.page-header::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
}

.page-header h1 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.breadcrumb-nav {
    font-size: 0.875rem;
    opacity: 0.8;
}

.breadcrumb-nav a {
    color: rgba(255, 255, 255, 0.85);
}

.breadcrumb-nav a:hover { color: #fff; }

/* ── Section ── */
.section { padding: 4rem 0; }

.section-alt { background: var(--brand-light); }

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--brand-dark);
    margin-bottom: 0.75rem;
}

.section-title .subtitle {
    color: var(--brand-gray);
    max-width: 560px;
    margin: 0 auto;
}

.section-title .line {
    width: 48px;
    height: 4px;
    background: var(--brand-primary);
    border-radius: 2px;
    margin: 1rem auto 0;
}

/* ── Feature Cards ── */
.feature-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--brand-border);
    transition: transform var(--transition), box-shadow var(--transition);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(10, 122, 56, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.75rem;
    color: var(--brand-primary);
}

.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--brand-gray);
    font-size: 0.9375rem;
    margin: 0;
}

/* ── Product Cards ── */
.product-card {
    border: 1px solid var(--brand-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    background: #fff;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.product-img-wrap {
    aspect-ratio: 4/3;
    background: var(--brand-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    transition: transform var(--transition);
}

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

.product-img-wrap.no-image::before {
    content: "\F5B0";
    font-family: "bootstrap-icons";
    font-size: 2.5rem;
    color: var(--brand-border);
}

.product-card .card-body {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--brand-border);
}

.product-card .card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--brand-dark);
    margin: 0;
    text-align: center;
}

.product-card .card-title a {
    color: inherit;
}

.product-card .card-title a:hover {
    color: var(--brand-primary);
}

/* ── Product Carousel ── */
.product-scroll {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0.5rem 0 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--brand-primary) var(--brand-light);
}

.product-scroll::-webkit-scrollbar { height: 6px; }
.product-scroll::-webkit-scrollbar-track { background: var(--brand-light); border-radius: 3px; }
.product-scroll::-webkit-scrollbar-thumb { background: var(--brand-primary); border-radius: 3px; }

.product-scroll .product-card {
    flex: 0 0 220px;
    scroll-snap-align: start;
}

/* ── Sidebar ── */
.sidebar-nav {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--brand-border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 90px;
}

.sidebar-nav .sidebar-header {
    background: var(--brand-primary);
    color: #fff;
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.9375rem;
}

.sidebar-nav .list-group-item {
    border: none;
    border-bottom: 1px solid var(--brand-border);
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    color: var(--brand-dark);
    transition: all var(--transition);
}

.sidebar-nav .list-group-item:last-child { border-bottom: none; }

.sidebar-nav .list-group-item:hover {
    background: rgba(10, 122, 56, 0.04);
    color: var(--brand-primary);
    padding-left: 1.5rem;
}

.sidebar-nav .list-group-item.active {
    background: rgba(10, 122, 56, 0.08);
    color: var(--brand-primary);
    font-weight: 600;
    border-left: 3px solid var(--brand-primary);
}

/* ── Content Area ── */
.content-card {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--brand-border);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.content-card .info {
    line-height: 1.8;
    color: #333;
}

.content-card .info img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.content-card .info table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.content-card .info table th,
.content-card .info table td {
    border: 1px solid var(--brand-border);
    padding: 0.625rem 0.75rem;
    text-align: center;
    font-size: 0.875rem;
}

.content-card .info table th {
    background: var(--brand-primary);
    color: #fff;
    font-weight: 600;
}

.content-card .info table tr:nth-child(even) {
    background: var(--brand-light);
}

/* ── Product Detail ── */
.product-detail-header {
    background: var(--brand-primary);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: var(--radius) var(--radius) 0 0;
    font-weight: 700;
    font-size: 1.25rem;
    text-align: center;
}

.detail-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand-primary);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--brand-primary);
    margin: 1.5rem 0 1rem;
    display: inline-block;
}

.product-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.gallery-item {
    flex: 0 0 calc(33.333% - 0.75rem);
    text-align: center;
}

.gallery-item img {
    width: 100%;
    max-height: 180px;
    object-fit: contain;
    border: 1px solid var(--brand-border);
    border-radius: 8px;
    padding: 0.5rem;
    background: var(--brand-light);
    cursor: pointer;
    transition: box-shadow var(--transition);
}

.gallery-item img:hover { box-shadow: var(--shadow-md); }

.gallery-item .caption {
    font-size: 0.8125rem;
    color: var(--brand-gray);
    margin-top: 0.375rem;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.spec-table th {
    background: var(--brand-primary);
    color: #fff;
    padding: 0.75rem;
    font-weight: 600;
}

.spec-table td {
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--brand-border);
    text-align: center;
}

.spec-table tr:nth-child(even) { background: var(--brand-light); }

/* ── Forms ── */
.form-card .form-label {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--brand-dark);
}

.form-card .form-control,
.form-card .form-select {
    border-radius: 8px;
    border-color: var(--brand-border);
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
}

.form-card .form-control:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 0.2rem rgba(10, 122, 56, 0.15);
}

.form-card .btn-submit {
    background: var(--brand-primary);
    border: none;
    color: #fff;
    padding: 0.625rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: background var(--transition);
}

.form-card .btn-submit:hover { background: var(--brand-primary-dark); }

.alert-success-custom {
    background: rgba(10, 122, 56, 0.08);
    border: 1px solid rgba(10, 122, 56, 0.2);
    color: var(--brand-primary-dark);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    font-weight: 500;
}

/* ── CTA Section ── */
.cta-section {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
    color: #fff;
    padding: 3.5rem 0;
    text-align: center;
}

.cta-section h2 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-section p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

/* ── Partner Links ── */
.partner-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius);
    transition: all var(--transition);
    height: 100%;
    cursor: pointer;
}

.partner-card:hover {
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.partner-card .partner-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: rgba(10, 122, 56, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--brand-primary);
    flex-shrink: 0;
}

.partner-card .partner-info h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
}

.partner-card .partner-info p {
    font-size: 0.8125rem;
    color: var(--brand-gray);
    margin: 0;
}

/* ── Footer ── */
.site-footer {
    background: var(--brand-dark);
    color: rgba(255, 255, 255, 0.75);
    padding-top: 3.5rem;
}

.site-footer h5 {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.site-footer h5::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 2px;
    background: var(--brand-primary);
}

.site-footer a {
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--transition);
    display: block;
    padding: 0.25rem 0;
    font-size: 0.875rem;
}

.site-footer a:hover { color: #fff; }

.footer-contact li {
    list-style: none;
    padding: 0.35rem 0;
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.footer-contact li i {
    color: var(--brand-primary-light);
    margin-top: 0.2rem;
}

.footer-keywords {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.8;
}

.footer-search .form-control {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 8px 0 0 8px;
    font-size: 0.875rem;
}

.footer-search .form-control::placeholder { color: rgba(255, 255, 255, 0.4); }

.footer-search .btn {
    background: var(--brand-primary);
    border: none;
    color: #fff;
    border-radius: 0 8px 8px 0;
    padding: 0 1rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.25rem 0;
    margin-top: 2.5rem;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ── Quick Nav Cards (Home) ── */
.quick-nav-card {
    display: block;
    padding: 2rem 1.5rem;
    background: #fff;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius);
    text-align: center;
    transition: all var(--transition);
    height: 100%;
    color: var(--brand-dark);
}

.quick-nav-card:hover {
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    color: var(--brand-dark);
}

.quick-nav-card i {
    font-size: 2.5rem;
    color: var(--brand-primary);
    margin-bottom: 1rem;
    display: block;
}

.quick-nav-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.quick-nav-card p {
    font-size: 0.875rem;
    color: var(--brand-gray);
    margin: 0;
}

/* ── Responsive ── */
@media (max-width: 991.98px) {
    .hero-section { min-height: 420px; }
    .hero-stats { gap: 1.5rem; }
    .sidebar-nav { position: static; margin-bottom: 1.5rem; }
    .gallery-item { flex: 0 0 calc(50% - 0.5rem); }
}

@media (max-width: 575.98px) {
    .hero-stats { flex-direction: column; gap: 1rem; }
    .content-card { padding: 1.25rem; }
    .gallery-item { flex: 0 0 100%; }
}
