/*
Theme Name: MIRA Records Child
Theme URI: https://mirarecords.mx/
Description: Tema hijo personalizado para MIRA Records.
Author: MIRA Records
Author URI: https://mirarecords.mx/
Template: blocksy
Version: 1.0.0
Text Domain: mira-records-child
*/

/* ==================================================
   CUADRÍCULAS DE ARTISTAS Y COMPOSITORES
================================================== */

/* Contenedor de ambas cuadrículas */
.mira-artists-grid,
.mira-composers-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, 250px);
	justify-content: center;
	gap: 24px;
	width: 100%;
	margin: 0 auto;
	padding: 40px 20px;
}

/* Tarjetas */
.mira-artist-card,
.mira-composer-card {
	position: relative;
	display: block;
	width: 250px;
	height: 250px;
	margin: 0;
	padding: 0;
	overflow: hidden;
	background: #111;
}

/* Enlace completo de la tarjeta */
.mira-artist-card__link,
.mira-composer-card__link {
	position: relative;
	display: block;
	width: 250px;
	height: 250px;
	overflow: hidden;
	background: #111;
	color: #fff;
	text-decoration: none;
}

/* Fotografías */
.mira-artist-card__image,
.mira-composer-card__image {
	position: absolute;
	inset: 0;
	display: block;
	width: 250px !important;
	max-width: none !important;
	height: 250px !important;
	margin: 0 !important;
	padding: 0 !important;
	object-fit: cover !important;
	object-position: center center !important;
	transition:
		transform 350ms ease,
		filter 350ms ease;
}

/* Imagen provisional */
.mira-artist-card__placeholder,
.mira-composer-card__placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background:
		linear-gradient(
			135deg,
			#1a1a1a,
			#050505
		);
	color: #fff;
}

/* Inicial mostrada cuando no hay fotografía */
.mira-composer-card__placeholder span {
	font-size: 5rem;
	font-weight: 800;
	line-height: 1;
	text-transform: uppercase;
}

/* Capa de texto */
.mira-artist-card__overlay,
.mira-composer-card__overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 22px;
	background:
		linear-gradient(
			to top,
			rgba(0, 0, 0, 0.9) 0%,
			rgba(0, 0, 0, 0.2) 62%,
			rgba(0, 0, 0, 0.05) 100%
		);
	color: #fff;
	transition: background 350ms ease;
}

/* Nombre */
.mira-artist-card__title,
.mira-composer-card__title {
	margin: 0 !important;
	padding: 0 !important;
	color: #fff !important;
	font-size: 1.55rem;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.03em;
	text-transform: uppercase;
}

/* Género y metadatos */
.mira-artist-card__genre,
.mira-composer-card__genre {
	margin: 8px 0 0 !important;
	padding: 0 !important;
	color: rgba(255, 255, 255, 0.78);
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

/* Texto “Ver artista” y “Ver compositor” */
.mira-artist-card__action,
.mira-composer-card__action {
	display: block;
	max-height: 0;
	margin-top: 0;
	overflow: hidden;
	color: #fff;
	font-size: 0.7rem;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	opacity: 0;
	transform: translateY(8px);
	transition:
		max-height 300ms ease,
		margin-top 300ms ease,
		opacity 300ms ease,
		transform 300ms ease;
}

/* Zoom y oscurecimiento */
.mira-artist-card__link:hover .mira-artist-card__image,
.mira-composer-card__link:hover .mira-composer-card__image {
	transform: scale(1.07);
	filter: brightness(0.72);
}

/* Cambio del degradado al pasar el cursor */
.mira-artist-card__link:hover .mira-artist-card__overlay,
.mira-composer-card__link:hover .mira-composer-card__overlay {
	background:
		linear-gradient(
			to top,
			rgba(0, 0, 0, 0.95) 0%,
			rgba(0, 0, 0, 0.35) 75%,
			rgba(0, 0, 0, 0.12) 100%
		);
}

/* Mostrar llamada a la acción */
.mira-artist-card__link:hover .mira-artist-card__action,
.mira-artist-card__link:focus-visible .mira-artist-card__action,
.mira-composer-card__link:hover .mira-composer-card__action,
.mira-composer-card__link:focus-visible .mira-composer-card__action {
	max-height: 30px;
	margin-top: 13px;
	opacity: 1;
	transform: translateY(5);
}

/* Navegación con teclado */
.mira-artist-card__link:focus-visible,
.mira-composer-card__link:focus-visible {
	outline: 3px solid #fff;
	outline-offset: -3px;
}

/* Mensaje cuando no hay publicaciones */
.mira-artists-empty,
.mira-composers-empty {
	padding: 60px 20px;
	text-align: center;
}

/* ==================================================
   CELULARES
================================================== */

@media (max-width: 580px) {

	.mira-artists-grid,
	.mira-composers-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		justify-content: initial;
		gap: 10px;
		padding: 40px 10px;
	}

	.mira-artist-card,
	.mira-composer-card {
		width: 100%;
		height: auto;
		aspect-ratio: 1 / 1;
	}

	.mira-artist-card__link,
	.mira-composer-card__link {
		width: 100%;
		height: 100%;
		aspect-ratio: 1 / 1;
	}

	.mira-artist-card__image,
	.mira-composer-card__image {
		width: 100% !important;
		height: 100% !important;
	}

	.mira-artist-card__overlay,
	.mira-composer-card__overlay {
		padding: 14px;
	}

	.mira-artist-card__title,
	.mira-composer-card__title {
		font-size: clamp(1rem, 5vw, 1.4rem);
	}

	.mira-artist-card__genre,
	.mira-composer-card__genre {
		font-size: 0.6rem;
		letter-spacing: 0.1em;
	}

	.mira-artist-card__action,
	.mira-composer-card__action {
		display: none;
	}
}

/* Reduce las animaciones cuando el dispositivo lo solicita */
@media (prefers-reduced-motion: reduce) {

	.mira-artist-card__image,
	.mira-composer-card__image,
	.mira-artist-card__overlay,
	.mira-composer-card__overlay,
	.mira-artist-card__action,
	.mira-composer-card__action {
		transition: none;
	}
}