/* ==========================================
   แก้ภาษีนิติบุคคล.com - Custom Styles
   Font: Sarabun (Thai)
   Theme: Deep Navy + Crimson Red (urgency)
   ========================================== */

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

:root {
  --primary:     #1a2e4a;
  --primary-dark:#0d1f35;
  --accent:      #c0392b;
  --accent-light:#e74c3c;
  --gold:        #f5a623;
  --gold-dark:   #d4891a;
  --success:     #06c755;
  --text:        #1a1a2e;
  --muted:       #6c757d;
  --light-bg:    #f8f9fa;
  --white:       #ffffff;
  --shadow:      0 4px 24px rgba(26,46,74,.12);
  --shadow-red:  0 4px 24px rgba(192,57,43,.18);
  --radius:      12px;
}

body {
  font-family: 'Sarabun', sans-serif;
  color: var(--text);
  scroll-behavior: smooth;
  font-size: 16px;
  line-height: 1.7;
}

/* ========== NAVBAR ========== */
#mainNavbar {
  background: rgba(13,31,53,.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: all .3s ease;
  padding: .75rem 0;
}
#mainNavbar.scrolled {
  background: rgba(13,31,53,1);
  box-shadow: 0 2px 20px rgba(0,0,0,.4);
  padding: .5rem 0;
}
.navbar-brand { font-size: 1.2rem; letter-spacing: -.5px; }
.nav-link { font-weight: 500; transition: color .2s; padding: .5rem .9rem !important; }
.nav-link:hover { color: var(--gold) !important; }
.btn-cta-nav {
  background: var(--accent);
  color: #fff !important;
  border-radius: 8px;
  font-size: .9rem;
  transition: all .2s;
  padding: .4rem 1rem !important;
}
.btn-cta-nav:hover { background: var(--accent-light); transform: translateY(-2px); }

/* ========== HERO ========== */
.hero-section {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #1e3a5f 40%, #16213e 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 6rem 0 4rem;
}
.hero-section::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(192,57,43,.15) 0%, transparent 60%),
              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.02'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-badge {
  display: inline-block;
  background: rgba(192,57,43,.15);
  border: 1px solid rgba(192,57,43,.5);
  color: #ff8a80;
  border-radius: 50px;
  padding: .4rem 1.2rem;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  animation: pulse-badge 3s ease-in-out infinite;
}
@keyframes pulse-badge {
  0%,100%{ box-shadow: 0 0 0 0 rgba(192,57,43,.3); }
  50%{ box-shadow: 0 0 0 8px rgba(192,57,43,0); }
}
.hero-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 1.2rem;
}
.hero-title .highlight { color: var(--gold); }
.hero-title .danger-text { color: #ff6b6b; }
.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,.8);
  margin-bottom: 2rem;
  line-height: 1.8;
}
.hero-cta-group { display: flex; flex-wrap: wrap; gap: .8rem; }
.btn-hero-phone {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #000;
  font-weight: 700;
  font-size: 1.1rem;
  padding: .85rem 2rem;
  border-radius: var(--radius);
  border: none;
  transition: all .3s;
  display: inline-flex; align-items: center; gap: .5rem;
  text-decoration: none;
}
.btn-hero-phone:hover {
  background: linear-gradient(135deg, #f8b734, var(--gold));
  color: #000;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(245,166,35,.45);
}
.btn-hero-line {
  background: linear-gradient(135deg, var(--success), #05a847);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  padding: .85rem 2rem;
  border-radius: var(--radius);
  border: none;
  transition: all .3s;
  display: inline-flex; align-items: center; gap: .5rem;
  text-decoration: none;
}
.btn-hero-line:hover {
  background: linear-gradient(135deg, #08e060, var(--success));
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(6,199,85,.45);
}
.hero-stats { display: flex; flex-wrap: wrap; gap: 2rem; margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,.1); }
.hero-stat { text-align: center; }
.hero-stat-num { font-size: 1.8rem; font-weight: 800; color: var(--gold); display: block; }
.hero-stat-label { font-size: .8rem; color: rgba(255,255,255,.65); }
.hero-card {
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  padding: 2rem;
  color: #fff;
}
.hero-card .card-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: .75rem 0;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.hero-card .card-item:last-child { border-bottom: none; }
.urgency-badge {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  padding: .3rem .8rem;
  border-radius: 6px;
  font-size: .8rem;
  font-weight: 700;
}

/* ========== SECTIONS ========== */
.section-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--primary-dark);
}
.section-title span { color: var(--accent); border-bottom: 3px solid var(--accent); }
.section-subtitle { color: var(--muted); font-size: 1.05rem; }
.section-divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: 2px;
  margin: 1rem auto;
}
.section-py { padding: 5rem 0; }

/* ========== PAIN POINTS ========== */
.pain-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  border-left: 4px solid var(--accent);
  box-shadow: 0 2px 16px rgba(192,57,43,.1);
  transition: all .3s;
  height: 100%;
}
.pain-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-red);
  border-left-color: var(--accent-light);
}
.pain-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, #fff5f3, #ffe8e5);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

/* ========== SERVICE CARDS ========== */
.service-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: transform .3s, box-shadow .3s;
  height: 100%;
  border-top: 4px solid var(--accent);
  position: relative;
  overflow: hidden;
}
.service-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 100px; height: 100px;
  background: radial-gradient(circle, rgba(192,57,43,.05) 0%, transparent 70%);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(192,57,43,.15);
}
.service-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: #fff; margin-bottom: 1.2rem;
}
.service-highlight {
  background: rgba(192,57,43,.08);
  border-left: 3px solid var(--accent);
  padding: .6rem 1rem;
  border-radius: 0 8px 8px 0;
  font-size: .875rem;
  color: var(--accent);
  margin-top: 1rem;
}

/* ========== WHY US (USP) ========== */
.usp-item {
  display: flex; align-items: flex-start;
  gap: 1rem; padding: 1.2rem;
  border-radius: 12px;
  transition: background .2s;
  border: 1px solid transparent;
}
.usp-item:hover {
  background: #fff;
  border-color: rgba(192,57,43,.1);
  box-shadow: 0 4px 16px rgba(192,57,43,.08);
}
.usp-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--primary), #2a5298);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: #fff;
  flex-shrink: 0;
}

/* ========== TIMELINE / HOW IT WORKS ========== */
.timeline { position: relative; padding-left: 2.5rem; }
.timeline::before {
  content: '';
  position: absolute; left: .85rem; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--gold));
}
.timeline-item { position: relative; margin-bottom: 2.5rem; }
.timeline-dot {
  position: absolute;
  left: -2.6rem;
  top: .2rem;
  width: 1.6rem; height: 1.6rem;
  background: var(--accent);
  border-radius: 50%;
  border: 3px solid var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: .65rem; color: #fff; font-weight: 700;
  box-shadow: 0 0 0 4px rgba(192,57,43,.2);
}

/* ========== FAQ ========== */
.faq-item {
  background: #fff;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  border: 1px solid rgba(0,0,0,.07);
  overflow: hidden;
  transition: box-shadow .2s;
}
.faq-item:hover { box-shadow: var(--shadow); }
.faq-question {
  padding: 1.2rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem;
  border: none; background: none; width: 100%; text-align: left;
  color: var(--primary-dark);
}
.faq-question .faq-icon {
  width: 28px; height: 28px;
  background: rgba(192,57,43,.1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  transition: transform .3s, background .3s;
  flex-shrink: 0;
}
.faq-item.open .faq-question .faq-icon {
  transform: rotate(45deg);
  background: var(--accent);
  color: #fff;
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease, padding .3s;
  padding: 0 1.5rem;
  color: var(--muted);
}
.faq-item.open .faq-answer {
  max-height: 400px;
  padding: 0 1.5rem 1.2rem;
}

/* ========== BLOG ========== */
.blog-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .3s;
  height: 100%;
  border: 1px solid rgba(0,0,0,.06);
  background: #fff;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(26,46,74,.15); }
.blog-card-img {
  height: 200px; background: linear-gradient(135deg, var(--primary), #2a5298);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 3rem;
}
.blog-tag {
  display: inline-block;
  background: rgba(192,57,43,.1);
  color: var(--accent);
  font-size: .75rem;
  font-weight: 600;
  padding: .2rem .7rem;
  border-radius: 20px;
  margin-bottom: .5rem;
}

/* ========== PROVINCE CARDS ========== */
.province-card {
  background: #fff;
  border-radius: 10px;
  padding: .75rem 1rem;
  text-decoration: none;
  color: var(--text);
  border: 1px solid #e9ecef;
  transition: all .2s;
  display: flex; align-items: center; gap: .5rem;
}
.province-card:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(192,57,43,.25);
}

/* ========== LAW CARDS ========== */
.law-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid rgba(26,46,74,.08);
  border-top: 3px solid var(--primary);
  transition: all .3s;
}
.law-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }

/* ========== FLOATING CTA ========== */
.floating-cta {
  position: fixed;
  bottom: 2rem; right: 1.5rem;
  display: flex; flex-direction: column;
  align-items: flex-end; gap: .8rem;
  z-index: 1000;
}
.fab-btn {
  display: flex; align-items: center;
  border-radius: 50px;
  padding: .75rem 1.2rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  transition: all .3s;
  gap: .5rem;
}
.fab-btn:hover { transform: translateY(-3px) scale(1.05); color: #fff; }
.fab-phone { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.fab-phone:hover { box-shadow: 0 8px 24px rgba(231,76,60,.5); }
.fab-line { background: linear-gradient(135deg, #06c755, #05a847); }
.fab-line:hover { box-shadow: 0 8px 24px rgba(6,199,85,.5); }
.fab-label { font-size: .875rem; }

/* ========== BREADCRUMB ========== */
.breadcrumb-wrap { background: var(--light-bg); border-bottom: 1px solid #e9ecef; padding: .75rem 0; }
.breadcrumb { margin: 0; font-size: .875rem; }
.breadcrumb-item a { color: var(--accent); text-decoration: none; }
.breadcrumb-item a:hover { text-decoration: underline; }

/* ========== BLOG DETAIL ========== */
.blog-hero { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); padding: 5rem 0 3rem; color: #fff; }
.post-content { font-size: 1.05rem; line-height: 1.9; }
.post-content h2 { color: var(--primary-dark); font-weight: 700; margin-top: 2rem; font-size: 1.4rem; border-left: 4px solid var(--accent); padding-left: 1rem; }
.post-content h3 { color: var(--accent); font-weight: 600; margin-top: 1.5rem; }
.post-content ul { padding-left: 1.5rem; }
.post-content ul li { margin-bottom: .5rem; }
.sidebar-widget { background: #fff; border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); margin-bottom: 1.5rem; }
.sidebar-widget h6 { color: var(--primary-dark); font-weight: 700; border-bottom: 2px solid var(--accent); padding-bottom: .5rem; margin-bottom: 1rem; }

/* ========== LOCATION PAGES ========== */
.location-hero { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); padding: 5rem 0 3rem; color: #fff; }

/* ========== ADMIN ========== */
.admin-sidebar { width: 240px; background: var(--primary-dark); min-height: 100vh; position: fixed; left: 0; top: 0; z-index: 100; overflow-y: auto; }
.admin-sidebar .brand { display: flex; align-items: center; gap: .75rem; padding: 1.25rem 1rem; border-bottom: 1px solid rgba(255,255,255,.1); color: #fff; font-weight: 700; font-size: .95rem; }
.admin-sidebar .brand .brand-icon { background: rgba(192,57,43,.25); border-radius: 8px; padding: .4rem; color: #ff8a80; font-size: 1.2rem; }
.sidebar-nav .nav-link { color: rgba(255,255,255,.7); padding: .55rem 1rem; border-radius: 8px; margin: 2px 8px; font-size: .9rem; display: flex; align-items: center; gap: .6rem; }
.sidebar-nav .nav-link:hover, .sidebar-nav .nav-link.active { background: rgba(255,255,255,.1); color: #fff; }
.sidebar-nav .nav-link.active { color: var(--gold); }
.sidebar-section { color: rgba(255,255,255,.35); font-size: .7rem; font-weight: 700; letter-spacing: .1em; padding: .75rem 1.2rem .25rem; text-transform: uppercase; }
.admin-content { margin-left: 240px; min-height: 100vh; background: #f0f2f5; }
.admin-topbar { background: #fff; padding: .75rem 1.5rem; border-bottom: 1px solid #e9ecef; position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; }
.page-body { padding: 1.5rem; }
.stat-card { border-radius: var(--radius); padding: 1.5rem; color: #fff; }
.stat-card .stat-icon { font-size: 2.5rem; opacity: .7; }
.stat-card .stat-num { font-size: 2.2rem; font-weight: 800; }
@media(max-width:767px){
  .admin-sidebar{transform:translateX(-100%)}
  .admin-content{margin-left:0}
}

/* ========== UTILITIES ========== */
.bg-primary-dark { background-color: var(--primary-dark) !important; }
.bg-primary-custom { background-color: var(--primary) !important; }
.text-primary-custom { color: var(--primary) !important; }
.text-accent { color: var(--accent) !important; }
.btn-primary-custom {
  background: var(--accent);
  border: none; color: #fff;
  border-radius: var(--radius);
  padding: .7rem 1.8rem;
  font-weight: 600;
  transition: all .3s;
  text-decoration: none;
  display: inline-block;
}
.btn-primary-custom:hover { background: var(--accent-light); color: #fff; transform: translateY(-2px); }
.btn-accent {
  background: var(--gold);
  border: none; color: #000;
  border-radius: var(--radius);
  padding: .7rem 1.8rem;
  font-weight: 700;
  transition: all .3s;
  text-decoration: none;
  display: inline-block;
}
.btn-accent:hover { background: var(--gold-dark); color: #000; transform: translateY(-2px); }
.rounded-custom { border-radius: var(--radius) !important; }
.bg-gradient-primary { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); }
.bg-gradient-danger { background: linear-gradient(135deg, var(--accent), var(--accent-light)); }

/* ========== ALERT BOX ========== */
.alert-tax {
  background: linear-gradient(135deg, #fff3f3, #fff8f3);
  border: 1px solid rgba(192,57,43,.2);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
}
.tax-rate-box {
  background: var(--primary-dark);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
}
.tax-rate-box .rate-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: .6rem 0; border-bottom: 1px solid rgba(255,255,255,.08);
}
.tax-rate-box .rate-row:last-child { border-bottom: none; }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .hero-section { padding: 7rem 0 3rem; min-height: auto; }
  .floating-cta { bottom: 1rem; right: 1rem; }
  .fab-label { display: none; }
  .fab-btn { border-radius: 50%; padding: 1rem; }
  .section-py { padding: 3rem 0; }
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp .6s ease forwards; opacity: 0; }
.delay-1 { animation-delay: .15s; }
.delay-2 { animation-delay: .3s; }
.delay-3 { animation-delay: .45s; }
.delay-4 { animation-delay: .6s; }

@keyframes countUp { from { opacity: 0; } to { opacity: 1; } }
.count-up { animation: countUp .5s ease; }
