/* ═══════════════════════════════════════════════════════════
   VINHGROUP — Archive & Search Shared Styles
   Dùng chung cho: archive.php, search.php, category, tag, author
═══════════════════════════════════════════════════════════ */

/* ── WRAP ─────────────────────────────────────────────────── */
.vg-archive-wrap,
.vg-search-wrap-page { background: #FAF7F2; min-height: 100vh; }

/* ── ARCHIVE / SEARCH HERO BANNER ────────────────────────── */
.vg-arc-banner {
  background: #0D1B2A;
  padding: 64px 0 52px;
  position: relative;
  overflow: hidden;
}
.vg-arc-banner::before {
  content: '';
  position: absolute;
  top: -60%; right: -5%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(201,168,64,0.08) 0%, transparent 65%);
  pointer-events: none;
}
.vg-arc-banner::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(to right, #C9A840, rgba(201,168,64,0.1));
}
.vg-arc-banner__inner {
  max-width: 1360px; margin: 0 auto; padding: 0 24px;
}
.vg-arc-banner__type {
  font-size: 11px; font-weight: 700; letter-spacing: 0.25em;
  text-transform: uppercase; color: #C9A840;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.vg-arc-banner__type::before {
  content: ''; width: 28px; height: 1px; background: #C9A840;
}
.vg-arc-banner__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700; color: #FAF7F2;
  margin: 0 0 14px;
}
.vg-arc-banner__desc {
  font-size: 15px; color: rgba(255,255,255,0.5);
}
.vg-arc-banner__meta {
  display: flex; flex-wrap: wrap; gap: 20px; margin-top: 20px;
}
.vg-arc-banner__badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.07);
  padding: 6px 14px; border-radius: 20px;
}
.vg-arc-banner__badge svg { flex-shrink: 0; }

/* ── MAIN LAYOUT ─────────────────────────────────────────── */
.vg-arc-layout {
  max-width: 1360px; margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ── POST GRID ───────────────────────────────────────────── */
.vg-post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-bottom: 48px;
}

/* Post Card — CSS Overlay Link Pattern */
/* Force always visible — override [data-vg-anim]{opacity:0} from animations.css */
.vg-post-card[data-vg-anim],
.vg-post-grid .vg-post-card {
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
}
.vg-post-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #EDE8DC;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1),
              box-shadow 0.4s cubic-bezier(0.4,0,0.2,1),
              border-color 0.4s ease;
  display: flex; flex-direction: column;
  position: relative;
  cursor: pointer;
  text-decoration: none;
  opacity: 1;
}
.vg-post-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.12);
  border-color: #C9A840;
}

/* Overlay link — phủ toàn bộ card, z-index thấp */
.vg-post-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
}
/* Các link con — nổi trên overlay */
.vg-card-link-above {
  position: relative;
  z-index: 1;
}

.vg-post-card__img {
  height: 220px; overflow: hidden;
  position: relative; background: #0D1B2A;
  flex-shrink: 0;
}
.vg-post-card__img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease;
}
.vg-post-card:hover .vg-post-card__img img { transform: scale(1.06); }
.vg-post-card__no-img {
  height: 220px; background: linear-gradient(135deg, #0D1B2A 0%, #1A2E44 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; flex-shrink: 0;
}

.vg-post-card__cat-badge {
  position: absolute; top: 16px; left: 16px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; color: #fff;
  background: #C9A840; padding: 4px 12px;
  border-radius: 20px; z-index: 2;
}

.vg-post-card__body {
  padding: 24px 28px 28px;
  display: flex; flex-direction: column; flex: 1;
}
.vg-post-card__meta {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 12px;
}
.vg-post-card__date {
  font-size: 12px; color: #8B7D6B;
  display: flex; align-items: center; gap: 5px;
}
.vg-post-card__read {
  font-size: 12px; color: #8B7D6B;
  display: flex; align-items: center; gap: 5px;
}
.vg-post-card__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1875rem; font-weight: 700;
  color: #0D1B2A; line-height: 1.4;
  margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
  transition: color 0.3s;
}
.vg-post-card:hover .vg-post-card__title { color: #C9A840; }
.vg-post-card__excerpt {
  font-size: 14px; color: #6B5E4E; line-height: 1.75;
  margin-bottom: 20px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.vg-post-card__footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 16px;
  border-top: 1px solid #F5EFE3;
}
.vg-post-card__author {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: #6B5E4E; font-weight: 500;
}
.vg-post-card__author img {
  width: 28px; height: 28px; border-radius: 50%;
  object-fit: cover; border: 2px solid #EDE8DC;
}
.vg-post-card__link {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: #C9A840;
  display: flex; align-items: center; gap: 5px;
}
.vg-post-card__link svg { transition: transform 0.3s; }
.vg-post-card:hover .vg-post-card__link svg { transform: translateX(4px); }

/* ── FEATURED FIRST POST (full width) ────────────────────── */
.vg-post-card--featured {
  grid-column: 1 / -1;
  flex-direction: row;
}
.vg-post-card--featured .vg-post-card__img,
.vg-post-card--featured .vg-post-card__no-img {
  width: 46%; height: auto; min-height: 300px; flex-shrink: 0;
}
.vg-post-card--featured .vg-post-card__body { padding: 36px 40px; }
.vg-post-card--featured .vg-post-card__title {
  font-size: 1.5rem; -webkit-line-clamp: 4;
}
.vg-post-card--featured .vg-post-card__excerpt {
  -webkit-line-clamp: 5;
}

/* ── NO RESULTS ──────────────────────────────────────────── */
.vg-no-results {
  text-align: center; padding: 80px 40px;
  background: #fff; border-radius: 16px;
  border: 1px solid #EDE8DC;
}
.vg-no-results__icon { font-size: 4rem; margin-bottom: 20px; display: block; }
.vg-no-results__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem; font-weight: 700; color: #0D1B2A;
  margin-bottom: 12px;
}
.vg-no-results__desc { font-size: 15px; color: #6B5E4E; margin-bottom: 28px; line-height: 1.7; }

/* ── PAGINATION ──────────────────────────────────────────── */
.vg-pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 8px; margin-top: 8px;
}
.vg-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 8px;
  font-size: 14px; font-weight: 600; text-decoration: none;
  border: 1px solid #EDE8DC; color: #0D1B2A;
  transition: 0.3s ease; background: #fff;
}
.vg-pagination .page-numbers:hover,
.vg-pagination .page-numbers.current {
  background: #0D1B2A; color: #fff; border-color: #0D1B2A;
}
.vg-pagination .page-numbers.current { background: #C9A840; border-color: #C9A840; }
.vg-pagination .prev, .vg-pagination .next {
  width: auto; padding: 0 18px; gap: 6px;
}

/* ── SEARCH FORM (banner) ─────────────────────────────────── */
.vg-search-form-hero {
  margin-top: 32px;
}
.vg-search-form-hero form {
  display: flex;
  max-width: 620px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(201,168,64,0.35);
  border-radius: 50px;
  overflow: hidden;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}
.vg-search-form-hero form:focus-within {
  border-color: rgba(201,168,64,0.75);
  background: rgba(255,255,255,0.11);
  box-shadow: 0 4px 32px rgba(201,168,64,0.20);
}
.vg-search-form-hero input[type="search"] {
  flex: 1 !important;
  padding: 0 28px !important;
  height: 56px !important;
  line-height: 56px !important;
  border: none !important;
  margin: 0 !important;
  background: transparent !important;
  color: #fff !important;
  font-family: 'Manrope', sans-serif !important;
  font-size: 15px !important;
  outline: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  align-self: center !important;
  vertical-align: middle !important;
  display: block !important;
  -webkit-appearance: none !important;
  letter-spacing: 0.02em !important;
}
.vg-search-form-hero input::placeholder { color: rgba(255,255,255,0.35); }
.vg-search-form-hero button {
  margin: 6px 6px 6px 0;
  padding: 12px 28px;
  background: #C9A840;
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: 'Manrope', sans-serif;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 40px;
  transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
  white-space: nowrap;
}
.vg-search-form-hero button:hover {
  background: #DDB84E;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(201,168,64,0.4);
}


/* ── SEARCH HIGHLIGHT ────────────────────────────────────── */
mark {
  background: rgba(201,168,64,0.25);
  color: inherit; border-radius: 3px; padding: 1px 3px;
}

/* ── SIDEBAR (shared with single.php) ─────────────────────
   Styles are in single.css — just ensure sticky works
──────────────────────────────────────────────────────────── */
.vg-arc-sidebar-col { padding-left: 16px; }
.vg-arc-sidebar-col .vg-sidebar { position: sticky; top: 100px; }

/* Filter bar */
.vg-arc-filterbar {
  display: flex; flex-wrap: wrap; gap: 10px;
  align-items: center; margin-bottom: 32px;
  padding: 18px 24px; background: #fff;
  border-radius: 10px; border: 1px solid #EDE8DC;
}
.vg-arc-filterbar__label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: #6B5E4E;
  margin-right: 4px;
}
.vg-arc-filter {
  font-size: 13px; font-weight: 600; padding: 6px 16px;
  border-radius: 20px; text-decoration: none;
  background: #F5EFE3; color: #3D2B1F; transition: 0.3s;
}
.vg-arc-filter:hover, .vg-arc-filter.active {
  background: #0D1B2A; color: #fff;
}
.vg-arc-filterbar__count {
  margin-left: auto; font-size: 13px; color: #8B7D6B;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .vg-arc-layout { padding: 36px 20px 60px; }
}
@media (max-width: 900px) {
  .vg-post-card--featured { flex-direction: column; }
  .vg-post-card--featured .vg-post-card__img,
  .vg-post-card--featured .vg-post-card__no-img { width: 100%; height: 260px; }
  .vg-arc-sidebar-col .vg-sidebar { position: static; }
}
@media (max-width: 680px) {
  .vg-post-grid { grid-template-columns: 1fr; }
  .vg-post-card--featured .vg-post-card__body { padding: 24px 20px; }
  .vg-arc-banner { padding: 48px 0 40px; }
}


