/* ===========================
   昶鉅工業 - Main Stylesheet
   PHP 8.x Compatible Website
   Industrial / Professional Aesthetic
   =========================== */

:root {
    --steel-dark:   #1a1f2e;
    --steel-mid:    #2c3347;
    --steel-light:  #3d4a66;
    --iron-gray:    #8a9ab5;
    --rust-accent:  #c0392b;
    --rust-bright:  #e74c3c;
    --gold-accent:  #d4a017;
    --silver:       #dce3ef;
    --white:        #f5f7fb;
    --text-primary: #1a1f2e;
    --text-muted:   #5a6880;
    --border:       #d0d8e8;

    --font-zh:   'Noto Sans TC', sans-serif;
    --font-en:   'Oswald', sans-serif;
    --font-serif:'Noto Serif TC', serif;

    --shadow-sm:  0 2px 8px rgba(26,31,46,.10);
    --shadow-md:  0 6px 24px rgba(26,31,46,.15);
    --shadow-lg:  0 16px 48px rgba(26,31,46,.22);
    --radius:     4px;
    --radius-lg:  8px;
    --transition: .25s ease;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font-zh);
    color: var(--text-primary);
    background: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; transition: color var(--transition); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ===========================
   TOP BAR
   =========================== */
.topbar {
    background: var(--steel-dark);
    color: var(--silver);
    font-size: .8rem;
    border-bottom: 2px solid var(--rust-accent);
}
.topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: .45rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}
.topbar-item a { color: var(--iron-gray); }
.topbar-item a:hover { color: var(--gold-accent); }
.topbar-lang { margin-left: auto; }
.lang-btn {
    display: inline-block;
    padding: .15rem .55rem;
    border: 1px solid var(--steel-light);
    border-radius: var(--radius);
    font-size: .75rem;
    color: var(--iron-gray) !important;
    margin-left: .3rem;
}
.lang-btn.active, .lang-btn:hover {
    background: var(--rust-accent);
    border-color: var(--rust-accent);
    color: #fff !important;
}

/* ===========================
   HEADER
   =========================== */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 900;
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: .9rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo-link {
    display: flex;
    align-items: center;
    gap: .9rem;
}
.logo-icon {
    width: 52px; height: 52px;
    background: var(--steel-dark);
    color: var(--gold-accent);
    font-family: var(--font-en);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: .05em;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius);
    border: 2px solid var(--rust-accent);
    flex-shrink: 0;
}
.logo-zh {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--steel-dark);
    letter-spacing: .08em;
}
.logo-en {
    display: block;
    font-family: var(--font-en);
    font-size: .7rem;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: .12em;
    text-transform: uppercase;
}

/* ===========================
   NAVIGATION
   =========================== */
.main-nav {
    background: var(--steel-dark);
    position: sticky;
    top: 73px;
    z-index: 800;
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
}
.nav-link {
    display: block;
    padding: .9rem 1.3rem;
    font-size: .9rem;
    font-weight: 500;
    color: var(--silver);
    letter-spacing: .06em;
    border-bottom: 3px solid transparent;
    transition: all var(--transition);
    white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
    color: var(--gold-accent);
    border-bottom-color: var(--rust-accent);
    background: rgba(255,255,255,.05);
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: .4rem;
}
.mobile-menu-btn span {
    display: block;
    width: 26px; height: 2px;
    background: var(--steel-dark);
    border-radius: 2px;
    transition: all var(--transition);
}

/* ===========================
   HERO BANNER
   =========================== */
.hero {
    background: linear-gradient(135deg, var(--steel-dark) 0%, var(--steel-mid) 50%, #1e2840 100%);
    color: #fff;
    padding: 80px 1.5rem;
    position: relative;
    overflow: hidden;
}
.hero::before {
    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.025'%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");
}
.hero::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--rust-accent), var(--gold-accent), var(--rust-accent));
}
.hero-inner {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}
.hero-content {}
.hero-tag {
    display: inline-block;
    background: var(--rust-accent);
    color: #fff;
    font-family: var(--font-en);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .15em;
    padding: .3rem .8rem;
    border-radius: var(--radius);
    margin-bottom: 1.2rem;
}
.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: .8rem;
    letter-spacing: .04em;
}
.hero-subtitle {
    font-family: var(--font-en);
    font-size: 1rem;
    font-weight: 400;
    color: var(--iron-gray);
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}
.hero-desc {
    color: var(--silver);
    font-size: .95rem;
    max-width: 460px;
    margin-bottom: 2rem;
    opacity: .85;
}
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn {
    display: inline-block;
    padding: .75rem 1.8rem;
    border-radius: var(--radius);
    font-size: .9rem;
    font-weight: 600;
    letter-spacing: .05em;
    transition: all var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}
.btn-primary {
    background: var(--rust-accent);
    color: #fff;
    border-color: var(--rust-accent);
}
.btn-primary:hover {
    background: var(--rust-bright);
    border-color: var(--rust-bright);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(192,57,43,.35);
}
.btn-outline {
    background: transparent;
    color: var(--silver);
    border-color: var(--iron-gray);
}
.btn-outline:hover {
    border-color: var(--gold-accent);
    color: var(--gold-accent);
}
.hero-video-wrap {
    position: relative;
    padding-top: 56.25%;
    background: rgba(0,0,0,.3);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 2px solid rgba(255,255,255,.1);
    box-shadow: var(--shadow-lg);
}
.hero-video-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    border: none;
}

/* ===========================
   STATS BAR
   =========================== */
.stats-bar {
    background: var(--rust-accent);
    padding: 1.5rem;
}
.stats-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    text-align: center;
}
.stat-item { color: #fff; }
.stat-num {
    font-family: var(--font-en);
    font-size: 2rem;
    font-weight: 700;
    display: block;
    line-height: 1;
}
.stat-label {
    font-size: .8rem;
    opacity: .85;
    letter-spacing: .06em;
}

/* ===========================
   SECTION COMMON
   =========================== */
.section {
    padding: 70px 1.5rem;
}
.section-alt { background: #eef1f7; }
.section-dark {
    background: var(--steel-dark);
    color: #fff;
}
.section-inner {
    max-width: 1200px;
    margin: 0 auto;
}
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.section-tag {
    display: inline-block;
    font-family: var(--font-en);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--rust-accent);
    margin-bottom: .6rem;
}
.section-title {
    font-family: var(--font-serif);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    color: var(--steel-dark);
    letter-spacing: .05em;
}
.section-dark .section-title { color: #fff; }
.section-divider {
    width: 50px; height: 3px;
    background: linear-gradient(90deg, var(--rust-accent), var(--gold-accent));
    margin: 1rem auto 0;
    border-radius: 2px;
}
.section-subtitle {
    color: var(--text-muted);
    margin-top: .8rem;
    font-size: .95rem;
}
.section-dark .section-subtitle { color: var(--iron-gray); }

/* ===========================
   PRODUCTS GRID
   =========================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}
.product-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}
.product-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--rust-accent), var(--gold-accent));
    opacity: 0;
    transition: opacity var(--transition);
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--rust-accent);
}
.product-card:hover::before { opacity: 1; }
.product-icon { font-size: 2.2rem; margin-bottom: .8rem; }
.product-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--steel-dark);
    margin-bottom: .4rem;
    letter-spacing: .04em;
}
.product-desc { font-size: .85rem; color: var(--text-muted); line-height: 1.6; }

/* ===========================
   ABOUT SECTION
   =========================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.about-text h3 {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--steel-dark);
    margin-bottom: 1rem;
}
.about-text p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: .95rem;
}
.about-strengths {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .8rem;
}
.strength-item {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    font-size: .9rem;
    color: var(--text-primary);
}
.strength-icon {
    color: var(--rust-accent);
    font-size: 1rem;
    margin-top: .1rem;
    flex-shrink: 0;
}
.about-image {
    background: linear-gradient(135deg, var(--steel-dark), var(--steel-mid));
    border-radius: var(--radius-lg);
    aspect-ratio: 4/3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--silver);
    text-align: center;
    gap: 1rem;
    border: 2px solid rgba(255,255,255,.08);
    padding: 2rem;
}
.about-image-icon { font-size: 4rem; opacity: .6; }
.about-image-text { font-size: .9rem; opacity: .5; }

/* ===========================
   NEWS
   =========================== */
.news-list { display: flex; flex-direction: column; gap: 1.2rem; }
.news-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.6rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    transition: all var(--transition);
}
.news-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--rust-accent);
    transform: translateX(4px);
}
.news-date {
    flex-shrink: 0;
    background: var(--steel-dark);
    color: var(--gold-accent);
    font-family: var(--font-en);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
    padding: .4rem .7rem;
    border-radius: var(--radius);
    text-align: center;
    line-height: 1.4;
}
.news-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: .3rem;
    color: var(--steel-dark);
}
.news-excerpt { font-size: .875rem; color: var(--text-muted); }

/* ===========================
   CONTACT
   =========================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 3rem;
}
.contact-info h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    color: var(--steel-dark);
}
.contact-info-list { display: flex; flex-direction: column; gap: .9rem; }
.contact-info-item {
    display: flex;
    gap: .8rem;
    align-items: flex-start;
    font-size: .9rem;
}
.contact-info-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: .05rem; }
.contact-info-label { font-size: .75rem; color: var(--text-muted); display: block; }
.contact-info-value { font-weight: 500; color: var(--steel-dark); }
.contact-info-value a:hover { color: var(--rust-accent); }

/* Contact Form */
.contact-form { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; }
.contact-form h3 {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--steel-dark);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1.2rem; }
.form-group label {
    display: block;
    font-size: .85rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: .4rem;
}
.form-group label span { color: var(--rust-accent); }
.form-control {
    width: 100%;
    padding: .65rem .9rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: .9rem;
    font-family: var(--font-zh);
    color: var(--text-primary);
    background: var(--white);
    transition: border-color var(--transition);
    outline: none;
}
.form-control:focus { border-color: var(--rust-accent); }
textarea.form-control { resize: vertical; min-height: 120px; }

/* ===========================
   PAGE HERO (inner pages)
   =========================== */
.page-hero {
    background: linear-gradient(135deg, var(--steel-dark) 0%, var(--steel-mid) 100%);
    color: #fff;
    padding: 50px 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-hero::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--rust-accent), var(--gold-accent), var(--rust-accent));
}
.page-hero-title {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 700;
    letter-spacing: .06em;
}
.page-hero-subtitle {
    font-family: var(--font-en);
    font-size: .9rem;
    color: var(--iron-gray);
    margin-top: .4rem;
    letter-spacing: .15em;
    text-transform: uppercase;
}
.breadcrumb {
    max-width: 1200px;
    margin: 0 auto 1rem;
    font-size: .8rem;
    color: var(--iron-gray);
    display: flex;
    gap: .4rem;
    align-items: center;
}
.breadcrumb a:hover { color: var(--gold-accent); }
.breadcrumb-sep { opacity: .4; }

/* ===========================
   LINKS PAGE
   =========================== */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.2rem;
}
.link-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.6rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all var(--transition);
}
.link-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--rust-accent);
    transform: translateY(-2px);
    color: var(--rust-accent);
}
.link-card-icon { font-size: 1.5rem; }
.link-card-name { font-weight: 600; font-size: .95rem; }

/* ===========================
   ALERT / SUCCESS
   =========================== */
.alert {
    padding: 1rem 1.2rem;
    border-radius: var(--radius);
    margin-bottom: 1.2rem;
    font-size: .9rem;
    border-left: 4px solid;
}
.alert-success { background: #e8f8ee; color: #1a7a3c; border-color: #2ecc71; }
.alert-error   { background: #fdecea; color: #922b21; border-color: var(--rust-accent); }

/* ===========================
   FOOTER
   =========================== */
.site-footer {
    background: var(--steel-dark);
    color: var(--silver);
    padding-top: 50px;
    border-top: 3px solid var(--rust-accent);
}
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1.5fr 1fr;
    gap: 3rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-logo { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.footer-logo-icon {
    width: 44px; height: 44px;
    background: var(--rust-accent);
    color: #fff;
    font-family: var(--font-en);
    font-size: 1.1rem;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius);
    flex-shrink: 0;
}
.footer-logo-zh { font-size: 1rem; font-weight: 700; }
.footer-logo-en { font-size: .65rem; color: var(--iron-gray); letter-spacing: .1em; }
.footer-tagline { font-size: .85rem; color: var(--iron-gray); line-height: 1.8; }
.footer-title {
    font-family: var(--font-en);
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--gold-accent);
    margin-bottom: 1rem;
}
.footer-info-list { display: flex; flex-direction: column; gap: .6rem; font-size: .85rem; color: var(--iron-gray); }
.footer-info-list a:hover { color: var(--gold-accent); }
.footer-links { display: flex; flex-direction: column; gap: .5rem; }
.footer-links a { font-size: .875rem; color: var(--iron-gray); transition: color var(--transition); }
.footer-links a:hover { color: var(--gold-accent); }
.footer-bottom {
    padding: 1.2rem 0;
    text-align: center;
    font-size: .8rem;
    color: var(--iron-gray);
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 1024px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-video-wrap { max-width: 560px; margin: 0 auto; }
    .about-grid { grid-template-columns: 1fr; gap: 2rem; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .stats-inner { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}

@media (max-width: 768px) {
    .mobile-menu-btn { display: flex; }
    .nav-inner {
        flex-direction: column;
        align-items: stretch;
        display: none;
        padding: 0;
    }
    .nav-inner.open { display: flex; }
    .main-nav { position: static; }
    .nav-link { padding: .8rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,.06); border-left: none; }
    .hero { padding: 50px 1.2rem; }
    .section { padding: 50px 1.2rem; }
    .about-strengths { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .products-grid { grid-template-columns: 1fr 1fr; }
    .topbar-item:nth-child(3) { display: none; }
}

@media (max-width: 480px) {
    .products-grid { grid-template-columns: 1fr; }
    .stats-inner { grid-template-columns: repeat(2, 1fr); }
    .hero-ctas { flex-direction: column; }
    .btn { width: 100%; text-align: center; }
}
