@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@1,400;1,500&display=swap');
@media (max-width: 768px) {
    .hero {
        aspect-ratio: 4 / 5; /* taller on mobile */
    }
    .hero-text {
        align-items: center;
        text-align: center;
        padding-right: 5%;
        padding-left: 5%;
    }
}

html {
    scroll-behavior: smooth;
}

body 
  { margin: 0; padding: 0; box-sizing: border-box;
   background-color: #fff;
   font-family: 'Noto Sans TC', sans-serif;
}

/* ===== Header ===== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 0 60px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: 0.3s;
    z-index: 999;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(8px);
    box-sizing: border-box;
}

header.scrolled {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

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

nav {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

nav a {
    color: #1a2f6e;
    text-decoration: none;
    font-size: 0.92rem;
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 400;
    letter-spacing: 0.05em;
    position: relative;
    padding-bottom: 4px;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #cc2229;
    transition: width 0.25s ease;
}

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

nav a:hover {
    opacity: 1;
    color: #cc2229;
}

nav a.active {
    color: #cc2229;
}

/* 語言切換 */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.lang-btn {
    background: none;
    border: none;
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 0.78rem;
    color: #888;
    cursor: pointer;
    padding: 4px 2px;
    letter-spacing: 0.05em;
    transition: color 0.2s;
}

.lang-btn:hover {
    color: #1a2f6e;
}

.lang-btn.active {
    color: #cc2229;
    font-weight: 500;
}

.lang-divider {
    color: #ddd;
    font-size: 0.75rem;
}


/* ===== Hero ===== */
.hero {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 7;
    overflow: hidden;
    margin-top: 80px;
}

.hero img,
.hero video {
    position: absolute;
    inset: 0;
    z-index: 1; 
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
   background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.25) 0%,
        rgba(0, 0, 0, 0.55) 45%,
        rgba(0, 0, 0, 0.75) 100%
    );
}

.hero-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    text-align: right;
    padding-right: 8%;
    padding-top: 60px;
    z-index: 3;
}

.hero-text h1 {
    font-family: 'Barlow Condensed', sans-serif;
    font-style: italic;
    font-weight: 600;
    font-size: clamp(3.5rem, 7vw, 6.5rem);
    color: #ffffff;
    line-height: 1.15;
    letter-spacing: 0.02em;
    margin-bottom: 1.2rem;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}

.hero-text p {
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 300;
    font-size: clamp(0.85rem, 1.4vw, 1.05rem);
    color: rgba(255,255,255,0.8);
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
    text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

.hero-btn {
    display: inline-block;
    background: transparent;
    color: #fff;
    text-decoration: none;
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 400;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    padding: 12px 32px;
    border: 1px solid rgba(255,255,255,0.7);
    border-radius: 4px;
    transition: background 0.2s, border-color 0.2s;
}

.hero-btn:hover {
    background: rgba(255,255,255,0.15);
    border-color: #fff;
}

/* services */
.products {
    padding: 60px 0;
    text-align: center;
    background: #f8f9fb;
}

.products p {
    font-size: 0.95rem;
    color: #888;
    margin-bottom: 2.5rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin: 0 50px;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    padding-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(26, 47, 110, 0.15);
}

.card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    overflow: hidden;
    border-radius: 8px;
}

.card-icon {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: #da3b13;
    color: rgb(231, 206, 206);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.product-card h4 {
    margin: 2.5rem 1.2rem 0.5rem;
    font-size: 1rem;
    color: #222;
}

.product-card p {
    margin: 0 1.2rem;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.6;
}

.card-btn {
    display: inline-block;
    align-self: center;
    margin: 1rem 1.2rem 0;
    color: #cc2229;
    text-decoration: none;
    font-size: 0.9rem;
    border: 1px solid #cc2229;
    padding: 6px 16px;
    border-radius: 4px;
}

/* Applications */
.applications {
    padding: 60px 0;
    text-align: center;
    overflow: hidden;
    background: #fff;
}

.applications .subtitle {
    font-size: 0.95rem;
    color: #888;
    margin-bottom: 2.5rem;
}

.slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 60px;
}

.slider-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    width: 100%;
    padding: 10px 80px;
    scrollbar-width: none;
}

.slider-track::-webkit-scrollbar {
    display: none;
}

.slide-card {
    flex: 0 0 50%;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16 / 9;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.slide-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    padding: 3rem 2rem 1.5rem;
    text-align: left;
    color: #fff;
}

.slide-overlay h4 {
    font-family: 'Noto Serif TC', serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.slide-overlay p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.85);
}

.slider-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #1a2f6e;
    background: #fff;
    color: #1a2f6e;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    z-index: 10;
    line-height: 1;
}

.slider-btn:hover {
    background: #1a2f6e;
    color: #fff;
}

/* Brands */
.brands {
    padding: 60px 0;
    text-align: center;
    overflow: hidden;
    background: #f8f9fb;
}


.brands .subtitle {
    color: #888;
    font-size: 1rem;
    margin-bottom: 3rem;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin: 0 40px;
}

.brand-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 3 / 2;
    border: 2px solid #e8edf5;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    cursor: pointer;
}

.brand-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 12px 30px rgba(26, 47, 110, 0.15);
    border-color: #cc2229;
}

.brand-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(30%);
    transition: filter 0.3s;
}

.brand-card:hover img {
    filter: grayscale(0%);
}

.card-btn:hover {
    color: #cc2229;
    border-color: #cc2229;
}

/* Inquiry */
.inquiry {
    padding: 60px 0;
    text-align: center;
    background: #fff;
}

.inquiry .subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
    color: #888;
}

.inquiry-form {
    display: flex;
    align-items: stretch;
    background: #ffffff;
    border-radius: 16px;
    border: 2px solid #cc2229;
    margin: 2rem auto;
    overflow: hidden;
    max-width: 1300px;
}

.form-col {
    flex: 1;
    padding: 2rem;
    text-align: left;
}

.form-col-right {
    display: flex;
    flex-direction: column;
}

.form-col h3 {
    font-size: 0.8rem;
    color: #cc2229;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1.2rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #ffcccc;
}

.form-group {
    margin-bottom: 0.9rem;
}

.form-group label {
    display: block;
    font-size: 0.78rem;
    color: #999;
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 90%;
    padding: 8px 12px;
    border: 1px solid #eee;
    border-radius: 6px;
    font-size: 0.88rem;
    color: #333;
    background: #fafafa;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
    resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #cc2229;
    background: #fff;
}

/* Upload */
.upload-area {
    border: 1px dashed #ffaaaa;
    border-radius: 6px;
    background: #fafafa;
    cursor: pointer;
}

.upload-placeholder {
    padding: 0.6rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #cc2229;
}

.upload-hint {
    font-size: 0.75rem;
    color: #bbb;
}

.preview-area {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0 0.8rem 0.8rem;
}

.preview-area img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

/* Submit */
.form-submit {
    margin-top: auto;
    text-align: right;
}

.submit-btn {
    background: #cc2229;
    color: #fff;
    border: none;
    padding: 12px 36px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, transform 0.2s;
    font-family: inherit;
}

.submit-btn:hover {
    background: #a81c22;
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background: #1a2f6e;
    padding: 30px 60px 20px; /* ← 左右60px控制與頁面距離 */
    color: #fff;
}

.footer-main {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.footer-logo img {
    height: 45px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-divider {
    width: 1px;
    height: 20px;
    background: rgba(255,255,255,0.3);
    flex-shrink: 0;
}

.footer-main p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    margin: 0;
    white-space: nowrap;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.4);
}

.back-to-top {
    position: fixed;
    bottom: 4rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: #fff;        /* ← 白色底 */
    color: #cc2229;             /* ← 紅色箭頭 */
    border: 3px solid #cc2229;  /* ← 紅色粗框 */
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 999;
    font-weight: 700;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #cc2229;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(204, 34, 41, 0.4);
}

.products h2,
.applications h2,
.brands h2,
.inquiry h2 {
    font-family: 'Noto Serif TC', serif;
    font-size: clamp(2.2rem, 3.5vw, 2.8rem);   /* ← unified */
    font-weight: 800;
    color: #1a2f6e;
    margin-bottom: 0.8rem;
    letter-spacing: 0.01em;
}

.inquiry h2 {
    color: #cc2229;  /* keep the red for inquiry only */
}

/* Unified subtitle */
.products .subtitle,
.applications .subtitle,
.brands .subtitle,
.inquiry .subtitle,
.products > .container > p {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 1rem;
    color: #888;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

/* ===== EN version — typography overrides ===== */

/* Navigation */
.lang-en nav a,
.lang-en .lang-btn {
    font-family: 'Montserrat', sans-serif;
}

/* Page 1 hero subtitle & button */
.lang-en .hero-text p,
.lang-en .hero-btn {
    font-family: 'Montserrat', sans-serif;
}

/* Section h2 titles */
.lang-en .products h2,
.lang-en .applications h2,
.lang-en .brands h2,
.lang-en .inquiry h2 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    letter-spacing: 0.005em;
}

/* Subtitles */
.lang-en .products .subtitle,
.lang-en .applications .subtitle,
.lang-en .brands .subtitle,
.lang-en .inquiry .subtitle,
.lang-en .products > .container > p {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}

/* Service card titles */
.lang-en .product-card h4,
.lang-en .slide-overlay h4 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 1.3rem;
    letter-spacing: 0.01em;
}

/* Card body */
.lang-en .product-card p,
.lang-en .slide-overlay p {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    line-height: 1.7;
}

/* Form */
.lang-en .form-col h3 {
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.12em;
}

.lang-en .form-group label,
.lang-en .form-group input,
.lang-en .form-group textarea,
.lang-en .submit-btn,
.lang-en .card-btn,
.lang-en .upload-placeholder {
    font-family: 'Montserrat', sans-serif;
}

/* Footer */
.lang-en .footer-main p,
.lang-en .footer-bottom p {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
}
/* ===== RESPONSIVE — Mobile & Tablet ===== */

/* === Tablet (768px and below) === */
@media (max-width: 768px) {

    /* Header */
    header {
        padding: 0 20px;
        height: 60px;
    }

    .logo-container img {
        height: 40px;
    }

    nav {
        display: none; /* hide nav links — we'll add hamburger later */
    }

    .lang-switcher {
        font-size: 0.7rem;
    }

    /* Hero */
    .hero {
        aspect-ratio: auto;
        height: 85vh;
        margin-top: 60px;
    }

    .hero-text {
        align-items: center;
        text-align: center;
        padding: 0 6%;
        padding-top: 0;
    }

    .hero-text h1 {
        font-size: clamp(2.5rem, 10vw, 3.5rem);
    }

    .hero-text p {
        font-size: 0.85rem;
    }

    .hero-overlay {
        background: rgba(0, 0, 0, 0.5);
    }

    /* Services */
    .products {
        padding: 40px 0;
    }

    .products h2 {
        font-size: 1.8rem;
    }

    .product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        margin: 0 20px;
    }

    /* Applications slider */
    .applications {
        padding: 40px 0;
    }

    .applications h2 {
        font-size: 1.8rem;
    }

    .slider-wrapper {
        padding: 0 20px;
    }

    .slider-track {
        padding: 10px 20px;
    }

    .slide-card {
        flex: 0 0 85%;
    }

    .slider-btn {
        width: 36px;
        height: 36px;
        font-size: 1.4rem;
    }

    /* Brands */
    .brands {
        padding: 40px 0;
    }

    .brands h2 {
        font-size: 1.8rem;
    }

    .brands-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        margin: 0 20px;
    }

    /* Inquiry form */
    .inquiry {
        padding: 40px 0;
    }

    .inquiry h2 {
        font-size: 1.8rem;
    }

    .inquiry-form {
        flex-direction: column;
        margin: 1rem 20px;
        border-radius: 12px;
    }

    .form-col {
        padding: 1.5rem;
    }

    .form-group input,
    .form-group textarea {
        width: 100%;
    }

    /* Footer */
    .footer {
        padding: 20px;
    }

    .footer-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .footer-divider {
        display: none;
    }

    .footer-main p {
        white-space: normal;
        font-size: 0.8rem;
    }

    /* Back to top */
    .back-to-top {
        bottom: 2rem;
        right: 1rem;
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }
}

/* ===== Hamburger Menu ===== */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #1a2f6e;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    nav {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        gap: 1.5rem;
        box-shadow: 0 8px 30px rgba(0,0,0,0.1);
        z-index: 1000;
    }

    nav.open {
        display: flex;
    }

    nav a {
        font-size: 1.1rem;
    }

    .lang-switcher {
        display: none;
    }

    header {
        padding: 0 20px;
        height: 60px;
    }
}
/* === Phone (480px and below) === */
@media (max-width: 480px) {

    .hero-text h1 {
        font-size: clamp(2rem, 9vw, 2.8rem);
    }

    .hero-text p {
        font-size: 0.78rem;
        margin-bottom: 1.5rem;
    }

    .hero-btn {
        font-size: 0.78rem;
        padding: 10px 24px;
    }

    .product-grid {
        grid-template-columns: 1fr;
        margin: 0 16px;
    }

    .product-card h4 {
        font-size: 0.9rem;
    }

    .slide-card {
        flex: 0 0 95%;
    }

    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
        margin: 0 16px;
    }

    .inquiry-form {
        margin: 1rem 16px;
    }

    .submit-btn {
        width: 100%;
    }
}