/* ============================================
   PS Safety - Global Stylesheet v3
   Dark Navbar, Professional Green Theme
   Inspired by: SafeSiri, ThaiSafe, SHAWPAT
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --green: #16a34a;
  --green-light: #22c55e;
  --green-dark: #15803d;
  --green-darker: #064e3b;
  --green-50: #f0fdf4;
  --green-100: #dcfce7;
  --blue: #1e40af;
  --blue-light: #3b82f6;
  --blue-dark: #1e3a8a;
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --dark: #1a1a2e;
  --dark-lighter: #16213e;
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
  --shadow-md: 0 6px 15px -3px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 40px -10px rgba(0,0,0,0.15);
  --radius: 12px;
  --radius-lg: 16px;
  --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1e293b;
  line-height: 1.7;
  background: #ffffff;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ============ DARK NAVBAR ============ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: #0f172a;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.navbar.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  background: #0a0f1e;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top contact strip */
.nav-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 0.75rem;
  background: transparent;
}
.nav-top a {
  color: rgba(255,255,255,0.6);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.nav-top a:hover { color: #22c55e; }
.nav-top a i { font-size: 0.68rem; color: #22c55e; }
.nav-top-left, .nav-top-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav-line-btn {
  background: #06c755;
  color: white !important;
  padding: 2px 12px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.7rem;
}
.nav-line-btn:hover { background: #05b34c; }

/* Main nav row */
.nav-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-shield {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 1.05rem;
}
.logo-text-group { line-height: 1.15; }
.logo-name {
  display: block;
  font-weight: 800;
  font-size: 1.2rem;
  color: white;
  letter-spacing: 0.5px;
}
.logo-tagline {
  display: block;
  font-size: 0.55rem;
  color: #22c55e;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 500;
}

/* Nav links */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-link {
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  border-radius: 6px;
  transition: all 0.3s ease;
  white-space: nowrap;
}
.nav-link:hover { color: #ffffff; background: rgba(255,255,255,0.1); }
.nav-link.active {
  color: #22c55e;
  font-weight: 700;
  background: rgba(22,163,74,0.15);
}
.dd-ico { font-size: 0.55rem; margin-left: 3px; opacity: 0.6; }

/* Store CTA button */
.nav-cta-btn {
  background: #16a34a !important;
  color: white !important;
  border-radius: 50px !important;
  padding: 8px 18px !important;
  font-weight: 600 !important;
}
.nav-cta-btn:hover {
  background: #22c55e !important;
  box-shadow: 0 4px 12px rgba(22,163,74,0.4);
}

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown .dropdown-menu {
  position: absolute;
  top: 100%; left: 0;
  min-width: 230px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
  padding: 8px;
  opacity: 0; visibility: hidden;
  transform: translateY(8px);
  transition: all 0.3s ease;
  margin-top: 8px;
}
.nav-dropdown:hover .dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown-menu a {
  display: flex; align-items: center;
  padding: 10px 14px; font-size: 0.87rem;
  color: #475569; border-radius: 8px;
  transition: all 0.3s ease; gap: 8px;
}
.dropdown-menu a:hover { background: #f0fdf4; color: #15803d; }
.dropdown-menu a i { color: #16a34a; width: 18px; text-align: center; }

.nav-spacer { height: 96px; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border: none;
  background: none;
}
.nav-toggle span {
  display: block; width: 24px; height: 2.5px;
  background: white; border-radius: 2px;
  transition: all 0.3s ease;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 8px;
  font-size: 0.95rem; font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer; border: none; font-family: inherit;
}
.btn-green { background: #16a34a; color: white; }
.btn-green:hover {
  background: #15803d;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(22,163,74,0.35);
}
.btn-dark { background: #0f172a; color: white; }
.btn-dark:hover {
  background: #1e293b;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.btn-outline-green {
  background: transparent; color: #16a34a;
  border: 2px solid #16a34a;
}
.btn-outline-green:hover { background: #f0fdf4; }
.btn-outline-white {
  background: transparent; color: white;
  border: 2px solid rgba(255,255,255,0.4);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.1); border-color: white;
}
.btn-line {
  background: #06c755; color: white;
}
.btn-line:hover {
  background: #05b34c;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6,199,85,0.35);
}

/* ============ LAYOUT ============ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 50px; }
.section-tag {
  display: inline-block; padding: 6px 18px;
  border-radius: 50px; font-size: 0.78rem;
  font-weight: 600; text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 14px;
}
.section-tag.green { background: #dcfce7; color: #15803d; }
.section-tag.blue { background: #dbeafe; color: #1e3a8a; }
.section-title {
  font-size: 2rem; font-weight: 800;
  color: #0f172a; margin-bottom: 12px; line-height: 1.3;
}
.section-desc {
  font-size: 1rem; color: #64748b;
  max-width: 650px; margin: 0 auto;
}

/* ============ FOOTER ============ */
.footer {
  background: #0f172a;
  color: rgba(255,255,255,0.7);
  padding: 50px 0 0;
  border-top: 3px solid #16a34a;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-logo-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.footer-shield {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1rem;
}
.footer-name { font-weight: 800; font-size: 1.15rem; color: white; }
.footer-sub {
  font-size: 0.58rem; color: #22c55e;
  text-transform: uppercase; letter-spacing: 1.5px;
}
.footer-brand p {
  font-size: 0.85rem; line-height: 1.7;
  color: rgba(255,255,255,0.5); margin-bottom: 16px;
}
.footer-social { display: flex; gap: 8px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.5); font-size: 0.9rem;
  transition: all 0.3s ease;
}
.footer-social a:hover { background: #16a34a; color: white; }
.footer-col h4 {
  color: white; font-size: 0.9rem;
  margin-bottom: 14px; font-weight: 700;
}
.footer-col a {
  display: block; font-size: 0.85rem; padding: 5px 0;
  color: rgba(255,255,255,0.5); transition: all 0.3s ease;
}
.footer-col a:hover { color: #22c55e; padding-left: 3px; }
.fc-icon { margin-right: 6px; color: #22c55e; font-size: 0.78rem; }
.footer-bottom {
  padding: 18px 0; text-align: center;
  font-size: 0.78rem; color: rgba(255,255,255,0.3);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .nav-top { display: none; }
  .nav-spacer { height: 60px; }
  .nav-menu {
    position: fixed; top: 60px; left: 0; right: 0; bottom: 0;
    background: #0f172a;
    flex-direction: column; padding: 20px;
    gap: 4px; align-items: stretch;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
  }
  .nav-menu.open { transform: translateX(0); }
  .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); }
  .nav-link { font-size: 1rem; padding: 12px 14px; }
  .nav-cta-btn { text-align: center; justify-content: center; margin-top: 8px; }
  .nav-dropdown .dropdown-menu {
    position: static; opacity: 1; visibility: visible;
    transform: none; box-shadow: none; border: none;
    padding-left: 16px; display: none; margin-top: 0;
    background: rgba(255,255,255,0.05);
  }
  .nav-dropdown .dropdown-menu a { color: rgba(255,255,255,0.6); }
  .nav-dropdown .dropdown-menu a:hover { color: #22c55e; background: rgba(255,255,255,0.05); }
  .nav-dropdown.open .dropdown-menu { display: block; }
  .section { padding: 50px 0; }
  .section-title { font-size: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 480px) {
  .nav-main { height: 55px; }
  .logo-name { font-size: 1.05rem; }
  .logo-shield { width: 34px; height: 34px; font-size: 0.9rem; }
  .logo-tagline { display: none; }
  .nav-menu { top: 55px; }
  .nav-spacer { height: 55px; }
}

/* ============ UTILITIES ============ */
.text-green { color: #16a34a; }
.text-blue { color: #1e40af; }
.bg-gray { background: #f8fafc; }
.bg-green-light { background: #f0fdf4; }
.bg-blue-light { background: #eff6ff; }
.fade-in {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
