/* W4 blog category pillar grid (oct_remarket) - CANON = Claude Design tile style. */
/* Loaded by catalog/controller/extension/module/oct_blogcategory.php in grid_mode (general blog only). */
/* Style copied from design/blog_layout_FINAL.html (.cat-tile*). Spec: Analysis/TASK-05_W4_blog_structure/design/TILE_STYLE_SPEC.md */
/* Full-bleed photo + diagonal red chevron over photo + name on photo + thin translucent green plank. */
/* Brand: green #10591b, green-dark #0c4615, red #ff0000. ASCII hyphen only (no em/en dash). */

/* compact search above the grid (markup IDs kept for the existing blog-search JS) */
.blog-cat-search {
	max-width: 360px;
	margin: 0 auto 28px;
}
.blog-cat-search .rm-blog-search {
	position: relative;
}
.blog-cat-search .form-control {
	height: 46px;
	border: 1.5px solid #e6e9e6;
	border-radius: 10px;
	padding: 0 52px 0 16px;
	font-size: 14px;
}
.blog-cat-search .form-control:focus {
	border-color: #10591b;
	box-shadow: 0 0 0 3px rgba(16, 89, 27, 0.1);
}

/* grid: even rows, no orphans for 10 tiles (10 = 5x2 = 2x5). 5 cols desktop -> 2 -> 1. */
/* max-width + side padding so tiles do not stick to the screen edges; slightly smaller tiles. */
.blog-cats {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 16px;
	max-width: 1240px;
	margin: 0 auto 40px;
	padding: 0 24px;
}
@media (max-width: 1000px) {
	.blog-cats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
	.blog-cats { grid-template-columns: 1fr; padding: 0 16px; }
}

/* tile - verbatim from Claude Design (.cat-tile*) */
.cat-tile {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	border-radius: 12px;
	overflow: hidden;
	background: #0a3a12;
	box-shadow: 0 6px 18px rgba(16, 89, 27, 0.14);
	transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.cat-tile__photo {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	background-image: linear-gradient(135deg, #1a6b27, #0a3a12);
	transition: transform 0.6s ease;
}
.cat-tile__photo::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(6, 28, 11, 0.55) 0%, rgba(6, 28, 11, 0) 42%);
}
/* red diagonal chevron ribbon, bottom-left, over the photo */
.cat-tile__chev {
	position: absolute;
	inset: 0;
	z-index: 4;
	background: #ff0000;
	clip-path: polygon(0 42%, 0 60%, 33% 100%, 17% 100%);
	pointer-events: none;
}
/* thin translucent dark-green plank with the name (padding-left clears the chevron) */
.cat-tile__plank {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 3;
	min-height: 46px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 9px 13px 9px 34%;
	background: rgba(7, 40, 14, 0.62);
	-webkit-backdrop-filter: blur(7px) saturate(1.15);
	backdrop-filter: blur(7px) saturate(1.15);
	border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.cat-tile__name {
	margin: 0;
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.01em;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}
.cat-tile__cta {
	flex: none;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.16);
	border: 1px solid rgba(255, 255, 255, 0.45);
	display: grid;
	place-items: center;
	color: #fff;
	transition: background 0.25s ease, transform 0.25s ease;
}
.cat-tile__cta svg {
	width: 15px;
	height: 15px;
}
.cat-tile__logo {
	position: absolute;
	top: 12px;
	right: 13px;
	z-index: 5;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.08em;
	color: #fff;
	opacity: 0.92;
	text-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
}
.cat-tile:hover,
.cat-tile:focus-visible {
	transform: translateY(-5px);
	box-shadow: 0 0 0 1.5px rgba(46, 207, 74, 0.5), 0 0 18px rgba(46, 207, 74, 0.36), 0 16px 32px rgba(16, 89, 27, 0.22);
}
.cat-tile:hover .cat-tile__photo,
.cat-tile:focus-visible .cat-tile__photo {
	transform: scale(1.06);
}
.cat-tile:hover .cat-tile__cta,
.cat-tile:focus-visible .cat-tile__cta {
	background: rgba(255, 255, 255, 0.3);
	transform: translateX(3px);
}

/* article feed cards under the grid: 4 per row on desktop (4 -> 2 -> 1), smaller. */
/* Scoped to the blog hub (this stylesheet loads only in grid_mode); section pages unchanged. */
/* Existing card style (.article-item / .img-blog-post in main.css) is NOT changed - only column width. */
.blog-content .article-col {
	flex: 0 0 25%;
	max-width: 25%;
}
@media (max-width: 991px) {
	.blog-content .article-col { flex: 0 0 50%; max-width: 50%; }
}
@media (max-width: 575px) {
	.blog-content .article-col { flex: 0 0 100%; max-width: 100%; }
}

/* W4-S14d: keep article thumb SQUARE (1/1, as original) - smaller comes from 4-per-row, */
/* not from changing the shape. background-size cover keeps the photo from stretching. */
.blog-content .img-blog-post {
	aspect-ratio: 1 / 1;
	background-size: cover;
}
/* article feed container: max-width + side padding, symmetric with .blog-cats. */
.blog-content .rm-blog-row {
	max-width: 1240px;
	margin-left: auto;
	margin-right: auto;
	padding: 0 24px;
}
@media (max-width: 560px) {
	.blog-content .rm-blog-row { padding: 0 16px; }
}
