/* ============================================================
   RetaPOS Blog stylesheet — index + article pages
   Loaded only on /blog pages via @section Styles in _Layout.
   Palette: navy rgb(20,28,77) · blue #2563eb→#3b82f6 · green #16a34a
   ============================================================ */

/* ---------- Hero (shares global .hero-section navy gradient) ---------- */
.blog-hero { padding-bottom: 3.5rem; }
.blog-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 1.1rem;
	padding: 0.4rem 1rem;
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: #fff;
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 50rem;
	backdrop-filter: blur(6px);
}
.blog-hero__title { font-weight: 800; line-height: 1.15; font-size: clamp(2rem, 4.4vw, 2.9rem); margin-bottom: 1rem; color: #fff; }
.blog-hero__lead { font-size: 1.1rem; line-height: 1.65; color: rgba(255, 255, 255, 0.88); max-width: 42rem; margin: 0 auto 1.5rem; }
.blog-topics { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; }
.blog-topics__pill {
	padding: 0.35rem 0.9rem;
	font-size: 0.82rem;
	font-weight: 600;
	color: #fff;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 50rem;
}

/* ---------- Listing ---------- */
.blog-listing { background: linear-gradient(180deg, #f7f9fc 0%, #ffffff 100%); }

.blog-meta { display: flex; align-items: center; gap: 0.65rem; flex-wrap: wrap; font-size: 0.85rem; color: #6c757d; margin-bottom: 1rem; }
.blog-meta__cat { color: #2563eb; font-weight: 700; background: rgba(37, 99, 235, 0.1); padding: 0.2rem 0.7rem; border-radius: 50rem; }
.blog-author { display: flex; align-items: center; gap: 0.5rem; font-size: 0.88rem; color: #3a4256; font-weight: 600; }
.blog-author i { color: #2563eb; font-size: 1.35rem; }
.blog-readmore { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 700; color: #2563eb; text-decoration: none; }
.blog-readmore i { transition: transform 0.25s ease; }

/* Featured (latest) post */
.blog-featured {
	display: grid;
	grid-template-columns: 1.05fr 1fr;
	background: #fff;
	border: 1px solid #eef1f6;
	border-radius: 22px;
	overflow: hidden;
	box-shadow: 0 12px 36px rgba(20, 28, 77, 0.08);
	margin-bottom: 3rem;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.blog-featured:hover { transform: translateY(-4px); box-shadow: 0 22px 50px rgba(20, 28, 77, 0.14); }
.blog-featured:hover .blog-readmore i { transform: translateX(4px); }
.blog-featured__media { position: relative; min-height: 320px; }
.blog-featured__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.blog-featured__flag {
	position: absolute; top: 1rem; left: 1rem;
	padding: 0.35rem 0.9rem;
	font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
	color: #fff; background: linear-gradient(135deg, #2563eb, #3b82f6);
	border-radius: 50rem; box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}
.blog-featured__body { padding: 2.5rem; display: flex; flex-direction: column; }
.blog-featured__title { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 800; line-height: 1.25; margin-bottom: 0.85rem; }
.blog-featured__title a { color: rgb(20, 28, 77); text-decoration: none; }
.blog-featured:hover .blog-featured__title a { color: #2563eb; }
.blog-featured__excerpt { color: #6c757d; line-height: 1.65; margin-bottom: 1.5rem; }
.blog-featured__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

/* Card grid */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.75rem; }
.blog-card {
	display: flex; flex-direction: column;
	background: #fff;
	border: 1px solid #eef1f6;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 6px 22px rgba(20, 28, 77, 0.05);
	transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
	position: relative;
}
.blog-card:hover { transform: translateY(-6px); box-shadow: 0 18px 42px rgba(20, 28, 77, 0.13); border-color: rgba(37, 99, 235, 0.25); }
.blog-card__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #eef2fb; }
.blog-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.blog-card:hover .blog-card__media img { transform: scale(1.05); }
.blog-card__badge {
	position: absolute; top: 0.85rem; left: 0.85rem;
	padding: 0.3rem 0.8rem; font-size: 0.72rem; font-weight: 700;
	color: #fff; background: rgba(20, 28, 77, 0.85); backdrop-filter: blur(4px);
	border-radius: 50rem; z-index: 2;
}
.blog-card__body { display: flex; flex-direction: column; flex-grow: 1; padding: 1.5rem; }
.blog-card__date { font-size: 0.8rem; color: #9aa3b2; margin-bottom: 0.5rem; }
.blog-card__date i { margin-right: 0.3rem; }
.blog-card__title { font-size: 1.1rem; font-weight: 700; line-height: 1.35; margin-bottom: 0.6rem; }
.blog-card__title a { color: rgb(20, 28, 77); text-decoration: none; }
.blog-card:hover .blog-card__title a { color: #2563eb; }
.blog-card__excerpt { font-size: 0.9rem; color: #6c757d; line-height: 1.55; margin-bottom: 1.1rem; }
.blog-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 1rem; border-top: 1px solid #f1f4f9; }
.blog-card__author { display: flex; align-items: center; gap: 0.45rem; font-size: 0.82rem; color: #3a4256; font-weight: 600; }
.blog-card__author i { color: #2563eb; }
.blog-card__more { font-size: 0.82rem; font-weight: 700; color: #2563eb; }

/* Empty state */
.blog-empty { text-align: center; padding: 4rem 1rem; color: #6c757d; }
.blog-empty i { font-size: 2.75rem; color: #cbd5e6; margin-bottom: 1rem; }
.blog-empty p { font-size: 1.1rem; margin: 0; }

/* ============================================================
   Article (detail) page
   ============================================================ */
.blog-article-meta { display: flex; justify-content: center; align-items: center; gap: 0.85rem; flex-wrap: wrap; font-size: 0.9rem; color: rgba(255, 255, 255, 0.7); }
.blog-article-meta i { margin-right: 0.35rem; }

.blog-figure { margin-top: -40px; position: relative; z-index: 2; }
.blog-figure img { width: 100%; object-fit: cover; max-height: 440px; border-radius: 18px; box-shadow: 0 24px 60px rgba(20, 28, 77, 0.22); }

.blog-back { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; color: #2563eb; text-decoration: none; margin-bottom: 1.75rem; }
.blog-back:hover { color: #1d4ed8; }

/* Body typography (rendered Markdown/HTML) */
.blog-post-body { font-size: 1.075rem; line-height: 1.8; color: #3a4256; }
.blog-post-body > *:first-child { margin-top: 0; }
.blog-post-body h2 { font-size: 1.6rem; font-weight: 800; margin: 2.25rem 0 1rem; color: rgb(20, 28, 77); line-height: 1.3; }
.blog-post-body h3 { font-size: 1.25rem; font-weight: 700; margin: 1.75rem 0 0.75rem; color: rgb(20, 28, 77); }
.blog-post-body h4 { font-size: 1.08rem; font-weight: 700; margin: 1.5rem 0 0.6rem; color: rgb(20, 28, 77); }
.blog-post-body p { margin-bottom: 1.25rem; }
.blog-post-body a { color: #2563eb; text-decoration: underline; text-underline-offset: 2px; }
.blog-post-body a:hover { color: #1d4ed8; }
.blog-post-body ul, .blog-post-body ol { margin-bottom: 1.25rem; padding-left: 1.4rem; }
.blog-post-body li { margin-bottom: 0.5rem; }
.blog-post-body li::marker { color: #2563eb; }
.blog-post-body strong { color: rgb(20, 28, 77); }
.blog-post-body blockquote {
	border-left: 4px solid #2563eb;
	background: #f7f9fc;
	padding: 1rem 1.25rem;
	margin: 1.5rem 0;
	border-radius: 0 12px 12px 0;
	color: #3a4256;
	font-style: italic;
}
.blog-post-body img { max-width: 100%; height: auto; border-radius: 14px; margin: 1.5rem 0; }
.blog-post-body table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; font-size: 0.95rem; }
.blog-post-body th, .blog-post-body td { padding: 12px 14px; border: 1px solid #e6eaf2; text-align: left; }
.blog-post-body th { background: #f7f9fc; font-weight: 700; color: rgb(20, 28, 77); }
.blog-post-body code { background: #f1f4f9; padding: 0.15rem 0.4rem; border-radius: 6px; font-size: 0.9em; color: #1d4ed8; }
.blog-post-body pre { background: #141c4d; color: #e8edff; padding: 1.25rem; border-radius: 12px; overflow: auto; margin: 1.5rem 0; }
.blog-post-body pre code { background: none; color: inherit; padding: 0; }

/* Related-category CTA */
.blog-cta {
	border: none;
	border-radius: 18px;
	padding: 1.75rem 2rem;
	color: #fff;
	background: linear-gradient(135deg, #141c4d 0%, #2563eb 100%);
	box-shadow: 0 16px 40px rgba(20, 28, 77, 0.2);
}
.blog-cta__row { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.blog-cta__icon {
	flex: 0 0 auto; width: 56px; height: 56px;
	display: flex; align-items: center; justify-content: center;
	border-radius: 14px; font-size: 1.5rem;
	background: rgba(255, 255, 255, 0.15); border: 1px solid rgba(255, 255, 255, 0.25);
}
.blog-cta__title { font-weight: 700; font-size: 1.15rem; margin: 0 0 0.2rem; }
.blog-cta__text { margin: 0; font-size: 0.9rem; color: rgba(255, 255, 255, 0.8); }
.blog-cta__btn {
	margin-left: auto; white-space: nowrap;
	display: inline-flex; align-items: center; gap: 0.4rem;
	padding: 0.7rem 1.4rem; border-radius: 50rem;
	font-weight: 600; text-decoration: none;
	color: #141c4d; background: #fff;
	box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
	transition: transform 0.2s ease;
}
.blog-cta__btn:hover { transform: translateY(-2px); color: #141c4d; }

/* Tags */
.blog-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.blog-tag { padding: 0.35rem 0.85rem; font-size: 0.8rem; font-weight: 600; color: #3a4256; background: #eef2fb; border-radius: 50rem; }

/* Share */
.blog-share { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.blog-share__label { font-size: 0.85rem; font-weight: 700; color: #6c757d; }
.blog-share__btn {
	display: inline-flex; align-items: center; gap: 0.4rem;
	padding: 0.5rem 1rem; border-radius: 50rem;
	font-size: 0.85rem; font-weight: 600; text-decoration: none;
	border: 1px solid #e6eaf2; color: #3a4256; background: #fff;
	transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.blog-share__btn:hover { transform: translateY(-2px); }
.blog-share__btn--wa:hover { background: #25D366; color: #fff; border-color: #25D366; }
.blog-share__btn--li:hover { background: #0a66c2; color: #fff; border-color: #0a66c2; }

/* Related articles section */
.blog-related { background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%); }
.blog-related__title { font-weight: 800; color: rgb(20, 28, 77); font-size: clamp(1.5rem, 3vw, 2.1rem); }

/* ---------- Responsive ---------- */
@media (max-width: 767.98px) {
	.blog-featured { grid-template-columns: 1fr; }
	.blog-featured__media { min-height: 220px; position: relative; }
	.blog-featured__media img { position: static; height: 220px; }
	.blog-featured__body { padding: 1.75rem; }
	.blog-cta__btn { margin-left: 0; width: 100%; justify-content: center; }
	.blog-figure { margin-top: -24px; }
}
