/* ============================================================
   ROTILI DE SIMONE — style.css
   Mobile-first. Bootstrap 5.3 breakpoints:
     sm ≥ 576px | md ≥ 768px | lg ≥ 992px | xl ≥ 1200px
   Bootstrap Reboot handles the base reset.
   ============================================================ */


/* ── 1. SITE-LEVEL OVERRIDES ────────────────────────────── */

body {
	font-family: 'Ropa Sans', sans-serif;

	scroll-behavior: smooth;
}

a,
a:visited {
	color: #fff;
	text-decoration: none;
}

a:hover {
	color: #330000;
}


/* ── 2. HEADER — scroll-aware, mobile-first ─────────────── */

/*
 * Base (any size): header invisible until user scrolls.
 * JS adds .is-scrolled when scrollY > 70% of viewport height.
 *
 * Mobile end-frame:  logo left + hamburger right (fixed bar)
 * Desktop end-frame: logo centered above + nav centered below
 */
#site-header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 1000;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.4s ease, background-color 0.4s ease, height 0.4s ease;

	/* Mobile layout: flex row, space-between */
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	padding: 0 16px;
	height: 56px;
	background-color: rgba(0, 0, 0, 0);
}

/* After scroll: become visible */
#site-header.is-scrolled {
	opacity: 1;
	pointer-events: auto;
	background-color: #333333;
	/* Gray header background */
}

/* Portfolio-specific: header always visible */
body.portfolio-gallery #site-header,
body.portfolio-categories #site-header {
	opacity: 1;
	pointer-events: auto;
	background-color: #333333;
}

/* Header logo — mobile: left-aligned, visible after scroll */
.header-logo {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.header-logo img {
	height: 36px;
	width: auto;
	display: block;
}

/* Desktop nav inside header (#navi) — hidden on mobile */
#navi {
	display: none;
}

.home_body {
	background: url('../img/studio_bn.jpg') no-repeat center center fixed;
	background-size: cover;
	min-height: 100dvh;
}

/* Mobile hamburger button */
.menu-toggle {
	display: block;
	background: none;
	border: none;
	cursor: pointer;
	font-size: 1.8em;
	color: #fff;
	padding: 8px;
	line-height: 1;
}

/* Mobile dropdown nav (#navi-mobile) */
#navi-mobile {
	display: none;
	width: 100%;
	flex-direction: column;
	background: rgba(0, 0, 0, 0.92);
	padding: 12px 16px;
	gap: 10px;
}

#navi-mobile.active {
	display: flex;
}

#navi-mobile a {
	color: #fff;
	font-weight: bold;
	text-decoration: none;
	padding: 4px 0;
}

#navi-mobile a:hover {
	color: #cc0000;
}

/* sm (≥ 576px) — still mobile layout */
@media (min-width: 576px) {
	.header-logo img {
		height: 42px;
	}
}

/* md (≥ 768px) — switch to desktop layout */
@media (min-width: 768px) {
	#site-header {
		flex-direction: column;
		justify-content: center;
		align-items: center;
		height: 120px;
		padding: 12px 0;
	}

	#site-header.is-scrolled {
		height: 120px;
	}

	.header-logo {
		margin-bottom: 16px;
	}

	.header-logo img {
		height: 52px;
	}

	/* Desktop nav: centered row */
	#navi {
		display: flex;
		gap: 24px;
		align-items: center;
	}

	#navi a {
		color: #fff;
		font-weight: bold;
		text-decoration: none;
		font-size: 0.85em;
		letter-spacing: 0.08em;
	}

	#navi a:hover {
		color: #cc0000;
	}

	/* Hamburger hidden on desktop */
	.menu-toggle {
		display: none;
	}

	#navi-mobile {
		display: none !important;
	}
}

/* lg (≥ 992px) */
@media (min-width: 992px) {
	#navi {
		gap: 32px;
	}

	#navi a {
		font-size: 0.9em;
	}
}


/* ── 3. HERO SECTION (#hero) ────────────────────────────── */

#hero {
	position: relative;
}

/* Full-viewport flex column pushing fascia to bottom */
#content {
	display: flex;
	flex-direction: column;
	min-height: 100dvh;
	width: 100%;
}

.flex-spacer {
	flex: 1;
}

/* Scroll hint arrow (desktop only) */
.scroll-hint {
	text-align: center;
	color: rgba(255, 255, 255, 0.6);
	font-size: 2em;
	padding-bottom: 12px;
	animation: bounce 2s infinite;
}

@keyframes bounce {

	0%,
	100% {
		transform: translateY(0);
	}

	50% {
		transform: translateY(8px);
	}
}


/* ── 4. FASCIA CENTRALE (hero red band) ─────────────────── */

/* xs / sm */
.fascia_centrale {
	background-color: #737370;
	padding: 15px 0;
	width: 100%;
	min-height: 100px;
	margin-bottom: 20%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	z-index: 100;
	transition: opacity 0.8s ease;
}

/* md (≥ 768px) */
@media (min-width: 768px) {
	.fascia_centrale {
		min-height: 120px;
		padding: 20px 0;
		margin-bottom: 20%;
	}
}

/* lg (≥ 992px) */
@media (min-width: 992px) {
	.flex-spacer {
		flex: 1 1 700px;
	}

	.fascia_centrale {
		padding: 25px 0;
	}
}


/* ── 5. .wrap (portraits + logo in hero) ────────────────── */

/* xs: flex-fill, full width */
.wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 5px;
	width: 100%;
	margin: 0 auto;
}

/* xs / sm: flex proportions */
#piero,
#francesco {
	flex: 0.6 1 0;
	min-width: 0;
}

#logo {
	flex: 2 1 0;
	min-width: 0;
}

/* sm (≥ 576px) */
@media (min-width: 576px) {
	.wrap {
		gap: 6px;
	}
}

/* md (≥ 768px) */
@media (min-width: 768px) {
	.wrap {
		gap: 20px;
		width: 90%;
		max-width: 960px;
	}

	#piero,
	#francesco {
		flex: none;
		width: 10%;
		max-width: 160px;
	}

	#logo {
		flex: none;
		width: 36%;
		max-width: 360px;
	}
}

/* lg (≥ 992px) */
@media (min-width: 992px) {
	.wrap {
		max-width: 1100px;
	}

	#piero,
	#francesco {
		width: 10%;
		max-width: 200px;
	}

	#logo {
		width: 38%;
		max-width: 420px;
	}
}


/* ── 6. PORTRAIT SPRITES (#piero, #francesco) ───────────── */

#piero,
#francesco {
	opacity: 1;
	background-image: url('../img/francesco_piero.jpg');
	background-repeat: no-repeat;
	background-size: 400% auto;
	aspect-ratio: 113 / 150;
	position: relative;
}

#piero::before,
#francesco::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: inherit;
	background-size: inherit;
	background-repeat: inherit;
	opacity: 0;
	transition: opacity 0.2s ease-in-out;
}

#francesco {
	background-position: 66.666% 0;
}

#piero {
	background-position: 100% 0;
}

#francesco::before {
	background-position: 0% 0;
}

#piero::before {
	background-position: 33.333% 0;
}

/* Reveal on hover (desktop) */
#francesco:hover::before,
#piero:hover::before {
	opacity: 1;
}

/* Mobile pulse animation */
@keyframes portrait-pulse {
	0% {
		opacity: 0;
	}

	15% {
		opacity: 1;
	}

	45% {
		opacity: 1;
	}

	60% {
		opacity: 0;
	}

	100% {
		opacity: 0;
	}
}

@media (max-width: 767.98px) {

	#piero::before,
	#francesco::before {
		transition: none;
		animation: portrait-pulse 5s ease-in-out infinite;
	}

	#piero::before {
		animation-delay: 2.5s;
	}
}


/* ── 7. LOGO ────────────────────────────────────────────── */

#logo {
	display: flex;
	align-items: center;
	padding: 0 8px;
	min-height: 80px;
}

@media (min-width: 768px) {
	#logo {
		min-height: 120px;
		padding: 0 15px;
	}
}

@media (min-width: 992px) {
	#logo {
		min-height: 150px;
	}
}

#logo img {
	width: 100%;
	height: auto;
	display: block;
}


/* ── 8. #navi-home (nav in red band, desktop only) ──────── */

#navi-home {
	gap: 20px;
	margin-top: 1rem;
}

#navi-home a {
	font-weight: bold;
	color: #fff;
	text-decoration: none;
}

#navi-home a:hover {
	color: #330000;
}


/* ── 9. CHI SIAMO SECTION ───────────────────────────────── */

.section-chi-siamo {
	background-color: #4a4a47;
	color: #fff;
	padding: 60px 0;
}

/* Portrait mini thumbnails */
.portrait-mini {
	width: 130px;
	aspect-ratio: 113 / 150;
	background-image: url('../img/francesco_piero.jpg');
	background-repeat: no-repeat;
	background-size: 400% auto;
	cursor: pointer;
	position: relative;
}

.portrait-mini::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-image: inherit;
	background-size: inherit;
	background-repeat: inherit;
	opacity: 0;
	transition: opacity 0.2s ease-in-out;
}

@media (min-width: 768px) {
	.portrait-mini:hover::before {
		opacity: 1;
	}
}

#chi-francesco {
	background-position: 66.666% 0;
}

#chi-francesco::before {
	background-position: 0% 0;
}

#chi-piero {
	background-position: 100% 0;
}

#chi-piero::before {
	background-position: 33.333% 0;
}

/* Text container */
.testo-container {
	text-align: justify;
}

/* Drop cap on first paragraph */
#contenuto p:first-of-type::first-letter {
	font-size: 3.5em;
	font-weight: bold;
	float: left;
	line-height: 0.75;
	margin: 4px 8px 0 0;
	color: #cc0000;
}

#contenuto p {
	margin-bottom: 1rem;
	line-height: 1.7;
}

#contenuto a {
	color: #ffaaaa;
	text-decoration: underline;
}

#contenuto a:hover {
	color: #fff;
}

.clienti {
	font-size: 0.88em;
	color: #ddd;
}

/* Mobile: full width */
@media (max-width: 767.98px) {
	.section-chi-siamo {
		padding: 40px 16px;
	}

	.testo-container {
		text-align: left;
	}
}


/* ── 10. LO STUDIO SECTION ──────────────────────────────── */

.section-studio {
	position: relative;
	background: #111;
	overflow: hidden;
}

/* Video: very wide horizontal strip clipped from center */
.studio-video-wrapper {
	width: 100%;
	height: 220px;
	overflow: hidden;
	position: relative;
}

@media (min-width: 768px) {
	.studio-video-wrapper {
		height: 300px;
	}
}

@media (min-width: 992px) {
	.studio-video-wrapper {
		height: 360px;
	}
}

.studio-video {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	min-width: 100%;
	min-height: 100%;
	width: auto;
	height: auto;
	object-fit: cover;
	object-position: center center;
}

/* Thumbnails grid */
.studio-thumbnails {
	padding: 0;
	background: #000;
}

.studio-thumbnails .row {
	margin: 0;
}

.studio-thumbnails a {
	display: block;
	overflow: hidden;
	position: relative;
}

.studio-thumbnails img {
	width: 100%;
	height: 180px;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease, opacity 0.35s ease;
}

.studio-thumbnails a:hover img {
	transform: scale(1.05);
	opacity: 0.8;
}

/* Mobile: single column (Bootstrap col-12 handles it, only height tweak) */
@media (max-width: 767.98px) {
	.studio-thumbnails img {
		height: 220px;
	}
}


/* ── 11. PORTFOLIO NAV SECTION ──────────────────────────── */

.section-portfolio {
	background-color: #1a1a1a;
	padding: 60px 0;
}

/* Masonry Container */
.am-container {
	display: flex;
	align-items: flex-start;
	width: 60%;
	margin: 80px auto 40px;
	/* Space for fixed header */
	gap: 15px;
}

.masonry-column {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 15px;
}

@media (min-width: 700px) {
	.section-portfolio {
		padding: 150px 0px 20px 0px;
	}

}

@media (max-width: 400px) {
	.section-portfolio {
		padding: 80px 0px 10px 0px;
	}

}

@media (max-width: 991.98px) {


	.am-container {
		width: 80%;
	}
}

@media (max-width: 767.98px) {
	.am-container {
		width: 100%;
		padding: 0 15px;
		margin-top: 60px;
	}
}

.portfolio-cats {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	padding: 0 16px;
	margin-bottom: 30px;
}

.foto_portfolio {
	display: inline-block;
	width: 100%;
	margin-bottom: 15px;
	break-inside: avoid;
}

.foto_portfolio img {
	width: 100%;
	height: auto;
	display: block;
	transition: opacity 0.3s ease;
}

.foto_portfolio:hover img {
	opacity: 0.8;
}

.portfolio-cat-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 20px;
	border: 1px solid rgba(255, 255, 255, 0.3);
	color: #fff;
	font-weight: bold;
	font-size: 0.8em;
	letter-spacing: 0.12em;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.25s ease, border-color 0.25s ease;
	position: relative;
	overflow: hidden;
}

.portfolio-cat-link::after {
	content: attr(data-label);
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: rgba(204, 0, 0, 0.85);
	color: #fff;
	font-size: 0.75em;
	font-weight: normal;
	letter-spacing: 0.06em;
	padding: 4px 8px;
	transform: translateY(100%);
	transition: transform 0.25s ease;
	text-transform: none;
}

.portfolio-cat-link:hover {
	background-color: rgba(204, 0, 0, 0.2);
	border-color: #cc0000;
	color: #fff;
}

.portfolio-cat-link:hover::after {
	transform: translateY(0);
}

@media (max-width: 767.98px) {
	.portfolio-cats {
		gap: 8px;
	}

	.portfolio-cat-link {
		font-size: 0.72em;
		padding: 10px 14px;
	}
}


/* ── 12. CONTATTI SECTION ───────────────────────────────── */

.section-contatti {
	background-color: #2d2d2d;
	color: #e0e0e0;
}



.contatti-indirizzo {
	font-style: normal;
	line-height: 1.8;
	font-size: 0.9em;
	color: #ccc;
}

.contatti-indirizzo a {
	color: #ffaaaa;
}

.contatti-indirizzo a:hover {
	color: #fff;
}

.flag {
	font-size: 1.2em;
	margin-right: 4px;
}

.contatti-form-title {
	color: #fff;
	font-size: 1em;
	font-weight: bold;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: 12px;
}

/* Form overrides on dark background */
.section-contatti .form-control {
	background-color: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.2);
	color: #fff;
}

.section-contatti .form-control::placeholder {
	color: rgba(255, 255, 255, 0.4);
}

.section-contatti .form-control:focus {
	background-color: rgba(255, 255, 255, 0.15);
	border-color: #cc0000;
	color: #fff;
	box-shadow: 0 0 0 0.2rem rgba(204, 0, 0, 0.25);
}

.section-contatti .form-label {
	color: #aaa;
	font-size: 0.8em;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 2px;
}

/* Map iframe */
#mappa-studio {
	border-radius: 4px;
	filter: grayscale(0.3) contrast(1.05);
}

/* Legal row */
.contatti-legal {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	padding-top: 16px;
	font-size: 0.78em;
	color: #888;
	text-align: center;
}

.contatti-legal a {
	color: #aaa;
	text-decoration: underline;
}

.contatti-legal a:hover {
	color: #fff;
}


/* ── 13. COOKIE BANNER ──────────────────────────────────── */

.cookie-banner {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 9999;
	background: rgba(20, 20, 20, 0.97);
	border-top: 2px solid #cc0000;
	padding: 16px;
	display: none;
	/* shown by JS if consent not set */
}

.cookie-banner.visible {
	display: block;
}

.cookie-banner-container {
	max-width: 860px;
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.cookie-banner p {
	color: #ccc;
	font-size: 0.85em;
	margin: 0;
	flex: 1 1 300px;
}

.cookie-banner p a {
	color: #ffaaaa;
	text-decoration: underline;
}

.cookie-buttons {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
}

.cookie-btn {
	padding: 8px 18px;
	border: none;
	border-radius: 3px;
	cursor: pointer;
	font-family: inherit;
	font-size: 0.82em;
	font-weight: bold;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	transition: opacity 0.2s;
}

.cookie-btn:hover {
	opacity: 0.85;
}

.cookie-btn.accept {
	background: #cc0000;
	color: #fff;
}

.cookie-btn.reject {
	background: rgba(255, 255, 255, 0.12);
	color: #ccc;
}


/* ── 14. PRINT ──────────────────────────────────────────── */

@media print {
	body {
		background: #fff !important;
		color: #000 !important;
	}

	#site-header,
	.cookie-banner {
		display: none !important;
	}

	a,
	a:visited {
		text-decoration: underline;
	}

	a[href]::after {
		content: " (" attr(href) ")";
	}

	img {
		max-width: 100% !important;
	}

	@page {
		margin: 0.5cm;
	}

	p,
	h2,
	h3 {
		orphans: 3;
		widows: 3;
	}

	h2,
	h3 {
		page-break-after: avoid;
	}
}