/* AMEZZ — Custom styles on top of Tailwind CDN */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  font-family: 'Inter', 'Prompt', system-ui, sans-serif;
}

/* ========== Header ========== */
#site-header {
  background: transparent;
}
#site-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(12px);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

#site-header .nav-link {
  position: relative;
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.2s ease;
}
#site-header.scrolled .nav-link {
  color: #1e293b;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #06b6d4, #2a72f5);
  transition: all 0.25s ease;
  transform: translateX(-50%);
  border-radius: 2px;
}
.nav-link:hover::after {
  width: 100%;
}
.nav-link:hover {
  color: #06b6d4;
}

/* Brand logo: render the asset directly so original brand colors (cyan/blue
 * hexagon + brand-blue wordmark) are preserved in every context.
 * On dark navy backgrounds, add a subtle white glow + light backdrop so the
 * mid-blue wordmark text remains readable without altering its color. */
#site-header .brand-logo img {
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.45));
  transition: filter 0.25s ease;
}
#site-header.scrolled .brand-logo img {
  filter: none;
}

footer .footer-logo {
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.45));
}

/* ========== Language toggle ========== */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  transition: border-color 0.25s ease, background 0.25s ease;
}
.lang-toggle .lang-btn {
  padding: 6px 10px;
  color: rgba(255, 255, 255, 0.85);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
  line-height: 1;
}
.lang-toggle .lang-btn:hover { color: #ffffff; }
.lang-toggle .lang-btn.active {
  background: linear-gradient(135deg, #00FFFF, #00B4FF);
  color: #0058D9;
}
#site-header.scrolled .lang-toggle {
  border-color: rgba(0, 88, 217, 0.25);
  background: rgba(0, 88, 217, 0.05);
}
#site-header.scrolled .lang-toggle .lang-btn {
  color: #0058D9;
}
#site-header.scrolled .lang-toggle .lang-btn:hover {
  color: #0a3e8c;
}
#site-header.scrolled .lang-toggle .lang-btn.active {
  background: linear-gradient(135deg, #0058D9, #0071BC);
  color: #ffffff;
}

/* ========== Hero ========== */
.hero-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 56px 56px;
}

/* ========== Animation ========== */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
[data-animate].in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ========== Filter Buttons ========== */
.filter-btn {
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.875rem;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
}
.filter-btn:hover {
  background: #e2e8f0;
  color: #0a4d8c;
}
.filter-btn.active {
  background: linear-gradient(135deg, #0a4d8c, #06b6d4);
  color: white;
  box-shadow: 0 6px 16px rgba(10, 77, 140, 0.25);
}

/* ========== Product Card ========== */
.product-card {
  background: white;
  border-radius: 1.25rem;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -16px rgba(10, 77, 140, 0.18);
  border-color: #b6d6ff;
}
.product-card.hidden {
  display: none;
}
.product-img {
  height: 220px;
  background: linear-gradient(135deg, #f8fafc 0%, #eef6ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  overflow: hidden;
}
.product-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}
.product-card:hover .product-img img {
  transform: scale(1.05);
}
.product-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-tag {
  display: inline-block;
  background: #eef6ff;
  color: #0a4d8c;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
  align-self: flex-start;
}
.product-body h3 {
  font-family: 'Prompt', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: #0a2d4f;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.product-body p {
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.6;
  flex: 1;
}
.product-spec {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}
.product-spec span {
  color: #64748b;
}
.product-spec strong {
  color: #0a4d8c;
  font-weight: 600;
}
.product-link {
  margin-top: 1rem;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0058D9; /* brand-700 */
  transition: gap 0.25s ease, color 0.25s ease;
}
.product-link:hover {
  color: #0a3e8c; /* brand-800 */
  gap: 0.6rem;
}
.product-link svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* ========== Industry Card ========== */
.industry-card {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem 1rem;
  border: 1px solid #e2e8f0;
  text-align: center;
  transition: all 0.25s ease;
  cursor: default;
}
.industry-card:hover {
  border-color: #06b6d4;
  transform: translateY(-3px);
  box-shadow: 0 10px 24px -10px rgba(6, 182, 212, 0.3);
}
.industry-icon {
  display: block;
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}
.industry-card h4 {
  font-weight: 600;
  font-size: 0.9rem;
  color: #0a2d4f;
}

/* ========== Feature Card (Why Choose Us) ========== */
.feature-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.25rem;
  padding: 2rem 1.5rem;
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}
.feature-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(34, 211, 238, 0.4);
  transform: translateY(-4px);
}
.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 1rem;
  background: linear-gradient(135deg, #22d3ee, #2a72f5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 20px rgba(34, 211, 238, 0.3);
}
.feature-card h3 {
  font-family: 'Prompt', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: white;
  margin-bottom: 0.5rem;
}
.feature-card p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ========== Contact Card ========== */
.contact-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  transition: all 0.2s ease;
}
.contact-card:hover {
  border-color: #b6d6ff;
  box-shadow: 0 8px 24px -10px rgba(10, 77, 140, 0.15);
}
.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-card h4 {
  font-weight: 600;
  color: #0a2d4f;
  margin-bottom: 0.15rem;
  font-size: 0.95rem;
}

/* ========== Form ========== */
.form-label {
  display: block;
  font-weight: 500;
  font-size: 0.875rem;
  color: #334155;
  margin-bottom: 0.4rem;
}
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.625rem;
  background: white;
  font-size: 0.95rem;
  color: #0f172a;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-input:focus {
  outline: none;
  border-color: #2a72f5;
  box-shadow: 0 0 0 4px rgba(42, 114, 245, 0.12);
}
.form-input::placeholder {
  color: #94a3b8;
}

/* ========== SweetAlert2 — ธีมแบรนด์ AMEZZ ========== */
.amezz-swal.swal2-popup {
  font-family: 'Inter', 'Prompt', system-ui, sans-serif;
  border-radius: 1.25rem;
  padding: 2rem 1.75rem 1.75rem;
  box-shadow: 0 24px 60px -12px rgba(7, 42, 94, 0.35);
}
.amezz-swal .swal2-title {
  font-family: 'Prompt', 'Inter', system-ui, sans-serif;
  font-weight: 700;
  color: #072a5e; /* brand-900 */
  font-size: 1.4rem;
}
.amezz-swal .swal2-html-container {
  color: #475569; /* slate-600 */
  font-size: 1rem;
  line-height: 1.6;
}
.amezz-swal .swal2-confirm {
  font-weight: 600;
  border-radius: 0.6rem;
  padding: 0.65rem 1.75rem;
  box-shadow: 0 8px 20px -6px rgba(0, 88, 217, 0.5);
}
.amezz-swal .swal2-confirm:focus {
  box-shadow: 0 0 0 4px rgba(0, 88, 217, 0.25);
}
/* แต่งสีไอคอนสำเร็จให้เข้าธีมฟ้าแบรนด์ */
.amezz-swal .swal2-icon.swal2-success [class^='swal2-success-line'] { background-color: #0071bc; }
.amezz-swal .swal2-icon.swal2-success .swal2-success-ring { border-color: rgba(0, 113, 188, 0.3); }

/* ========== Reduced motion ========== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-animate] { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
