/*
 * Mediapoint Base Theme – CSS globale.
 * Token: le variabili --mp-* puntano ai preset di theme.json e possono essere
 * sovrascritte per fiera (filtro mp_brand_tokens) o dal kit Elementor.
 */

:root {
	--mp-primary: var(--wp--preset--color--primary, #002d59);
	--mp-secondary: var(--wp--preset--color--secondary, #2c3a72);
	--mp-accent: var(--wp--preset--color--accent, #ffdc15);
	--mp-on-accent: var(--wp--preset--color--dark, #001a36);
	--mp-dark: var(--wp--preset--color--dark, #001a36);
	--mp-light: var(--wp--preset--color--light, #f4f6f9);
	--mp-text: var(--wp--preset--color--text, #10233d);
	--mp-text-muted: #3d4f66;
	--mp-border: #dde3ec;

	--mp-font-heading: var(--wp--preset--font-family--heading, 'Barlow Condensed', sans-serif);
	--mp-font-body: var(--wp--preset--font-family--body, 'Barlow', sans-serif);

	--mp-space-xs: 8px;
	--mp-space-s: 16px;
	--mp-space-m: 24px;
	--mp-space-l: 48px;
	--mp-space-xl: 80px;
	--mp-space-xxl: 120px;

	--mp-radius-s: 6px;
	--mp-radius-m: 12px;
	--mp-radius-l: 20px;
	--mp-radius-pill: 999px;

	--mp-container: 1280px;
	--mp-gutter: clamp(16px, 5vw, 80px);
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; font-family: var(--mp-font-body); color: var(--mp-text); background: #fff; line-height: 1.6; }
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--mp-primary); text-underline-offset: .15em; }
a:hover { color: var(--mp-secondary); }
:focus-visible { outline: 3px solid var(--mp-accent); outline-offset: 2px; }

h1, h2, h3, h4, h5, h6 { font-family: var(--mp-font-heading); font-weight: 700; line-height: 1.05; color: var(--mp-primary); margin: 0 0 .5em; }
h1 { font-size: clamp(2.75rem, 6vw, 6rem); text-transform: uppercase; }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); text-transform: uppercase; }
h3 { font-size: clamp(1.4rem, 2.2vw, 2rem); }
h4 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

/* Accessibilità */
.mp-skip-link { position: absolute; left: -9999px; top: 8px; z-index: 10000; padding: 12px 20px; background: var(--mp-accent); color: var(--mp-on-accent); font-weight: 700; }
.mp-skip-link:focus { left: 8px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* Contenitore */
.mp-container { width: 100%; max-width: calc(var(--mp-container) + 2 * var(--mp-gutter)); margin: 0 auto; padding: 0 var(--mp-gutter); }

/* ---------- Classi di utilità per Elementor (Avanzate > Classi CSS) ---------- */

/* Sopratitolo: "GIORNATE ITALIANE DEL SOLLEVAMENTO" */
.mp-eyebrow, .mp-eyebrow .elementor-heading-title { font-family: var(--mp-font-heading); font-weight: 600; font-size: 1.125rem; letter-spacing: .14em; text-transform: uppercase; color: var(--mp-accent); }

/* Hero stile Hyvolution: foto con velatura blu e reticolo */
.mp-hero { position: relative; isolation: isolate; color: #fff; }
.mp-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, color-mix(in srgb, var(--mp-primary) 92%, transparent) 0%, color-mix(in srgb, var(--mp-primary) 70%, transparent) 55%, color-mix(in srgb, var(--mp-secondary) 35%, transparent) 100%); }
.mp-hero--reticolo::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: repeating-linear-gradient(60deg, rgba(255,255,255,.05) 0 2px, transparent 2px 44px), repeating-linear-gradient(-60deg, rgba(255,255,255,.05) 0 2px, transparent 2px 44px); }
.mp-hero h1, .mp-hero h2, .mp-hero .elementor-heading-title { color: #fff; }

/* Sezioni */
.mp-sezione-scura { background: var(--mp-primary); color: #fff; }
.mp-sezione-scura h2, .mp-sezione-scura h3, .mp-sezione-scura .elementor-heading-title { color: #fff; }
.mp-sezione-chiara { background: var(--mp-light); }

/* Card */
.mp-card { background: #fff; border: 1px solid var(--mp-border); border-radius: var(--mp-radius-l); transition: transform .2s, box-shadow .2s; }
.mp-card:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0, 26, 54, .08); }

/* Pulsanti (stesse regole di Elementor: applicare la classe al widget Pulsante) */
.mp-btn-pieno .elementor-button, .mp-btn-accento .elementor-button, .mp-btn-contorno .elementor-button {
	border-radius: var(--mp-radius-pill); font-family: var(--mp-font-heading); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; min-height: 48px; padding: 0 1.6em; display: inline-flex; align-items: center;
}
.mp-btn-pieno .elementor-button { background: var(--mp-primary); color: #fff; }
.mp-btn-accento .elementor-button { background: var(--mp-accent); color: var(--mp-on-accent); }
.mp-btn-contorno .elementor-button { background: transparent; color: currentColor; border: 2px solid currentColor; }

/* ---------- Header e footer di ripiego (usati solo se non c'è un template Elementor) ---------- */
.mp-header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--mp-border); }
.mp-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--mp-space-m); min-height: calc(var(--mp-logo-h, 120px) + 24px); }
.mp-header__logo img { max-height: var(--mp-logo-h, 120px); max-width: min(440px, 60vw); width: auto; }
@media (max-width: 767px) { .mp-header__logo img { max-height: 52px; } }
.mp-header__title { font-family: var(--mp-font-heading); font-weight: 700; font-size: 1.75rem; text-transform: uppercase; text-decoration: none; color: var(--mp-primary); }
.mp-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--mp-space-m); }
.mp-nav a { font-family: var(--mp-font-heading); font-weight: 600; font-size: 1.15rem; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; color: var(--mp-primary); }
.mp-nav .current-menu-item > a, .mp-nav a:hover { color: var(--mp-secondary); box-shadow: inset 0 -3px 0 var(--mp-accent); }
.mp-nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--mp-primary); }
@media (max-width: 1024px) {
	.mp-nav-toggle { display: inline-flex; }
	.mp-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--mp-border); padding: var(--mp-space-s) var(--mp-gutter); }
	.mp-nav.is-open { display: block; }
	.mp-nav ul { flex-direction: column; gap: var(--mp-space-s); }
}

.mp-footer { background: var(--mp-dark); color: #c9d4e3; padding: var(--mp-space-xl) 0 var(--mp-space-l); }
.mp-footer a { color: #fff; }
.mp-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--mp-space-l); }
.mp-footer__bottom { margin-top: var(--mp-space-l); padding-top: var(--mp-space-m); border-top: 1px solid rgba(255,255,255,.15); font-size: .875rem; }
.mp-footer ul { list-style: none; margin: 0; padding: 0; }

/* Contenuti standard (template di ripiego) */
.mp-main { min-height: 50vh; }
.mp-page-header { background: var(--mp-primary); color: #fff; padding: var(--mp-space-xl) 0 var(--mp-space-l); }
.mp-page-header h1 { color: #fff; margin: 0; }
.mp-content { padding: var(--mp-space-l) 0 var(--mp-space-xl); }
.mp-content > * { max-width: 820px; }
.mp-content .alignwide { max-width: var(--mp-container); }
.mp-content .alignfull { max-width: none; }
.mp-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--mp-space-m); }
.mp-post-card { padding: var(--mp-space-m); }
.mp-post-card h2 { font-size: 1.5rem; text-transform: none; }
.mp-pagination { margin-top: var(--mp-space-l); display: flex; gap: var(--mp-space-xs); flex-wrap: wrap; }
.mp-pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--mp-border); border-radius: var(--mp-radius-s); text-decoration: none; }
.mp-pagination .current { background: var(--mp-primary); color: #fff; border-color: var(--mp-primary); }
.mp-404 { text-align: center; padding: var(--mp-space-xxl) 0; }

/* Elementor: le pagine costruite con Elementor occupano tutta la larghezza */
.elementor-page .mp-content { padding: 0; }
.elementor-page .mp-content > * { max-width: none; }
