/*
 * OneGetUp — Blog, artículo, archivos y búsqueda (Fase 13).
 * Copyright © 2026 OneGetUP — JAZO.
 */

.ogu-blog-hero,
.ogu-article-hero {
	padding-block: clamp(5rem, 12vw, 9rem);
}

.ogu-blog-hero h1,
.ogu-article-hero h1 {
	max-width: 20ch;
	margin-block: var(--ogu-space-4) 0;
	color: inherit;
	font-size: var(--ogu-text-6xl);
	letter-spacing: var(--ogu-tracking-tighter);
}

.ogu-blog-hero__description {
	max-width: 48rem;
	margin-block-start: var(--ogu-space-5);
	color: var(--ogu-text-secondary);
}

.ogu-blog-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
	gap: var(--ogu-grid-gap);
}

.ogu-blog-card {
	position: relative;
	display: flex;
	min-width: 0;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--ogu-border);
	border-radius: var(--ogu-radius-sm);
	background-color: var(--ogu-surface);
}

.ogu-blog-card__image {
	display: block;
	aspect-ratio: 3 / 2;
	overflow: hidden;
}

.ogu-blog-card__image .ogu-figure {
	height: 100%;
	margin: 0;
}

.ogu-blog-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--ogu-dur-3) var(--ogu-ease-entrance);
}

.ogu-blog-card:hover .ogu-blog-card__image img,
.ogu-blog-card:focus-within .ogu-blog-card__image img {
	transform: scale(1.025);
}

.ogu-blog-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: var(--ogu-space-6);
}

.ogu-blog-card__meta,
.ogu-article-meta {
	margin-block: 0 var(--ogu-space-3);
	color: var(--ogu-text-secondary);
	font-family: var(--ogu-font-mono);
	font-size: var(--ogu-text-sm);
}

.ogu-blog-card h2 {
	margin-block: 0 var(--ogu-space-3);
	font-size: var(--ogu-text-2xl);
}

.ogu-blog-card h2 a {
	color: inherit;
	text-decoration: none;
}

.ogu-blog-card h2 a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.ogu-blog-card__excerpt {
	color: var(--ogu-text-secondary);
}

.ogu-blog-card__excerpt p {
	margin-block-start: 0;
}

.ogu-blog-card .ogu-link--more {
	position: relative;
	z-index: 1;
	margin-block-start: auto;
	padding-block-start: var(--ogu-space-4);
}

.ogu-article-terms a {
	color: inherit;
}

.ogu-article-meta {
	margin-block: var(--ogu-space-5) 0;
}

.ogu-article-image {
	margin-block-start: calc(-1 * var(--ogu-space-10));
}

.ogu-article-image .ogu-figure {
	margin: 0;
}

.ogu-article-image img {
	display: block;
	width: 100%;
	max-height: 44rem;
	object-fit: cover;
}

.ogu-article-body {
	max-width: 50rem;
}

.ogu-related-posts {
	background-color: var(--ogu-bg-subtle);
}

.ogu-related-posts h2 {
	margin-block: 0 var(--ogu-space-8);
}

.ogu-search-page form[role="search"] {
	display: flex;
	max-width: 42rem;
	gap: var(--ogu-space-2);
	margin-block-start: var(--ogu-space-6);
}

.ogu-search-page input[type="search"] {
	min-width: 0;
	min-height: 48px;
	flex: 1;
	padding-inline: var(--ogu-space-4);
	border: 1px solid var(--ogu-border-strong);
	border-radius: var(--ogu-radius-sm);
	background-color: var(--ogu-surface);
	color: var(--ogu-text);
	font: inherit;
}

.ogu-search-page form[role="search"] [type="submit"] {
	min-height: 48px;
	padding-inline: var(--ogu-space-5);
	border: 1px solid var(--ogu-accent);
	border-radius: var(--ogu-radius-sm);
	background-color: var(--ogu-accent);
	color: var(--ogu-accent-contrast);
	font: inherit;
	font-weight: var(--ogu-weight-semibold);
	cursor: pointer;
}

@media (max-width: 36rem) {
	.ogu-search-page form[role="search"] {
		align-items: stretch;
		flex-direction: column;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ogu-blog-card__image img {
		transition: none;
	}

	.ogu-blog-card:hover .ogu-blog-card__image img,
	.ogu-blog-card:focus-within .ogu-blog-card__image img {
		transform: none;
	}
}
