/* =========================================================
   HOMEPAGE MAGAZINE SEO ELITE
   Versione pulita, premium, SEO-first
   ========================================================= */

/* =========================================================
   BASE
   ========================================================= */

.home-magazine-wrapper {
    max-width: 1220px;
    margin: 2rem auto 3.5rem;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    font-family: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.home-magazine-wrapper .mag-post-title,
.home-magazine-wrapper .mag-post-title a,
.home-magazine-wrapper .mag-section-title,
.home-magazine-wrapper .mag-section-title a,
.home-magazine-wrapper .mag-simple-title,
.home-magazine-wrapper .mag-simple-title a,
.home-magazine-wrapper .mag-featured-ultra__title {
    font-family: "Fira Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.home-magazine-wrapper .mag-excerpt,
.home-magazine-wrapper p,
.home-magazine-wrapper li,
.home-magazine-wrapper a {
    font-family: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* =========================================================
   FIX SPAZIO SOPRA HOMEPAGE
   ========================================================= */

#primary,
#main,
#primary #main,
.seo-elite-home,
.home-magazine-wrapper.seo-elite-home {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

#primary #main .home-magazine-wrapper.seo-elite-home {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.home-magazine-wrapper .mag-section:first-child,
.home-magazine-wrapper .mag-section-featured:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.mag-section-featured .mag-section-header {
    margin-top: 0 !important;
}

/* =========================================================
   INTRO MINIMA / TESTO SEO
   ========================================================= */

.mag-home-intro-minimal {
    margin: 0 0 .35rem;
}

.mag-home-intro-minimal__title {
    margin: 0 0 .45rem;
    font-size: clamp(1.5rem, 2.4vw, 2.2rem);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -.02em;
    color: #101828;
}

.mag-home-intro-minimal__text {
    margin: 0;
    max-width: 860px;
    font-size: .98rem;
    line-height: 1.65;
    color: #556070;
}

.home-seo-text {
    margin: 0 0 1.4rem;
    font-size: .98rem;
    line-height: 1.65;
    color: #4b5563;
}

/* =========================================================
   SEZIONI
   ========================================================= */

.mag-section {
    position: relative;
}

.mag-section:not(:last-child)::after {
    content: "";
    display: block;
    width: 90%;
    height: 2px;
    margin: 2.2rem auto 0;
    border-radius: 2px;
    background: linear-gradient(
        to right,
        #4163ab 0%,
        #4163ab 45%,
        #ffffff 50%,
        #4163ab 55%,
        #4163ab 100%
    );
    opacity: .24;
}

.mag-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 0 1.2rem;
}

.mag-section-heading-wrap {
    flex: 1;
    min-width: 0;
}

.mag-section-title {
    position: relative;
    margin: 0;
    padding-bottom: .4rem;
    font-size: 1.28rem;
    line-height: 1.08;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 900;
    color: #111827;
}

.mag-section-title::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 56px;
    height: 2px;
    border-radius: 999px;
    background: var(--mag-accent, #143b8f);
}

.mag-section-headlink {
    display: inline-block;
    color: inherit;
    text-decoration: none;
}

.mag-section-headlink:hover {
    color: var(--mag-accent, #143b8f);
}

.mag-section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: .58rem .92rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, .06);
    background: #f5f7fb;
    color: #111827;
    text-decoration: none;
    font-size: .78rem;
    line-height: 1;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.mag-section-more:hover {
    background: #ecf2fb;
    color: var(--mag-accent, #143b8f);
    border-color: rgba(20, 59, 143, .14);
}

.mag-section-header-banner {
    display: inline-block;
    width: 52%;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    vertical-align: middle;
}

/* featured title nascosto visivamente ma presente nel DOM */
.mag-section-featured .mag-section-title {
    position: absolute;
    left: -9999px;
}

/* =========================================================
   LINK / IMMAGINI
   ========================================================= */

.mag-thumb-link {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 12px;
    text-decoration: none;
    background: #eef2f6;
}

.mag-thumb-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.18), transparent 45%);
    opacity: 0;
    transition: opacity .25s ease;
}

.mag-thumb-link:hover::after {
    opacity: 1;
}

.mag-thumb-large,
.mag-thumb-medium,
.mag-thumb-small,
.mag-thumb-tiny {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.mag-thumb-link:hover img {
    transform: scale(1.02);
}

/* =========================================================
   BADGE
   ========================================================= */

.mag-cat-badge {
    display: inline-block;
    padding: .16rem .44rem;
    font-size: .62rem;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 800;
    border-radius: 4px;
    background: var(--mag-cat-bg, #f2c94c);
    color: var(--mag-cat-text, #111111);
    margin-bottom: .38rem;
}

/* =========================================================
   TESTI
   ========================================================= */

.mag-post-title {
    margin: 0 0 .4rem;
    font-size: 1.04rem;
    line-height: 1.34;
    font-weight: 900;
    color: #111827;
}

.mag-post-title a,
.mag-simple-title {
    color: #111827;
    text-decoration: none;
}

.mag-post-title a:hover,
.mag-simple-title:hover,
.mag-section a:hover {
    color: var(--mag-accent, #143b8f);
}

.mag-excerpt {
    margin: 0;
    font-size: .95rem;
    line-height: 1.62;
    color: #5a6472;
}

/* =========================================================
   FEATURED ULTRA PREMIUM
   ========================================================= */


/* =========================================================
   LAYOUT PRINCIPALE
   ========================================================= */


.mag-featured-ultra {

	display: grid;

	grid-template-columns:
		minmax(0, 3fr)
		minmax(280px, .9fr);

	gap: 1.25rem;

	align-items: start;

}



/* =========================================================
   HERO PRINCIPALE
   ========================================================= */


.mag-featured-ultra__main {

	position: relative;

	height: 520px;

	overflow: hidden;

	border-radius: 14px;

	background: #111;

}



.mag-featured-ultra__main .mag-thumb-link {

	display: block;

	width: 100%;

	height: 100%;

	position: relative;

}



.mag-featured-ultra__main .mag-thumb-large {

	display: block;

	width: 100%;

	height: 520px;

	object-fit: cover;

	object-position: center center;

}



/* =========================================================
   OVERLAY HERO
   ========================================================= */


.mag-featured-ultra__overlay {

	position: absolute;

	left: 0;

	right: 0;

	bottom: 0;

	padding:

		1.2rem

		1.25rem

		1.1rem;


	background:

		linear-gradient(

			to top,

			rgba(0,0,0,.92),

			rgba(0,0,0,.55) 60%,

			transparent

		);


	color: #fff;

	z-index: 2;

}



/* =========================================================
   FEATURED ULTRA PREMIUM
   ========================================================= */


/* ---------------------------------------------------------
   LAYOUT DESKTOP
   --------------------------------------------------------- */

.mag-featured-ultra {
	display: grid;
	grid-template-columns: minmax(0, 3fr) minmax(280px, .9fr);
	gap: 1.25rem;
	align-items: stretch;
}


/* ---------------------------------------------------------
   HERO PRINCIPALE
   --------------------------------------------------------- */

.mag-featured-ultra__main {
	position: relative;
	min-width: 0;
	height: 520px;
	overflow: hidden;
	border-radius: 14px;
	background: #111;
}

.mag-featured-ultra__main .mag-thumb-link {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	overflow: hidden;
	border-radius: inherit;
}

.mag-featured-ultra__main .mag-thumb-large {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
}


/* ---------------------------------------------------------
   OVERLAY HERO
   --------------------------------------------------------- */

.mag-featured-ultra__overlay {
	position: absolute;
	inset: auto 0 0 0;
	z-index: 2;
	padding: 1.2rem 1.25rem 1.1rem;
	color: #fff;
	background:
		linear-gradient(
			to top,
			rgba(0, 0, 0, .94) 0%,
			rgba(0, 0, 0, .72) 45%,
			rgba(0, 0, 0, .22) 78%,
			transparent 100%
		);
}


/* badge solo featured */
.mag-featured-ultra__overlay .mag-cat-badge {
	display: inline-flex;
	align-items: center;
	margin: 0 0 .55rem;
	padding: .25rem .65rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, .18);
	color: #fff;
	font-size: .7rem;
	line-height: 1;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .08em;
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}


/* ---------------------------------------------------------
   TITOLO HERO
   --------------------------------------------------------- */

.mag-featured-ultra__title {
	margin: 0;
	color: #fff;
	font-size: clamp(1.7rem, 2.3vw, 2.2rem);
	line-height: 1.08;
	font-weight: 900;
	letter-spacing: -.02em;
	text-shadow: 0 2px 18px rgba(0, 0, 0, .42);

	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}


/* ---------------------------------------------------------
   META HERO
   --------------------------------------------------------- */

.mag-featured-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .35rem .8rem;
	margin-top: .6rem;
	color: rgba(255, 255, 255, .86);
	font-size: .85rem;
	line-height: 1.3;
}


/* ---------------------------------------------------------
   EXCERPT HERO
   --------------------------------------------------------- */

.mag-featured-ultra__overlay-excerpt {
	margin: .7rem 0 0;
	max-width: 92%;
	color: rgba(255, 255, 255, .94);
	font-size: .98rem;
	line-height: 1.45;

	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}


/* ---------------------------------------------------------
   RAIL DESTRA
   --------------------------------------------------------- */

.mag-featured-ultra__rail {
	display: grid;
	grid-template-rows: repeat(2, minmax(0, 1fr));
	gap: 1.25rem;
	min-width: 0;
	height: 520px;
}


/* ---------------------------------------------------------
   CARD LATERALI BASE
   --------------------------------------------------------- */

.mag-featured-ultra__side {
	position: relative;
	min-width: 0;
	min-height: 0;
	overflow: hidden;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 8px 25px rgba(15, 23, 42, .08);
}


/* ---------------------------------------------------------
   SLOT 2 — CARD SUPERIORE
   --------------------------------------------------------- */

.mag-featured-ultra__side--top {
	display: flex;
	flex-direction: column;
}

.mag-featured-ultra__side--top > .mag-thumb-link {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	flex: 0 0 auto;
	overflow: hidden;
	border-radius: 0;
}

.mag-featured-ultra__side--top .mag-thumb-medium {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
}

.mag-featured-ultra__side-copy {
	padding: .85rem .95rem 1rem;
	min-width: 0;
}


/* ---------------------------------------------------------
   SLOT 3 — CARD INFERIORE
   --------------------------------------------------------- */

.mag-featured-ultra__side--bottom {
	display: block;
}

.mag-featured-ultra__mini {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	min-width: 0;
}

.mag-featured-ultra__mini-thumb {
	width: 100%;
	flex: 0 0 auto;
	min-width: 0;
}

.mag-featured-ultra__mini-thumb .mag-thumb-link {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 0;
}

.mag-featured-ultra__mini-thumb .mag-thumb-small {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
}

.mag-featured-ultra__mini-copy {
	padding: .85rem .95rem 1rem;
	min-width: 0;
}


/* ---------------------------------------------------------
   TITOLI CARD LATERALI
   --------------------------------------------------------- */

.mag-featured-ultra__side-copy .mag-post-title,
.mag-featured-ultra__mini-copy .mag-post-title {
	margin: 0;
	font-size: 1.02rem;
	line-height: 1.25;
	font-weight: 900;
	overflow-wrap: break-word;
}

.mag-featured-ultra__side-copy .mag-post-title a,
.mag-featured-ultra__mini-copy .mag-post-title a {
	color: #111827;
	text-decoration: none;
}

.mag-featured-ultra__side-copy .mag-post-title a:hover,
.mag-featured-ultra__mini-copy .mag-post-title a:hover {
	color: var(--mag-accent, #143b8f);
}


/* nascondiamo eventuali elementi non necessari nelle card */
.mag-featured-ultra__side-copy .mag-cat-badge,
.mag-featured-ultra__mini-copy .mag-cat-badge,
.mag-featured-ultra__side-copy .mag-excerpt,
.mag-featured-ultra__mini-copy .mag-excerpt {
	display: none;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 992px) {

	.mag-featured-ultra {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.mag-featured-ultra__main {
		height: auto;
		aspect-ratio: 16 / 9;
	}

	.mag-featured-ultra__rail {
		height: auto;
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-rows: none;
		gap: 1rem;
	}

	.mag-featured-ultra__side {
		height: auto;
	}

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

	.mag-featured-ultra {
		display: grid;
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	/* Hero */
	.mag-featured-ultra__main {
		height: auto;
		aspect-ratio: 16 / 10;
		border-radius: 16px;
	}

	.mag-featured-ultra__main .mag-thumb-large {
		width: 100%;
		height: 100%;
	}

	.mag-featured-ultra__overlay {
		padding: .9rem 1rem .9rem;
	}

	.mag-featured-ultra__title {
		font-size: clamp(1.2rem, 5.7vw, 1.65rem);
		line-height: 1.12;
		-webkit-line-clamp: 3;
	}

	.mag-featured-meta {
		margin-top: .5rem;
		font-size: .78rem;
		gap: .3rem .65rem;
	}

	.mag-featured-ultra__overlay-excerpt {
		font-size: .86rem;
		line-height: 1.4;
		margin-top: .45rem;
		-webkit-line-clamp: 1;
	}


	/* Rail mobile: una card sotto l'altra */
	.mag-featured-ultra__rail {
		display: flex;
		flex-direction: column;
		height: auto;
		gap: 1rem;
	}


	/* SLOT 2 orizzontale */
	.mag-featured-ultra__side--top {
		display: grid;
		grid-template-columns: minmax(120px, 38%) minmax(0, 1fr);
		align-items: center;
		min-height: 0;
		padding: .75rem;
		gap: .85rem;
	}

	.mag-featured-ultra__side--top > .mag-thumb-link {
		width: 100%;
		aspect-ratio: 4 / 3;
		border-radius: 12px;
		overflow: hidden;
	}

	.mag-featured-ultra__side-copy {
		padding: 0;
	}


	/* SLOT 3 orizzontale */
	.mag-featured-ultra__side--bottom {
		padding: .75rem;
	}

	.mag-featured-ultra__mini {
		display: grid;
		grid-template-columns: minmax(120px, 38%) minmax(0, 1fr);
		align-items: center;
		gap: .85rem;
		height: auto;
	}

	.mag-featured-ultra__mini-thumb {
		width: 100%;
	}

	.mag-featured-ultra__mini-thumb .mag-thumb-link {
		width: 100%;
		aspect-ratio: 4 / 3;
		border-radius: 12px;
		overflow: hidden;
	}

	.mag-featured-ultra__mini-copy {
		padding: 0;
	}


	/* Titoli laterali */
	.mag-featured-ultra__side-copy .mag-post-title,
	.mag-featured-ultra__mini-copy .mag-post-title {
		font-size: 1rem;
		line-height: 1.25;
	}

}


/* =========================================================
   SMARTPHONE PICCOLI
   ========================================================= */

@media (max-width: 520px) {

	.mag-featured-ultra__main {
		aspect-ratio: 4 / 3;
	}

	.mag-featured-ultra__overlay {
		padding: .8rem .85rem .75rem;
	}

	.mag-featured-ultra__overlay .mag-cat-badge {
		font-size: .62rem;
		padding: .2rem .5rem;
		margin-bottom: .4rem;
	}

	.mag-featured-ultra__title {
		font-size: clamp(1.08rem, 5.4vw, 1.42rem);
		line-height: 1.12;
	}

	.mag-featured-ultra__overlay-excerpt {
		display: none;
	}


	.mag-featured-ultra__side--top {
		grid-template-columns: 112px minmax(0, 1fr);
		gap: .75rem;
		padding: .7rem;
	}

	.mag-featured-ultra__mini {
		grid-template-columns: 112px minmax(0, 1fr);
		gap: .75rem;
	}

	.mag-featured-ultra__side--bottom {
		padding: .7rem;
	}

	.mag-featured-ultra__side-copy .mag-post-title,
	.mag-featured-ultra__mini-copy .mag-post-title {
		font-size: .92rem;
		line-height: 1.24;
	}

}

/* =========================================================
   NEWS – VERSIONE UNIFORME (PRO)
   ========================================================= */

.mag-news-premium {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

/* tutte le card uguali */
.mag-news-premium__lead,
.mag-news-premium__item {
    display: flex;
    flex-direction: column;
    gap: .7rem;
    min-width: 0;
    padding: .9rem;
    border-radius: 16px;
    background: #fafafa;
    border: 1px solid rgba(0,0,0,.05);
    transition: transform .22s ease, box-shadow .22s ease, background-color .22s ease;
}

/* hover elegante */
.mag-news-premium__lead:hover,
.mag-news-premium__item:hover {
    transform: translateY(-2px);
    background: #f8fafc;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .05);
}

/* immagini tutte uguali */
.mag-news-premium__lead .mag-thumb-link,
.mag-news-premium__item .mag-thumb-link {
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    overflow: hidden;
}

/* titolo coerente */
.mag-news-premium .mag-post-title {
    font-size: 1.05rem;
    line-height: 1.35;
    font-weight: 900;
}

/* excerpt leggero */
.mag-news-premium .mag-excerpt {
    font-size: .9rem;
    line-height: 1.55;
}

/* opzionale: limita excerpt a 2 righe */
.mag-news-premium .mag-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =========================================================
   GRID PREMIUM
   ========================================================= */

.mag-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.mag-card-premium {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .82rem;
    padding: .98rem;
    border-radius: 16px;
    background: #fafafa;
    border: 1px solid rgba(0,0,0,.05);
    overflow: hidden;
    transition: transform .22s ease, box-shadow .22s ease, background-color .22s ease;
}

.mag-card-premium::before {
    content: "";
    position: absolute;
    left: 0;
    top: 16px;
    bottom: 16px;
    width: 3px;
    border-radius: 999px;
    background: var(--mag-accent-alt, #4163ab);
}

.mag-card-premium:hover {
    transform: translateY(-2px);
    background: #f6f8fb;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .05);
}

.mag-card-premium .mag-thumb-link {
    aspect-ratio: 16 / 9;
    border-radius: 14px;
}

.mag-card-premium .mag-cat-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 5;
}

/* =========================================================
   MIXED LIST
   ========================================================= */

.mixed-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.15rem 1.6rem;
}

.mag-mixed-item {
    position: relative;
    display: flex;
    gap: .95rem;
    align-items: flex-start;
    padding: .8rem .4rem;
    border-radius: 12px;
    transition: background-color .22s ease, transform .22s ease;
}

.mag-mixed-item::before {
    content: "";
    position: absolute;
    inset: .35rem;
    border-radius: 12px;
    border: 1px dashed rgba(0,0,0,.06);
    pointer-events: none;
}

.mag-mixed-item:hover {
    background: #fafafa;
    transform: translateY(-1px);
}

.mag-mixed-item .mag-thumb-link {
    flex: 0 0 122px;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
}

.mag-mixed-item .mag-content {
    flex: 1;
    min-width: 0;
}

/* =========================================================
   SIMPLE LIST
   ========================================================= */

.mag-simple-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.8rem;
}

.mag-simple-item {
    padding: .2rem 0 .85rem;
    border-bottom: 1px solid #ececec;
}

.mag-simple-title {
    display: inline-block;
    margin-bottom: .22rem;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.35;
}

/* =========================================================
   ANALYSIS
   ========================================================= */

.mag-analysis-shell {
    display: grid;
    grid-template-columns: minmax(220px, .78fr) minmax(0, 1.6fr);
    gap: 1.5rem;
    align-items: start;
}

.mag-analysis-intro {
    padding: 1.2rem;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff8ea, #f7f3e8);
    border: 1px solid rgba(0,0,0,.05);
}

.mag-analysis-kicker {
    display: inline-block;
    margin-bottom: .65rem;
    font-size: .75rem;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-weight: 800;
    color: #8a6a13;
}

.mag-analysis-intro p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #4b5563;
    font-weight: 700;
}

/* =========================================================
   MOBILE / TABLET
   ========================================================= */

@media (max-width: 992px) {
    .mag-featured-ultra,
    .mag-news-premium,
    .mag-analysis-shell {
        grid-template-columns: 1fr;
    }

    .mag-featured-ultra__rail {
        display: grid;
        grid-template-rows: auto;
        gap: 1rem;
        height: auto;
    }

    .mag-featured-ultra__main .mag-thumb-link {
        aspect-ratio: 16 / 9;
    }

    .mag-featured-ultra__side {
        display: grid;
        grid-template-columns: minmax(140px, 38%) minmax(0, 1fr);
        align-items: start;
        gap: .9rem;
        padding: .85rem .9rem .85rem 1rem;
    }

    .mag-featured-ultra__side .mag-thumb-link {
        aspect-ratio: 16 / 10;
        height: 100%;
    }

    .mag-featured-ultra__mini {
        display: contents;
    }

    .mag-featured-ultra__mini-thumb,
    .mag-featured-ultra__mini-copy,
    .mag-featured-ultra__side-copy {
        min-width: 0;
    }

    .mag-featured-ultra__side-copy .mag-post-title,
    .mag-featured-ultra__mini-copy .mag-post-title {
        font-size: 1.02rem;
        line-height: 1.28;
    }
}

@media (max-width: 768px) {
    .home-magazine-wrapper {
        padding: 0 .8rem;
        gap: 2.2rem;
    }

    .mag-grid-2,
    .mixed-list,
    .mag-simple-list,
    .mag-news-premium {
        grid-template-columns: 1fr;
    }

    .mag-section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .mag-section-header-banner {
        width: 100%;
    }

    .mag-featured-ultra {
        gap: 1rem;
    }

    .mag-featured-ultra__main .mag-thumb-link {
        aspect-ratio: 16 / 10;
        border-radius: 16px;
    }

    .mag-featured-ultra__side {
        grid-template-columns: 132px minmax(0, 1fr);
        gap: .85rem;
        padding: .8rem .85rem .8rem .95rem;
        border-radius: 14px;
    }

    .mag-featured-ultra__side .mag-thumb-link,
    .mag-featured-ultra__mini-thumb .mag-thumb-link {
        aspect-ratio: 4 / 3;
        border-radius: 10px;
    }

    .mag-featured-ultra__side-copy .mag-post-title,
    .mag-featured-ultra__mini-copy .mag-post-title {
        font-size: .98rem;
        line-height: 1.3;
    }

    .mag-featured-ultra__title {
        font-size: clamp(1.1rem, 5.2vw, 1.55rem);
        line-height: 1.15;
        letter-spacing: -0.01em;
    }

    .mag-featured-ultra__overlay {
        padding: .85rem .9rem .75rem;
    }

    .mag-featured-ultra__overlay-excerpt {
        font-size: .88rem;
        line-height: 1.45;
        margin-top: .4rem;
    }
}

@media (max-width: 520px) {
    .mag-section:not(:last-child)::after {
        display: none;
    }

    .mag-home-intro-minimal__title {
        font-size: 1.55rem;
    }

    .mag-featured-ultra__main .mag-thumb-link {
        aspect-ratio: 16 / 10;
    }

    .mag-featured-ultra__overlay {
        padding: .9rem .9rem .8rem;
    }

    .mag-featured-ultra__title {
		font-size: clamp(1rem, 4.8vw, 1.35rem);
		line-height: 1.15;
	}

    .mag-featured-ultra__overlay-excerpt {
        display: none;
    }

    .mag-featured-ultra__side {
        grid-template-columns: 118px minmax(0, 1fr);
        gap: .75rem;
        padding: .75rem .8rem .75rem .9rem;
    }

    .mag-featured-ultra__side::before {
        top: 12px;
        bottom: 12px;
    }

    .mag-featured-ultra__side .mag-thumb-link,
    .mag-featured-ultra__mini-thumb .mag-thumb-link {
        aspect-ratio: 4 / 3;
    }

    .mag-featured-ultra__side-copy .mag-post-title,
    .mag-featured-ultra__mini-copy .mag-post-title {
        font-size: .94rem;
        line-height: 1.28;
    }

    .mag-mixed-item .mag-thumb-link {
        flex: 0 0 36%;
        max-width: 145px;
    }

    .mixed-list .mag-excerpt {
        display: none;
    }
}

@media (max-width: 768px) {
    .mag-news-section .mag-section-more,
    .mag-grid-section .mag-section-more,
    .mag-mixed-section .mag-section-more {
        display: none !important;
    }
}

/* =========================================================
   FEATURED ULTRA — RESPONSIVE OVERRIDE FINALE
   Deve restare alla FINE del file CSS
   ========================================================= */


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 992px) {

	.mag-featured-ultra {
		display: grid;
		grid-template-columns: 1fr;
		gap: 1rem;
	}


	/* HERO */

	.mag-featured-ultra__main {
		width: 100%;
		height: auto;
		aspect-ratio: 16 / 9;
	}


	.mag-featured-ultra__main .mag-thumb-link {
		display: block;
		width: 100%;
		height: 100%;
	}


	.mag-featured-ultra__main .mag-thumb-large {
		display: block;
		width: 100%;
		height: 100%;
		object-fit: cover;
	}


	/* RAIL */

	.mag-featured-ultra__rail {
		display: flex;
		flex-direction: column;
		width: 100%;
		height: auto;
		gap: 1rem;
	}


	/* RESET CARD */

	.mag-featured-ultra__side,
	.mag-featured-ultra__side--top,
	.mag-featured-ultra__side--bottom {
		display: block;
		width: 100%;
		height: auto;
		min-width: 0;
		padding: 0;
		overflow: hidden;
	}


	/* SLOT 2 */

	.mag-featured-ultra__side--top {
		display: grid;
		grid-template-columns: minmax(160px, 35%) minmax(0, 1fr);
		align-items: center;
		gap: 1rem;
		padding: .8rem;
	}


	.mag-featured-ultra__side--top > .mag-thumb-link {
		display: block;
		width: 100%;
		height: auto;
		aspect-ratio: 4 / 3;
		border-radius: 12px;
		overflow: hidden;
	}


	.mag-featured-ultra__side--top .mag-thumb-medium {
		display: block;
		width: 100%;
		height: 100%;
		object-fit: cover;
	}


	.mag-featured-ultra__side-copy {
		min-width: 0;
		padding: 0;
	}


	/* SLOT 3 */

	.mag-featured-ultra__mini {
		display: grid;
		grid-template-columns: minmax(160px, 35%) minmax(0, 1fr);
		align-items: center;
		gap: 1rem;
		width: 100%;
		height: auto;
		min-width: 0;
		padding: .8rem;
	}


	.mag-featured-ultra__mini-thumb {
		display: block;
		width: 100%;
		min-width: 0;
	}


	.mag-featured-ultra__mini-thumb .mag-thumb-link {
		display: block;
		width: 100%;
		height: auto;
		aspect-ratio: 4 / 3;
		border-radius: 12px;
		overflow: hidden;
	}


	.mag-featured-ultra__mini-thumb .mag-thumb-small {
		display: block;
		width: 100%;
		height: 100%;
		object-fit: cover;
	}


	.mag-featured-ultra__mini-copy {
		display: block;
		min-width: 0;
		padding: 0;
	}


	/* TITOLI */

	.mag-featured-ultra__side-copy .mag-post-title,
	.mag-featured-ultra__mini-copy .mag-post-title {
		margin: 0;
		font-size: 1rem;
		line-height: 1.26;
		overflow-wrap: normal;
		word-break: normal;
	}


	.mag-featured-ultra__side-copy .mag-post-title a,
	.mag-featured-ultra__mini-copy .mag-post-title a {
		display: block;
		width: 100%;
		white-space: normal;
		word-break: normal;
		overflow-wrap: break-word;
	}

}



/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 640px) {

	/* HERO */

	.mag-featured-ultra__main {
		aspect-ratio: 4 / 3;
	}


	.mag-featured-ultra__overlay {
		padding: .85rem .9rem .8rem;
	}


	.mag-featured-ultra__title {
		font-size: clamp(1.1rem, 5.5vw, 1.45rem);
		line-height: 1.12;
		-webkit-line-clamp: 3;
	}


	.mag-featured-meta {
		font-size: .78rem;
	}


	.mag-featured-ultra__overlay-excerpt {
		display: none;
	}


	/* SLOT 2 */

	.mag-featured-ultra__side--top {
		display: grid;
		grid-template-columns: 118px minmax(0, 1fr);
		align-items: center;
		gap: .8rem;
		padding: .7rem;
	}


	.mag-featured-ultra__side--top > .mag-thumb-link {
		width: 118px;
		aspect-ratio: 4 / 3;
		border-radius: 10px;
	}


	/* SLOT 3 */

	.mag-featured-ultra__side--bottom {
		display: block;
		padding: 0;
	}


	.mag-featured-ultra__mini {
		display: grid;
		grid-template-columns: 118px minmax(0, 1fr);
		align-items: center;
		gap: .8rem;
		width: 100%;
		padding: .7rem;
	}


	.mag-featured-ultra__mini-thumb {
		width: 118px;
	}


	.mag-featured-ultra__mini-thumb .mag-thumb-link {
		width: 118px;
		aspect-ratio: 4 / 3;
		border-radius: 10px;
	}


	/* TITOLI */

	.mag-featured-ultra__side-copy .mag-post-title,
	.mag-featured-ultra__mini-copy .mag-post-title {
		font-size: .94rem;
		line-height: 1.25;
	}


	.mag-featured-ultra__side-copy .mag-post-title a,
	.mag-featured-ultra__mini-copy .mag-post-title a {
		white-space: normal;
		word-break: normal;
		overflow-wrap: break-word;
	}

}



/* =========================================================
   SMARTPHONE MOLTO STRETTI
   ========================================================= */

@media (max-width: 390px) {

	.mag-featured-ultra__side--top,
	.mag-featured-ultra__mini {
		grid-template-columns: 105px minmax(0, 1fr);
		gap: .7rem;
	}


	.mag-featured-ultra__side--top > .mag-thumb-link,
	.mag-featured-ultra__mini-thumb,
	.mag-featured-ultra__mini-thumb .mag-thumb-link {
		width: 105px;
	}


	.mag-featured-ultra__side-copy .mag-post-title,
	.mag-featured-ultra__mini-copy .mag-post-title {
		font-size: .88rem;
		line-height: 1.24;
	}

}

/* =========================================================
   HOME TITOLI — RIDUZIONE PESO FONT
   ========================================================= */


/* Hero principale */

.mag-featured-ultra__title {

	font-weight: 700;

}



/* Titoli card laterali */

.mag-post-title {

	font-weight: 700;

}


/* Eventuali titoli sezioni */

.mag-section h2,
.mag-section h3,
.mag-post-card .entry-title {

	font-weight: 700;

}



/* Link titoli */

.mag-post-title a {

	font-weight: 700;

}