/**
 * Homepage
 *
 * Homepage-specific layout and component styles.
 */


/* =========================================================
   Shared Homepage Section
   ========================================================= */

.homepage-section {
	margin-bottom: 2.5rem;
}


/* =========================================================
   Section Heading
   ========================================================= */

.homepage-section .section-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.15rem;
	padding-bottom: 0.7rem;
	border-bottom: 1px solid #e0e0e0;
}

.homepage-section .section-heading-title {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	min-width: 0;
}

.homepage-section .section-heading-title i {
	flex: 0 0 auto;
	color: var(--lyrics71-color-primary);
	font-size: 0.95rem;
}

.homepage-section .section-heading h2 {
	margin: 0;
	font-size: 1.2rem;
	font-weight: 700;
	line-height: 1.35;
	color: #222;
}

.homepage-section .section-heading-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	flex: 0 0 auto;
	padding: 0.42rem 0.75rem;
	border: 1px solid var(--lyrics71-color-primary);
	background: #fff;
	color: var(--lyrics71-color-primary);
	font-size: 0.78rem;
	font-weight: 600;
	line-height: 1.25;
	text-decoration: none;
	transition:
		background-color 0.2s ease,
		color 0.2s ease,
		border-color 0.2s ease;
}

.homepage-section .section-heading-link:hover,
.homepage-section .section-heading-link:focus {
	background: var(--lyrics71-color-primary);
	color: #fff;
	border-color: var(--lyrics71-color-primary);
	text-decoration: none;
}

.homepage-section .section-heading-link i {
	font-size: 0.68rem;
}


/* =========================================================
   Popular Artists
   ========================================================= */

.homepage-artist-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 0.5rem;
}

.homepage-artist-card {
	position: relative;
	min-width: 0;
	overflow: hidden;
	background: #6c757d;
}

.homepage-artist-card-link {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 8rem;
	padding: 0.75rem;
	color: #fff;
	text-decoration: none;
	overflow: hidden;
}

.homepage-artist-card-image {
	position: absolute;
	inset: 0;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	transition: transform 0.25s ease;
}

.homepage-artist-card-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.28);
	transition: background 0.25s ease;
}

.homepage-artist-card-title {
	position: relative;
	z-index: 2;
	display: block;
	width: 100%;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.35;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.homepage-artist-card-link:hover .homepage-artist-card-image,
.homepage-artist-card-link:focus .homepage-artist-card-image {
	transform: scale(1.04);
}

.homepage-artist-card-link:hover .homepage-artist-card-overlay,
.homepage-artist-card-link:focus .homepage-artist-card-overlay {
	background: rgba(0, 0, 0, 0.4);
}


/* =========================================================
   Latest Lyrics
   ========================================================= */

.homepage-latest-lyrics .artist-lyrics {
	margin: 0;
}

.homepage-latest-lyrics .artist-section__title {
	display: none;
}


/*
 * Homepage uses three lyric cards per row.
 *
 * The shared Artist Lyrics component remains unchanged.
 */
.homepage-latest-lyrics .artist-lyrics-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}


/*
 * Card backgrounds.
 */
.homepage-latest-lyrics .artist-lyric-card .artist-lyric-card__link {
	background: #fff;
}

.homepage-latest-lyrics .artist-lyric-card:nth-child(2n+1) .artist-lyric-card__link {
	background: #f5f5f5;
}


/*
 * Album.
 */
.homepage-latest-lyrics .artist-lyric-card__album {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 12px;
	line-height: 18px;
}

.homepage-latest-lyrics .artist-lyric-card__album a {
	text-decoration: none;
}


/*
 * Individual links.
 */
.homepage-latest-lyrics .artist-lyric-card__artist a,
.homepage-latest-lyrics .artist-lyric-card__title a {
	text-decoration: none;
}


/*
 * The locked Artist Lyrics title has bottom padding
 * intended for its original layout.
 *
 * Homepage cards don't need that extra space.
 */
.homepage-latest-lyrics .artist-lyric-card__title {
	padding-bottom: 10px;
}


/* =========================================================
   Alphabet Browser
   ========================================================= */

/*
 * Homepage uses the shared Alphabet component.
 *
 * The visual styles come from:
 *
 * assets/css/alphabet.css
 *
 * The old homepage-alphabet styles are intentionally
 * removed so there is only one Alphabet design.
 */


/* =========================================================
   Latest News
   ========================================================= */

.homepage-latest-news {
	margin-top: 2.5rem;
	margin-bottom: 2.5rem;
}


/*
 * News grid.
 */
.homepage-news-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.25rem;
}


/*
 * News card.
 */
.homepage-news-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	border: 1px solid #e5e5e5;
	background: #fff;
}


/*
 * Image.
 */
.homepage-news-card__image {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #f5f5f5;
}

.homepage-news-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}


/*
 * Content.
 */
.homepage-news-card__content {
	display: flex;
	flex-direction: column;
	padding: 0.9rem;
}


/*
 * Title.
 */
.homepage-news-card__title {
	margin: 0 0 0.45rem;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.45;
}

.homepage-news-card__title a {
	text-decoration: none;
}

.homepage-news-card__title a:hover,
.homepage-news-card__title a:focus {
	text-decoration: underline;
}


/*
 * Excerpt.
 */
.homepage-news-card__excerpt {
	margin-bottom: 0.7rem;
	font-size: 0.78rem;
	line-height: 1.65;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

.homepage-news-card__excerpt p {
	margin: 0;
}


/*
 * Read More.
 */
.homepage-news-card__read-more {
	align-self: flex-start;
	margin-top: auto;
	font-size: 0.75rem;
	font-weight: 600;
	text-decoration: none;
}

.homepage-news-card__read-more:hover,
.homepage-news-card__read-more:focus {
	text-decoration: underline;
}


/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 991.98px) {

	.homepage-artist-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.homepage-latest-lyrics .artist-lyrics-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.homepage-news-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 575.98px) {

	.homepage-section .section-heading {
		align-items: flex-start;
		gap: 0.75rem;
	}

	.homepage-section .section-heading-title {
		gap: 0.45rem;
	}

	.homepage-section .section-heading h2 {
		font-size: 1.05rem;
	}

	.homepage-section .section-heading-link {
		padding: 0.38rem 0.6rem;
		font-size: 0.72rem;
		white-space: nowrap;
	}

	.homepage-artist-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.homepage-artist-card-link {
		min-height: 7rem;
	}

	.homepage-latest-lyrics .artist-lyrics-grid {
		grid-template-columns: 1fr;
	}

	.homepage-news-grid {
		grid-template-columns: 1fr;
	}

}