/* ===== 女力日誌頁（原 Elementor 頁 709＋JetEngine／JetBlog）＋共用的文章列表元件 ===== */

.grl-blog-top.grl-blog-top,
.grl-blog-cats.grl-blog-cats,
.grl-blog-more.grl-blog-more { margin: 0; }
.grl-blog-top > *, .grl-blog-cats > *, .grl-blog-more > * { margin-block: 0; }

/* 區段標題：閃電＋標題＋右側細線 */
.grl-sec-head.grl-sec-head {
	display: flex;
	align-items: center;
	gap: 20px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 10px 10px 10px 18px;
}
.grl-sec-head > * { margin: 0 !important; }
.grl-sec-head .grl-bolt { flex: 0 0 auto; }
.grl-sec-head .grl-bolt img { display: block; width: 20px; height: auto; }
.grl-sec-head h2.wp-block-heading {
	flex: 0 0 auto;
	font-family: Helvetica, sans-serif;
	font-size: 24px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 1px;
	color: #242424;
}
.grl-sec-head::after { content: ""; flex: 1 1 auto; border-top: 1px solid #c5c5c5; }

/* 分類小標籤＋文章標題 */
.grl-badge.grl-badge {
	align-self: flex-start;
	padding: 3px 4px;
	border: 1px solid #757575;
	border-radius: 5px;
	font-family: Helvetica, sans-serif;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
	color: #757575;
}
.grl-badge a { color: inherit; text-decoration: none; }
.grl-item-text.grl-item-text { display: flex; flex-direction: column; gap: 1px; margin: 0; padding: 10px; }
.grl-item-text > * { margin: 0 !important; }
.grl-item-text h3.wp-block-post-title {
	font-family: Montserrat, sans-serif;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: .5px;
}
.grl-item-text h3.wp-block-post-title a { color: #707c84; text-decoration: none; }
.grl-item-text h3.wp-block-post-title a:hover { color: #ea6eac; }

/* 第一區：輪播＋精選文章 */
.grl-blog-top.grl-blog-top { padding: 250px 40px 40px; }
.grl-blog-top .grl-blog-top-cols.grl-blog-top-cols {
	max-width: 1200px;
	margin: 0 auto;
	gap: 0;
	flex-wrap: nowrap;
	align-items: flex-start;
}
.grl-blog-top .grl-blog-top-cols.grl-blog-top-cols > .grl-blog-latest { flex: 0 0 70%; margin: 0; padding-bottom: 10px; }
.grl-blog-top .grl-blog-top-cols.grl-blog-top-cols > .grl-blog-featured {
	flex: 0 0 30%;
	margin: 0;
	padding: 30px 20px 15px;
	background: #f9f9f9;
	border: 8px solid #e0e0e0;
}
.grl-blog-featured > * { margin-block: 0 !important; }
.grl-blog-featured .grl-sec-head.grl-sec-head { padding: 10px 0 10px 18px; }

/* 輪播（grl-site.js 會加上箭頭與圓點） */
.grl-carousel.grl-carousel { position: relative; margin: 0; padding: 10px 0 30px; }
.grl-carousel.grl-carousel > * { margin: 0; }
.grl-carousel .wp-block-post-template {
	display: flex;
	margin: 0;
	padding: 0;
	overflow: hidden;
	list-style: none;
}
.grl-carousel .wp-block-post-template > li {
	flex: 0 0 100%;
	margin: 0;
	padding: 10px;
	box-sizing: border-box;
	transition: transform .5s ease;
}
.grl-carousel .wp-block-post-featured-image { margin: 0; }
.grl-carousel .wp-block-post-featured-image img { display: block; width: 100%; aspect-ratio: 820 / 506; object-fit: cover; }
.grl-carousel h3.wp-block-post-title {
	margin: 0 0 20px;
	font-family: Helvetica, sans-serif;
	font-size: 26px;
	font-weight: 400;
	line-height: 1.2;
}
.grl-carousel h3.wp-block-post-title a { color: #707c84; text-decoration: none; }
.grl-carousel-arrow {
	position: absolute;
	top: calc(50% - 10px);
	width: 36px;
	height: 36px;
	margin: -18px 0 0 !important;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	z-index: 2;
}
.grl-carousel-arrow::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 11px;
	height: 11px;
	border: solid #fff;
	border-width: 0 2.5px 2.5px 0;
	transform: translate(-70%, -50%) rotate(-45deg);
}
.grl-carousel-arrow.is-prev { left: 20px; }
.grl-carousel-arrow.is-prev::before { transform: translate(-30%, -50%) rotate(135deg); }
.grl-carousel-arrow.is-next { right: 20px; }
.grl-carousel-dots.grl-carousel-dots { display: flex; justify-content: center; margin: 0; padding: 0; list-style: none; }
.grl-carousel-dots li { margin: 0; padding: 5px 6px; line-height: 0; }
.grl-carousel-dots button {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #8a8a8a;
	cursor: pointer;
}
.grl-carousel-dots button:hover { background: #ea6eac; }
.grl-carousel-dots .is-active button { background: #8f89c0; }

/* 精選文章清單 */
.grl-blog-featured > .grl-side-list.grl-side-list { margin: 10px 0 0 !important; }
/* 舊 JetEngine 清單左右各多出 10px */
.grl-side-list .wp-block-post-template.wp-block-post-template { max-width: none; margin: 0 -10px; padding: 0; list-style: none; }
.grl-side-list .wp-block-post-template > li {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 4px 10px;
}
.grl-side-list .wp-block-post-featured-image { flex: 0 0 28%; margin: 0; padding: 5px; }
.grl-side-list .wp-block-post-featured-image img { display: block; width: 75px; height: 75px; border-radius: 50%; object-fit: cover; }
.grl-side-list .grl-item-text.grl-item-text { flex: 0 0 72%; gap: 4px; }

/* 第二區：文章分類 */
.grl-blog-cats.grl-blog-cats { padding: 40px 0; background: #fff; }
.grl-cat-row.grl-cat-row {
	display: flex;
	gap: 20px;
	max-width: 1200px;
	margin: 30px auto 0;
	padding: 0 0 10px 10px;
}
.grl-cat-row > * { margin: 0 !important; }
.grl-cat-row .wp-block-cover.grl-cat {
	flex: 1 1 24%;
	min-height: 200px;
	padding: 10px;
	border-radius: 8px;
	overflow: hidden;
}
.grl-cat .wp-block-cover__inner-container { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.grl-cat .wp-block-cover__inner-container > * { margin: 0 !important; }
.grl-cat h3.wp-block-heading {
	font-family: Helvetica, sans-serif;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.3;
	color: #fff;
}
.grl-cat .wp-block-button__link {
	padding: 8px 14px;
	border: 1px solid #fff;
	border-radius: 8px;
	background: transparent;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 2px;
	text-transform: uppercase;
}

/* 第三區：更多文章（卡片） */
.grl-blog-more.grl-blog-more { padding: 0 0 80px; background: #fff; }
.grl-more-list.grl-more-list { max-width: 1200px; margin: 20px auto 0; }
.grl-more-list .wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	margin: 0;
	padding: 0;
	list-style: none;
}
.grl-more-list .wp-block-post-template > li { display: flex; flex-direction: column; margin: 0; padding: 10px; }
.grl-more-list .wp-block-post-template > li > * { margin: 0; background: #fff; }
.grl-more-list li > .wp-block-post-featured-image {
	border: 1px solid #e2e2e2;
	border-bottom: 0;
	border-radius: 8px 8px 0 0;
	box-shadow: 0 -2px 10px -2px rgba(201, 201, 201, .5);
}
.grl-more-list .wp-block-post-featured-image img { display: block; width: 100%; height: 172px; object-fit: cover; border-radius: 8px 8px 0 0; }
.grl-more-list li > .grl-item-text {
	flex: 1 1 auto;
	padding: 10px 10px 30px;
	border: 1px solid #e2e2e2;
	border-top: 0;
	border-radius: 0 0 8px 8px;
	box-shadow: 0 6px 10px -2px rgba(201, 201, 201, .5);
}
.grl-more-list .wp-block-query-pagination { display: none; }
.grl-loadmore.grl-loadmore { justify-content: center; margin: 55px 0 0; padding-bottom: 10px; }
.grl-loadmore .wp-block-button__link {
	padding: var(--grl-btn-pad, 16px 23px);
	border: 2px solid #f4d204;
	border-radius: 0;
	background: #ea6eac;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 2px;
	text-transform: uppercase;
	cursor: pointer;
}
.grl-loadmore .wp-block-button__link:hover { background: transparent; color: #ea6eac; }
.grl-loadmore.is-loading .wp-block-button__link { opacity: .6; pointer-events: none; }
.grl-loadmore.is-done { display: none; }

@media (max-width: 1024px) {
	.grl-blog-more { --grl-btn-pad: 15px 22px; }
	.grl-carousel h3.wp-block-post-title { font-size: 24px; }
	.grl-blog-top.grl-blog-top { padding: 80px 40px; }
	.grl-blog-top .grl-blog-top-cols.grl-blog-top-cols { flex-direction: column; }
	.grl-blog-top .grl-blog-top-cols.grl-blog-top-cols > .grl-blog-latest,
	.grl-blog-top .grl-blog-top-cols.grl-blog-top-cols > .grl-blog-featured { flex: 0 0 auto; width: 100%; }
	.grl-side-list .wp-block-post-template.wp-block-post-template { display: grid; grid-template-columns: repeat(2, 1fr); row-gap: 8px; }
	.grl-cat-row.grl-cat-row { gap: 10px; margin-top: 20px; padding: 0; }
	.grl-cat-row .wp-block-cover.grl-cat { min-height: 180px; }
	.grl-more-list .wp-block-post-template { grid-template-columns: repeat(2, 1fr); }
	.grl-more-list .wp-block-post-featured-image img { height: auto; aspect-ratio: 278 / 172; }
}

@media (max-width: 767px) {
	.grl-blog-top.grl-blog-top { padding: 160px 24px 64px; }
	.grl-blog-top .grl-blog-top-cols.grl-blog-top-cols > .grl-blog-latest { padding-bottom: 0; }
	.grl-carousel.grl-carousel { margin: 0 -10px; padding-top: 0; }
	.grl-blog-more { --grl-btn-pad: 14px 21px; }
	.grl-carousel h3.wp-block-post-title { font-size: 20px; }
	.grl-side-list .wp-block-post-template.wp-block-post-template { grid-template-columns: 1fr; row-gap: 0; }
	.grl-side-list .grl-item-text.grl-item-text { padding: 5px 0; }
	.grl-blog-top .grl-blog-top-cols.grl-blog-top-cols > .grl-blog-featured { padding: 0 5px; }
	.grl-blog-cats.grl-blog-cats { padding: 20px 0; }
	.grl-cat-row.grl-cat-row { flex-wrap: wrap; }
	.grl-cat-row .wp-block-cover.grl-cat { flex: 1 1 45%; min-height: 160px; }
	.grl-blog-more.grl-blog-more { padding-bottom: 40px; }
	.grl-more-list .wp-block-post-template { grid-template-columns: 1fr; }
}
