:root {
  --primary: #1a237e;
  --primary-dark: #0d1257;
  --accent: #ffc107;
  --accent-dark: #e6a800;
  --success: #00c853;
  --danger: #ff1744;
  --dark: #0a0e27;
  --text-light: #e8eaf6;
  --glass: rgba(255,255,255,0.05);
  --glass-border: rgba(255,255,255,0.1);
}

* { scroll-behavior: smooth; }

body {
  font-family: 'Sarabun', sans-serif;
  background-color: #f8f9fc;
  color: #2c3e50;
  padding-top: 80px;
}

/* ===== NAVBAR ===== */
#mainNav {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

#mainNav .navbar-brand { font-family: 'Kanit', sans-serif; font-size: 1.4rem; }
#mainNav .nav-link { font-size: 0.95rem; font-weight: 500; transition: color 0.2s; }
#mainNav .nav-link:hover { color: var(--accent) !important; }

/* ===== HERO ===== */
.hero-section {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #1565c0 50%, #0288d1 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero-section::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-badge {
  display: inline-block;
  background: rgba(255,193,7,0.2);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 6px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 1.5rem;
}

.hero-section h1 {
  font-family: 'Kanit', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.hero-section h1 .highlight {
  background: linear-gradient(135deg, var(--accent), #ff6f00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle { font-size: 1.15rem; color: rgba(255,255,255,0.8); }

.hero-cta-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(20px);
}

.hero-stats .stat-item {
  text-align: center;
  padding: 1rem;
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
}

.hero-stats .stat-number {
  font-family: 'Kanit', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
}

.hero-stats .stat-label { font-size: 0.8rem; color: rgba(255,255,255,0.7); }

/* ===== SECTION COMMON ===== */
.section-title {
  font-family: 'Kanit', sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--primary);
}

.section-badge {
  display: inline-block;
  background: rgba(26,35,126,0.08);
  color: var(--primary);
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(26,35,126,0.2);
}

/* ===== WHY SECTION ===== */
.why-section { background: #fff; }
.why-card {
  border: none;
  border-radius: 16px;
  padding: 1.75rem;
  height: 100%;
  transition: transform 0.3s, box-shadow 0.3s;
  background: #f8f9ff;
  border-left: 4px solid var(--primary);
}
.why-card:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(26,35,126,0.1); }
.why-card .icon-wrap {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--primary), #1565c0);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem; color: #fff;
}

/* ===== PAIN POINTS ===== */
.pain-section { background: linear-gradient(135deg, #fff4f4, #fff9f9); }
.pain-item {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1rem 1.2rem;
  background: #fff;
  border-radius: 12px;
  border-left: 4px solid var(--danger);
  margin-bottom: 0.75rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.pain-item i { color: var(--danger); font-size: 1.2rem; margin-top: 2px; flex-shrink: 0; }

/* ===== SERVICES ===== */
.services-section { background: linear-gradient(135deg, #e8eaf6 0%, #f3f4f9 100%); }
.service-card {
  background: #fff;
  border-radius: 20px;
  padding: 2rem;
  height: 100%;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid #e8eaf6;
}
.service-card:hover { transform: translateY(-6px); box-shadow: 0 15px 40px rgba(26,35,126,0.12); }
.service-card .icon-top {
  width: 70px; height: 70px;
  background: linear-gradient(135deg, var(--primary), #0288d1);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: #fff; margin: 0 auto 1.5rem;
}
.service-check li { padding: 0.4rem 0; border-bottom: 1px solid #f0f0f0; }
.service-check li:last-child { border: none; }
.service-check i { color: var(--success); margin-right: 8px; }

/* ===== TIMELINE ===== */
.timeline-section { background: #fff; }
.timeline-card {
  background: linear-gradient(135deg, var(--primary), #1565c0);
  color: #fff;
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  height: 100%;
  position: relative;
}
.timeline-card .step-num {
  font-family: 'Kanit', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  opacity: 0.15;
  position: absolute;
  top: 10px; right: 20px;
}
.timeline-card .date-tag {
  background: var(--accent);
  color: #000;
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-block;
  margin-bottom: 0.75rem;
}

/* ===== WHY US ===== */
.why-us-section { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; }
.why-us-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 1rem;
  transition: background 0.3s;
}
.why-us-item:hover { background: rgba(255,255,255,0.14); }
.why-us-item i { font-size: 1.5rem; color: var(--accent); flex-shrink: 0; }

/* ===== CTA ===== */
.cta-section {
  background: linear-gradient(135deg, #ff6f00, #ffc107);
  padding: 80px 0;
}
.cta-section h2 {
  font-family: 'Kanit', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 700;
  color: var(--primary-dark);
}
.btn-cta-white {
  background: var(--primary-dark);
  color: #fff;
  border: none;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s;
}
.btn-cta-white:hover { background: #000; color: #fff; transform: scale(1.05); }

/* ===== LOCATION GRID ===== */
.location-card {
  background: #fff;
  border-radius: 14px;
  padding: 1.25rem;
  text-align: center;
  border: 1px solid #e8eaf6;
  transition: all 0.3s;
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}
.location-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(26,35,126,0.12);
  border-color: var(--primary);
  color: var(--primary);
  background: #f0f2ff;
}
.location-card .loc-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.location-card .loc-name { font-size: 0.9rem; font-weight: 600; line-height: 1.3; }

/* ===== BLOG ===== */
.blog-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e8eaf6;
  transition: all 0.3s;
  height: 100%;
}
.blog-card:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0,0,0,0.1); }
.blog-card img { width: 100%; height: 200px; object-fit: cover; }
.blog-card-body { padding: 1.5rem; }
.blog-card .category-tag {
  display: inline-block;
  background: rgba(26,35,126,0.08);
  color: var(--primary);
  padding: 2px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.blog-card h5 { font-family: 'Kanit', sans-serif; font-size: 1rem; font-weight: 600; line-height: 1.4; }
.blog-card a { text-decoration: none; color: inherit; }
.blog-card a:hover h5 { color: var(--primary); }
.read-more-btn {
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: gap 0.2s;
}
.read-more-btn:hover { color: var(--primary-dark); }

/* ===== FOOTER ===== */
.footer-main { background: linear-gradient(135deg, #0a0e27, #1a237e); }
.footer-top { border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-links { margin: 0; padding: 0; }
.footer-links li { margin-bottom: 0.4rem; }
.footer-links a { color: rgba(255,255,255,0.6); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }

/* ===== PAGE HERO (inner pages) ===== */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 80px 0 50px;
  color: #fff;
}
.page-hero h1 { font-family: 'Kanit', sans-serif; font-size: 2.2rem; font-weight: 700; }
.breadcrumb-item a { color: rgba(255,255,255,0.7); text-decoration: none; }
.breadcrumb-item.active { color: var(--accent); }
.breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.4); }

/* ===== DISTRICT/PROVINCE DETAIL ===== */
.detail-content { font-size: 1.05rem; line-height: 1.9; }
.detail-content h2 { font-family: 'Kanit', sans-serif; font-size: 1.5rem; color: var(--primary); margin-top: 2rem; }
.detail-content ul li { margin-bottom: 0.4rem; }

.sticky-cta-card {
  position: sticky;
  top: 100px;
  background: linear-gradient(135deg, var(--primary), #1565c0);
  border-radius: 20px;
  padding: 2rem;
  color: #fff;
}

/* ===== ADMIN ===== */
.admin-sidebar {
  background: linear-gradient(180deg, var(--primary-dark), var(--primary));
  min-height: 100vh;
  width: 260px;
  position: fixed;
  top: 0; left: 0;
  padding-top: 1rem;
  z-index: 100;
}
.admin-sidebar .sidebar-brand {
  padding: 1rem 1.5rem 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-family: 'Kanit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
}
.admin-sidebar .nav-link {
  color: rgba(255,255,255,0.75);
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
  color: #fff;
  background: rgba(255,255,255,0.1);
  border-left-color: var(--accent);
}
.admin-sidebar .nav-link i { margin-right: 10px; width: 20px; text-align: center; }
.admin-content { margin-left: 260px; min-height: 100vh; background: #f4f6fc; }
.admin-topbar {
  background: #fff;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e8eaf6;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stat-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid #e8eaf6;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.stat-card .stat-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #fff;
}

/* ===== BUTTONS ===== */
.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary), #1565c0);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s;
}
.btn-primary-custom:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(26,35,126,0.3); color: #fff; }

.btn-line {
  background: #00b900;
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s;
}
.btn-line:hover { background: #009900; color: #fff; transform: translateY(-2px); }

/* ===== UTILS ===== */
.text-primary-custom { color: var(--primary) !important; }
.bg-primary-custom { background: var(--primary) !important; }
.rounded-xl { border-radius: 20px !important; }

@media (max-width: 768px) {
  .admin-sidebar { display: none; }
  .admin-content { margin-left: 0; }
  .hero-section { min-height: auto; padding: 120px 0 60px; }
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.6s ease forwards; }

/* ===== MOBILE FLOATING CONTACT BAR ===== */
.mobile-contact-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  padding: 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

.mobile-contact-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 12px;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Sarabun', sans-serif;
  text-decoration: none;
  transition: filter 0.2s, transform 0.15s;
  min-height: 60px;
  letter-spacing: 0.3px;
}

.mobile-contact-btn:active {
  filter: brightness(0.88);
  transform: scale(0.98);
}

.mobile-contact-btn i {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.mobile-call-btn {
  background: linear-gradient(135deg, #e65100, #ff8f00);
  color: #fff;
  border-right: 1px solid rgba(255,255,255,0.2);
}

.mobile-call2-btn {
  background: linear-gradient(135deg, #1a237e, #1565c0);
  color: #fff;
  border-right: 1px solid rgba(255,255,255,0.2);
}

.mobile-line-btn {
  background: #00b900;
  color: #fff;
}

/* Push page content up so it's not hidden behind the bar on mobile */
@media (max-width: 767.98px) {
  body {
    padding-bottom: 62px;
  }
  /* Make hero CTA buttons full-width & bigger on small screens */
  .hero-section .d-flex.flex-wrap.gap-3 {
    flex-direction: column !important;
  }
  .hero-section .btn-lg {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.05rem;
  }
  /* Slightly bigger touch targets for CTA buttons sitewide */
  .btn-warning.fw-bold,
  .btn-line {
    padding: 14px 20px;
    font-size: 1rem;
  }
}

/* ===== PREMIUM CALL BUTTON STYLES ===== */
@keyframes callPulse {
  0%   { transform: scale(1); opacity: 0.8; }
  70%  { transform: scale(1.65); opacity: 0; }
  100% { transform: scale(1.65); opacity: 0; }
}

/* Hero section */
.btn-call-hero {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #ff6f00, #ffc107);
  color: #1a237e;
  padding: 14px 28px;
  border-radius: 50px;
  font-family: 'Kanit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(255,111,0,0.45);
  transition: transform 0.2s, box-shadow 0.2s;
  line-height: 1.3;
}
.btn-call-hero:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 12px 32px rgba(255,111,0,0.55); color: #1a237e; }
.btn-call-hero i { font-size: 1.4rem; flex-shrink: 0; }
.btn-call-hero .btn-call-ring {
  position: absolute; inset: -3px; border-radius: 50px;
  border: 3px solid rgba(255,193,7,0.7);
  animation: callPulse 1.6s ease-out infinite;
  pointer-events: none;
}

/* CTA section */
.btn-call-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--primary-dark);
  color: #ffc107;
  padding: 18px 40px;
  border-radius: 50px;
  font-family: 'Kanit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 28px rgba(13,18,87,0.5);
  transition: transform 0.2s, box-shadow 0.2s;
  line-height: 1.3;
}
.btn-call-cta:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 14px 36px rgba(13,18,87,0.6); color: #ffc107; }
.btn-call-cta i { font-size: 1.5rem; flex-shrink: 0; }
.btn-call-cta .btn-call-ring {
  position: absolute; inset: -4px; border-radius: 50px;
  border: 3px solid rgba(255,193,7,0.6);
  animation: callPulse 1.6s ease-out infinite;
  pointer-events: none;
}

/* Card button */
.btn-call-card {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #ff6f00, #ffc107);
  color: #1a237e;
  padding: 14px 20px;
  border-radius: 50px;
  font-family: 'Kanit', sans-serif;
  font-size: 1.05rem; font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(255,111,0,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-call-card:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 10px 28px rgba(255,111,0,0.5); color: #1a237e; }

/* Mobile floating bar main call button */
.mobile-call-main {
  background: linear-gradient(135deg, #ff6f00, #ffc107) !important;
  color: #1a237e !important;
  font-weight: 800 !important;
}

/* ===== CTA SECTION CALL BUTTON ===== */
.cta-call-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  color: var(--primary-dark);
  padding: 16px 32px;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: visible;
}
.cta-call-btn:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 16px 40px rgba(0,0,0,0.25);
  color: var(--primary-dark);
  text-decoration: none;
}
.cta-call-ring {
  position: absolute; inset: -4px; border-radius: 50px;
  border: 3px solid rgba(255,255,255,0.7);
  animation: callPulse 1.8s ease-out infinite;
  pointer-events: none;
}
.cta-call-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, #ff6f00, #ffc107);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(255,111,0,0.4);
}
.cta-call-text {
  display: flex; flex-direction: column; text-align: left; line-height: 1.2;
}
.cta-call-label {
  font-size: 0.85rem; font-weight: 600;
  color: #777; letter-spacing: 0.4px;
}
.cta-call-number {
  font-family: 'Kanit', sans-serif;
  font-size: 1.35rem; font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: 0.5px;
}

@media (max-width: 767.98px) {
  .cta-call-btn { padding: 14px 24px; gap: 12px; }
  .cta-call-icon { width: 44px; height: 44px; font-size: 1.2rem; }
  .cta-call-number { font-size: 1.15rem; }
}
