/* ============ JRY corporate site — main.css ============ */
:root {
  --primary: #1a56db;
  --primary-dark: #123c9e;
  --navy: #0a1a33;
  --navy-2: #10254a;
  --text: #24303f;
  --muted: #66788c;
  --light: #f5f7fa;
  --border: #e3e9f1;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 2px 14px rgba(16, 37, 74, 0.08);
  --shadow-lg: 0 10px 34px rgba(16, 37, 74, 0.14);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.center { text-align: center; margin-top: 36px; }
.muted { color: var(--muted); }

/* ---------- Language switch (in navbar) ---------- */
.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; flex: none; }
.lang-switch button {
  background: transparent; color: var(--muted); border: 0; padding: 7px 13px;
  font-size: 13px; cursor: pointer; transition: all .15s;
}
.lang-switch button:hover:not(.active) { background: var(--light); }
.lang-switch button.active { background: var(--primary); color: #fff; }

/* ---------- Navbar ---------- */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow);
}
.navbar-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  background: var(--primary); color: #fff; font-weight: 800; font-size: 20px;
  padding: 8px 12px; border-radius: 8px; letter-spacing: 1px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { color: var(--navy); font-size: 18px; }
.brand-text small { color: var(--muted); font-size: 11px; max-width: 220px; }

.nav-menu { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav-menu > a, .nav-item > a {
  color: var(--text); font-size: 15px; font-weight: 500;
  padding: 8px 14px; border-radius: 6px; display: block;
}
.nav-menu > a:hover, .nav-item > a:hover,
.nav-menu > a.active, .nav-item > a.active { color: var(--primary); background: #eef3fd; }

.nav-cta {
  background: var(--primary) !important; color: #fff !important;
  padding: 9px 22px !important; border-radius: 6px;
}
.nav-cta:hover { background: var(--primary-dark) !important; }

.nav-item { position: relative; }
.dropdown {
  position: absolute; top: 100%; left: 0; min-width: 180px;
  background: var(--white); border-radius: 8px; box-shadow: var(--shadow-lg);
  padding: 8px; opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all .18s ease; z-index: 110;
}
.nav-item:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a { display: block; padding: 8px 14px; color: var(--text); font-size: 14px; border-radius: 6px; }
.dropdown a:hover { background: #eef3fd; color: var(--primary); }

.nav-toggle { display: none; background: none; border: 0; font-size: 26px; cursor: pointer; color: var(--navy); }

/* ---------- Hero carousel ---------- */
.hero-carousel { position: relative; height: 520px; overflow: hidden; background: var(--navy); }
.carousel-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .7s ease;
}
.carousel-slide.active { opacity: 1; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel-slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10,26,51,.72) 0%, rgba(10,26,51,.30) 60%, rgba(10,26,51,.15) 100%);
}
.slide-caption {
  position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 100%; max-width: 1200px; padding: 0 20px; color: #fff; text-align: center;
}
.slide-caption h2 { font-size: 44px; font-weight: 700; text-shadow: 0 2px 12px rgba(0,0,0,.4); }
.slide-caption p { font-size: 18px; margin: 12px 0 22px; opacity: .92; }

.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.22); color: #fff; font-size: 28px; line-height: 1;
  backdrop-filter: blur(3px);
}
.carousel-arrow:hover { background: var(--primary); }
.carousel-arrow.prev { left: 24px; }
.carousel-arrow.next { right: 24px; }

.carousel-dots {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 10px; z-index: 3;
}
.carousel-dot {
  width: 34px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.4);
  cursor: pointer; transition: background .2s;
}
.carousel-dot.active { background: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 11px 28px; border-radius: 6px; font-size: 15px;
  font-weight: 600; cursor: pointer; border: 0; transition: all .18s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-light { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.5); }
.btn-light:hover { background: #fff; color: var(--navy); }
.btn-block { width: 100%; margin-top: 8px; }

/* ---------- Stats bar ---------- */
.stats-bar { background: var(--navy); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat-item { text-align: center; padding: 34px 10px; }
.stat-value { display: block; font-size: 38px; font-weight: 800; color: #fff; }
.stat-value::after { content: ""; }
.stat-label { color: #9fb4d4; font-size: 14px; margin-top: 4px; display: block; }

/* ---------- Sections ---------- */
.section { padding: 76px 0; }
.section-gray { background: var(--light); }
.section-dark { background: var(--navy); }
.section-dark h2 { color: #fff; }
.section-dark .section-sub { color: #9fb4d4; }

.section-head { text-align: center; margin-bottom: 48px; }
.section-head h2 { font-size: 32px; color: var(--navy); position: relative; display: inline-block; padding-bottom: 14px; }
.section-head h2::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 0; width: 56px; height: 3px; background: var(--primary); border-radius: 2px;
}
.section-sub { color: var(--muted); margin-top: 10px; letter-spacing: 2px; text-transform: uppercase; font-size: 13px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ---------- Cards ---------- */
.card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

.capability-card { padding: 30px 26px; }
.capability-icon {
  width: 62px; height: 62px; border-radius: 12px; background: #eef3fd;
  display: flex; align-items: center; justify-content: center; font-size: 28px;
  color: var(--primary); margin-bottom: 18px;
}
.capability-card h3 { color: var(--navy); font-size: 20px; margin-bottom: 10px; }
.capability-card p { color: var(--muted); font-size: 14px; }
.feature-list { margin: 14px 0 6px; padding: 0; list-style: none; }
.feature-list li { font-size: 13.5px; color: var(--text); padding: 4px 0 4px 22px; position: relative; }
.feature-list li::before { content: "✓"; position: absolute; left: 0; color: var(--primary); font-weight: 700; }
.link-more { font-size: 14px; font-weight: 600; display: inline-block; margin-top: 8px; }

/* ---------- About ---------- */
.about-row { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-media img { border-radius: var(--radius); width: 100%; box-shadow: var(--shadow-lg); }
.about-text h2 { font-size: 30px; color: var(--navy); margin-bottom: 6px; }
.about-text .section-sub { text-transform: none; letter-spacing: 0; font-size: 14px; }
.about-text p { margin: 14px 0 22px; color: var(--text); }

.check-list { list-style: none; margin-top: 10px; }
.check-list li { padding: 5px 0 5px 26px; position: relative; }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 5px;
  color: var(--primary); font-weight: 700;
}

.value-card { padding: 28px 24px; text-align: center; border-top: 3px solid var(--primary); }
.value-card h3 { color: var(--navy); font-size: 18px; margin-bottom: 8px; }
.value-card p { color: var(--muted); font-size: 14px; }

/* ---------- Products ---------- */
.product-card { text-align: center; }
.product-img { aspect-ratio: 4/3; overflow: hidden; background: #e8edf4; }
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.product-card:hover .product-img img { transform: scale(1.05); }
.product-card h3 {
  font-size: 15px; color: var(--navy); padding: 14px 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- Industries ---------- */
.industry-card { position: relative; color: #fff; }
.industry-card img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.industry-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,26,51,0) 35%, rgba(10,26,51,.85) 100%);
}
.industry-card h3 {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 16px;
  color: #fff; font-size: 17px; text-align: center;
}
.industry-detail-card .industry-body { padding: 20px 22px; }
.industry-detail-card h3 { color: var(--navy); margin-bottom: 6px; }
.industry-detail-card p { color: var(--muted); font-size: 14px; }

/* ---------- Equipment ---------- */
.equipment-card { padding-bottom: 20px; }
.equipment-card h3 { font-size: 16px; color: var(--navy); padding: 14px 20px 4px; }
.equipment-card p { color: var(--muted); font-size: 13.5px; padding: 0 20px; }

/* ---------- Certification ---------- */
.cert-banner { text-align: center; color: #cdd9ec; max-width: 760px; margin: 0 auto; }
.cert-badge {
  display: inline-flex; align-items: center; gap: 12px; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18); padding: 16px 30px; border-radius: 10px;
  margin-bottom: 18px; color: #fff; font-size: 20px;
}
.cert-icon { font-size: 30px; }

/* ---------- News ---------- */
.news-card { display: flex; flex-direction: column; color: var(--text); }
.news-cover { aspect-ratio: 16/9; overflow: hidden; }
.news-cover img { width: 100%; height: 100%; object-fit: cover; }
.news-body { padding: 18px 20px 22px; }
.news-meta { font-size: 12.5px; color: var(--primary); }
.news-card h3 { color: var(--navy); font-size: 17px; margin: 8px 0; line-height: 1.45; }
.news-card p { color: var(--muted); font-size: 13.5px; }
.news-card:hover { color: var(--text); }

.pagination { display: flex; gap: 10px; justify-content: center; margin-top: 40px; align-items: center; }
.pagination a, .page-info {
  padding: 8px 16px; border-radius: 6px; background: var(--light);
  color: var(--text); font-size: 14px;
}
.pagination a:hover { background: var(--primary); color: #fff; }

/* ---------- Article ---------- */
.article-layout { display: grid; grid-template-columns: 1fr 300px; gap: 44px; align-items: start; }
.article-title { font-size: 30px; color: var(--navy); line-height: 1.35; margin-bottom: 12px; }
.article-meta { display: flex; gap: 18px; color: var(--muted); font-size: 13.5px; padding-bottom: 18px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.article-main :is(h2, h3) { color: var(--navy); margin: 26px 0 10px; }
.article-main p { margin-bottom: 14px; }
.article-main img { border-radius: 8px; margin: 18px 0; }
.back-link { display: inline-block; margin-top: 30px; font-weight: 600; }

.article-side {
  background: var(--light); border-radius: var(--radius); padding: 22px; position: sticky; top: 96px;
}
.article-side h3 { font-size: 16px; color: var(--navy); margin-bottom: 14px; }
.side-news { display: flex; flex-direction: column; gap: 4px; padding: 12px; background: #fff; border-radius: 8px; margin-bottom: 10px; color: var(--text); }
.side-news strong { font-size: 14px; line-height: 1.4; }
.side-news span { font-size: 12px; color: var(--muted); }
.side-news:hover { box-shadow: var(--shadow); }

/* ---------- Page hero ---------- */
.page-hero {
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 55%, #173a7c 100%);
  color: #fff; padding: 72px 0; text-align: center;
}
.page-hero h1 { font-size: 36px; }
.page-hero p { color: #9fb4d4; margin-top: 10px; }

/* ---------- Services ---------- */
.service-row { display: grid; grid-template-columns: 1fr 1.15fr; gap: 44px; align-items: center; }
.service-row h2 { font-size: 28px; color: var(--navy); }
.lead { font-size: 16.5px; margin: 12px 0 18px; }
.service-media img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--primary); color: #fff; padding: 56px 0; text-align: center; }
.cta-band h2 { margin-bottom: 20px; font-size: 28px; }

/* ---------- Contact ---------- */
.contact-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
.contact-info h2 { color: var(--navy); margin-bottom: 18px; }
.contact-list { list-style: none; }
.contact-list li {
  display: grid; grid-template-columns: 110px 1fr; gap: 12px;
  padding: 12px 0; border-bottom: 1px dashed var(--border);
}
.contact-list b { color: var(--navy); font-size: 14px; }
.contact-note { margin-top: 30px; background: var(--light); padding: 22px; border-radius: var(--radius); }
.contact-note h3 { color: var(--navy); margin-bottom: 6px; font-size: 18px; }
.contact-note p { color: var(--muted); font-size: 14px; }

.contact-form-wrap {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 34px; border-top: 4px solid var(--primary);
}
.contact-form input, .contact-form textarea {
  width: 100%; padding: 13px 16px; margin-bottom: 16px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14.5px; font-family: inherit; background: #fbfcfe;
  transition: border .15s;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--primary); background: #fff;
}

/* ---------- Flash messages ---------- */
.flash { margin: 18px 0 0; padding: 13px 18px; border-radius: 8px; font-size: 14.5px; }
.flash-success { background: #e8f7ee; color: #177245; border: 1px solid #b5e3c8; }
.flash-error { background: #fdecec; color: #a12727; }

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: #9fb4d4; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr .8fr; gap: 44px; padding: 60px 20px 44px; }
.footer h3 { color: #fff; font-size: 20px; margin-bottom: 10px; }
.footer h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.footer-slogan { color: var(--primary); font-weight: 600; margin-bottom: 10px; font-size: 14px; }
.footer-desc { font-size: 13.5px; line-height: 1.7; }
.footer-contact, .footer-links { list-style: none; font-size: 13.5px; }
.footer-contact li { margin-bottom: 9px; }
.footer-contact b { color: #cdd9ec; }
.footer-links li a { display: block; padding: 5px 0; color: #9fb4d4; }
.footer-links li a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #1d355e; }
.footer-bottom-inner {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 18px; padding-bottom: 18px; font-size: 12.5px; flex-wrap: wrap; gap: 8px;
}
.footer-bottom a { color: #7e95b8; }
.footer-bottom a:hover { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .about-row, .service-row, .contact-layout, .article-layout { grid-template-columns: 1fr; }
  .article-side { position: static; }
  .slide-caption h2 { font-size: 32px; }
}

@media (max-width: 720px) {
  .grid-4, .grid-3, .stats-grid { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: block; margin-left: auto; }
  .nav-menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; flex-direction: column; align-items: stretch;
    padding: 12px 20px 20px; box-shadow: var(--shadow-lg); gap: 2px;
  }
  .nav-menu.open { display: flex; }
  .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding: 0 0 0 16px; }
  .hero-carousel { height: 380px; }
  .slide-caption h2 { font-size: 24px; }
  .slide-caption p { font-size: 14px; }
  .carousel-arrow { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .topbar-contact span:last-child { display: none; }
  .contact-list li { grid-template-columns: 1fr; }
}
