/* ==========================================================================
   Law Guide USA — post section shortcodes
   [lgu_latest_articles]  [lgu_category_tiles]  [lgu_category_split]
   Colors come from the Astra global palette.
   ========================================================================== */

.lgu-posts {
	--lgu-navy: var(--ast-global-color-0, #0e2b55);
	--lgu-red: var(--ast-global-color-1, #b8232e);
	--lgu-ink: var(--ast-global-color-2, #0f1d33);
	--lgu-body: var(--ast-global-color-3, #4b5567);
	--lgu-tint: var(--ast-global-color-5, #f6f8fb);
	--lgu-dark: var(--ast-global-color-6, #0a1f3d);
	--lgu-line: var(--ast-global-color-7, #e8ebf0);
	--lgu-muted: var(--ast-global-color-8, #8a93a3);
	--lgu-head: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
	--lgu-shadow: 0 1px 2px rgba(15, 29, 51, .04), 0 4px 16px rgba(15, 29, 51, .05);
	--lgu-shadow-hover: 0 2px 4px rgba(15, 29, 51, .04), 0 18px 40px -12px rgba(15, 29, 51, .18);
	font-family: "Inter", system-ui, sans-serif;
	color: var(--lgu-body);
}
.lgu-posts *, .lgu-posts *::before, .lgu-posts *::after { box-sizing: border-box; }
.lgu-posts a { color: inherit; text-decoration: none; box-shadow: none; }
.lgu-posts h3 { margin: 0; padding: 0; font-family: var(--lgu-head); color: var(--lgu-ink); }
.lgu-posts p { margin: 0; }
.lgu-posts ul, .lgu-posts ol, .lgu-posts li { margin: 0; padding: 0; list-style: none; }

/* Shared ------------------------------------------------------------------ */
.lgu-posts .lgu-img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform .5s ease; }
.lgu-posts .lgu-ph {
	display: grid; place-items: center; width: 100%; height: 100%;
	background: linear-gradient(135deg, #eef2f7 0%, #e2e8f0 100%); color: #b3bfcf; transition: transform .5s ease;
}
.lgu-posts .lgu-ph svg { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.lgu-posts .lgu-arrow { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; transition: transform .25s; }

.lgu-posts .lgu-badge {
	display: inline-block; padding: 5px 11px; border-radius: 999px; background: var(--lgu-navy); color: #fff;
	font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; line-height: 1.2;
	box-shadow: 0 4px 12px -4px rgba(14, 43, 85, .5);
}
.lgu-posts .lgu-badge--light { background: rgba(255, 255, 255, .92); color: var(--lgu-navy); box-shadow: none; backdrop-filter: blur(6px); }
.lgu-posts .lgu-cat { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--lgu-red); }
.lgu-posts .lgu-meta { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--lgu-muted); }
.lgu-posts .lgu-meta i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }

/* Whole card clickable via the title link */
.lgu-posts .lgu-card__title a::after,
.lgu-posts .lgu-tile__title a::after,
.lgu-posts .lgu-big__title a::after,
.lgu-posts .lgu-hcard__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }

/* [lgu_latest_articles] — card grid --------------------------------------- */
.lgu-posts.lgu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.lgu-posts .lgu-card {
	position: relative; display: flex; flex-direction: column; overflow: hidden;
	background: #fff; border: 1px solid var(--lgu-line); border-radius: 18px; box-shadow: var(--lgu-shadow);
	transition: transform .3s ease, box-shadow .3s ease, border-color .3s;
}
.lgu-posts .lgu-card:hover { transform: translateY(-5px); box-shadow: var(--lgu-shadow-hover); border-color: transparent; }
.lgu-posts .lgu-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.lgu-posts .lgu-card:hover .lgu-img, .lgu-posts .lgu-card:hover .lgu-ph { transform: scale(1.04); }
.lgu-posts .lgu-card__media .lgu-badge { position: absolute; top: 14px; left: 14px; }
.lgu-posts .lgu-card__body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 24px; }
.lgu-posts .lgu-card__title { margin: 10px 0; font-size: 1.12rem; font-weight: 700; line-height: 1.4; }
.lgu-posts .lgu-card:hover .lgu-card__title a { color: var(--lgu-navy); }
.lgu-posts .lgu-card__excerpt { font-size: .92rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lgu-posts .lgu-card__more {
	display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 18px;
	font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--lgu-red);
}
.lgu-posts .lgu-card:hover .lgu-card__more .lgu-arrow { transform: translateX(5px); }

/* [lgu_category_tiles] — overlay tiles ------------------------------------ */
.lgu-posts.lgu-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.lgu-posts .lgu-tile {
	position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 440px;
	border-radius: 22px; overflow: hidden; isolation: isolate; box-shadow: var(--lgu-shadow);
	transition: transform .35s ease, box-shadow .35s ease;
}
.lgu-posts .lgu-tile:hover { transform: translateY(-6px); box-shadow: var(--lgu-shadow-hover); }
.lgu-posts .lgu-tile__media { position: absolute; inset: 0; z-index: -2; }
.lgu-posts .lgu-tile__media .lgu-ph { place-items: start center; padding-top: 22%; }
.lgu-posts .lgu-tile__media .lgu-ph svg { width: 52px; height: 52px; }
.lgu-posts .lgu-tile:hover .lgu-img, .lgu-posts .lgu-tile:hover .lgu-ph { transform: scale(1.05); }
.lgu-posts .lgu-tile__shade {
	position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(180deg, rgba(10, 31, 61, 0) 30%, rgba(10, 31, 61, .72) 58%, rgba(10, 31, 61, .96) 100%);
}
.lgu-posts .lgu-tile .lgu-badge { position: absolute; top: 18px; left: 18px; }
.lgu-posts .lgu-tile__body { padding: 26px; color: #d3dcea; }
.lgu-posts .lgu-tile__meta { font-size: .8rem; color: #a9b7cc; }
.lgu-posts .lgu-tile__title { margin: 8px 0 10px; color: #fff; font-size: 1.3rem; font-weight: 800; line-height: 1.3; letter-spacing: -.01em; }
.lgu-posts .lgu-tile__excerpt { font-size: .9rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lgu-posts .lgu-tile__go {
	display: flex; align-items: center; gap: 8px; margin-top: 18px; padding-top: 16px;
	border-top: 1px solid rgba(255, 255, 255, .16); font-size: .85rem; font-weight: 600; color: #fff; transition: color .25s;
}
.lgu-posts .lgu-tile:hover .lgu-tile__go { color: #ff9aa2; }
.lgu-posts .lgu-tile:hover .lgu-tile__go .lgu-arrow { transform: translateX(5px); }

/* [lgu_category_split] — big card + stacked cards ------------------------- */
.lgu-posts.lgu-split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: stretch; }
.lgu-posts .lgu-big {
	position: relative; display: flex; flex-direction: column; overflow: hidden;
	background: #fff; border: 1px solid var(--lgu-line); border-radius: 22px; box-shadow: var(--lgu-shadow);
	transition: transform .35s ease, box-shadow .35s ease;
}
.lgu-posts .lgu-big:hover { transform: translateY(-5px); box-shadow: var(--lgu-shadow-hover); }
.lgu-posts .lgu-big__media { aspect-ratio: 16 / 9; overflow: hidden; }
.lgu-posts .lgu-big__media .lgu-ph svg { width: 56px; height: 56px; }
.lgu-posts .lgu-big:hover .lgu-img, .lgu-posts .lgu-big:hover .lgu-ph { transform: scale(1.04); }
.lgu-posts .lgu-big__body { display: flex; flex-direction: column; flex: 1; padding: 26px 30px 28px; }
.lgu-posts .lgu-big__title { margin: 10px 0 12px; font-size: clamp(1.35rem, 2.2vw, 1.7rem); font-weight: 800; line-height: 1.25; letter-spacing: -.01em; }
.lgu-posts .lgu-big:hover .lgu-big__title a { color: var(--lgu-navy); }
.lgu-posts .lgu-big__excerpt { font-size: .97rem; line-height: 1.6; }
.lgu-posts .lgu-big__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 22px; }
.lgu-posts .lgu-big__go { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 700; color: var(--lgu-red); }
.lgu-posts .lgu-big:hover .lgu-big__go .lgu-arrow { transform: translateX(5px); }

.lgu-posts .lgu-stack { display: grid; grid-auto-rows: 1fr; gap: 16px; }
.lgu-posts .lgu-hcard {
	position: relative; display: grid; grid-template-columns: 168px 1fr; gap: 20px; align-items: center; padding: 12px;
	background: #fff; border: 1px solid var(--lgu-line); border-radius: 18px;
	transition: border-color .25s, box-shadow .25s, transform .25s;
}
.lgu-posts .lgu-hcard::before {
	content: ""; position: absolute; left: -1px; top: 22%; bottom: 22%; width: 3px; border-radius: 3px;
	background: var(--lgu-red); opacity: 0; transition: opacity .25s;
}
.lgu-posts .lgu-hcard:hover { border-color: transparent; box-shadow: var(--lgu-shadow-hover); transform: translateX(4px); }
.lgu-posts .lgu-hcard:hover::before { opacity: 1; }
.lgu-posts .lgu-hcard__media { height: 100%; min-height: 112px; border-radius: 12px; overflow: hidden; }
.lgu-posts .lgu-hcard__media .lgu-ph svg { width: 28px; height: 28px; }
.lgu-posts .lgu-hcard__body { padding: 6px 10px 6px 0; }
.lgu-posts .lgu-hcard__title { margin: 6px 0 8px; font-size: 1.04rem; font-weight: 700; line-height: 1.38; }
.lgu-posts .lgu-hcard:hover .lgu-hcard__title a { color: var(--lgu-navy); }

/* Editor-only notice ------------------------------------------------------ */
.lgu-notice { padding: 12px 16px; border: 1px dashed #b8232e; border-radius: 8px; background: #fbeeef; color: #7a1820; font-size: .9rem; }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 1000px) {
	.lgu-posts.lgu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
	.lgu-posts.lgu-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.lgu-posts.lgu-tiles .lgu-tile:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 340px; }
	.lgu-posts.lgu-split { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
	.lgu-posts.lgu-grid, .lgu-posts.lgu-tiles { grid-template-columns: 1fr; }
	.lgu-posts .lgu-tile, .lgu-posts.lgu-tiles .lgu-tile:last-child:nth-child(odd) { min-height: 380px; }
	.lgu-posts .lgu-hcard { grid-template-columns: 104px 1fr; gap: 14px; }
	.lgu-posts .lgu-hcard__media { min-height: 88px; }
	.lgu-posts .lgu-hcard__title { font-size: .98rem; }
	.lgu-posts .lgu-big__body { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
	.lgu-posts *, .lgu-posts *::before, .lgu-posts *::after { transition: none !important; }
}

/* [lgu_hero_spotlight] — featured card in the hero ------------------------ */
.lgu-posts.lgu-spotlight {
	position: relative; border-radius: 22px; background: #fff; padding: 12px;
	box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .55); transition: transform .35s ease;
}
.lgu-posts.lgu-spotlight:hover { transform: translateY(-6px); }
.lgu-posts .lgu-spotlight__media { position: relative; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; }
.lgu-posts .lgu-spotlight__media .lgu-ph svg { width: 56px; height: 56px; }
.lgu-posts.lgu-spotlight:hover .lgu-img { transform: scale(1.04); }
.lgu-posts .lgu-spotlight__flag {
	position: absolute; top: 14px; left: 14px; padding: 6px 12px; border-radius: 999px; background: var(--lgu-red); color: #fff;
	font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1.2;
}
.lgu-posts .lgu-spotlight__panel { padding: 20px 14px 10px; }
.lgu-posts h2.lgu-spotlight__title { margin: 8px 0 16px; padding: 0; font-family: var(--lgu-head); color: var(--lgu-ink); font-size: clamp(1.25rem, 2vw, 1.55rem); font-weight: 800; line-height: 1.25; letter-spacing: -.01em; }
.lgu-posts .lgu-spotlight__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.lgu-posts .lgu-spotlight__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lgu-posts .lgu-spotlight__go {
	display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--lgu-navy); color: #fff;
	transition: background .25s, transform .25s;
}
.lgu-posts.lgu-spotlight:hover .lgu-spotlight__go { background: var(--lgu-red); transform: rotate(-45deg); }

/* [lgu_trending] — numbered strip ----------------------------------------- */
.lgu-posts.lgu-trending {
	display: grid; grid-template-columns: auto 1fr; align-items: stretch; overflow: hidden;
	border-radius: 18px; background: #fff; border: 1px solid var(--lgu-line); box-shadow: 0 20px 40px -24px rgba(15, 29, 51, .35);
}
.lgu-posts .lgu-trending__label {
	display: flex; align-items: center; gap: 8px; margin: 0; padding: 0 26px; background: var(--lgu-tint); border-right: 1px solid var(--lgu-line);
	font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--lgu-red);
}
.lgu-posts .lgu-trending__label svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lgu-posts .lgu-trending__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lgu-posts .lgu-trending__list li + li { border-left: 1px solid var(--lgu-line); }
.lgu-posts .lgu-trending__list a { display: flex; gap: 12px; height: 100%; padding: 22px 20px; transition: background .2s; }
.lgu-posts .lgu-trending__list a:hover { background: var(--lgu-tint); }
.lgu-posts .lgu-trending__num { flex: none; min-width: 30px; font-family: var(--lgu-head); font-size: 1.35rem; font-weight: 800; line-height: 1; color: #d3d9e3; transition: color .2s; }
.lgu-posts .lgu-trending__list a:hover .lgu-trending__num { color: var(--lgu-red); }
.lgu-posts .lgu-trending__text { font-family: var(--lgu-head); font-size: .92rem; font-weight: 700; line-height: 1.35; color: var(--lgu-ink); }
.lgu-posts .lgu-trending__text .lgu-cat { display: block; margin-bottom: 4px; font-family: "Inter", sans-serif; font-size: .66rem; }

@media (max-width: 1024px) {
	.lgu-posts.lgu-trending { grid-template-columns: 1fr; }
	.lgu-posts .lgu-trending__label { padding: 14px 20px; border-right: 0; border-bottom: 1px solid var(--lgu-line); }
	.lgu-posts .lgu-trending__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.lgu-posts .lgu-trending__list li:nth-child(3) { border-left: 0; }
	.lgu-posts .lgu-trending__list li:nth-child(n+3) { border-top: 1px solid var(--lgu-line); }
}
@media (max-width: 640px) {
	.lgu-posts .lgu-trending__list { grid-template-columns: 1fr; }
	.lgu-posts .lgu-trending__list li + li { border-left: 0; border-top: 1px solid var(--lgu-line); }
	.lgu-posts .lgu-trending__list a { padding: 16px 20px; }
}

/* Blog archives (inc/lgu-archive.php) ------------------------------------- */
.lgu-blog-archive .lgu-posts.lgu-archive { margin: 8px 0 48px; }
.lgu-blog-archive .lgu-posts h2.lgu-card__title { margin: 10px 0; font-size: 1.12rem; font-weight: 700; line-height: 1.4; }
.lgu-blog-archive .ast-pagination { margin-top: 0; }
.lgu-blog-archive .ast-pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.lgu-blog-archive .ast-pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; margin: 0; padding: 0 16px;
	border: 1px solid var(--ast-global-color-7, #e8ebf0); border-radius: 10px; background: #fff;
	font-size: .92rem; font-weight: 600; line-height: 1; color: var(--ast-global-color-0, #0e2b55); text-decoration: none;
	transition: border-color .2s, background .2s, color .2s;
}
.lgu-blog-archive .ast-pagination a.page-numbers:hover { border-color: var(--ast-global-color-0, #0e2b55); }
.lgu-blog-archive .ast-pagination .page-numbers.current { border-color: var(--ast-global-color-0, #0e2b55); background: var(--ast-global-color-0, #0e2b55); color: #fff; }
.lgu-blog-archive .ast-pagination .page-numbers.dots { border: 0; background: none; }
