/* ==========================================
   closingfinancial.com - Custom Styles
   Font: Sarabun (Thai)
   ========================================== */

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

:root {
  --primary:     #1a3c6e;
  --primary-dark:#0f2447;
  --accent:      #f5a623;
  --accent-dark: #d4891a;
  --success:     #06c755;
  --text:        #1a1a2e;
  --muted:       #6c757d;
  --light-bg:    #f8f9fa;
  --white:       #ffffff;
  --shadow:      0 4px 24px rgba(26,60,110,.12);
  --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(15,36,71,.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: all .3s ease;
  padding: .75rem 0;
}
#mainNavbar.scrolled {
  background: rgba(15,36,71,1);
  box-shadow: 0 2px 20px rgba(0,0,0,.3);
  padding: .5rem 0;
}
.navbar-brand { font-size: 1.3rem; letter-spacing: -.5px; }
.nav-link { font-weight: 500; transition: color .2s; padding: .5rem .9rem !important; }
.nav-link:hover { color: var(--accent) !important; }
.btn-cta-nav { border-radius: 8px; font-size: .9rem; transition: transform .2s; }
.btn-cta-nav:hover { transform: translateY(-2px); }

/* ========== HERO ========== */
.hero-section {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #1e5799 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: 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%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-badge {
  display: inline-block;
  background: rgba(245,166,35,.15);
  border: 1px solid rgba(245,166,35,.4);
  color: var(--accent);
  border-radius: 50px;
  padding: .4rem 1.2rem;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}
.hero-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 1.2rem;
}
.hero-title span { color: var(--accent); }
.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(255,255,255,.8);
  margin-bottom: 2rem;
}
.hero-cta-group { display: flex; flex-wrap: wrap; gap: .8rem; }
.btn-hero-phone {
  background: var(--accent);
  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;
}
.btn-hero-phone:hover {
  background: var(--accent-dark);
  color: #000;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(245,166,35,.4);
}
.btn-hero-line {
  background: var(--success);
  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;
}
.btn-hero-line:hover {
  background: #05a847;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(6,199,85,.4);
}
.hero-stats { display: flex; flex-wrap: wrap; gap: 2rem; margin-top: 2.5rem; }
.hero-stat { text-align: center; }
.hero-stat-num { font-size: 1.8rem; font-weight: 800; color: var(--accent); display: block; }
.hero-stat-label { font-size: .8rem; color: rgba(255,255,255,.7); }
.hero-card {
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 20px;
  padding: 2rem;
  color: #fff;
}
.hero-price { font-size: 2.5rem; font-weight: 800; color: var(--accent); }

/* ========== 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(--primary), var(--accent));
  border-radius: 2px;
  margin: 1rem auto;
}

/* ========== 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(--primary);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(26,60,110,.18);
}
.service-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--primary), #2a5298);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: #fff; margin-bottom: 1.2rem;
}
.pain-card {
  background: linear-gradient(135deg, #fff5f5, #fff);
  border-radius: var(--radius);
  padding: 1.5rem;
  border-left: 4px solid #dc3545;
  box-shadow: 0 2px 12px rgba(220,53,69,.08);
}
.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);
}
.blog-card:hover { transform: translateY(-4px); }
.blog-card-img { height: 200px; object-fit: cover; background: linear-gradient(135deg, var(--primary), #2a5298); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 3rem; }
.province-card {
  background: #fff;
  border-radius: 10px;
  padding: 1rem 1.2rem;
  text-decoration: none;
  color: var(--text);
  border: 1px solid #e9ecef;
  transition: all .2s;
  display: flex; align-items: center; gap: .6rem;
}
.province-card:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26,60,110,.2);
}

/* ========== TIMELINE ========== */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before { content: ''; position: absolute; left: .7rem; top: 0; bottom: 0; width: 2px; background: linear-gradient(to bottom, var(--primary), var(--accent)); }
.timeline-item { position: relative; margin-bottom: 2rem; }
.timeline-dot {
  position: absolute;
  left: -2.3rem;
  top: .3rem;
  width: 1.4rem; height: 1.4rem;
  background: var(--accent);
  border-radius: 50%;
  border: 3px solid var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: .6rem; color: #fff; font-weight: 700;
}

/* ========== 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: .85rem; }

/* ========== 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(--primary); text-decoration: none; }
.breadcrumb-item a:hover { text-decoration: underline; }

/* ========== BLOG ========== */
.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; }
.post-content h3 { color: var(--primary); font-weight: 600; margin-top: 1.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; }

/* ========== LAW / USP SECTION ========== */
.law-card { background: linear-gradient(135deg, #f8f9ff, #fff); border-radius: var(--radius); padding: 1.5rem; border: 1px solid rgba(26,60,110,.1); }
.usp-item { display: flex; align-items: flex-start; gap: 1rem; padding: 1rem; border-radius: 10px; transition: background .2s; }
.usp-item:hover { background: var(--light-bg); }
.usp-icon { width: 48px; height: 48px; background: linear-gradient(135deg, var(--accent), #f39c12); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }

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

/* ========== ADMIN ========== */
.admin-sidebar { width: 260px; background: var(--primary-dark); min-height: 100vh; position: fixed; left: 0; top: 0; z-index: 100; transition: width .3s; }
.admin-sidebar .sidebar-brand { padding: 1.5rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.admin-sidebar .nav-link { color: rgba(255,255,255,.7); padding: .7rem 1.5rem; border-radius: 8px; margin: 2px 8px; font-size: .925rem; }
.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active { background: rgba(255,255,255,.1); color: #fff; }
.admin-sidebar .nav-link i { width: 20px; margin-right: .5rem; }
.admin-content { margin-left: 260px; min-height: 100vh; background: #f0f2f5; }
.admin-topbar { background: #fff; padding: .8rem 1.5rem; border-bottom: 1px solid #e9ecef; position: sticky; top: 0; z-index: 50; }
.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; }

/* ========== 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(--primary); border: none; color: #fff; border-radius: var(--radius); padding: .7rem 1.8rem; font-weight: 600; transition: all .3s; }
.btn-primary-custom:hover { background: var(--primary-dark); color: #fff; transform: translateY(-2px); }
.btn-accent { background: var(--accent); border: none; color: #000; border-radius: var(--radius); padding: .7rem 1.8rem; font-weight: 700; transition: all .3s; }
.btn-accent:hover { background: var(--accent-dark); color: #000; transform: translateY(-2px); }
.rounded-custom { border-radius: var(--radius) !important; }
.section-py { padding: 5rem 0; }
.bg-gradient-primary { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); }

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

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