/* ==========================================================================
   Journal (page-journal.php, fasce news/story) + ribbon Video verticali
   Mobile first. Breakpoint: 768 (tablet: colonna singola centrata), 1024 (desktop: 3 colonne).
   ========================================================================== */

.main-journal {
	--j-ink: #39332D;
	--j-ink-soft: #6f655d;
	--j-bg: #F6F2EE;
	--j-line: rgba(57, 51, 45, 0.35);
	--j-dark: #3B302C;
	--j-gap: 24px;
	--j-band-gap: 56px;
	background-color: var(--j-bg);
	color: var(--j-ink);
}

/* Contenitore a colonna singola fino a desktop */
.main-journal .j-listing .aux,
.main-journal .j-head .aux { max-width: 1400px; }

/* --- Rapporti immagine ------------------------------------------------- */
.j-ratio { position: relative; display: block; overflow: hidden; background: #e5ddd5; }
.j-ratio--3-2 { aspect-ratio: 3 / 2; }
.j-ratio--3-4 { aspect-ratio: 3 / 4; }
.j-ratio > img,
.j-ratio .j-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: translate3d(0, 0, 0) scale(1); -webkit-backface-visibility: hidden; backface-visibility: hidden; will-change: transform; transition: transform 600ms ease; }

/* --- Intestazione ------------------------------------------------------ */
.j-head { padding: 24px 0 0; }
.j-head__row { display: flex; flex-direction: column; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid var(--j-ink); }
.j-head__title { margin: 0; font-family: 'Poppins', sans-serif; font-weight: 500; font-size: 44px; line-height: 1; letter-spacing: -0.01em; color: var(--j-ink); }
.j-head__tagline { margin: 0; max-width: 36ch; font-size: 15px; line-height: 1.5; font-style: italic; color: var(--j-ink); }

/* --- Filtri ------------------------------------------------------------ */
.j-filters { padding: 16px 0 0; }
.j-filters__tabs { display: none; }
.j-filters__select { position: relative; }
.j-filters__select:after { content: ''; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 1.5px solid var(--j-ink); border-bottom: 1.5px solid var(--j-ink); transform: rotate(45deg); pointer-events: none; }
.j-filters__select select { display: block; width: 100%; height: 44px; padding: 0 44px 0 16px; border: 1px solid var(--j-line); border-radius: 0; background: transparent; color: var(--j-ink); font-family: 'Poppins', sans-serif; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; -webkit-appearance: none; appearance: none; cursor: pointer; }
.j-filters__select select:focus-visible { outline: 2px solid var(--j-ink); outline-offset: 2px; }

/* --- Listing / fasce --------------------------------------------------- */
.j-listing { padding: 40px 0 80px; }
.j-bands { display: flex; flex-direction: column; min-width: 0; gap: var(--j-band-gap); transition: opacity 250ms ease; }
.j-bands.is-loading { opacity: 0.4; pointer-events: none; }
.j-empty { padding: 40px 0; text-align: center; font-size: 15px; }

/* Testi comuni */
.j-kicker { display: inline-block; align-self: flex-start; padding: 5px 9px; background: var(--j-dark); color: #fff; font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; line-height: 1.3; }
.j-kicker--light { padding: 0; background: none; color: rgba(255, 255, 255, 0.75); }
/* CTA: stesso .btn del sito (testo, sottolineatura in hover), freccia fissa a destra
   che in hover si sposta leggermente. Assoluta, così il testo non va mai a capo per l'icona. */
.main-journal .btn.btn--arrow { align-self: flex-start; margin: 0; text-align: left; }
.main-journal .btn.btn--arrow span.text,
.main-journal .btn.btn--arrow:hover span.text,
.main-journal .j-card:hover .btn.btn--arrow span.text { padding: 6px 30px 6px 0; }
.main-journal .btn.btn--arrow .dot,
.main-journal .btn.btn--arrow:hover .dot { left: auto; right: 0; width: 17px; height: 10px; transform: translate(0, -50%); }
.main-journal .btn.btn--arrow:hover .dot,
.main-journal .j-card:hover .btn.btn--arrow .dot { transform: translate(5px, -50%); }
.main-journal .j-card:hover .btn.btn--arrow span.text > span { border-bottom-color: inherit; }
.main-journal .btn.btn--light { color: #fff; }
.main-journal .btn.btn--light .svg { fill: #fff; }

/* Card news */
.j-news { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; margin: 0; padding: 0; list-style: none; }
.j-news__item { list-style: none; }
.j-card { display: flex; flex-direction: column; gap: 0; color: var(--j-ink); text-decoration: none; border: none; }
.j-card__media { margin-bottom: 18px; }
.j-card__terms + .j-card__title { margin-top: 2px; }
.main-journal .j-card .btn.btn--arrow { margin-top: 22px; }
.j-card__terms { line-height: 1.3; font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--j-ink-soft); }
.j-card__title { margin: 0; font-family: 'Poppins', sans-serif; font-size: 20px; font-weight: 400; line-height: 1.3; color: var(--j-ink); }
.j-card:hover .j-img,
.j-story__media:hover .j-img { transform: translate3d(0, 0, 0) scale(1.03); }
.j-card:focus-visible { outline: 2px solid var(--j-ink); outline-offset: 4px; }

/* Story: struttura comune */
.j-band, .j-story > *, .j-story__main > * { min-width: 0; }
.j-story { display: flex; flex-direction: column; gap: 20px; }
.j-story__body { display: flex; flex-direction: column; gap: 0; }
.j-story__body .j-kicker { margin-bottom: 10px; }
.main-journal .j-story__body .btn.btn--arrow { margin-top: 28px; }
.j-story__title { margin: 0; font-family: 'Poppins', sans-serif; font-size: 28px; font-weight: 400; line-height: 1.2; color: var(--j-ink); }
.j-story__title a { color: inherit; text-decoration: none; border: none; }
.j-story__title a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.j-story__intro { margin: 14px 0 0; font-size: 15px; line-height: 1.6; color: var(--j-ink); }
.j-story__media { display: block; border: none; }

/* Tipologia 2: box approfondimento */
.j-story__main { display: flex; flex-direction: column; gap: 20px; }
.j-story--2 { gap: 44px; }
.j-story--3 { gap: 40px; }
.j-deep { display: flex; flex-direction: column; justify-content: space-between; gap: 28px; padding: 32px 28px; background: var(--j-dark); color: #fff; }
.j-kicker--light + .j-deep__text { margin-top: -8px; }
.main-journal .j-deep .btn.btn--arrow { margin-top: 8px; }
.j-deep__text { margin: 0; padding: 0; border: none; font-size: 24px; font-style: italic; font-weight: 300; line-height: 1.35; color: #fff; quotes: '\201C' '\201D'; }
.j-deep__text:before { content: open-quote; }
.j-deep__text:after { content: close-quote; }

/* Tipologia 3: tre immagini sfalsate */
.j-story--3 { padding: 40px 0; border-top: 1px solid var(--j-line); border-bottom: 1px solid var(--j-line); }
.j-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: start; padding-bottom: 24px; }
.j-trio__item:nth-child(2) { margin-top: 24px; }

/* Carica altre */
.j-more { margin-top: var(--j-band-gap); text-align: center; }
.j-more[hidden] { display: none; }
.j-more__btn { display: inline-block; min-width: 220px; padding: 14px 28px; border: 1px solid var(--j-ink); background: transparent; color: var(--j-ink); font-family: 'Poppins', sans-serif; font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; transition: background-color 250ms ease, color 250ms ease; }
.j-more__btn:hover,
.j-more__btn:focus-visible { background: var(--j-ink); color: #fff; }
.j-more__btn[disabled] { opacity: 0.5; cursor: wait; }

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

/* --- Tablet: colonna singola a larghezza massima -------------------------- */
@media screen and (min-width: 768px) {
	.main-journal { --j-band-gap: 72px; }
	.j-head { padding-top: 40px; }
	.j-head__title { font-size: 64px; }
	.j-head__tagline { font-size: 17px; }
	.j-bands,
	.j-more { max-width: 640px; margin-left: auto; margin-right: auto; }
	.j-filters__select { max-width: 360px; }
	.j-story__title { font-size: 32px; }
	.j-deep { padding: 44px 40px; }
	.j-deep__text { font-size: 28px; }
}

/* --- Desktop: griglia a 3 colonne, tab categorie --------------------------- */
@media screen and (min-width: 1024px) {
	.main-journal { --j-gap: 32px; --j-band-gap: 88px; }
	.j-head__row { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 40px; }
	.j-head__title { font-size: 88px; }
	.j-head__tagline { text-align: left; }

	.j-filters { padding-top: 18px; }
	.j-filters__select { display: none; }
	.j-filters__tabs { display: flex; gap: 32px; margin: 0; padding: 0 0 6px; list-style: none; overflow-x: auto; scrollbar-width: thin; white-space: nowrap; }
	.j-filters__tabs li { list-style: none; flex: 0 0 auto; }
	.j-filters__tab { display: inline-block; padding: 6px 0; border: none; border-bottom: 1px solid transparent; color: var(--j-ink); font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; transition: border-color 200ms ease, opacity 200ms ease; opacity: 0.7; }
	.j-filters__tab:hover { opacity: 1; }
	.j-filters__tab.is-current { opacity: 1; border-bottom-color: var(--j-ink); }

	.j-listing { padding: 56px 0 120px; }
	.j-bands,
	.j-more { max-width: none; }

	.j-news { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--j-gap); }

	/* Tipologia 1: immagine 7/12, testo 5/12 */
	.j-story--1 { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: center; }
	.j-story__title { font-size: 40px; }

	/* Tipologia 2: story 7/12, box 5/12 */
	.j-story--2 { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--j-gap); align-items: stretch; }
	.j-story--2 .j-story__body { padding-right: 20%; }
	.j-deep { padding: 48px 44px; }
	.j-deep__text { font-size: 32px; }

	/* Tipologia 3: testo 5/12, immagini 7/12 */
	.j-story--3 { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; padding: 56px 0; }
	.j-trio { gap: 16px; padding-bottom: 40px; }
	.j-trio__item:nth-child(2) { margin-top: 40px; }
}

@media screen and (min-width: 1400px) {
	.j-head__title { font-size: 104px; }
	.j-story--1 .j-story__body { padding-right: 8%; }
}

@media (prefers-reduced-motion: reduce) {
	.j-ratio > img, .j-ratio .j-img, .j-bands { transition: none; }
}

/* ==========================================================================
   Ribbon Reel Instagram (story, pagine, news)
   ========================================================================== */
.reels_ribbon .j-reels__title { margin: 0 0 28px; font-size: 26px; font-weight: 400; line-height: 1.2; color: #39332D; }
/* Griglia: 1 colonna su mobile (card con larghezza massima), 2 da 640px, 4 da 1024px; va a capo su più righe */
.j-reels { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; margin: 0; padding: 0; list-style: none; }
.j-reels__item { width: 100%; max-width: 400px; min-width: 0; margin: 0 auto; list-style: none; }
.j-reels__media { position: relative; aspect-ratio: 9 / 16; overflow: hidden; background: #2a2420; }
.j-reels__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.j-reels__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #2a2420; }
.j-reels__item.is-playing .j-reels__play { display: none; }
.j-reels__item.is-playing .j-reels__video { object-fit: contain; }
/* Embed Instagram: intestazione e piè di pagina dell'embed restano visibili, il video occupa la parte centrale */
.j-reels__item.is-playing .j-reels__media { background: #fff; }
.j-reels__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.j-reels__play { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: rgba(0, 0, 0, 0.12); cursor: pointer; transition: background-color 250ms ease; }
.j-reels__play:hover { background: rgba(0, 0, 0, 0.22); }
.j-reels__play:focus-visible { outline: 2px solid #fff; outline-offset: -6px; }
.j-reels__play-icon { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(255, 255, 255, 0.9); }
.j-reels__play-icon:after { content: ''; position: absolute; left: 26px; top: 21px; border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent #39332D; }
.j-reels__fallback { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 2; padding: 10px 12px; background: #39332D; color: #fff; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; text-align: center; text-decoration: none; }
.j-reels__item-title { margin: 14px 0 6px; font-size: 17px; font-weight: 500; line-height: 1.3; color: #39332D; }
.j-reels__abstract { margin: 0; font-size: 14px; line-height: 1.5; color: #39332D; }

@media screen and (min-width: 640px) {
	.j-reels { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 20px; }
	.j-reels__item { max-width: none; margin: 0; }
}
@media screen and (min-width: 1024px) {
	.j-reels { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 44px 24px; }
}
