/* ==========================================================================
   Mina Custom Author — frontend styles
   ========================================================================== */

/* --- Nhãn đã kiểm duyệt (dùng chung) --- */
.mina-ca-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	padding: 7px 12px;
	border-radius: 999px;
}
.mina-ca-badge--verified {
	color: #16a34a;
	background: none;
	border: 0;
	padding: 0;
}
.mina-ca-badge--verified svg {
	color: #16a34a;
}

/* --- Hộp tác giả cuối bài viết --- */
.mina-ca-box {
	display: flex;
	gap: 18px;
	align-items: flex-start;
	margin: 40px 0;
	padding: 22px;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	background: #f9fafb;
}
.mina-ca-box__avatar {
	width: 84px;
	height: 84px;
	border-radius: 50%;
	object-fit: cover;
	flex: 0 0 auto;
}
.mina-ca-box__label {
	display: inline-block;
	font-size: 12px;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: #6b7280;
	margin-bottom: 4px;
}
.mina-ca-box__name {
	margin: 0 0 4px;
	font-size: 20px;
	line-height: 1.3;
}
.mina-ca-box__name a {
	text-decoration: none;
	color: inherit;
}
.mina-ca-box__name a:hover {
	text-decoration: underline;
}
.mina-ca-box__badge {
	margin: 2px 0 8px;
}
.mina-ca-box__expertise {
	margin: 0 0 10px;
	color: #4b5563;
	font-size: 15px;
}

/* --- Trang chi tiết Tác giả --- */
.mina-author-wrap {
	max-width: var(--wp--style--global--wide-size, 1340px);
	margin: 40px auto;
	padding-left: var(--wp--style--root--padding-left, 20px);
	padding-right: var(--wp--style--root--padding-right, 20px);
	box-sizing: border-box;
}

/* Tag nhỏ "Tác giả" ở trên cùng */
.mina-author-tag {
	display: inline-block;
	font-size: 13px;
	font-weight: 600;
	color: #b45309;
	background: #fde9d0;
	padding: 6px 14px;
	border-radius: 6px;
	margin-bottom: 16px;
}

/* Hero: ảnh trái + panel phải */
.mina-author-hero {
	display: flex;
	gap: 24px;
	align-items: flex-start;
}
.mina-author-hero__photo {
	flex: 0 0 240px;
	max-width: 240px;
	aspect-ratio: 5 / 6;
	background: #eef1f4;
	border-radius: 12px;
	overflow: hidden;
}
.mina-author__avatar,
.mina-author-hero__photo img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
	object-position: center;
}
.mina-author-hero__photo-fallback {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #e5e7eb, #cbd5e1);
}
.mina-author-hero__panel {
	flex: 1 1 auto;
	background: linear-gradient(135deg, #dfe7ff 0%, #cdd8ff 100%);
	border-radius: 12px;
	padding: 32px;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
}
.mina-author-hero__name {
	margin: 0 0 6px;
	font-size: 30px;
	line-height: 1.2;
	font-weight: 700;
}
.mina-author-hero__expertise {
	margin: 0 0 14px;
	font-size: 17px;
	color: #475569;
}
.mina-author-hero__bio {
	margin-top: 16px;
	color: #374151;
	line-height: 1.7;
}
.mina-author-hero__bio p {
	margin: 0 0 10px;
}
.mina-author-hero__bio p:last-child {
	margin-bottom: 0;
}
.mina-author-hero__bio ul {
	padding-left: 1.2em;
}

/* Section chung — nền màu như thiết kế */
.mina-author-section {
	margin-top: 24px;
	background: #fdece0;
	border-radius: 12px;
	padding: 28px 32px;
}
.mina-author-section__title {
	margin: 0 0 16px;
	font-size: 24px;
	line-height: 1.3;
	font-weight: 700;
	color: #1f2937;
}
.mina-author-bio__content {
	color: #374151;
	line-height: 1.7;
}
.mina-author-bio__content ul {
	padding-left: 1.2em;
}

/* --- Slider bài viết --- */
/* Section bài viết: nền trắng như thiết kế */
.mina-author-posts {
	background: none;
	padding-left: 0;
	padding-right: 0;
}
.mina-author-posts__head {
	margin-bottom: 20px;
}
.mina-author-posts__head .mina-author-section__title {
	margin: 0;
}

/* Grid bài viết: 4 cột desktop */
.mina-author-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 28px 24px;
}
.mina-card__link {
	display: block;
	text-decoration: none;
	color: inherit;
}
.mina-card__thumb {
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 3;
	border-radius: 12px;
	overflow: hidden;
	background: #e5e7eb;
	margin-bottom: 12px;
}
.mina-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .3s ease;
}
.mina-card__link:hover .mina-card__thumb img {
	transform: scale(1.04);
}
.mina-card__thumb-fallback {
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, #e5e7eb, #cbd5e1);
}
.mina-card__title {
	margin: 0 0 8px;
	font-size: 17px;
	line-height: 1.4;
	font-weight: 700;
}
.mina-card__link:hover .mina-card__title {
	color: #2563eb;
}
.mina-card__date {
	font-size: 13px;
	color: #6b7280;
}

/* Phân trang */
.mina-author-pagination {
	margin-top: 32px;
}
.mina-author-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	margin: 0 4px 4px 0;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	color: #111827;
	text-decoration: none;
	font-size: 14px;
	line-height: 1;
	transition: background .2s, color .2s, border-color .2s;
}
.mina-author-pagination ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
}
.mina-author-pagination .page-numbers:hover {
	background: #f3f4f6;
}
.mina-author-pagination .page-numbers.current {
	background: #111827;
	color: #fff;
	border-color: #111827;
}
.mina-author-pagination .page-numbers.dots {
	border-color: transparent;
}

/* Tablet: 3 cột */
@media (max-width: 1024px) {
	.mina-author-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* Hero xếp dọc trên tablet nhỏ */
@media (max-width: 782px) {
	.mina-author-hero {
		flex-direction: column;
	}
	.mina-author-hero__photo {
		flex-basis: auto;
		max-width: 220px;
	}
}

/* Mobile: 2 cột */
@media (max-width: 600px) {
	.mina-author-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 20px 16px;
	}
}

/* Nhãn kiểm duyệt trong byline: xuống dòng riêng ngay dưới tên tác giả */
.mina-ca-byline-badge {
	flex-basis: 100%;
	order: 99;
	margin-top: 14px;
	width: fit-content;
}

/* Thông tin tác giả ngay sau tiêu đề (fallback) */
.mina-ca-title-author {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin: 12px 0 20px;
	font-size: 15px;
	color: #4b5563;
}
.mina-ca-title-author__by {
	color: #6b7280;
}
.mina-ca-title-author__name {
	font-weight: 700;
	text-decoration: none;
	color: inherit;
}
.mina-ca-title-author__name:hover {
	text-decoration: underline;
}
.mina-ca-title-author__expertise {
	position: relative;
	padding-left: 10px;
}
.mina-ca-title-author__expertise::before {
	content: "·";
	position: absolute;
	left: 0;
}
.mina-ca-title-author__badge {
	margin-left: 2px;
}

/* Tên tác giả ở byline: in đậm, bỏ gạch chân */
.wp-block-post-author-name__link,
.mina-ca-box__name a {
	font-weight: 700;
	text-decoration: none;
}
.wp-block-post-author-name__link:hover,
.mina-ca-box__name a:hover {
	text-decoration: none;
}

