/**
 * Galleries Archive — wide hero card (986×205 desktop).
 *
 * Source: Figma node 686:19123 ("כתבה לארכיון גלריות").
 *
 * RTL flex-row: image is the FIRST DOM child (= rightmost visually);
 * content is the SECOND DOM child (= leftmost visually).
 *
 * @package Hamechadesh
 */

.hm-galleries-hero {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	height: 205px;
	background-color: #383838;
	border-radius: 20px;
	overflow: hidden;
	margin-top: 22px; /* same breathing room as .hm-featured had */
}

/* In-grid variant — full-row width, no extra top margin (the grid `gap`
   already provides spacing between rows). Selector targets the wide hero
   anywhere inside .hm-archive-grid; CSS Grid places it on its own row
   because grid-column: 1 / -1 spans every column track. */
.hm-archive-grid .hm-galleries-hero {
	grid-column: 1 / -1;
	margin-top: 0;
}

/* Stretched link covering the whole card (above image, below overlays). */
.hm-galleries-hero__link {
	position: absolute;
	inset: 0;
	z-index: 1;
}

/* Interactive overlays sit above the stretched link. */
.hm-galleries-hero__category,
.hm-galleries-hero__title a,
.hm-galleries-hero__comments {
	position: relative;
	z-index: 2;
}

/* ==========================================================================
   Media (right side in RTL)
   ========================================================================== */

.hm-galleries-hero__media {
	position: relative;
	flex-shrink: 0;
	width: 341.322px;
	height: 100%;
}

.hm-galleries-hero__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	/* Image's visual right corners (= "start" corners in RTL). The card's
	   own overflow: hidden + 20px outer radius does most of the clipping;
	   the 14px keeps Figma parity for the inner shape. */
	border-start-start-radius: 14px;
	border-end-start-radius: 14px;
}

.hm-galleries-hero__image--placeholder {
	background-color: rgba(255, 255, 255, 0.08);
}

/* Gallery icon overlay — top-right of image (= inset-inline-start in RTL).
   Figma spec: 26.666×26.015 at top:8.32px, right:10.67px (from container). */
.hm-galleries-hero__icon {
	position: absolute;
	inset-block-start: 8.32px;
	inset-inline-start: 10.67px;
	width: 26.666px;
	height: 26.015px;
	z-index: 2;
	pointer-events: none;
}

/* Category badge — uses shared .hm-card-md__category for positioning.
   We just enlarge slightly to match the Figma spec (127×26.67 vs 119×26). */
.hm-galleries-hero__category {
	width: 127px;
	height: 26.67px;
}

/* ==========================================================================
   Content (left side in RTL)
   ========================================================================== */

.hm-galleries-hero__content {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 7px;
	padding: 0 20px 20px;
	/* RTL column flex: flex-start = RIGHT (lesson #1 in CLAUDE.md). */
	align-items: flex-start;
}

/* Before-title pill — Figma: 14px Bold #55EBB1 with right border 0.5px.
   Mirrors .hm-card-md__badge but scoped to this hero. */
.hm-galleries-hero__badge {
	display: inline-flex;
	align-items: center;
	padding: 3px 13px;
	border-inline-start: 0.5px solid #55EBB1;
	color: #55EBB1;
	font-family: var(--hm-font-primary);
	font-weight: 700;
	font-size: 14px;
	line-height: 22.115px;
	letter-spacing: 0.84px;
	white-space: nowrap;
}

.hm-galleries-hero__title {
	width: 100%;
	margin: 0;
	font-family: var(--hm-font-primary);
	font-weight: 700;
	font-size: 45px;
	line-height: 1;
	color: #ffffff;
	text-align: start;
	unicode-bidi: isolate;
	/* Clamp to 2 lines so very long titles don't blow out the 205px card. */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.hm-galleries-hero__title a {
	color: inherit;
	text-decoration: none;
	transition: opacity var(--hm-transition-fast);
}

.hm-galleries-hero__title a:hover {
	opacity: 0.75;
	color: inherit;
}

/* ==========================================================================
   Meta row — comments | author | date | time (RTL order: comments rightmost).
   Text is white at 50% opacity per Figma; separator + comment icon SVGs
   already bake opacity:0.5 into their paths, so no extra CSS opacity needed
   on those.
   ========================================================================== */

.hm-galleries-hero__meta {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: nowrap;
}

.hm-galleries-hero__meta-item {
	color: #ffffff;
	opacity: 0.5;
	font-family: var(--hm-font-primary);
	font-weight: 300;
	font-size: 14px;
	line-height: normal;
	white-space: nowrap;
	text-decoration: none;
}

.hm-galleries-hero__comments {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	color: #ffffff;
	font-family: var(--hm-font-primary);
	font-weight: 300;
	font-size: 14px;
	line-height: normal;
	opacity: 0.5;
	text-decoration: none;
	white-space: nowrap;
}

.hm-galleries-hero__comment-icon {
	flex-shrink: 0;
	width: 12px;
	height: 12px;
}

/* Vertical separator | — opacity is baked into Figma's icon, mirrored here
   in the background so it looks identical at any zoom level. */
.hm-galleries-hero__sep {
	display: inline-block;
	width: 1.12px;
	height: 15.358px;
	flex-shrink: 0;
	background-color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Responsive — Tablet
   ========================================================================== */

@media (max-width: 1023px) {
	.hm-galleries-hero__media {
		width: 280px;
	}

	.hm-galleries-hero__title {
		font-size: 36px;
	}
}

/* ==========================================================================
   Responsive — Mobile: stack image on top, content below.
   ========================================================================== */

@media (max-width: 767px) {
	.hm-galleries-hero {
		flex-direction: column;
		height: auto;
		gap: 0;
		border-radius: 14px;
	}

	.hm-galleries-hero__media {
		width: 100%;
		height: 200px;
	}

	.hm-galleries-hero__image {
		border-radius: 0;
	}

	.hm-galleries-hero__content {
		width: 100%;
		padding: 14px 16px 16px;
		gap: 6px;
	}

	.hm-galleries-hero__title {
		font-size: 24px;
	}

	.hm-galleries-hero__meta {
		gap: 8px;
	}
}
