/* ============================================
   JEM SHANGHAI – Redesign 2026
   Color: #2467AC (JEM Corporate Blue)
   ============================================ */

:root {
  --primary:       #2467AC;
  --primary-dark:  #1a4f8a;
  --primary-light: #4a89d0;
  --accent:        #58C0E6;
  --text-dark:     #222222;
  --text-mid:      #555555;
  --text-light:    #888888;
  --bg-white:      #FFFFFF;
  --bg-light:      #F5F7FA;
  --bg-gray:       #F0F2F5;
  --border:        #DDE2EA;
  --shadow-sm:     0 1px 4px rgba(0,0,0,.08);
  --shadow-md:     0 4px 16px rgba(0,0,0,.10);
  --radius:        6px;
  --radius-lg:     12px;
  --transition:    .25s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: "Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif;
       font-size: 15px; line-height: 1.7; color: var(--text-dark);
       background: var(--bg-white); }
img { max-width: 100%; height: auto; display: block; }
a   { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-light); }
ul  { list-style: none; }

/* ── Layout ── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.section    { padding: 72px 0; }
.section-sm { padding: 48px 0; }

/* ── Typography ── */
h1,h2,h3,h4 { font-weight: 700; line-height: 1.3; color: var(--text-dark); }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }
.text-center { text-align: center; }
.text-primary { color: var(--primary); }

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px;
}
.site-logo { display: flex; align-items: center; gap: 10px; }
.site-logo img { height: 40px; width: auto; }
.logo-text { display: none; }
.logo-text .en { font-size: .7rem; font-weight: 700; color: var(--text-mid);
                  letter-spacing: .05em; }
.logo-text .ja { font-size: .85rem; font-weight: 700; color: var(--text-dark); }

/* Nav */
.site-nav { display: flex; align-items: center; gap: 0; }
.site-nav a {
  display: block; padding: 0 16px; height: 70px; line-height: 70px;
  font-size: .88rem; font-weight: 600; color: var(--text-dark);
  border-bottom: 3px solid transparent; transition: all var(--transition);
  white-space: nowrap;
}
.site-nav a:hover,
.site-nav a.active { color: var(--primary); border-bottom-color: var(--primary); }
.site-nav a.nav-external { color: var(--primary); }
.site-nav a.nav-external:hover { color: var(--primary-dark); }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px;
             cursor: pointer; padding: 8px; border: none; background: none; }
.hamburger span { display: block; width: 24px; height: 2px;
                  background: var(--text-dark); border-radius: 2px;
                  transition: all var(--transition); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
  display: none; position: fixed; top: 70px; left: 0; right: 0;
  background: var(--bg-white); border-top: 1px solid var(--border);
  box-shadow: var(--shadow-md); z-index: 999; padding: 8px 0;
}
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: 13px 24px; font-size: .95rem;
                font-weight: 600; color: var(--text-dark); border-left: 3px solid transparent; }
.mobile-nav a:hover,
.mobile-nav a.active { color: var(--primary); border-left-color: var(--primary);
                        background: var(--bg-light); }

/* ============================================
   HERO (HOME)
   ============================================ */
.hero {
  position: relative; overflow: hidden;
  min-height: 520px; display: flex; align-items: center;
  background: #1a2a40 center/cover no-repeat;
  color: #fff;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(36,103,172,.75) 0%, rgba(0,0,0,.45) 100%);
}
.hero-content { position: relative; z-index: 1; max-width: 680px; }
.hero-content .label {
  font-size: .8rem; font-weight: 700; letter-spacing: .15em;
  text-transform: uppercase; color: rgba(255,255,255,.8);
  margin-bottom: 12px;
}
.hero-content h1 { color: #fff; margin-bottom: 16px; }
.hero-content p { font-size: 1.05rem; color: rgba(255,255,255,.9); margin-bottom: 28px; }

/* Page Hero (interior pages) */
.page-hero {
  background: var(--primary) center/cover no-repeat;
  position: relative; padding: 56px 0; color: #fff; text-align: center;
  overflow: hidden;
}
.page-hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg,rgba(26,79,138,.8),rgba(36,103,172,.6));
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; font-size: clamp(1.8rem,4vw,3rem); letter-spacing: .05em; }
.page-hero .sub { color: rgba(255,255,255,.8); font-size: .9rem; margin-top: 8px; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-block; padding: 12px 32px; border-radius: var(--radius);
  font-size: .9rem; font-weight: 700; transition: all var(--transition); cursor: pointer;
  letter-spacing: .03em;
}
.btn-primary { background: var(--primary); color: #fff; border: 2px solid var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.8); }
.btn-outline:hover { background: rgba(255,255,255,.15); color: #fff; }
.btn-sm { padding: 8px 20px; font-size: .82rem; }

/* ============================================
   CARDS GRID
   ============================================ */
.card-grid {
  display: grid; gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.card-grid-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--bg-white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  border: 1px solid var(--border);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card-img { aspect-ratio: 16/9; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover;
                transition: transform .4s ease; }
.card:hover .card-img img { transform: scale(1.04); }
.card-body { padding: 24px; }
.card-body h3 { margin-bottom: 10px; }
.card-body p  { color: var(--text-mid); font-size: .9rem; margin-bottom: 16px; }
.card-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .85rem; font-weight: 700; color: var(--primary);
}
.card-link::after { content: '›'; font-size: 1.1rem; }

/* Horizontal card (home featured) */
.card-h { display: flex; gap: 0; }
.card-h .card-img { width: 48%; flex-shrink: 0; aspect-ratio: auto; min-height: 260px; }
.card-h .card-body { padding: 36px; display: flex; flex-direction: column;
                      justify-content: center; }

/* ============================================
   SECTION HEADER
   ============================================ */
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { position: relative; display: inline-block; padding-bottom: 16px; }
.section-header h2::after {
  content: ''; display: block; width: 48px; height: 3px;
  background: var(--primary); margin: 12px auto 0;
  border-radius: 2px;
}
.section-header p { color: var(--text-mid); margin-top: 12px; font-size: .95rem; }

/* ============================================
   MINI INFO GRID (home sections)
   ============================================ */
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.info-card {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 4/3;
}
.info-card img { width: 100%; height: 100%; object-fit: cover; }
.info-card .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.65) 0%, transparent 55%);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 24px;
}
.info-card .overlay h3 { color: #fff; font-size: 1.1rem; margin-bottom: 4px; }
.info-card .overlay p  { color: rgba(255,255,255,.85); font-size: .85rem; margin-bottom: 12px; }
.info-card .overlay .btn { align-self: flex-start; }

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
  background: var(--bg-light); border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px;
                  align-items: center; font-size: .82rem; color: var(--text-light); }
.breadcrumb ol li + li::before { content: '›'; margin-right: 6px; }
.breadcrumb ol li a { color: var(--text-mid); }
.breadcrumb ol li a:hover { color: var(--primary); }
.breadcrumb ol li.active { color: var(--primary); }

/* ============================================
   SIDEBAR LAYOUT
   ============================================ */
.layout-with-sidebar { display: flex; gap: 40px; align-items: flex-start; }
.sidebar { width: 240px; flex-shrink: 0; }
.sidebar-title {
  background: var(--primary); color: #fff; padding: 16px 20px;
  font-size: .9rem; font-weight: 700; border-radius: var(--radius) var(--radius) 0 0;
}
.sidebar-nav { border: 1px solid var(--border); border-top: none;
               border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
.sidebar-nav a {
  display: block; padding: 13px 20px; font-size: .88rem;
  color: var(--text-dark); border-bottom: 1px solid var(--border);
  transition: all var(--transition);
}
.sidebar-nav a:last-child { border-bottom: none; }
.sidebar-nav a:hover { background: var(--bg-light); color: var(--primary); padding-left: 24px; }
.sidebar-nav a.active { background: var(--bg-light); color: var(--primary);
                         font-weight: 700; border-left: 3px solid var(--primary); }
.content-area { flex: 1; min-width: 0; }
.content-box {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.content-box-header {
  background: var(--bg-light); border-bottom: 2px solid var(--primary);
  padding: 20px 28px;
}
.content-box-header h2 { font-size: 1.2rem; color: var(--primary); }
.content-box-body { padding: 32px 28px; }

/* ============================================
   COMPANY TABLE
   ============================================ */
.info-table { width: 100%; border-collapse: collapse; }
.info-table th, .info-table td {
  padding: 12px 16px; text-align: left;
  border-bottom: 1px solid var(--border); font-size: .9rem;
}
.info-table th { background: var(--bg-light); color: var(--text-mid);
                  font-weight: 700; width: 140px; white-space: nowrap; }
.info-table td { color: var(--text-dark); }
.info-table tr:last-child th,
.info-table tr:last-child td { border-bottom: none; }

/* History section */
.history-list { margin-top: 32px; }
.history-list h3 { color: var(--primary); font-size: 1rem; margin-bottom: 16px; }
.history-list ul { display: flex; flex-direction: column; gap: 8px; }
.history-list li {
  padding: 10px 16px; background: var(--bg-light); border-radius: var(--radius);
  font-size: .88rem; color: var(--text-mid); line-height: 1.6;
  border-left: 3px solid var(--accent);
}

/* ============================================
   FACTORY / PRODUCT GALLERY
   ============================================ */
.section-block { margin-bottom: 48px; }
.section-block h3 {
  font-size: 1.05rem; color: var(--primary); border-left: 4px solid var(--primary);
  padding-left: 12px; margin-bottom: 16px;
}
.img-grid { display: grid; gap: 16px; }
.img-grid-2 { grid-template-columns: repeat(2, 1fr); }
.img-grid-3 { grid-template-columns: repeat(3, 1fr); }
.img-grid img { border-radius: var(--radius); width: 100%; object-fit: cover; }
.img-full img { border-radius: var(--radius); width: 100%; }

/* ============================================
   PRODUCT DETAIL
   ============================================ */
.product-figure {
  text-align: center; margin-bottom: 20px;
}
.product-figure img {
  max-width: 100%; border-radius: var(--radius); border: 1px solid var(--border);
}
.product-caption {
  margin-top: 10px; font-size: .88rem; color: var(--text-mid);
  font-style: italic;
}

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-map { width: 100%; height: 380px; border-radius: var(--radius-lg);
               overflow: hidden; border: 1px solid var(--border); margin-bottom: 40px; }
.contact-map iframe { width: 100%; height: 100%; border: none; }
.contact-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr));
                gap: 24px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-icon {
  width: 44px; height: 44px; border-radius: 50%; background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: #fff; font-size: 1.1rem;
}
.contact-text .label { font-size: .78rem; font-weight: 700; color: var(--text-light);
                        text-transform: uppercase; letter-spacing: .08em; }
.contact-text .value { font-size: .95rem; color: var(--text-dark); margin-top: 2px; }
.contact-text a { color: var(--primary); }

/* ============================================
   WORKS (RECRUIT)
   ============================================ */
.recruit-hero {
  position: relative; padding: 56px 0;
  background: #1a2a40 center/cover no-repeat;
  overflow: hidden;
}
.recruit-hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(36,103,172,.65), rgba(0,0,0,.5));
}
.recruit-hero .container { position: relative; z-index: 1; }
.recruit-hero h1 { color: #fff; }
.recruit-hero p   { color: rgba(255,255,255,.85); margin-top: 12px; }

.job-card {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: all var(--transition);
  text-align: center; padding-bottom: 28px;
}
.job-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.job-card .img-wrap { aspect-ratio: 4/3; overflow: hidden; background: var(--bg-gray); }
.job-card .img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.job-card h3 { margin: 20px 20px 8px; }
.job-card p  { font-size: .88rem; color: var(--text-mid); padding: 0 20px 16px; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer { background: var(--primary); color: rgba(255,255,255,.9); }
.footer-top { padding: 48px 0; }
.footer-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 48px;
               align-items: start; }
.footer-brand .logo-wrap { display: flex; align-items: center; gap: 10px;
                             margin-bottom: 14px; }
.footer-brand .logo-wrap img { display: none; }
.footer-brand .name { font-size: .95rem; font-weight: 700; color: #fff; }
.footer-brand p { font-size: .82rem; color: rgba(255,255,255,.7); line-height: 1.7; }
.footer-links h4 { color: rgba(255,255,255,.6); font-size: .75rem; letter-spacing: .1em;
                    text-transform: uppercase; margin-bottom: 12px; font-weight: 700; }
.footer-links ul { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-links ul li a { color: rgba(255,255,255,.85); font-size: .88rem; }
.footer-links ul li a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  padding: 16px 0; text-align: center; font-size: .78rem;
  color: rgba(255,255,255,.55);
}
.footer-bottom a { color: rgba(255,255,255,.65); margin: 0 10px; }
.footer-bottom a:hover { color: #fff; }

/* ============================================
   DIVIDER
   ============================================ */
.divider { width: 48px; height: 3px; background: var(--primary);
           border-radius: 2px; margin: 14px 0 24px; }
.divider-center { margin: 14px auto 24px; }

/* ============================================
   UTILITIES
   ============================================ */
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.bg-light { background: var(--bg-light); }
.bg-gray  { background: var(--bg-gray); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .site-nav { display: none; }
  .hamburger { display: flex; }
  .card-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .card-h { flex-direction: column; }
  .card-h .card-img { width: 100%; min-height: 200px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .layout-with-sidebar { flex-direction: column; }
  .sidebar { width: 100%; }
}

@media (max-width: 768px) {
  .section    { padding: 48px 0; }
  .section-sm { padding: 32px 0; }
  .hero       { min-height: 380px; }
  .card-grid-2 { grid-template-columns: 1fr; }
  .card-grid-3 { grid-template-columns: 1fr; }
  .info-grid   { grid-template-columns: 1fr; }
  .img-grid-2  { grid-template-columns: 1fr; }
  .img-grid-3  { grid-template-columns: repeat(2,1fr); }
  .contact-info { grid-template-columns: 1fr; }
  .contact-map  { height: 260px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .header-inner { height: 60px; }
  .mobile-nav { top: 60px; }
  .page-hero { padding: 40px 0; }
  .img-grid-3 { grid-template-columns: 1fr; }
  .content-box-body { padding: 20px 16px; }
}
