/* ===========================================
   Jindrich Engineering — Design System
   Brand: #221714 (Black) + #c81d1d (Red)
   Style: Minimal, Business, Premium
   =========================================== */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&family=Inter:wght@300;400;500;600&family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

/* ── CSS Variables ── */
:root {
  --color-primary: #221714;
  --color-accent: #c81d1d;
  --color-accent-dark: #a01717;
  --color-white: #ffffff;
  --color-bg: #ffffff;
  --color-bg-alt: #f5f5f5;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-border: #e0e0e0;

  --font-heading-en: 'Montserrat', sans-serif;
  --font-heading-cn: 'Noto Sans SC', sans-serif;
  --font-body: 'Inter', 'Noto Sans SC', sans-serif;

  --nav-height: 80px;
  --max-width: 1200px;
  --section-padding: 100px 0;
  --transition: 0.3s ease;
  --radius: 4px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* ── Reset ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul,
ol {
  list-style: none;
}

/* ── Container ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Typography ── */
h1,
h2,
h3,
h4 {
  font-family: var(--font-heading-en);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.3;
}

[lang="zh"] h1,
[lang="zh"] h2,
[lang="zh"] h3,
[lang="zh"] h4 {
  font-family: var(--font-heading-cn);
}

h1 {
  font-size: 3rem;
}

h2 {
  font-size: 2.2rem;
  margin-bottom: 16px;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

h4 {
  font-size: 1.1rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--color-text-light);
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-body);
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.02em;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}

.btn-outline:hover {
  background: var(--color-white);
  color: var(--color-primary);
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}

.btn-accent:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* ══════════════════════════════
   NAVIGATION
   ══════════════════════════════ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  transition: all var(--transition);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(10px);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo img {
  height: 48px;
  width: auto;
  transition: filter var(--transition);
}

/* Logo color inversion for transparent nav */
.navbar:not(.scrolled) .nav-logo img {
  filter: brightness(0) invert(1);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 8px 0;
  position: relative;
  transition: color var(--transition);
}

.navbar:not(.scrolled) .nav-link {
  color: var(--color-white);
}

.navbar.scrolled .nav-link {
  color: var(--color-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition);
}

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

.nav-link:hover {
  color: var(--color-accent);
}

/* Language Toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0;
  border: 2px solid;
  border-radius: 20px;
  overflow: hidden;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.navbar:not(.scrolled) .lang-toggle {
  border-color: rgba(255, 255, 255, 0.5);
}

.navbar.scrolled .lang-toggle {
  border-color: var(--color-border);
}

.lang-btn {
  padding: 6px 14px;
  cursor: pointer;
  transition: all var(--transition);
  background: transparent;
  border: none;
  font-weight: 700;
  font-family: var(--font-body);
  font-size: 0.8rem;
}

.navbar:not(.scrolled) .lang-btn {
  color: rgba(255, 255, 255, 0.7);
}

.navbar.scrolled .lang-btn {
  color: var(--color-text-light);
}

.lang-btn.active {
  background: var(--color-accent);
  color: var(--color-white) !important;
}

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  transition: all var(--transition);
}

.navbar:not(.scrolled) .nav-toggle span {
  background: var(--color-white);
}

.navbar.scrolled .nav-toggle span {
  background: var(--color-primary);
}

/* ── Nav Dropdown ── */
.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  padding: 12px 0;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 100;
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 10px 24px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-text);
  text-transform: none;
  letter-spacing: 0;
  transition: all var(--transition);
}

.dropdown-menu a:hover {
  background: var(--color-bg-alt);
  color: var(--color-accent);
  padding-left: 28px;
}

/* ══════════════════════════════
   HERO
   ══════════════════════════════ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
      rgba(34, 23, 20, 0.85) 0%,
      rgba(34, 23, 20, 0.5) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  color: var(--color-white);
  max-width: 680px;
}

.hero-slogan {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.hero h1 {
  color: var(--color-white);
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.15rem;
  line-height: 1.8;
  opacity: 0.9;
  margin-bottom: 36px;
  max-width: 520px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── Page Hero (smaller, for sub-pages) ── */
.page-hero {
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.page-hero .hero-bg,
.page-hero .hero-overlay {
  position: absolute;
  inset: 0;
}

.page-hero .hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero .hero-overlay {
  background: rgba(34, 23, 20, 0.75);
}

.page-hero-content {
  position: relative;
  z-index: 1;
  color: var(--color-white);
}

.page-hero h1 {
  color: var(--color-white);
  font-size: 2.8rem;
  margin-bottom: 12px;
}

.page-hero p {
  font-size: 1.1rem;
  opacity: 0.85;
}

/* ══════════════════════════════
   SECTIONS
   ══════════════════════════════ */
.section {
  padding: var(--section-padding);
}

.section-alt {
  background-color: var(--color-bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: var(--color-accent);
}

/* ══════════════════════════════
   INDUSTRY CARDS (Homepage)
   ══════════════════════════════ */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.industry-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.industry-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

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

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

.industry-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(34, 23, 20, 0.9) 0%,
      rgba(34, 23, 20, 0.1) 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  transition: background var(--transition);
}

.industry-card:hover .industry-card-overlay {
  background: linear-gradient(to top,
      rgba(200, 29, 29, 0.9) 0%,
      rgba(200, 29, 29, 0.15) 60%);
}

.industry-card h3 {
  color: var(--color-white);
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.industry-card p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  line-height: 1.5;
}

.industry-card .card-arrow {
  margin-top: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.industry-card:hover .card-arrow {
  background: var(--color-white);
  color: var(--color-accent);
}

.card-arrow svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: white;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke var(--transition);
}

.industry-card:hover .card-arrow svg {
  stroke: var(--color-accent);
}

/* ══════════════════════════════
   ADVANTAGES
   ══════════════════════════════ */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.advantage-item {
  text-align: center;
  padding: 40px 24px;
  border-radius: var(--radius);
  transition: all var(--transition);
  border: 1px solid transparent;
}

.advantage-item:hover {
  border-color: var(--color-border);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.advantage-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(200, 29, 29, 0.08);
  color: var(--color-accent);
  font-size: 1.8rem;
}

.advantage-item h4 {
  margin-bottom: 10px;
}

.advantage-item p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

/* ══════════════════════════════
   CTA SECTION
   ══════════════════════════════ */
.cta-section {
  background: var(--color-primary);
  padding: 80px 0;
  text-align: center;
}

.cta-section h2 {
  color: var(--color-white);
  margin-bottom: 16px;
}

.cta-section h2::after {
  background: var(--color-accent);
}

.cta-section p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.05rem;
  margin-bottom: 32px;
}

/* ══════════════════════════════
   ABOUT PAGE
   ══════════════════════════════ */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text p {
  margin-bottom: 20px;
  line-height: 1.9;
  color: var(--color-text);
}

.about-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.about-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

/* ══════════════════════════════
   SERVICE PAGE
   ══════════════════════════════ */
.service-intro {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  padding-bottom: 20px;
}

.service-intro p {
  font-size: 1.08rem;
  color: var(--color-text-light);
  line-height: 1.8;
}

.service-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.service-category {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 40px 32px;
  transition: all var(--transition);
}

.service-category:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.service-category-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(200, 29, 29, 0.08);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.service-category h3 {
  margin-bottom: 16px;
  font-size: 1.25rem;
}

.service-list {
  list-style: none;
}

.service-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--color-bg-alt);
  font-size: 0.95rem;
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.service-list li:last-child {
  border-bottom: none;
}

.service-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
}

/* Service Gallery */
.service-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.service-gallery img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: var(--radius);
  transition: transform var(--transition);
}

.service-gallery img:hover {
  transform: scale(1.03);
}

/* ══════════════════════════════
   CONTACT PAGE
   ══════════════════════════════ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.contact-card {
  text-align: center;
  padding: 48px 32px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.contact-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.contact-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: rgba(200, 29, 29, 0.08);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.contact-card h4 {
  margin-bottom: 12px;
}

.contact-card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

.contact-card a {
  color: var(--color-accent);
  font-weight: 500;
}

.contact-card a:hover {
  text-decoration: underline;
}

/* ══════════════════════════════
   FOOTER
   ══════════════════════════════ */
.footer {
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.6);
  padding: 60px 0 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand img {
  height: 40px;
  filter: brightness(0) invert(1);
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.88rem;
  max-width: 280px;
  line-height: 1.6;
}

.footer-links h4 {
  color: var(--color-white);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.footer-links a {
  display: block;
  font-size: 0.88rem;
  padding: 5px 0;
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-contact h4 {
  color: var(--color-white);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.footer-contact p {
  font-size: 0.88rem;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.footer-contact a {
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition);
}

.footer-contact a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  font-size: 0.82rem;
}

/* ══════════════════════════════
   ANIMATIONS
   ══════════════════════════════ */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════════════════════════
   RESPONSIVE
   ══════════════════════════════ */

/* Tablet */
@media (max-width: 1024px) {
  h1 {
    font-size: 2.4rem;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .industry-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .advantages-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-categories {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --nav-height: 64px;
    --section-padding: 64px 0;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .page-hero {
    height: 300px;
  }

  .page-hero h1 {
    font-size: 2rem;
  }

  /* Mobile Nav */
  .nav-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    flex-direction: column;
    background: var(--color-white);
    padding: 24px;
    gap: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-120%);
    transition: transform var(--transition);
  }

  .nav-menu.open {
    transform: translateY(0);
  }

  .nav-menu .nav-link {
    color: var(--color-primary) !important;
    padding: 14px 0;
    width: 100%;
    border-bottom: 1px solid var(--color-bg-alt);
  }

  .nav-toggle {
    display: flex;
  }

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

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

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

  .industry-grid {
    grid-template-columns: 1fr;
  }

  .advantages-grid {
    grid-template-columns: 1fr;
  }

  .service-categories {
    grid-template-columns: 1fr;
  }

  .service-gallery {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .footer-content {
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
    gap: 40px;
  }

  .footer-brand p {
    max-width: 100%;
  }

  .footer-contact p {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.4rem;
  }
}