/* ============================================================
   FORWOOD Machinery — European Industrial Style
   Inspired by Homag, Weinig, SCM, Biesse
   ============================================================ */

:root {
    --black: #1a1a1a;
    --dark: #222;
    --primary: #003366;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #ccc;
    --gray-500: #888;
    --gray-700: #555;
    --white: #ffffff;
    --accent: #cc6600;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.7;
    color: var(--dark);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

/* ==================== HEADER ==================== */
header {
    background: var(--white);
    padding: 1.2rem 6%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-img {
    height: 38px;
    width: auto;
    display: block;
}

nav {
    display: flex;
    gap: 32px;
    align-items: center;
}

nav > a {
    text-decoration: none;
    color: var(--black);
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: 0.2s;
}

nav > a:hover {
    border-bottom-color: var(--black);
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown > a {
    text-decoration: none;
    color: var(--black);
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: 0.2s;
}

.dropdown > a:hover {
    border-bottom-color: var(--black);
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: -10px;
    background: var(--white);
    min-width: 210px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
    z-index: 101;
    border: 1px solid var(--gray-200);
}

.dropdown-content a {
    color: var(--dark);
    padding: 12px 18px;
    display: block;
    font-size: 0.8rem;
    text-decoration: none;
    border-bottom: 1px solid var(--gray-100);
    letter-spacing: 0;
    text-transform: none;
    transition: 0.15s;
}

.dropdown-content a:last-child { border-bottom: none; }
.dropdown-content a:hover { background: var(--gray-100); }
.dropdown:hover .dropdown-content { display: block; }

/* ==================== HERO ==================== */
/* 轮播动画 */
@keyframes hero-fade {
    0% { opacity: 0; }
    10% { opacity: 1; }
    33% { opacity: 1; }
    43% { opacity: 0; }
    100% { opacity: 0; }
}

.hero {
    position: relative;
    height: 75vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    overflow: hidden; /* 必须：防止图片溢出 */
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: hero-fade 15s infinite;
}

.hero-slide:nth-child(1) { animation-delay: 0s; }
.hero-slide:nth-child(2) { animation-delay: 5s; }
.hero-slide:nth-child(3) { animation-delay: 10s; }

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 8%;
    max-width: 700px;
}

.hero-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--white);
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-sub {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.75);
    margin-bottom: 2.5rem;
}

.btn-outline {
    display: inline-block;
    padding: 0.9rem 2.5rem;
    border: 2px solid var(--white);
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: 0.3s;
}

.btn-outline:hover {
    background: var(--white);
    color: var(--black);
}

/* ==================== STATS BAR ==================== */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-bottom: 1px solid var(--gray-200);
}

.stat {
    padding: 2.5rem 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--gray-700);
    letter-spacing: 0.5px;
    border-right: 1px solid var(--gray-200);
}

.stat:last-child { border-right: none; }

.stat-num {
    display: block;
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.3rem;
    letter-spacing: -1px;
}

/* ==================== CATEGORIES (HOME) ==================== */
.categories {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-bottom: 1px solid var(--gray-200);
}

.cat-card {
    padding: 3.5rem 2rem;
    border-right: 1px solid var(--gray-200);
    transition: 0.3s;
}

.cat-card:last-child { border-right: none; }
.cat-card:hover { background: var(--gray-100); }

.cat-icon {
    margin-bottom: 1.5rem;
}

.cat-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 0.8rem;
}

.cat-card p {
    font-size: 0.85rem;
    color: var(--gray-700);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.cat-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cat-link:hover { color: var(--accent); }

/* ==================== CTA SECTION ==================== */
.cta-section {
    background: var(--black);
    padding: 5rem 8%;
    text-align: center;
}

.cta-inner {
    max-width: 650px;
    margin: 0 auto;
}

.cta-inner h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 1rem;
}

.cta-inner p {
    color: rgba(255,255,255,0.6);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.btn-solid {
    display: inline-block;
    padding: 1rem 3rem;
    background: var(--white);
    color: var(--black);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: 0.3s;
}

.btn-solid:hover {
    background: var(--gray-200);
}

/* ==================== PAGE HEAD (SUBPAGES) ==================== */
.page-head {
    background: var(--gray-100);
    padding: 5rem 8%;
    border-bottom: 1px solid var(--gray-200);
}

.page-head-inner {
    max-width: 900px;
    margin: 0 auto;
}

.section-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--gray-500);
    margin-bottom: 0.8rem;
}

.page-head h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--black);
    letter-spacing: -1px;
    line-height: 1.1;
}

.page-intro {
    color: var(--gray-700);
    margin-top: 1rem;
    font-size: 1rem;
    max-width: 600px;
}

/* ==================== ABOUT ==================== */
.about-body {
    padding: 5rem 8%;
    max-width: 900px;
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.about-text h2 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--black);
}

.about-text p {
    margin-bottom: 1.2rem;
    color: var(--gray-700);
}

.about-stats-compact {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-left: 3px solid var(--primary);
    padding-left: 2rem;
}

.about-stat {
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.85rem;
    color: var(--gray-700);
}

.about-stat:last-child { border-bottom: none; }

.about-stat span {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.2rem;
}

.about-detail {
    border-top: 1px solid var(--gray-200);
    padding-top: 3rem;
}

.about-detail h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.about-detail p {
    color: var(--gray-700);
    margin-bottom: 1.5rem;
}

.about-detail ul {
    list-style: none;
    padding: 0;
}

.about-detail li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.9rem;
    color: var(--gray-700);
}

.about-detail li:last-child { border-bottom: none; }

.about-detail li strong {
    color: var(--black);
    display: block;
    margin-bottom: 0.3rem;
}

/* ==================== PRODUCTS ==================== */
.product-family {
    padding: 4rem 8%;
    border-bottom: 1px solid var(--gray-200);
    max-width: 1200px;
    margin: 0 auto;
}

.product-family:last-of-type { border-bottom: none; }

.family-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.family-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--black);
}

.family-intro {
    color: var(--gray-700);
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
    margin-left: 3rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.prod-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--gray-200);
    transition: 0.3s;
}

.prod-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.04);
}

.prod-img {
    aspect-ratio: 4/3;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.img-placeholder {
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--gray-300);
}

.prod-info {
    padding: 1.5rem;
}

.prod-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--black);
}

.prod-info p {
    font-size: 0.85rem;
    color: var(--gray-700);
    line-height: 1.6;
}

/* ==================== CONTACT ==================== */
.contact-body {
    padding: 5rem 8%;
    max-width: 900px;
    margin: 0 auto;
}

.contact-channels {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--gray-200);
    margin-bottom: 4rem;
}

.channel-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    text-align: center;
}

.channel-card h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gray-500);
    margin-bottom: 0.8rem;
}

.channel-detail {
    font-size: 1rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 0.5rem;
}

.channel-detail a {
    color: var(--primary);
    text-decoration: none;
}

.channel-detail a:hover {
    color: var(--accent);
}

.channel-note {
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* — Form — */
.form-section {
    border: 1px solid var(--gray-200);
    padding: 3rem;
}

.form-section h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

#inquiryForm input,
#inquiryForm select,
#inquiryForm textarea {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 0;
    font-family: inherit;
    font-size: 0.9rem;
    transition: 0.15s;
    background: var(--white);
}

#inquiryForm input:focus,
#inquiryForm select:focus,
#inquiryForm textarea:focus {
    outline: none;
    border-color: var(--black);
}

#inquiryForm button { width: 100%; }

/* ==================== FOOTER ==================== */
footer {
    background: var(--black);
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    padding: 4rem 8%;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    height: 30px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.7;
    margin-bottom: 0.8rem;
}

.footer-brand p {
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.footer-links h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 1.2rem;
}

.footer-links a {
    display: block;
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    font-size: 0.8rem;
    margin-bottom: 0.6rem;
    transition: 0.2s;
}

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

.footer-bottom {
    text-align: center;
    padding: 1.5rem 8%;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 0.75rem;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .categories { grid-template-columns: repeat(2, 1fr); }
    .cat-card:nth-child(2) { border-right: none; }
    .cat-card:nth-child(3), .cat-card:nth-child(4) { border-top: 1px solid var(--gray-200); }
}

@media (max-width: 900px) {
    .stats-bar { grid-template-columns: repeat(2, 1fr); }
    .stat:nth-child(2) { border-right: none; }
    .stat:nth-child(3), .stat:nth-child(4) { border-top: 1px solid var(--gray-200); }
    .about-grid { grid-template-columns: 1fr; gap: 2rem; }
    .about-stats-compact { flex-direction: row; gap: 2rem; border-left: none; border-top: 3px solid var(--primary); padding: 2rem 0 0; }
    .contact-channels { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; text-align: center; }
}

@media (max-width: 768px) {
    header { flex-direction: column; gap: 1rem; padding: 1rem 5%; }
    nav { flex-wrap: wrap; gap: 18px; justify-content: center; }
    .hero h1 { font-size: 2.5rem; }
    .page-head h1 { font-size: 2.2rem; }
    .categories { grid-template-columns: 1fr; }
    .cat-card { border-right: none; border-bottom: 1px solid var(--gray-200); }
    .cat-card:last-child { border-bottom: none; }
    .product-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .product-family { padding: 3rem 5%; }
    .family-intro { margin-left: 0; }
}

@media (max-width: 480px) {
    .hero { height: 60vh; min-height: 400px; }
    .hero h1 { font-size: 2rem; }
    .stats-bar { grid-template-columns: repeat(2, 1fr); }
    .about-stats-compact { flex-direction: column; gap: 0; }
}