/* =========================================
   LOCALIS INSIGHTS GRID PLUGIN
   ========================================= */
.lig-wrapper {
  --lig-brand: #1d4634;        
  --lig-accent: #c45a40;       
  --lig-bg-main: #faf9f6;      
  --lig-bg-alt: #f3f0e8;
  --lig-text-dark: #2c2c2c;
  --lig-text-muted: #6b7280;
  --lig-border: rgba(29, 70, 52, 0.15);
  
  --font-bold: 'TikTokSans-Bold', sans-serif;
  --font-reg: 'TikTokSans-Regular', sans-serif;
  
  font-family: var(--font-reg);
  margin-bottom: 4rem;
}

/* --- TABS (FILTER) --- */
.lig-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 3rem;
}
.lig-tab {
  font-size: 0.75rem;
  padding: 6px 16px;
  border: 1px solid var(--lig-border);
  border-radius: 50px;
  color: rgba(44, 44, 44, 0.7);
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}
.lig-tab:hover, 
.lig-tab.active {
  border-color: var(--lig-accent);
  color: var(--lig-accent);
}

/* --- HAIRLINE GRID --- */
.lig-grid {
  display: grid;
  grid-template-columns: repeat(var(--lig-cols, 3), 1fr); 
  gap: 1px; 
  background-color: var(--lig-border); 
  border: 1px solid var(--lig-border); 
  overflow: hidden; /* Giữ hairline sạch sẽ */
}

/* --- CARD (BOX NHỎ) --- */
.lig-card {
  background-color: var(--lig-bg-main); 
  display: flex; 
  flex-direction: column;
  /* Trạng thái ban đầu trước khi scroll tới */
  opacity: 0;
  transform: translateY(40px);
  /* Chỉnh timing mượt mà (Ease-out) */
  transition: background-color 0.4s ease, opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.lig-card:hover {
  background-color: var(--lig-bg-alt);
}
.lig-card.hide {
  display: none !important;
}

/* Trạng thái hiển thị khi Scroll tới (Được add bằng JS) */
.lig-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.lig-card-link-wrapper {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  width: 100%;
  color: inherit;
  height: 100%;
}
.lig-card-content {
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* --- CARD ELEMENTS --- */
.lig-eyebrow {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--lig-accent);
  margin: 0 0 1rem 0;
  font-family: var(--font-bold);
}
.lig-title {
  font-family: var(--font-bold);
  font-size: 1.25rem;
  color: var(--lig-brand);
  line-height: 1.4;
  margin: 0 0 1rem 0;
}
.lig-excerpt {
  font-size: 0.875rem;
  color: var(--lig-text-muted);
  line-height: 1.6;
  margin: 0 0 1.5rem 0;
  flex: 1; 
}
.lig-readmore {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--lig-accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-bold);
}
.lig-card:hover .lig-readmore {
  gap: 16px; /* Mũi tên trượt xa hơn một chút khi hover */
}

/* --- THUMBNAIL (ZOOM EFFECT) --- */
.lig-thumb {
  width: 100%;
  overflow: hidden; /* Cắt phần ảnh tràn khi phóng to */
}
.lig-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); /* Zoom mượt */
}
.lig-card:hover .lig-thumb img {
  transform: scale(1.06); /* Phóng to ảnh nhẹ khi hover */
}

/* Tỷ lệ ảnh */
.lig-ratio-16-9 { aspect-ratio: 16/9; }
.lig-ratio-1-1 { aspect-ratio: 1/1; }
.lig-ratio-4-3 { aspect-ratio: 4/3; }

/* --- PAGINATION --- */
.lig-pagination {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.lig-pagination a, .lig-pagination span {
  padding: 8px 16px;
  border: 1px solid var(--lig-border);
  color: var(--lig-text-dark);
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}
.lig-pagination span.current, .lig-pagination a:hover {
  background: var(--lig-accent);
  color: #fff;
  border-color: var(--lig-accent);
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
  .lig-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 768px) {
  .lig-grid { grid-template-columns: 1fr !important; }
  .lig-card-content { padding: 2rem 1.5rem; }
}