/*
 * Mediapoint Fiera – stili dei componenti (shortcode storici e nuovi).
 * Usa le variabili del Mediapoint Base Theme; i valori dopo la virgola sono il ripiego.
 */

/* Pulsanti */
.mp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5em;
	min-height: 48px;
	padding: 0 1.5em;
	border: 2px solid var(--mp-primary, #002d59);
	border-radius: var(--mp-radius-pill, 999px);
	background: transparent;
	color: var(--mp-primary, #002d59);
	font-family: var(--mp-font-heading, inherit);
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color .2s, color .2s;
}
.mp-btn:hover, .mp-btn:focus-visible { background: var(--mp-primary, #002d59); color: #fff; }
.mp-btn--pieno { background: var(--mp-primary, #002d59); color: #fff; }
.mp-btn--pieno:hover { background: var(--mp-secondary, #2c3a72); border-color: var(--mp-secondary, #2c3a72); }
.mp-btn--accento { background: var(--mp-accent, #ffdc15); border-color: var(--mp-accent, #ffdc15); color: var(--mp-on-accent, #001a36); }
.mp-btn--accento:hover { filter: brightness(.95); color: var(--mp-on-accent, #001a36); background: var(--mp-accent, #ffdc15); }

/* Loghi: patrocini, media partner, sponsor */
.mp-loghi {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: var(--mp-space-s, 16px);
	width: 100%;
}
.mp-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 4 / 3;
	padding: var(--mp-space-s, 16px);
	background: #fff;
	border: 1px solid var(--mp-border, #dde3ec);
	border-radius: var(--mp-radius-m, 12px);
}
.mp-logo img { max-width: 80%; max-height: 80px; width: auto; height: auto; object-fit: contain; }
.mp-loghi--ass-home .mp-logo { aspect-ratio: 3 / 2; }

/* Numeri della fiera */
.mp-numeri {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: var(--mp-space-m, 24px);
}
.mp-numeri__item { display: flex; flex-direction: column; gap: 4px; padding-left: 20px; border-left: 4px solid var(--mp-accent, #ffdc15); }
.mp-numeri__valore { font-family: var(--mp-font-heading, inherit); font-weight: 700; font-size: clamp(2.5rem, 4vw, 3.5rem); line-height: 1; color: var(--mp-primary, #002d59); }
.mp-numeri__etichetta { color: var(--mp-text-muted, #3d4f66); }

/* Lista espositori semplice (shortcode storico) */
.mp-espositori { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.mp-espositore {
	display: grid;
	grid-template-columns: 180px 1fr auto;
	gap: 20px;
	align-items: center;
	padding: 16px;
	background: #fff;
	border: 1px solid var(--mp-border, #dde3ec);
	border-radius: var(--mp-radius-m, 12px);
	min-width: 0;
}
.mp-espositore * { overflow-wrap: anywhere; }
.mp-espositore .logo-esp img { max-width: 160px; max-height: 110px; object-fit: contain; }
.mp-espositore h3, .mp-espositore h5 { margin: 0 0 4px; }
.mp-espositore .stand-esp h3 { font-family: var(--mp-font-heading, inherit); color: var(--mp-primary, #002d59); white-space: nowrap; }
@media (max-width: 767px) {
	.mp-espositore { grid-template-columns: minmax(0, 1fr); text-align: center; }
	.mp-espositore .stand-esp h3 { white-space: normal; }
	.mp-espositore .logo-esp img { margin: 0 auto; }
}

/* Conferenze (shortcode storico) */
.mp-conferenze { display: grid; gap: var(--mp-space-m, 24px); }
.mp-conf {
	display: grid;
	gap: 16px;
	padding: 28px 32px;
	background: #fff;
	border: 1px solid var(--mp-border, #dde3ec);
	border-radius: var(--mp-radius-l, 20px);
}
.mp-conf--vuoto { text-align: center; font-weight: 600; }
.mp-conf .box-logo-conf img { max-height: 80px; width: auto; }
.mp-conf .sala-conf { font-weight: 600; color: var(--mp-text-muted, #3d4f66); letter-spacing: .02em; }
.mp-conf .titolo-conf { margin: 4px 0; font-family: var(--mp-font-heading, inherit); text-transform: uppercase; line-height: 1.05; color: var(--mp-primary, #002d59); }
.mp-conf .sottotitolo-conf { margin: 0; font-weight: 500; }
.mp-conf .collaborazione-conf h4 { margin: 0 0 8px; font-size: .9rem; color: var(--mp-text-muted, #3d4f66); }
.mp-conf__coll { display: flex; flex-wrap: wrap; gap: 12px; }
.mp-conf__coll img { max-height: 56px; width: auto; }
.mp-conf__corpo { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 32px; padding-top: 16px; border-top: 1px solid var(--mp-border, #dde3ec); }
.mp-conf__corpo--pieno { grid-template-columns: 1fr; }
.mp-conf .spalla-dx-conf { display: flex; flex-direction: column; gap: 12px; }
.mp-conf .spalla-dx-conf img { width: 100%; height: auto; border-radius: var(--mp-radius-m, 12px); }
.mp-conf .materiale-conf { margin-top: 24px; }
@media (max-width: 767px) {
	.mp-conf { padding: 20px; }
	.mp-conf__corpo { grid-template-columns: 1fr; }
}

/* News della rivista */
.mp-news__intestazione { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 0 0 var(--mp-space-m, 24px); text-align: center; text-decoration: none; color: inherit; }
.mp-news__intestazione .mp-news__logo, .mp-news__intestazione img.mp-news__logo { width: 400px !important; max-width: 100% !important; height: auto !important; flex: 0 0 auto; }
.mp-news__testo { font-family: var(--mp-font-heading, inherit); font-weight: 700; font-size: 1.6rem; line-height: 1.2; text-decoration: none; }
.mp-news__intestazione, .mp-news__intestazione:hover, .mp-news__intestazione:focus { text-decoration: none; }
.mp-news { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--mp-space-m, 24px); }
.mp-news__item { display: flex; flex-direction: column; gap: 10px; }
.mp-news__img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--mp-radius-m, 12px); }
.mp-news .date-news { margin: 0; font-size: .875rem; color: var(--mp-text-muted, #3d4f66); }
.mp-news .title-news { margin: 0; font-size: 1.35rem; line-height: 1.25; }
.mp-news .title-news a { color: inherit; text-decoration: none; }
.mp-news .body-news { margin: 0; }
.mp-news .readmore-news { font-family: var(--mp-font-heading, inherit); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }

/* Sezioni della Home pilotate dal gestionale */
.mp-sec--custom { padding: var(--mp-space-xl, 80px) 0; }
.mp-sec--custom .mp-sec__testo { max-width: 70ch; margin-bottom: var(--mp-space-m, 24px); }

/* Elenco conferenze (shortcode [mp_conferenze]) */
.mp-conf-elenco { display: grid; gap: calc(var(--mp-space-m, 24px) * 1.5); }
.mp-conf-giorno { display: grid; gap: var(--mp-space-s, 16px); }
.mp-conf-giorno__titolo { margin: 0; font-family: var(--mp-font-heading, inherit); text-transform: uppercase; color: var(--mp-primary, #002d59); border-bottom: 2px solid var(--mp-accent, #ffdc15); padding-bottom: 8px; }
.mp-conf--scheda { display: grid; gap: 8px; }
.mp-conf__meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-weight: 600; color: var(--mp-text-muted, #3d4f66); }
.mp-conf__sala::before { content: "·"; margin-right: 16px; }
.mp-conf--scheda .titolo-conf { margin: 0; font-size: 1.35rem; }
.mp-conf__azioni { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }

/* Header: la tendina "Altre fiere" deve stare sopra la barra del menu orizzontale */
.mp-header .mp-header__top { position: relative; z-index: 20; }
.mp-header .mp-header__bottom { position: relative; z-index: 10; }
.mp-header .mp-header__top .sub-menu { z-index: 30; }

/* Header: selettore lingua leggibile su sfondo blu */
.mp-header__lang .wpml-ls-link,
.mp-header__lang .wpml-ls-native,
.mp-header__lang .wpml-ls-item a { color: #fff !important; }
.mp-header__lang .wpml-ls-link:hover,
.mp-header__lang .wpml-ls-link:hover .wpml-ls-native { color: var(--mp-accent, #ffc20e) !important; }
.mp-header__lang .sub-menu a, .mp-header__lang .wpml-ls-sub-menu a { color: #fff !important; background: #001a36; }

/* Header mobile: logo con proporzioni corrette */
.mp-header .mp-header__logo { flex: 0 1 auto; min-width: 0; }
.mp-header .mp-header__logo img { width: auto; height: auto; max-width: 100%; object-fit: contain; }
@media (max-width: 767px) {
	.mp-header .mp-header__logo img { max-height: 64px; width: auto; }
}

/* Header mobile: menu orizzontale (widget .mp-header__menu) sempre visibile, senza hamburger; l'hamburger desktop (.mp-header__hamburger) resta */
@media (max-width: 1024px) {
	.mp-header .mp-header__menu .elementor-menu-toggle,
	.mp-header .mp-header__menu .elementor-nav-menu--dropdown { display: none !important; }
	.mp-header .mp-header__menu .elementor-nav-menu--main { display: block !important; }
	.mp-header .mp-header__menu .elementor-nav-menu { display: flex !important; flex-wrap: nowrap; white-space: nowrap; }
	.mp-header .mp-header__menu .elementor-nav-menu > li { flex: 0 0 auto; }
	.mp-header .mp-header__menu .elementor-nav-menu a { font-size: 13px; padding: 12px 10px; }
	.mp-header .mp-header__bottom { overflow-x: auto; scrollbar-width: none; }
	.mp-header .mp-header__bottom::-webkit-scrollbar { display: none; }
	.mp-header .mp-header__bottom > .e-con-inner { flex-wrap: nowrap; align-items: center; }
	.mp-header .mp-header__hamburger, .mp-header .mp-header__menu { flex: 0 0 auto; width: auto; }
}

/* Loghi (sponsor, media partner, patrocini) su mobile: schede compatte, nessuno spazio vuoto in fondo */
@media (max-width: 767px) {
	.mp-loghi { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-content: start; min-height: 0; height: auto; }
	.mp-logo, .mp-loghi--ass-home .mp-logo { aspect-ratio: 3 / 2; padding: 8px; min-height: 0; height: auto; border-radius: 8px; }
	.mp-logo__inner { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
	.mp-logo img { max-width: 90%; max-height: 48px; }
	.elementor-widget-shortcode .elementor-shortcode, .elementor-widget-shortcode .mp-loghi { margin-bottom: 0; }
}
@media (max-width: 400px) {
	.mp-loghi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
