/* ============================================
   KSC Website V2 — Steel, Aluminum, Stainless Steel
   ============================================ */

:root {
  --primary: #1c2d4a;
  --primary-dark: #0f1e33;
  --accent: #c8963e;
  --accent-light: #e8b86d;
  --steel: #4a5568;
  --white: #ffffff;
  --gray-light: #f4f5f7;
  --gray: #6b7280;
  --text: #1f2937;
  --text-light: #9ca3af;
}

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

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;700;900&family=Noto+Sans+Thai:wght@400;700;900&display=swap');

body {
  font-family: 'Segoe UI', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans Thai', sans-serif;
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ---- Navbar ---- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 60px;
  height: 70px;
  background: rgba(28, 45, 74, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.25);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo-img {
  height: 42px;
  width: auto;
  border-radius: 6px;
  object-fit: cover;
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
}

.nav-logo-name {
  font-weight: 900;
  font-size: 18px;
  color: var(--white);
  letter-spacing: 1px;
}

.nav-logo-sub {
  font-size: 10px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: 7px;
  transition: all 0.2s;
}

.nav-links a:hover { color: var(--white); background: rgba(255,255,255,0.1); }
.nav-links a.active { color: var(--accent); }

/* Language Switcher */
.lang-switcher {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  transition: all 0.2s;
  font-family: inherit;
}

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

.lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
  overflow: hidden;
  display: none;
  min-width: 160px;
  z-index: 1001;
}

.lang-dropdown.show { display: block; }

.lang-option {
  padding: 11px 18px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s;
  color: var(--text);
}

.lang-option:hover { background: var(--gray-light); }
.lang-option.active { background: var(--accent); color: var(--white); }

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

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('images/cover.jpg') center center / cover no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(15,30,51,0.92) 0%, rgba(28,45,74,0.75) 60%, rgba(200,150,62,0.3) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 60px;
  max-width: 760px;
  color: var(--white);
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(200,150,62,0.2);
  border: 1px solid rgba(200,150,62,0.5);
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-light);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-content h1 {
  font-size: 52px;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 18px;
  letter-spacing: -1px;
}

.hero-content p {
  font-size: 18px;
  opacity: 0.85;
  margin-bottom: 34px;
  max-width: 580px;
}

.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

.btn-primary {
  padding: 14px 32px;
  background: var(--accent);
  color: var(--primary-dark);
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s;
  display: inline-block;
}

.btn-primary:hover { background: var(--accent-light); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(200,150,62,0.4); }

.btn-outline-white {
  padding: 14px 32px;
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.45);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s;
  display: inline-block;
}

.btn-outline-white:hover { border-color: var(--white); background: rgba(255,255,255,0.1); }

/* ---- Scroll Indicator ---- */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.6);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ---- Section Base ---- */
.section { padding: 100px 60px; }
.section-title { text-align: center; margin-bottom: 64px; }
.section-title h2 { font-size: 38px; font-weight: 900; color: var(--primary); margin-bottom: 14px; }
.section-title p { font-size: 17px; color: var(--gray); max-width: 600px; margin: 0 auto; }
.alt-bg { background: var(--gray-light); }
.dark-bg { background: var(--primary); color: var(--white); }

/* ---- Product Category Cards ---- */
.category-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.category-tab {
  padding: 10px 24px;
  border-radius: 50px;
  border: 2px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.category-tab.active, .category-tab:hover {
  background: var(--primary);
  color: var(--white);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  max-width: 1200px;
  margin: 0 auto;
}

.product-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
  transition: all 0.3s;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 50px rgba(0,0,0,0.14);
}

.product-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.product-card-body { padding: 22px; }

.product-card-body h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 10px;
}

.product-card-body p {
  font-size: 13px;
  color: var(--gray);
  line-height: 1.6;
  font-family: 'Courier New', monospace;
}

/* ---- Factory Section ---- */
.factory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 28px;
  max-width: 1300px;
  margin: 0 auto;
}

.factory-card {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 6px 30px rgba(0,0,0,0.09);
  transition: all 0.3s;
}

.factory-card:hover { transform: translateY(-6px); box-shadow: 0 16px 50px rgba(0,0,0,0.15); }

.factory-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.factory-card-body { padding: 26px; }

.factory-card-body h3 {
  font-size: 19px;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 4px;
}

.factory-card-body .location {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.factory-card-body .capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cap-tag {
  padding: 4px 12px;
  background: var(--gray-light);
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  color: var(--steel);
}

/* ---- Materials Table ---- */
.materials-table-wrap { max-width: 1000px; margin: 0 auto; overflow-x: auto; }
.materials-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 16px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.07); }
.materials-table th { background: var(--primary); color: var(--white); padding: 14px 20px; font-size: 13px; font-weight: 700; text-align: left; }
.materials-table td { padding: 12px 20px; font-size: 13px; border-bottom: 1px solid #eee; color: var(--steel); font-family: 'Courier New', monospace; }
.materials-table tr:last-child td { border-bottom: none; }
.materials-table tr:nth-child(even) td { background: var(--gray-light); }

/* ---- Customers ---- */
.customers-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
}

.customer-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 30px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  min-width: 160px;
  transition: all 0.2s;
}

.customer-item:hover { transform: translateY(-4px); box-shadow: 0 10px 35px rgba(0,0,0,0.1); }

.customer-logo {
  font-size: 28px;
  font-weight: 900;
  color: var(--primary);
  text-align: center;
  line-height: 1.1;
}

.customer-name { font-size: 12px; color: var(--gray); text-align: center; font-weight: 600; }
.customer-tag { font-size: 11px; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }

/* ---- Timeline ---- */
.timeline { max-width: 900px; margin: 0 auto; position: relative; }
.timeline::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; background: var(--accent); transform: translateX(-50%); }
.timeline-item { display: flex; gap: 40px; margin-bottom: 50px; position: relative; }
.timeline-item:nth-child(even) { flex-direction: row-reverse; }
.timeline-left { width: 45%; text-align: right; }
.timeline-right { width: 45%; }
.timeline-dot { position: absolute; left: 50%; top: 0; width: 20px; height: 20px; background: var(--accent); border-radius: 50%; transform: translateX(-50%); border: 4px solid var(--white); box-shadow: 0 0 0 3px var(--accent); }
.timeline-year { font-size: 36px; font-weight: 900; color: var(--accent); line-height: 1; margin-bottom: 6px; }
.timeline-event { font-size: 15px; font-weight: 700; color: var(--primary); }
.timeline-loc { font-size: 13px; color: var(--gray); margin-top: 4px; }

/* ---- Certs ---- */
.certs-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.cert-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 28px;
  background: rgba(255,255,255,0.08);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  min-width: 140px;
  text-align: center;
}

.cert-name { font-size: 14px; font-weight: 800; color: var(--white); }
.cert-sub { font-size: 11px; color: rgba(255,255,255,0.6); font-weight: 600; }

/* ---- Process Capability ---- */
.process-table { width: 100%; border-collapse: collapse; max-width: 1100px; margin: 0 auto; background: var(--white); border-radius: 16px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.07); }
.process-table th { background: var(--primary); color: var(--white); padding: 13px 16px; font-size: 13px; font-weight: 700; text-align: center; }
.process-table td { padding: 10px 16px; font-size: 13px; border-bottom: 1px solid #eee; text-align: center; color: var(--steel); }
.process-table tr:last-child td { border-bottom: none; }
.process-table tr:nth-child(even) td { background: var(--gray-light); }

/* ---- Page Header ---- */
.page-header {
  height: 420px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 70px;
  overflow: hidden;
}

.page-header-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(15,30,51,0.85) 0%, rgba(28,45,74,0.7) 100%);
}

.page-header-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  padding: 0 30px;
}

.page-header-content h1 { font-size: 46px; font-weight: 900; margin-bottom: 14px; }
.page-header-content p { font-size: 18px; opacity: 0.8; max-width: 600px; margin: 0 auto; }

/* ---- Contact ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  max-width: 1100px;
  margin: 0 auto;
}

.contact-info h3 { font-size: 22px; font-weight: 800; color: var(--primary); margin-bottom: 24px; }
.contact-item { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.contact-icon { width: 42px; height: 42px; border-radius: 10px; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.contact-detail h4 { font-size: 14px; font-weight: 800; color: var(--primary); }
.contact-detail p { font-size: 13px; color: var(--gray); }

.contact-form { display: flex; flex-direction: column; gap: 14px; }
.form-group input, .form-group textarea { width: 100%; padding: 13px 17px; border: 2px solid #e5e7eb; border-radius: 10px; font-size: 14px; font-family: inherit; transition: border-color 0.2s; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); }
.form-group textarea { height: 110px; resize: vertical; }
.form-submit { padding: 14px 30px; background: var(--primary); color: var(--white); border: none; border-radius: 10px; font-size: 15px; font-weight: 800; cursor: pointer; transition: all 0.2s; }
.form-submit:hover { background: var(--accent); transform: translateY(-2px); }

/* ---- Footer ---- */
.footer { background: var(--primary-dark); color: var(--white); padding: 60px 60px 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 50px; max-width: 1200px; margin: 0 auto; }
.footer-brand h3 { font-size: 20px; font-weight: 900; color: var(--accent); margin-bottom: 12px; }
.footer-brand p { font-size: 13px; opacity: 0.65; line-height: 1.8; }
.footer-col h4 { font-size: 13px; font-weight: 800; margin-bottom: 16px; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 13px; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { text-align: center; padding-top: 28px; margin-top: 40px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 12px; opacity: 0.5; }

/* ---- Animations ---- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.anim-fade-up { opacity: 0; animation: fadeUp 0.6s ease forwards; }
.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .navbar { padding: 0 20px; }
  .section { padding: 60px 20px; }
  .hero-content { padding: 0 20px; }
  .hero-content h1 { font-size: 34px; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .timeline::before { left: 20px; }
  .timeline-item, .timeline-item:nth-child(even) { flex-direction: column; gap: 0; padding-left: 50px; }
  .timeline-left { width: 100%; text-align: left; }
  .timeline-right { width: 100%; }
  .timeline-dot { left: 20px; }
}

html { scroll-behavior: smooth; }
