/* ==========================================================================
   MakingMe CPT — Frontend styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   Grid layout
   -------------------------------------------------------------------------- */

.mm-grid {
	display: grid;
	grid-template-columns: repeat(var(--mm-columns, 3), 1fr);
	gap: 30px;
	margin: 30px 0;
}

.mm-columns-1 { --mm-columns: 1; }
.mm-columns-2 { --mm-columns: 2; }
.mm-columns-3 { --mm-columns: 3; }
.mm-columns-4 { --mm-columns: 4; }
.mm-columns-5 { --mm-columns: 5; }
.mm-columns-6 { --mm-columns: 6; }

@media (max-width: 1024px) {
	.mm-columns-4,
	.mm-columns-5,
	.mm-columns-6 {
		--mm-columns: 3;
	}
}

@media (max-width: 768px) {
	.mm-grid {
		--mm-columns: 2 !important;
		gap: 20px;
	}
}

@media (max-width: 480px) {
	.mm-grid {
		--mm-columns: 1 !important;
	}
}

/* --------------------------------------------------------------------------
   Filter bar — base (shortcode, usabile ovunque)
   -------------------------------------------------------------------------- */

.mm-grid-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0;
	margin-bottom: 40px;
}

.mm-filter-btn {
	padding: 6px 24px;
	border: none;
	background: transparent;
	cursor: pointer;
	font-size: 0.95rem;
	letter-spacing: 0.02em;
	color: #111;
	transition: color 0.2s;
	position: relative;
}

.mm-filter-btn + .mm-filter-btn::before {
	content: '';
	position: absolute;
	left: 0;
	top: 20%;
	height: 60%;
	width: 1px;
	background: #ccc;
}

.mm-filter-btn:hover {
	color: #c0392b;
}

.mm-filter-btn.is-active {
	color: #c0392b;
	font-weight: 600;
}

/* Variante testo puro usata nell'archivio */
.mm-filters-text .mm-filter-btn {
	font-size: 1rem;
	padding: 4px 20px;
}

/* --------------------------------------------------------------------------
   Card base
   -------------------------------------------------------------------------- */

.mm-card {
	position: relative;
	overflow: hidden;
}

.mm-card-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

/* --------------------------------------------------------------------------
   Card Produzione — image-dominant con overlay al hover
   -------------------------------------------------------------------------- */

.mm-card-produzione .mm-card-image {
	overflow: hidden;
	aspect-ratio: 2 / 3;   /* proporzioni locandina cinema */
	background: #111;
}

.mm-card-produzione .mm-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease, opacity 0.4s ease;
}

.mm-card-produzione:hover .mm-card-image img {
	transform: scale(1.05);
	opacity: 0.5;
}

.mm-card-produzione .mm-card-no-image {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #222;
	color: #fff;
	font-size: 0.9rem;
	padding: 20px;
	text-align: center;
}

/* Overlay testo — visibile solo all'hover */
.mm-card-produzione .mm-card-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 20px;
	text-align: center;
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.mm-card-produzione:hover .mm-card-overlay {
	opacity: 1;
}

.mm-card-produzione .mm-card-overlay .mm-card-title {
	margin: 0 0 8px;
	font-size: 1.1rem;
	font-weight: 700;
	color: #fff;
	line-height: 1.3;
}

.mm-card-produzione .mm-card-overlay .mm-card-meta {
	font-size: 0.8rem;
	color: rgba(255, 255, 255, 0.8);
	margin: 0;
}

/* --------------------------------------------------------------------------
   Card Service
   -------------------------------------------------------------------------- */

.mm-card-service .mm-card-image {
	overflow: hidden;
	aspect-ratio: 3 / 2;
}

.mm-card-service .mm-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.mm-card-service:hover .mm-card-image img {
	transform: scale(1.04);
}

.mm-card-service .mm-card-body {
	padding: 14px 0;
}

.mm-card-service .mm-card-title {
	margin: 4px 0 6px;
	font-size: 1rem;
	line-height: 1.4;
}

.mm-card-service .mm-card-title a {
	text-decoration: none;
	color: inherit;
}

.mm-card-service .mm-card-title a:hover {
	opacity: 0.7;
}

.mm-card-service .mm-card-titolo-film,
.mm-card-service .mm-card-regista {
	font-size: 0.85rem;
	color: #666;
	margin: 3px 0 0;
}

.mm-card-service .mm-card-excerpt {
	font-size: 0.85rem;
	color: #555;
	margin: 6px 0 0;
}

/* --------------------------------------------------------------------------
   Terms badge
   -------------------------------------------------------------------------- */

.mm-card-terms {
	margin-bottom: 6px;
}

.mm-term {
	display: inline-block;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 3px 8px;
	border: 1px solid currentColor;
	margin-right: 4px;
}

.mm-term-in-produzione,
.mm-term-in-lavorazione {
	color: #c0392b;
	border-color: #c0392b;
}

.mm-term-sviluppate {
	color: #27ae60;
	border-color: #27ae60;
}

.mm-term-stato {
	color: #555;
	border-color: #aaa;
}

/* Hidden items during filter */
.mm-grid-item.is-hidden {
	display: none;
}

/* Empty state */
.mm-grid-empty {
	padding: 30px;
	text-align: center;
	color: #777;
}

/* --------------------------------------------------------------------------
   Single Produzione — hero layout (poster + details side by side)
   -------------------------------------------------------------------------- */

.mm-single-wrap {
	max-width: 1100px;
	margin: 0 auto;
	padding: 50px 20px 60px;
}

/* Two-column hero */
.mm-prod-hero {
	display: flex;
	gap: 50px;
	align-items: flex-start;
	margin-bottom: 40px;
}

.mm-prod-poster {
	flex: 0 0 47%;
	max-width: 47%;
}

.mm-prod-poster img {
	width: 100%;
	height: auto;
	display: block;
}

.mm-prod-details {
	flex: 1;
	min-width: 0;
}

/* Title */
.mm-prod-title {
	font-size: 2rem;
	font-weight: 700;
	margin: 0 0 20px;
	line-height: 1.2;
}

/* Meta definition list */
.mm-prod-meta {
	margin: 0 0 20px;
	padding: 0;
}

.mm-prod-meta-row {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-bottom: 3px;
	font-size: 0.9rem;
	line-height: 1.5;
}

.mm-prod-meta-row dt {
	font-weight: 600;
	color: #222;
}

.mm-prod-meta-row dt::after {
	content: ':';
	margin-right: 4px;
}

.mm-prod-meta-row dd {
	margin: 0;
	color: #444;
}

/* Descrizione (crediti/note) nella colonna destra dell'hero */
.mm-prod-descrizione {
	margin-top: 16px;
	font-size: 0.875rem;
	line-height: 1.7;
	color: #444;
}

/* Responsive hero */
@media (max-width: 768px) {
	.mm-prod-hero {
		flex-direction: column;
		gap: 24px;
	}

	.mm-prod-poster {
		flex: none;
		max-width: 100%;
		width: 60%;
		margin: 0 auto;
	}
}

@media (max-width: 480px) {
	.mm-prod-poster {
		width: 100%;
	}
}

/* --------------------------------------------------------------------------
   Single post — excerpt, body, video
   -------------------------------------------------------------------------- */

.mm-prod-excerpt {
	font-size: 1rem;
	color: #444;
	line-height: 1.7;
	margin-bottom: 30px;
	padding: 0;
}

.mm-prod-body {
	font-size: 1rem;
	line-height: 1.8;
	color: #333;
	margin-bottom: 40px;
}

/* Video embed */
.mm-prod-video {
	margin-bottom: 40px;
}

.mm-video-responsive {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
	background: #f0f0f0;
}

.mm-video-responsive iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* --------------------------------------------------------------------------
   Single Produzione — full-width slideshow carousel
   -------------------------------------------------------------------------- */

.mm-prod-slideshow {
	position: relative;
	overflow: hidden;
	margin-bottom: 40px;
}

.mm-slideshow-track {
	display: flex;
	transition: transform 0.4s ease;
}

.mm-slideshow-track .mm-slide {
	flex: 0 0 100%;
	max-width: 100%;
}

.mm-slideshow-track .mm-slide img {
	width: 100%;
	height: auto;
	display: block;
	max-height: 600px;
	object-fit: cover;
}

/* Prev / Next arrows */
.mm-slide-prev,
.mm-slide-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0, 0, 0, 0.45);
	color: #fff;
	border: none;
	width: 44px;
	height: 44px;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
	transition: background 0.2s;
}

.mm-slide-prev:hover,
.mm-slide-next:hover {
	background: rgba(0, 0, 0, 0.75);
}

.mm-slide-prev {
	left: 0;
}

.mm-slide-next {
	right: 0;
}

/* --------------------------------------------------------------------------
   Single Service — layout (reuses hero/meta/body/video/slideshow classes)
   -------------------------------------------------------------------------- */

.mm-single-service .mm-single-header {
	margin-bottom: 24px;
}

.mm-single-title {
	font-size: 2rem;
	margin: 0 0 12px;
}

.mm-single-excerpt {
	font-size: 1.05rem;
	color: #444;
	margin-bottom: 24px;
	line-height: 1.7;
}

.mm-single-meta {
	margin-bottom: 30px;
}

.mm-single-meta .mm-meta-table {
	border-collapse: collapse;
	width: 100%;
}

.mm-single-meta .mm-meta-table th,
.mm-single-meta .mm-meta-table td {
	padding: 8px 12px;
	text-align: left;
	border-bottom: 1px solid #eee;
	font-size: 0.9rem;
}

.mm-single-meta .mm-meta-table th {
	width: 200px;
	font-weight: 600;
	color: #333;
}

.mm-single-body {
	margin-bottom: 30px;
}

.mm-single-video {
	margin-bottom: 30px;
}

/* Slideshow for service (grid style) */
.mm-single-slideshow {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	margin-top: 30px;
}

.mm-single-slideshow .mm-slide img {
	width: 100%;
	height: auto;
	display: block;
}

@media (max-width: 768px) {
	.mm-single-slideshow {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.mm-single-slideshow {
		grid-template-columns: 1fr;
	}
}

/* --------------------------------------------------------------------------
   Archive header
   -------------------------------------------------------------------------- */

.mm-archive-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 50px 20px 60px;
}

.mm-archive-header {
	text-align: center;
	margin-bottom: 30px;
}

.mm-archive-title {
	font-size: 2.5rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	margin: 0 0 30px;
}

.mm-archive-description {
	font-size: 1rem;
	color: #555;
	margin-top: 10px;
}

/* Filtri centrati nell'archivio */
.mm-archive-produzione .mm-grid-filters {
	justify-content: center;
	margin-bottom: 50px;
}

/* Griglia dell'archivio senza gap verticale eccessivo */
.mm-archive-produzione .mm-grid {
	gap: 20px;
	margin-top: 0;
}
