/**
 * UI components.
 *
 * @package Psychologies
 */

.psy-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--psy-spacing-sm);
	padding: 0.75rem 1.75rem;
	font-family: var(--psy-font-body);
	font-size: var(--psy-text-sm);
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	border: none;
	border-radius: var(--psy-radius-pill);
	cursor: pointer;
	transition: background var(--psy-transition-base), color var(--psy-transition-base), transform var(--psy-transition-fast);
}

.psy-btn--primary {
	background: var(--psy-cta);
	color: var(--psy-white);
}

.psy-btn--primary:hover,
.psy-btn--primary:focus {
	background: var(--psy-primary);
	color: var(--psy-white);
}

.psy-btn--secondary {
	background: transparent;
	color: var(--psy-primary);
	border: 1px solid var(--psy-primary);
}

.psy-btn--outline-light {
	background: transparent;
	color: var(--psy-white);
	border: 1px solid rgba(255, 255, 255, 0.5);
}

.psy-label {
	display: block;
	font-size: var(--psy-text-xs);
	font-weight: 600;
	letter-spacing: var(--psy-letter-spacing-label);
	text-transform: uppercase;
	color: var(--psy-primary);
	margin-bottom: var(--psy-spacing-sm);
}

.psy-card {
	background: var(--psy-surface);
	border-radius: var(--psy-radius-lg);
	box-shadow: var(--psy-shadow-md);
	padding: var(--psy-spacing-xl);
}

.psy-form-field {
	margin-bottom: var(--psy-spacing-md);
}

.psy-form-field label {
	display: block;
	font-size: var(--psy-text-sm);
	font-weight: 500;
	margin-bottom: var(--psy-spacing-xs);
	color: var(--psy-text);
}

.psy-form-field input,
.psy-form-field select,
.psy-form-field textarea {
	width: 100%;
	padding: 0.75rem 1rem;
	font-family: var(--psy-font-body);
	font-size: var(--psy-text-base);
	color: var(--psy-text);
	background: var(--psy-background);
	border: 1px solid var(--psy-border);
	border-radius: var(--psy-radius);
	transition: border-color var(--psy-transition-fast);
}

.psy-form-field input:focus,
.psy-form-field select:focus,
.psy-form-field textarea:focus {
	outline: none;
	border-color: var(--psy-primary);
}

.psy-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--psy-spacing-md);
}

.psy-filter-pills {
	display: flex;
	flex-wrap: wrap;
	gap: var(--psy-spacing-sm);
	margin-bottom: var(--psy-spacing-xl);
}

.psy-filter-pill {
	padding: 0.5rem 1rem;
	font-size: var(--psy-text-sm);
	font-family: var(--psy-font-body);
	background: var(--psy-background-blush);
	color: var(--psy-text);
	border: 1px solid transparent;
	border-radius: var(--psy-radius-pill);
	cursor: pointer;
	transition: all var(--psy-transition-fast);
}

.psy-filter-pill.is-active,
.psy-filter-pill:hover {
	background: var(--psy-primary);
	color: var(--psy-white);
}

.psy-favorite-btn {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 1.25rem;
	color: var(--psy-text-muted);
	transition: color var(--psy-transition-fast), transform var(--psy-transition-fast);
}

.psy-favorite-btn.is-active {
	color: var(--psy-cta);
}

.psy-favorite-btn:hover {
	transform: scale(1.1);
}

/* Hero */
.psy-hero h1 {
	font-size: var(--psy-text-5xl);
	margin-bottom: var(--psy-spacing-md);
}

.psy-hero p {
	font-size: var(--psy-text-lg);
	color: var(--psy-text-muted);
	max-width: 540px;
}

.psy-stats strong {
	font-family: var(--psy-font-heading);
	font-size: var(--psy-text-2xl);
	color: var(--psy-primary);
}

.psy-single-entry .psy-entry-title {
	font-size: var(--psy-text-4xl);
}

.psy-single-entry .psy-entry-meta {
	font-size: var(--psy-text-sm);
	color: var(--psy-text-muted);
	margin-bottom: var(--psy-spacing-lg);
}

.psy-article-card {
	background: var(--psy-surface);
	border-radius: var(--psy-radius-lg);
	overflow: hidden;
	box-shadow: var(--psy-shadow-sm);
	transition: transform var(--psy-transition-base), box-shadow var(--psy-transition-base);
}

.psy-article-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--psy-shadow-md);
}

.psy-article-card__image {
	position: relative;
	overflow: hidden;
	aspect-ratio: 16/10;
}

.psy-article-card__image .psy-favorite-btn {
	position: absolute;
	top: 12px;
	right: 12px;
	background: var(--psy-surface-elevated);
	border-radius: 50%;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--psy-shadow-sm);
}

.psy-article-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: filter var(--psy-transition-base), transform var(--psy-transition-base);
}

.psy-article-card:hover .psy-article-card__image img {
	filter: brightness(1.08);
	transform: scale(1.02);
}

.psy-article-card__body {
	padding: var(--psy-spacing-lg);
}

.psy-article-card__cat {
	font-size: var(--psy-text-xs);
	font-weight: 600;
	letter-spacing: var(--psy-letter-spacing-label);
	text-transform: uppercase;
	color: var(--psy-primary);
}

.psy-article-card__title {
	font-family: var(--psy-font-heading);
	font-size: var(--psy-text-xl);
	line-height: var(--psy-line-height-tight);
	margin: var(--psy-spacing-sm) 0;
}

.psy-article-card__title a {
	color: var(--psy-text);
	text-decoration: none;
}

.psy-article-card__title a:hover {
	color: var(--psy-primary);
}

/* Blog / article cards (home + articles page) */
.psy-home-blog__grid,
.psy-articles-featured__grid,
.psy-articles-group__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
}

.psy-home-blog-card {
	background: var(--psy-surface);
	border: 1px solid var(--psy-card-border);
	border-radius: var(--psy-radius-lg);
	overflow: hidden;
	box-shadow: var(--psy-shadow-sm);
	transition: transform var(--psy-transition-base), box-shadow var(--psy-transition-base), border-color var(--psy-transition-base);
}

.psy-home-blog-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--psy-shadow-md);
	border-color: var(--psy-card-border-hover);
}

.psy-home-blog-card__image {
	display: block;
	aspect-ratio: 16/10;
	overflow: hidden;
}

.psy-home-blog-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--psy-transition-base);
}

.psy-home-blog-card:hover .psy-home-blog-card__image img {
	transform: scale(1.03);
}

.psy-home-blog-card__placeholder {
	width: 100%;
	height: 100%;
	background: var(--psy-background-blush);
}

.psy-home-blog-card__body {
	padding: 1.25rem;
}

.psy-home-blog-card__body h3 {
	font-family: var(--psy-font-heading);
	font-size: var(--psy-text-xl);
	margin: 0 0 0.5rem;
	line-height: 1.25;
}

.psy-home-blog-card__body h3 a {
	color: var(--psy-text);
	text-decoration: none;
}

.psy-home-blog-card__body h3 a:hover {
	color: var(--psy-primary);
}

.psy-home-blog-card__meta {
	font-size: var(--psy-text-xs);
	margin-bottom: 0.5rem;
}

.psy-home-blog-card__date,
.psy-home-blog-card__sep {
	color: var(--psy-text-muted);
	font-weight: 400;
}

.psy-home-blog-card__category {
	color: var(--psy-cta);
	font-weight: 600;
}

.psy-home-blog-card__body > p:last-child {
	font-size: var(--psy-text-sm);
	color: var(--psy-text-muted);
	margin: 0;
	line-height: 1.65;
}

@media (max-width: 991px) {
	.psy-home-blog__grid,
	.psy-articles-featured__grid,
	.psy-articles-group__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.psy-form-row {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 640px) {
	.psy-home-blog__grid,
	.psy-articles-featured__grid,
	.psy-articles-group__grid {
		grid-template-columns: 1fr;
	}
}
