/* ====== Reset & Base ====== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Noto Sans TC', 'Source Han Sans', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: #333; background: #fff; line-height: 1.6; overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
.container { width: 1200px; max-width: 100%; margin: 0 auto; padding: 0 20px; }

/* ====== Header ====== */
.header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    background: rgba(255,255,255,0.95); backdrop-filter: blur(8px);
    box-shadow: 0 1px 6px rgba(0,0,0,0.08); transition: background .3s, box-shadow .3s;
}
.header-inner {
    width: 1200px; max-width: 100%; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px; height: 70px;
}
.logo a { color: inherit; text-decoration: none; }
.logo strong { font-size: 18px; color: #333; white-space: nowrap; }
.main-nav ul { display: flex; }
.main-nav ul li { position: relative; }
.main-nav ul li a {
    display: block; padding: 0 24px; line-height: 70px;
    font-size: 15px; color: #333; transition: color .3s; position: relative;
}
.main-nav ul li a::after {
    content: ''; position: absolute; bottom: 0; left: 50%;
    transform: translateX(-50%); width: 0; height: 3px;
    background: #003686; transition: width .3s;
}
.main-nav ul li a:hover,
.main-nav ul li a.active { color: #003686; }
.main-nav ul li a:hover::after,
.main-nav ul li a.active::after { width: 60%; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #333; transition: .3s; }

/* ====== Hero Slider ====== */
.hero-slider { position: relative; width: 100%; height: 560px; overflow: hidden; margin-top: 70px; }
.slides { position: relative; width: 100%; height: 100%; }
.slide {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: 0; transition: opacity 1s ease-in-out;
}
.slide.active { opacity: 1; }
.slider-arrows {
    position: absolute; top: 50%; left: 0; right: 0; transform: translateY(-50%);
    display: flex; justify-content: space-between; padding: 0 30px;
    pointer-events: none; z-index: 10;
}
.arrow {
    pointer-events: auto; background: rgba(0,0,0,0.3); color: #fff; border: none;
    width: 50px; height: 50px; font-size: 22px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; transition: background .3s;
}
.arrow:hover { background: rgba(0,0,0,0.6); }
.slider-dots {
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 12px; z-index: 10;
}
.dot {
    width: 12px; height: 12px; border-radius: 50%;
    background: rgba(255,255,255,0.5); cursor: pointer; transition: background .3s, transform .3s;
}
.dot.active { background: #fff; transform: scale(1.2); }

/* ====== Section Titles ====== */
.section-title {
    text-align: center; font-size: 36px; font-weight: 700;
    margin-bottom: 50px; position: relative;
}
.section-title::after {
    content: ''; display: block; width: 60px; height: 3px;
    background: #003686; margin: 14px auto 0;
}
.section-title .orange { color: #ef7700; }
.section-title .blue { color: #003686; }
.white-title { color: #fff; }
.white-title::after { background: #fff; }

/* 首页三列区：原站 inner 1200px、列表约 1176px 宽，左右约 12px 边距；避免 .container 20px 导致 1160px 放不下 380×3+gap */
.services > .container,
.cases > .container.cases-inner {
    padding-left: 12px;
    padding-right: 12px;
}

/* ====== Services Section (Homepage) — 对齐 jappnsu.com/sy ====== */
.services {
    position: relative;
    padding: 120px 0 110px;
    background-color: #2a2a2a;
    background-image: url('images/services-section-bg.jpg');
    background-position: 50% 50%;
    background-repeat: no-repeat;
    background-size: cover;
    overflow: hidden;
}
.services-section-title {
    color: #fff;
    font-size: 46px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 50px;
    text-align: center;
    text-shadow: 0 1px 12px rgba(0,0,0,0.35);
}
.services-section-title::after { display: none; }
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
    width: 100%;
    max-width: 1176px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    align-items: stretch;
}
.service-card {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    height: 438px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    box-sizing: border-box;
    cursor: pointer;
    text-decoration: none;
}
.service-card-bg {
    position: absolute;
    inset: 0;
    background-position: 50% 50%;
    background-repeat: no-repeat;
    background-size: cover;
}
.service-card-hover-sheet {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-color: #eee;
    opacity: 0.88;
    transform: translateY(100%);
    transition: transform .35s ease;
    pointer-events: none;
}
.service-card:hover .service-card-hover-sheet {
    transform: translateY(0);
}
.service-card-body {
    position: absolute;
    left: 13px;
    right: 13px;
    top: 76px;
    bottom: 57px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    box-sizing: border-box;
    pointer-events: none;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .3s ease .05s, transform .3s ease .05s;
}
.service-card:hover .service-card-body {
    opacity: 1;
    transform: translateY(0);
}
.service-card-body .service-icon,
.service-card-body h3,
.service-card-body .service-card-more {
    pointer-events: auto;
}
.service-card-body .service-icon {
    width: 71px;
    height: 71px;
    object-fit: contain;
    margin-bottom: 22px;
}
.service-card-body h3 {
    color: #333;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 auto;
    text-align: center;
}
.service-card-more {
    margin: 0;
    flex-shrink: 0;
    border-color: #003686;
    color: #003686;
}
.service-card-more:hover {
    background: #003686;
    color: #fff;
}
.card-bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 89px;
    z-index: 3;
    background: rgba(0, 54, 134, 0.6);
    display: flex;
    align-items: center;
    padding: 0 28px;
    box-sizing: border-box;
    transition: opacity .3s ease;
}
.service-card:hover .card-bottom-bar {
    opacity: 0;
}
.bar-text {
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    font-family: 'Source Han Sans', 'Noto Sans TC', sans-serif;
    letter-spacing: 0.02em;
}

/* ====== Buttons ====== */
.btn {
    display: inline-block; padding: 8px 30px; font-size: 14px;
    border-radius: 4px; transition: all .3s; cursor: pointer;
}
.btn-outline { border: 2px solid #fff; color: #fff; background: transparent; }
.btn-outline:hover { background: #fff; color: #003686; }
.btn-outline-dark { border: 1px solid #003686; color: #003686; background: transparent; border-radius: 0; }
.btn-outline-dark:hover { background: #003686; color: #fff; }
.btn-primary { border: 2px solid #003686; color: #003686; background: transparent; }
.btn-primary:hover { background: #003686; color: #fff; }

/* ====== Cases Section (Homepage) — 对齐原站 listproduct Style6 ====== */
.cases {
    padding: 72px 0 64px;
    background: #fff;
}
.cases-inner { max-width: 1200px; }
.cases-heading {
    text-align: center;
    font-size: 46px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 32px;
    color: #000;
}
.cases-heading::after { display: none; }
.cases-heading .orange { color: #ef7700; }
.cases-heading .blue { color: #003686; }
.cases-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
    width: 100%;
    max-width: 1176px;
    margin: 0 auto 40px;
    padding: 0;
    align-items: start;
}
.case-card {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid transparent;
    list-style: none;
    transition: box-shadow .2s linear, border-color .2s linear;
}
.case-card:hover {
    border-color: rgba(228, 57, 57, 0.35);
    box-shadow: 0 6px 24px rgba(0,0,0,0.08);
}
.case-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    outline: none;
}
.case-image {
    width: 100%;
    height: 388px;
    overflow: hidden;
    margin: 0;
    padding: 0;
    background: #f0f0f0;
}
.case-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s linear;
}
.case-card:hover .case-img { transform: scale(1.04); }
.case-info {
    margin: 0;
    padding: 10px 10px 12px;
    text-align: center;
    background: #fff;
    border-top: 1px solid #eee;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.case-title {
    margin: 0;
    padding: 0;
    line-height: 28px;
    min-height: 28px;
    font-size: 14px;
    font-weight: 400;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}
.cases-more-wrap {
    text-align: center;
    margin: 8px 0 0;
    padding: 0;
}
.cases-more-btn {
    display: inline-block;
    min-width: 160px;
    height: 36px;
    line-height: 34px;
    padding: 0 20px;
    font-size: 14px;
    color: #003686;
    text-align: center;
    border: 1px solid #003686;
    border-radius: 0;
    background: transparent;
    transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.cases-more-btn:hover {
    background: #003686;
    color: #fff;
    border-color: #2188ca;
}

/* ====== Footer ====== */
.footer { background: #444; color: #ccc; padding: 50px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 60px; padding-bottom: 30px; }
.footer-col h4 {
    color: #fff; font-size: 18px; margin-bottom: 20px;
    position: relative; padding-bottom: 10px;
}
.footer-col h4::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 40px; height: 2px; background: #ef7700;
}
.footer-nav li { margin-bottom: 10px; }
.footer-nav li a { color: #aaa; font-size: 14px; transition: color .3s; }
.footer-nav li a:hover { color: #fff; }
.contact-info p { font-size: 14px; color: #aaa; margin-bottom: 8px; line-height: 1.8; }
.contact-info strong { color: #ddd; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 16px 0; text-align: center; font-size: 12px; color: #989898;
}

/* ====== Page Banner (All Sub-pages) ====== */
.page-banner {
    position: relative; width: 100%; height: 480px; margin-top: 70px;
    overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.page-banner-bg {
    position: absolute; inset: 0;
    background-position: center center; background-size: cover; background-repeat: no-repeat;
}
.page-banner-title {
    position: relative; z-index: 2; text-align: center;
}
.page-banner-title h1 {
    color: #fff; font-size: 36px; font-weight: 700; letter-spacing: 4px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.breadcrumb-bar {
    width: 100%; height: 50px; background: #fff;
    display: flex; align-items: center; border-bottom: 1px solid #eee;
}
.breadcrumb-bar .container { display: flex; align-items: center; }
.breadcrumb { font-size: 13px; color: #666; }
.breadcrumb a { color: #666; transition: color .3s; }
.breadcrumb a:hover { color: #48B6F8; }
.breadcrumb .sep { margin: 0 6px; color: #999; }

/* ====== About Page ====== */
.about-section { padding: 70px 0 90px; background: #fff; }
.about-content { max-width: 900px; margin: 0 auto; line-height: 2; color: #555; font-size: 15px; }
.about-content p { margin-bottom: 18px; text-indent: 2em; }

/* ====== Sub-page List Pages (Services/Cases) ====== */
.list-page { padding: 60px 0 80px; background: #f8f9fb; }

/* ====== Contact Page ====== */
.contact-hero {
    position: relative;
    height: 356px;
    box-sizing: border-box;
    background: #fff;
    overflow: hidden;
}
.contact-hero-title {
    text-align: center;
    font-size: 46px;
    font-weight: 700;
    margin: 0;
    padding-top: 77px;
    line-height: 1.2;
}
.contact-hero-title .orange { color: #ef7700; }
.contact-hero-title .blue { color: #003686; }
.contact-hero-info {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1198px;
    max-width: 100%;
    height: 175px;
    background: linear-gradient(to bottom, #107bb0, #0eacc1);
}
.contact-hero-info .container {
    position: relative;
    height: 100%;
}
.contact-hero-company {
    position: absolute;
    left: 21px;
    top: 87px;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    font-family: 'Source Han Sans', 'Noto Sans TC', sans-serif;
    margin: 0;
    white-space: nowrap;
}
.contact-hero-line {
    position: absolute;
    left: 21px;
    top: 117px;
    width: 465px;
    height: 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.5);
}
.contact-section {
    padding: 20px 0 60px;
}
.contact-content {
    position: relative;
    width: 1198px;
    max-width: 100%;
    height: 636px;
    margin: 0 auto;
    background: #f3f3f3;
}
.contact-content .form-desc {
    position: absolute;
    left: 54px; top: 27px;
    width: 581px;
    font-size: 16px; color: #555; line-height: 1.75;
    text-align: justify; margin: 0;
}
.contact-info-block {
    position: absolute;
    left: 63px; top: 101px;
    width: 950px;
    margin: 0;
}
.contact-info-block .info-line {
    font-size: 16px; color: #333; line-height: 1.75;
    font-family: 'Source Han Sans', 'Noto Sans TC', sans-serif;
    text-align: justify; margin: 0;
}
.contact-form {
    position: absolute;
    left: 50px; top: 295px;
    width: 1102px;
}
.form-row-double {
    display: flex; gap: 0;
    margin-bottom: 10px;
}
.form-row-double .form-field { flex: 1; }
.form-row-double .form-field:first-child { margin-right: 10px; }
.form-field input,
.form-field textarea {
    width: 100%; padding: 10px 12px;
    border: 1px solid #ddd; border-radius: 0;
    font-size: 14px; font-family: inherit; background: #fff;
    transition: border-color .3s; box-sizing: border-box;
    color: #333;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: #aaa; }
.form-field input:focus,
.form-field textarea:focus { outline: none; border-color: #003686; }
.form-field textarea { resize: vertical; margin-bottom: 10px; }
.form-row-captcha {
    display: flex; align-items: stretch; gap: 0; margin-bottom: 15px;
}
.form-row-captcha .captcha-input { flex: 0 0 auto; }
.form-row-captcha .captcha-input input { width: 200px; border-right: none; }
.captcha-img {
    flex: 0 0 auto;
    display: flex; align-items: center;
    border: 1px solid #ddd; border-left: none;
    padding: 0 4px;
    background: #f5f5f5;
}
.captcha-img img { height: 36px; display: block; cursor: pointer; }
.captcha-img canvas { display: block; cursor: pointer; }
.btn-submit {
    display: inline-block; padding: 8px 36px;
    background: #003686; color: #fff; border: none; border-radius: 0;
    font-size: 14px; cursor: pointer; transition: background .3s;
    letter-spacing: 2px;
}
.btn-submit:hover { background: #002a6a; }

/* ====== Scroll Animations ====== */
.fade-target {
    opacity: 0; transform: translateY(24px);
    transition: opacity .6s ease, transform .6s ease;
}
.fade-target.visible { opacity: 1; transform: translateY(0); }

/* ====== Responsive ====== */
@media (max-width: 1200px) {
    .header-inner, .container { width: 100%; padding: 0 20px; }
    .services > .container,
    .cases > .container.cases-inner {
        padding-left: 12px;
        padding-right: 12px;
    }
    .contact-content {
        width: 100%;
    }
    .contact-form {
        width: calc(100% - 96px);
    }
    .contact-info-block {
        width: calc(100% - 126px);
    }
}
@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .main-nav {
        position: fixed; top: 70px; left: 0; width: 100%;
        background: rgba(255,255,255,0.98); box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        transform: translateY(-100%); opacity: 0; pointer-events: none;
        transition: transform .3s, opacity .3s;
    }
    .main-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
    .main-nav ul { flex-direction: column; }
    .main-nav ul li a { line-height: 50px; padding: 0 20px; border-bottom: 1px solid #f0f0f0; }
    .hero-slider { height: 360px; }
    .section-title { font-size: 28px; margin-bottom: 36px; }
    .cases-heading { font-size: 32px; margin-bottom: 28px; }
    .cases-more-btn { min-width: 140px; }
    .services { padding: 48px 0 56px; }
    .services-section-title { font-size: 32px; margin-bottom: 28px; }
    .services-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
    .service-card { height: 380px; }
    .service-card-body { top: 60px; bottom: 50px; }
    .card-bottom-bar { height: 70px; }
    .cases { padding: 56px 0; }
    .cases-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto 32px;
    }
    .case-image { height: 280px; }
    .case-info { }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .page-banner { height: 280px; }
    .page-banner-title h1 { font-size: 28px; }
    .about-section, .list-page, .contact-section { padding: 40px 0 50px; }
    .contact-hero { height: 260px; }
    .contact-hero-title { font-size: 32px; padding-top: 50px; }
    .contact-hero-info { height: 120px; }
    .contact-hero-company { font-size: 18px; left: 10px; top: 55px; }
    .contact-hero-line { left: 10px; top: 80px; width: 260px; }
    .contact-section { padding: 20px 0 30px; }
    .contact-content {
        position: static; width: auto; height: auto; padding: 0 20px;
    }
    .contact-content .form-desc {
        position: static; width: auto; margin-bottom: 20px;
    }
    .contact-info-block {
        position: static; width: auto; margin-bottom: 30px;
    }
    .contact-form {
        position: static; width: auto;
    }
    .form-row-double { flex-direction: column; gap: 10px; }
    .form-row-captcha .captcha-input input { width: 160px; }
}
@media (max-width: 480px) {
    .hero-slider { height: 240px; }
    .logo strong { font-size: 14px; }
    .section-title { font-size: 24px; }
    .page-banner { height: 200px; }
    .page-banner-title h1 { font-size: 24px; }
}
