/* ==========================================================================
   CineScroll — personalizzazione del template T4
   File: templates/<tuo-template>/local/css/custom.css
   Modificabile anche da: Template T4 > Tools > Edit Custom CSS

   SCEGLI LA PALETTE: lascia attivo UNO dei tre blocchi :root qui sotto
   e lascia gli altri due dentro i commenti.
   ========================================================================== */

/* Font: Archivo, una sola famiglia declinata per peso (100–900) e larghezza (62–125%).
   Per il GDPR puoi ospitarlo sul tuo server e sostituire questa riga con un @font-face. */
@import url("https://fonts.googleapis.com/css2?family=Archivo:ital,wdth,wght@0,62..125,100..900;1,62..125,100..900&display=swap");


/* ---------- PALETTE 1 · SALA BUIA (attiva) ----------
   Il nero della sala, il bianco del proiettore, le luci soffuse gialle e blu. */ 
:root {
	--cine-bg: #0a0b0f;
	--cine-bg-alt: #12141c;
	--cine-surface: #191c26;
	--cine-screen: #f1ede3;
	--cine-screen-ink: #121318;
	--cine-ink: #f1ede3;
	--cine-ink-soft: #c9c4b8;
	--cine-ink-mute: #8d8a82;
	--cine-accent: #f2c14e;
	--cine-accent-ink: #14110a;
	--cine-accent-2: #5b8cff;
	--cine-accent-deep: #8a5a00;
	--cine-line: rgba(241, 237, 227, 0.14);
	--cine-glow: rgba(242, 193, 78, 0.28);
}

/* ---------- PALETTE 2 · RED CARPET ----------
   Rubino e amaranto, velluto delle poltrone, oro delle premiazioni.*/
/* :root {
	--cine-bg: #120507;
	--cine-bg-alt: #1f080c;
	--cine-surface: #2b0d13;
	--cine-screen: #f6ebe1;
	--cine-screen-ink: #1d0a0d;
	--cine-ink: #f8ede4;
	--cine-ink-soft: #dcc5bb;
	--cine-ink-mute: #a48a83;
	--cine-accent: #e0b25a;
	--cine-accent-ink: #1d0a0d;
	--cine-accent-2: #b3122e;
	--cine-accent-deep: #9b111e;
	--cine-line: rgba(248, 237, 228, 0.14);
	--cine-glow: rgba(179, 18, 46, 0.42);
} */


/* ---------- PALETTE 3 · OCRA ----------
   Giallo ocra della pellicola d'epoca, seppia e un blu petrolio di contrasto.*/
/* :root {
	--cine-bg: #110e08;
	--cine-bg-alt: #1c170d;
	--cine-surface: #282012;
	--cine-screen: #f3e9d2;
	--cine-screen-ink: #1a140a;
	--cine-ink: #f4ead5;
	--cine-ink-soft: #d6c8a8;
	--cine-ink-mute: #9d907a;
	--cine-accent: #d99a2b;
	--cine-accent-ink: #1a140a;
	--cine-accent-2: #3f7f86;
	--cine-accent-deep: #8a4f0c;
	--cine-line: rgba(244, 234, 213, 0.14);
	--cine-glow: rgba(217, 154, 43, 0.32);
}
 */


/* ==========================================================================
   Base del sito
   ========================================================================== */

html {
	scroll-behavior: smooth;
	background: var(--cine-bg);
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}

body {
	background: var(--cine-bg);
	color: var(--cine-ink-soft);
	font-family: var(--cine-font, "Archivo", system-ui, sans-serif);
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
	font-family: var(--cine-font, "Archivo", system-ui, sans-serif);
	color: var(--cine-ink);
}

h1, .h1 { font-weight: 900; font-stretch: 62%; font-variation-settings: "wdth" 62; text-transform: uppercase; line-height: .9; }
h2, .h2 { font-weight: 800; font-stretch: 70%; font-variation-settings: "wdth" 70; text-transform: uppercase; line-height: .95; }
h3, .h3 { font-weight: 800; font-stretch: 80%; font-variation-settings: "wdth" 80; }
h4, .h4, h5, .h5, h6, .h6 { font-weight: 700; }

a { color: var(--cine-accent); }
a:hover { color: color-mix(in srgb, var(--cine-accent) 80%, #fff); }

::selection { background: var(--cine-accent); color: var(--cine-accent-ink); }

/* I moduli CineScroll gestiscono da soli spazi e sfondi.
   Ogni riga T4 che ne contiene uno diventa a tutta larghezza, senza sfondo bianco,
   qualunque sia la struttura interna (contenitore, colonna, cornice del modulo). */
.t4-section:has(:is(.cine-nav, [data-cine-section], .cine-hero, .cine-footer, .cine-page, .cine-article)),
.t4-main-body:has(.cine-page, .cine-article) {
	background: var(--cine-bg) !important;
	padding: 0 !important;
	margin: 0 !important;
	max-width: none !important;
	width: 100% !important;
	border: 0 !important;
}

.t4-section:has(:is(.cine-nav, [data-cine-section], .cine-hero, .cine-footer, .cine-page, .cine-article))
	:is(.container, .container-fluid, .container-sm, .container-md, .container-lg, .container-xl, .container-xxl,
		.t4-section-inner, .t4-row, .row, .t4-col, [class*="col-"], .t4-module, .module, .module-inner, .module-ct, .t4-module-content)
	:not(.cine-nav *, [data-cine-section] *, .cine-hero *, .cine-footer *, .cine-page *, .cine-article *),
.t4-section:has(:is(.cine-nav, [data-cine-section], .cine-hero, .cine-footer, .cine-page, .cine-article))
	> :is(.container, .container-fluid, .t4-section-inner, .t4-row, .row) {
	max-width: none !important;
	width: 100% !important;
	flex: 0 0 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	--bs-gutter-x: 0;
}

.t4-section:has(:is(.cine-nav, [data-cine-section], .cine-hero, .cine-footer, .cine-page, .cine-article)) :is(.t4-module, .module) {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

/* Linee di separazione da bordo a bordo dello schermo */
html, body { overflow-x: clip; }

.t4-section:has(.cine-nav) { border-bottom: 1px solid var(--cine-line) !important; }
.cine-nav { border-bottom: 0; }

.cine-page .cine-section__foot,
.cine-article__foot,
.cine-footer__bottom {
	position: relative;
	border-top: 0;
}

.cine-page .cine-section__foot::before,
.cine-article__foot::before,
.cine-footer__bottom::before {
	content: "";
	position: absolute;
	top: 0;
	left: calc(50% - 50vw);
	width: 100vw;
	height: 1px;
	background: var(--cine-line);
}

/* Titoli grandi: vanno a capo tra le parole, senza sillabare */
:is(.cine-display, .cine-hero__title, .cine-section__title, .cine-page__title, .cine-article__title, .cine-feature__title, .cine-card__title, .cine-slide__title) {
	-webkit-hyphens: manual;
	hyphens: manual;
	word-break: normal;
	overflow-wrap: break-word;
}

/* Claim dell'hero un po' più piccolo */
.cine-hero__title {
	font-size: clamp(2.4rem, 1.2rem + 5.2vw, 7.5rem);
	max-width: 16ch;
}

/* Barra del menù: voci e nome su una riga sola */
.cine-nav__brand,
.cine-nav__link { white-space: nowrap; }

@media (min-width: 1024px) and (max-width: 1279px) {
	.cine-nav__link { padding-inline: 0.55rem; letter-spacing: 0.14em; font-size: 0.72rem; }
	.cine-nav__inner { gap: 1rem; }
}

/* Il menù di T4 non serve: la navigazione è il modulo «CineScroll - Menù principale».
   Se preferisci tenere il mega menu T4, cancella questa regola. */
.t4-section:has(.cine-nav) ~ :is(#t4-mainnav, .t4-mainnav) { display: none; }


/* ==========================================================================
   Responsive: smartphone → tablet → PC → smart TV
   Le dimensioni del design sono in rem: alzando la base, tutto scala.
   ========================================================================== */

@media (max-width: 599px) {
	:root { --cine-poster-min: 9.25rem; --cine-gutter: 1rem; }
}

@media (min-width: 600px) and (max-width: 1023px) {
	:root { --cine-poster-min: 11rem; }
}

/* Smart TV e grandi schermi (Full HD visto da lontano) */
@media (min-width: 1920px) {
	html { font-size: 112.5%; }
	:root { --cine-max: 2200px; }
}

@media (min-width: 2560px) {
	html { font-size: 137.5%; }
	:root { --cine-max: 3000px; }
}

@media (min-width: 3800px) {
	html { font-size: 200%; }
}

/* TV con telecomando: navigazione a focus, niente hover */
@media (hover: none) and (pointer: coarse) and (min-width: 1280px) {
	a:focus-visible, button:focus-visible {
		outline: 4px solid var(--cine-accent) !important;
		outline-offset: 6px;
	}
}

/* Archivio Premi e Riconoscimenti — itemid 116 */
body.itemid-116 { background: #0a0b0f; color: #e8e3d9; }
body.itemid-116 #t4-main-body { background: #0a0b0f; color: #e8e3d9; padding-top: 54px; padding-bottom: 72px; }
body.itemid-116 #t4-main-body .page-header { margin-bottom: 38px; }
body.itemid-116 #t4-main-body h1, body.itemid-116 #t4-main-body h2, body.itemid-116 #t4-main-body .item-title, body.itemid-116 #t4-main-body .item-title a { color: #f4efe5 !important; }
body.itemid-116 #t4-main-body h1 { font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: .06em; text-transform: uppercase; }
body.itemid-116 #t4-main-body .blog-item, body.itemid-116 #t4-main-body .com-content-category-blog__item { background: #14161b; border: 1px solid rgba(255,255,255,.09); border-radius: 12px; overflow: hidden; box-shadow: 0 18px 42px rgba(0,0,0,.22); padding: 0 0 28px; }
body.itemid-116 #t4-main-body .blog-item .item-image img, body.itemid-116 #t4-main-body .com-content-category-blog__item .item-image img { display: block; width: 100%; height: clamp(240px, 30vw, 360px); object-fit: cover; }
body.itemid-116 #t4-main-body .blog-item .item-title, body.itemid-116 #t4-main-body .blog-item .item-content, body.itemid-116 #t4-main-body .com-content-category-blog__item .item-title, body.itemid-116 #t4-main-body .com-content-category-blog__item .item-content { margin-left: 26px; margin-right: 26px; }
body.itemid-116 #t4-main-body .blog-item .item-title, body.itemid-116 #t4-main-body .com-content-category-blog__item .item-title { margin-top: 24px; margin-bottom: 12px; font-size: 1.35rem; letter-spacing: .08em; }
body.itemid-116 #t4-main-body .blog-item p, body.itemid-116 #t4-main-body .com-content-category-blog__item p { color: #c9c6bf !important; line-height: 1.75; }
body.itemid-116 #t4-main-body .blog-item .readmore, body.itemid-116 #t4-main-body .com-content-category-blog__item .readmore { margin: 18px 26px 0; }
body.itemid-116 #t4-main-body .blog-item .readmore a, body.itemid-116 #t4-main-body .com-content-category-blog__item .readmore a { display: inline-block; color: #101114 !important; background: #e8b84b; border-radius: 999px; padding: 10px 18px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
body.itemid-116 #t4-main-body .blog-item .readmore a:hover, body.itemid-116 #t4-main-body .com-content-category-blog__item .readmore a:hover { background: #f4ce72; }
@media (max-width: 767px) { body.itemid-116 #t4-main-body { padding-top: 32px; } body.itemid-116 #t4-main-body .blog-item .item-image img, body.itemid-116 #t4-main-body .com-content-category-blog__item .item-image img { height: 240px; } body.itemid-116 #t4-main-body .blog-item .item-title, body.itemid-116 #t4-main-body .blog-item .item-content, body.itemid-116 #t4-main-body .com-content-category-blog__item .item-title, body.itemid-116 #t4-main-body .com-content-category-blog__item .item-content { margin-left: 18px; margin-right: 18px; } }

/* Rifinitura: il layout blog del componente aggiunge un pannello chiaro interno */
body.itemid-116 #t4-main-body { background: #0a0b0f !important; color: #c9c6bf !important; }
body.itemid-116 #t4-main-body > *, body.itemid-116 #t4-main-body .container, body.itemid-116 #t4-main-body .container-fluid, body.itemid-116 #t4-main-body .container-component, body.itemid-116 #t4-main-body .com-content-category-blog, body.itemid-116 #t4-main-body .blog { background-color: transparent !important; color: #c9c6bf !important; }
body.itemid-116 #t4-main-body h1, body.itemid-116 #t4-main-body h2, body.itemid-116 #t4-main-body h3, body.itemid-116 #t4-main-body .item-title, body.itemid-116 #t4-main-body .item-title a { color: #f4efe5 !important; }
body.itemid-116 #t4-main-body p, body.itemid-116 #t4-main-body .item-content, body.itemid-116 #t4-main-body .item-content * { color: #d1cec6 !important; }
body.itemid-116 #t4-main-body a { color: #e8b84b !important; }
body.itemid-116 #t4-main-body .row > *, body.itemid-116 #t4-main-body article, body.itemid-116 #t4-main-body .item { background-color: #14161b !important; border-radius: 12px; }
body.itemid-116 #t4-main-body img { width: 100%; height: clamp(240px, 30vw, 360px); object-fit: cover; }

/* La classe pagina Joomla mantiene queste regole circoscritte all’archivio premi */
body.premi-archive, .premi-archive { background: #0a0b0f !important; color: #d1cec6 !important; }
body.premi-archive #t4-main-body, .premi-archive #t4-main-body, #t4-main-body.premi-archive, body.itemid-116 #t4-main-body { background: #0a0b0f !important; color: #d1cec6 !important; }
body.premi-archive #t4-main-body *, .premi-archive #t4-main-body *, #t4-main-body.premi-archive * { background-color: transparent !important; color: #d1cec6 !important; }
body.premi-archive #t4-main-body h1, body.premi-archive #t4-main-body h2, body.premi-archive #t4-main-body h3, .premi-archive #t4-main-body h1, .premi-archive #t4-main-body h2, .premi-archive #t4-main-body h3, body.premi-archive #t4-main-body .item-title a, .premi-archive #t4-main-body .item-title a { color: #f4efe5 !important; }
body.premi-archive #t4-main-body a, .premi-archive #t4-main-body a { color: #e8b84b !important; }
body.premi-archive #t4-main-body article, body.premi-archive #t4-main-body .blog-item, body.premi-archive #t4-main-body .row > *, .premi-archive #t4-main-body article, .premi-archive #t4-main-body .blog-item, .premi-archive #t4-main-body .row > * { background: #14161b !important; border-radius: 12px; overflow: hidden; }
body.premi-archive #t4-main-body img, .premi-archive #t4-main-body img { width: 100%; height: clamp(240px, 30vw, 360px); object-fit: cover; }

/* Spaziatura e gerarchia visiva della pagina */
body.premi-archive #t4-main-body, .premi-archive #t4-main-body, #t4-main-body.premi-archive { padding: 54px clamp(22px, 5vw, 72px) 72px !important; }
body.premi-archive #t4-main-body h1, .premi-archive #t4-main-body h1, #t4-main-body.premi-archive h1 { font-size: clamp(2rem, 4vw, 3rem) !important; line-height: 1.1; margin: 0 0 34px; letter-spacing: .06em; }
body.premi-archive #t4-main-body .row > *, .premi-archive #t4-main-body .row > *, #t4-main-body.premi-archive .row > * { padding: 0 14px 28px; }
