/* ============================================
   SKWAY MACHINERY 鈥� Bootstrap 5 Custom Styles
   ============================================ */

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: #2d3748;
  background: #fff;
}

/* ---- Top Bar ---- */
.topbar {
  background: #1a6b2f;
  color: #d4edda;
  font-size: 0.8rem;
}
.topbar a { color: #d4edda; text-decoration: none; }
.topbar a:hover { color: #fff; }

/* ---- Navbar ---- */
#mainNav {
  background: rgba(20, 83, 45, 0.97);
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  padding: 0.6rem 0;
  border-bottom: 2px solid rgba(255,255,255,0.08);
}
#mainNav.scrolled {
  background: rgba(15, 60, 32, 0.99);
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.navbar-nav .nav-link {
  color: rgba(255,255,255,0.88) !important;
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.5rem 0.9rem !important;
  border-radius: 6px;
  transition: all 0.2s;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: #fff !important;
  background: rgba(255,255,255,0.12);
}

/* Brand */
.brand-logo {
  font-size: 1.5rem;
  color: #4ade80;
}
.brand-text {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
}
.brand-sub {
  display: block;
  font-size: 0.55rem;
  font-weight: 400;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.6);
  line-height: 1;
}

/* ---- Hero ---- */
#hero { position: relative; }
.hero-slide {
  height: 90vh;
  min-height: 520px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,50,20,0.78) 0%, rgba(20,80,40,0.45) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}
.hero-tag {
  display: inline-block;
  background: rgba(74,222,128,0.18);
  border: 1px solid rgba(74,222,128,0.4);
  color: #4ade80;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 1rem;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.hero-sub {
  font-size: 1.05rem;
  opacity: 0.88;
  margin-top: 1rem;
  line-height: 1.7;
}

/* ---- Quick Products ---- */
.quick-card {
  color: #2d3748;
  text-decoration: none;
  border: 1px solid #e2e8f0;
  transition: all 0.25s;
}
.quick-card:hover {
  background: #f0fdf4;
  border-color: #86efac;
  color: #166534;
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(22,101,52,0.1);
}

/* ---- Section Common ---- */
.section-tag {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}
.section-tag-light {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}
.section-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  color: #1a202c;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

/* ---- DNA / Stats ---- */
.section-dna { background: #fff; }
.stat-card {
  background: linear-gradient(135deg, #166534 0%, #15803d 100%);
  color: #fff;
}
.stat-card-alt {
  background: linear-gradient(135deg, #14532d 0%, #166534 100%);
}
.stat-num {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}
.stat-plus {
  font-size: 1.5rem;
  font-weight: 700;
}
.stat-label {
  font-size: 0.82rem;
  opacity: 0.85;
  margin-top: 0.4rem;
}

/* ---- Product Cards ---- */
.product-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(22,101,52,0.12) !important;
  border-color: #86efac;
}
.product-img-wrap {
  position: relative;
  overflow: hidden;
  height: 220px;
}
.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-img {
  transform: scale(1.06);
}
.product-overlay {
  position: absolute;
  inset: 0;
  background: rgba(22,101,52,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.product-card:hover .product-overlay {
  opacity: 1;
}

/* ---- Why Cards ---- */
.why-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: all 0.25s;
}
.why-card:hover {
  background: #f0fdf4;
  border-color: #86efac;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(22,101,52,0.1);
}
.why-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #166534;
  margin: 0 auto;
}

/* ---- Process Flow ---- */
.process-step {
  background: #fff;
  border: 2px solid #bbf7d0;
  border-radius: 16px;
  padding: 16px 20px;
  min-width: 110px;
  transition: all 0.25s;
}
.process-step:hover {
  background: #f0fdf4;
  border-color: #4ade80;
  transform: translateY(-4px);
}
.process-icon {
  font-size: 1.8rem;
  color: #166534;
  margin-bottom: 8px;
}
.process-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #374151;
  line-height: 1.4;
}
.process-arrow {
  font-size: 1.2rem;
  color: #86efac;
}

/* ---- Markets ---- */
.market-badge {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  transition: all 0.25s;
}
.market-badge:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-3px);
}

/* ---- FAQ ---- */
.accordion-button:not(.collapsed) {
  color: #166534;
  background-color: #f0fdf4;
  box-shadow: none;
}
.accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(22,101,52,0.15);
}
.accordion-button::after {
  filter: hue-rotate(100deg);
}

/* ---- Page Hero ---- */
.page-hero {
  position: relative;
  padding: 80px 0 60px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,50,20,0.82) 0%, rgba(20,80,40,0.65) 100%);
}
.page-hero .container {
  position: relative;
  z-index: 2;
}

/* ---- Product Tabs ---- */
.nav-tabs-custom {
  border-bottom: 2px solid #e2e8f0;
  gap: 4px;
}
.nav-tabs-custom .nav-link {
  border: none;
  border-radius: 8px 8px 0 0;
  color: #6b7280;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 10px 18px;
  transition: all 0.2s;
}
.nav-tabs-custom .nav-link:hover {
  color: #166534;
  background: #f0fdf4;
}
.nav-tabs-custom .nav-link.active {
  color: #166534;
  background: #fff;
  border-bottom: 2px solid #166534;
  font-weight: 700;
}

/* ---- Config Cards ---- */
.config-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: all 0.2s;
}
.config-card:hover {
  background: #f0fdf4;
  border-color: #86efac;
}
.config-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #166534;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---- Feature List ---- */
.feature-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #166534;
}

/* ---- Advantage List ---- */
.advantage-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: all 0.2s;
}
.advantage-item:hover {
  background: #f0fdf4;
  border-color: #86efac;
}
.adv-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #166534;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ---- Service Cards ---- */
.service-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: all 0.25s;
}
.service-card:hover {
  background: #f0fdf4;
  border-color: #86efac;
}
.service-icon {
  font-size: 2rem;
  color: #166534;
}

/* ---- About Page ---- */
.qual-card {
  transition: all 0.25s;
}
.qual-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(22,101,52,0.1) !important;
}
.qual-icon {
  font-size: 2.5rem;
  color: #166534;
}
.market-item {
  transition: all 0.25s;
}
.market-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(22,101,52,0.1) !important;
}

/* ---- Contact Page ---- */
.contact-icon {
  width: 44px;
  height: 44px;
  background: #dcfce7;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #166534;
}
.step-num {
  font-size: 2rem;
  font-weight: 800;
  color: #166534;
  line-height: 1;
}
.step-card {
  transition: all 0.25s;
}
.step-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(22,101,52,0.1) !important;
}

/* ---- Footer ---- */
.footer {
  background: #0f2d1a;
}
.footer-brand {
  display: flex;
  align-items: center;
}
.footer-heading {
  color: #4ade80;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer-links li {
  margin-bottom: 0.5rem;
  color: rgba(255,255,255,0.55);
  font-size: 0.88rem;
}
.footer-links a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: #4ade80;
}
.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s;
}
.footer-social:hover {
  background: #166534;
  color: #fff;
  transform: translateY(-2px);
}
.footer-divider {
  border-color: rgba(255,255,255,0.08);
}

/* ---- Floating Buttons ---- */
.floating-btns {
  position: fixed;
  right: 20px;
  bottom: 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1050;
}
.float-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.3rem;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  transition: all 0.25s;
}
.float-btn:hover {
  transform: scale(1.12);
  color: #fff;
}
.float-wa { background: #25d366; }
.float-phone { background: #166534; }
.float-mail { background: #2563eb; }

/* ---- Buttons ---- */
.btn-success {
  background: #166534;
  border-color: #166534;
  font-weight: 600;
}
.btn-success:hover {
  background: #14532d;
  border-color: #14532d;
}
.btn-outline-success {
  color: #166534;
  border-color: #166534;
  font-weight: 600;
}
.btn-outline-success:hover {
  background: #166534;
  border-color: #166534;
}

/* ---- Form ---- */
.form-control:focus, .form-select:focus {
  border-color: #4ade80;
  box-shadow: 0 0 0 0.2rem rgba(22,101,52,0.15);
}
.form-check-input:checked {
  background-color: #166534;
  border-color: #166534;
}

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
  .hero-slide { height: 70vh; min-height: 420px; }
  .hero-title { font-size: 1.8rem; }
  .process-flow { gap: 8px; }
  .process-arrow { display: none; }
  .process-step { min-width: 90px; padding: 12px 14px; }
}

@media (max-width: 767.98px) {
  .hero-slide { height: 60vh; min-height: 380px; }
  .hero-title { font-size: 1.5rem; }
  .hero-sub { font-size: 0.9rem; }
  .section-title { font-size: 1.4rem; }
  .floating-btns { right: 12px; bottom: 20px; }
  .float-btn { width: 42px; height: 42px; font-size: 1.1rem; }
  .page-hero { padding: 60px 0 40px; }
  .nav-tabs-custom { overflow-x: auto; flex-wrap: nowrap; }
  .nav-tabs-custom .nav-link { white-space: nowrap; font-size: 0.82rem; padding: 8px 12px; }
}

@media (max-width: 575.98px) {
  .hero-slide { height: 55vh; min-height: 340px; }
  .stat-num { font-size: 2rem; }
  .product-img-wrap { height: 180px; }
}

/* ---- Dropdown Menu ---- */
.nav-dropdown {
  border: none;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
  padding: 10px 0;
  min-width: 220px;
  margin-top: 6px !important;
  animation: dropFade 0.18s ease;
}
@keyframes dropFade {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav-dropdown .dropdown-item {
  font-size: 0.88rem;
  font-weight: 500;
  padding: 8px 18px;
  color: #374151;
  border-radius: 6px;
  margin: 1px 6px;
  transition: all 0.18s;
}
.nav-dropdown .dropdown-item:hover {
  background: #f0fdf4;
  color: #166534;
}
.nav-dropdown .dropdown-header {
  font-size: 0.72rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #9ca3af;
  padding: 6px 18px 4px;
}
.nav-dropdown .dropdown-divider {
  border-color: #e5e7eb;
  margin: 6px 12px;
}

/* Language button */
.lang-btn {
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 20px;
  letter-spacing: 0.5px;
  transition: all 0.2s;
}
.lang-btn:hover {
  background: rgba(255,255,255,0.2) !important;
}

/* ---- Thumbnail Active ---- */
.thumb-img {
  border: 2px solid transparent;
  transition: all 0.2s;
  opacity: 0.7;
}
.thumb-img:hover {
  opacity: 1;
  border-color: #4ade80;
}
.thumb-img.thumb-active {
  border-color: #166534;
  opacity: 1;
  box-shadow: 0 0 0 2px #bbf7d0;
}

/* ---- Case Cards ---- */
.case-card {
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}
.case-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(22,101,52,0.12) !important;
  border-color: #86efac;
}
.case-img-wrap {
  position: relative;
  overflow: hidden;
  height: 210px;
}
.case-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.case-card:hover .case-img {
  transform: scale(1.06);
}
.case-region-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #166534;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}

/* Filter buttons */
.filter-btn {
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}

/* ---- Case Detail Timeline ---- */
.timeline-item { position: relative; }
.timeline-icon .badge {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 50% !important;
}

/* ---- Responsive additions ---- */
@media (max-width: 767.98px) {
  .case-img-wrap { height: 180px; }
  .nav-dropdown { min-width: 180px; }
}