/*
 * Castelgrande Turismo — stili del tema sopra Bootstrap Italia 2.x.
 *
 * Palette (contrasti verificati su bianco, WCAG AA testo normale ≥ 4.5:1):
 *   --cgt-notte     #10263f  cielo notturno (testo/sfondi scuri)        15.3:1
 *   --cgt-terra     #9a3b14  terracotta, accento                          7.0:1 (6.2:1 su sabbia)
 *   --cgt-bosco     #2a6236  verde dei boschi                             7.2:1
 *   --cgt-sabbia    #f6f1ea  sfondo caldo delle sezioni (testo #1a1a1a 15.5:1, link #0066cc 4.95:1)
 *   primary BI      #0066cc  link e pulsanti (5.6:1)
 */
:root {
	--cgt-notte: #10263f;
	--cgt-terra: #9a3b14;
	--cgt-bosco: #2a6236;
	--cgt-sabbia: #f6f1ea;
	--cgt-testo: #1a1a1a;
	--cgt-raggio: 8px;
}

body {
	color: var(--cgt-testo);
}

/* --- Accessibilità -------------------------------------------------- */
:focus-visible {
	outline: 3px solid #ff9900;
	outline-offset: 2px;
}

.skiplinks a {
	z-index: 10000;
}

main:focus,
#main-container:focus {
	outline: none;
}

/* --- Intestazione --------------------------------------------------- */
.cgt-header .it-header-slim-wrapper {
	background: var(--cgt-notte);
}

.cgt-header .it-header-center-wrapper {
	background: #0b4f8a;
}

.cgt-header .it-header-navbar-wrapper {
	background: #0b4f8a;
}

.cgt-header .it-brand-wrapper a .icon,
.cgt-stemma {
	width: 64px;
	height: 64px;
	object-fit: contain;
	flex-shrink: 0;
	margin-right: 12px;
}

.cgt-header .it-brand-title {
	font-weight: 700;
	letter-spacing: 0.01em;
}

@media (max-width: 991.98px) {
	.cgt-header .it-brand-wrapper a .icon,
	.cgt-header .cgt-stemma {
		width: 44px;
		height: 44px;
	}

	.cgt-header .navbar .navbar-collapsable .menu-wrapper .logo-hamburger .cgt-stemma {
		width: 40px;
		height: 40px;
	}
}

@media (min-width: 992px) {
	/* Il logo nel menu serve solo nel pannello mobile. */
	.cgt-header .navbar .navbar-collapsable .menu-wrapper .logo-hamburger {
		display: none;
	}
}

.cgt-header .it-search-wrapper > span {
	margin-right: 0.5rem;
}

.cgt-header .it-search-wrapper .search-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	box-shadow: none;
}

.cgt-header .it-search-wrapper .search-link .icon {
	width: 24px;
	height: 24px;
	margin: 0;
	fill: #0b4f8a;
}

.cgt-header .it-search-wrapper .search-link:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 3px;
}

/* --- Hero ----------------------------------------------------------- */
.cgt-hero {
	position: relative;
	min-height: 420px;
	display: flex;
	align-items: flex-end;
	color: #fff;
	background: var(--cgt-notte);
	overflow: hidden;
}

.cgt-hero__media {
	position: absolute;
	inset: 0;
}

.cgt-hero__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.cgt-hero__overlay {
	position: relative;
	width: 100%;
	padding: 6rem 0 3rem;
	background: linear-gradient(to top, rgba(8, 22, 40, 0.92) 0%, rgba(8, 22, 40, 0.65) 55%, rgba(8, 22, 40, 0.15) 100%);
}

.cgt-hero__title {
	font-size: 2.25rem;
	line-height: 1.15;
	font-weight: 700;
	color: #fff;
	margin-bottom: 1rem;
	text-wrap: balance;
}

.cgt-hero__text {
	font-size: 1.15rem;
	color: #fff;
	max-width: 40em;
	margin-bottom: 1.5rem;
}

.cgt-hero__kicker {
	color: #ffd9a8;
}

.cgt-hero__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

@media (min-width: 992px) {
	.cgt-hero {
		min-height: 560px;
	}

	.cgt-hero__title {
		font-size: 3.25rem;
	}

	.cgt-hero__overlay {
		padding: 8rem 0 4rem;
	}
}

/* --- Tipografia di supporto (classi usate dai moduli cg-*) ----------- */
.title-xxxlarge {
	font-size: 2rem;
	line-height: 1.2;
	font-weight: 700;
	text-wrap: balance;
}

.title-xlarge {
	font-size: 1.75rem;
	line-height: 1.25;
	font-weight: 700;
}

.title-large {
	font-size: 1.5rem;
	line-height: 1.3;
	font-weight: 600;
}

.subtitle-small {
	font-size: 1.125rem;
	line-height: 1.5;
	color: #3f4a56;
}

.text-paragraph-small {
	font-size: 0.875rem;
	line-height: 1.5;
}

@media (min-width: 992px) {
	.title-xxxlarge {
		font-size: 2.5rem;
	}
}

.cgt-eyebrow {
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--cgt-terra);
}

.cmp-heading {
	padding-top: 1rem;
}

.cmp-card .card {
	border-radius: var(--cgt-raggio);
}

.has-bkg-grey {
	background-color: #f5f6f7;
}

.it-page-section {
	margin-bottom: 2.5rem;
	scroll-margin-top: 1rem;
}

/* --- Breadcrumb ----------------------------------------------------- */
.cgt-breadcrumb {
	padding-top: 1.5rem;
}

.cgt-breadcrumb .breadcrumb {
	flex-wrap: wrap;
}

/* --- Sezioni e card --------------------------------------------------- */
.cgt-main {
	display: block;
}

.cgt-section {
	padding: 3rem 0;
}

.cgt-section--tinted {
	background: var(--cgt-sabbia);
}

.cgt-section__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem 1.5rem;
	margin-bottom: 1.5rem;
}

.cgt-section__head h2 {
	margin-bottom: 0;
}

.cgt-card {
	overflow: hidden;
	transition: box-shadow 0.15s ease;
}

.cgt-card:hover,
.cgt-card:focus-within {
	box-shadow: 0 0.5rem 1.5rem rgba(16, 38, 63, 0.18) !important;
}

.cgt-card .img-responsive-wrapper img {
	object-fit: cover;
}

.cgt-card .card-title {
	margin-bottom: 0.5rem;
}

.cgt-card__meta {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--cgt-terra);
	margin-bottom: 0.5rem;
}

.cgt-card .card-title a::after {
	/* stretched-link: tutta la card è cliccabile, il focus resta sul titolo */
	border-radius: var(--cgt-raggio);
}

/* --- Pagine e schede -------------------------------------------------- */
.cgt-prose {
	font-size: 1.0625rem;
	line-height: 1.65;
}

.cgt-prose img {
	max-width: 100%;
	height: auto;
}

.cgt-cover img {
	border-radius: var(--cgt-raggio);
	max-height: 560px;
	object-fit: cover;
}

.cgt-scheda__section {
	padding-top: 1rem;
	margin-bottom: 2.5rem;
	scroll-margin-top: 1rem;
}

.cgt-page-index {
	position: sticky;
	top: 1rem;
	border-left: 3px solid var(--cgt-terra);
	padding-left: 1rem;
}

.cgt-page-index li {
	margin-bottom: 0.4rem;
}

.cgt-event-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 2rem;
	font-size: 1.125rem;
	font-weight: 600;
}

.cgt-event-facts li {
	display: flex;
	align-items: center;
}

.cgt-contacts li {
	margin-bottom: 0.4rem;
}

.cgt-contacts__label {
	font-weight: 600;
}

.cgt-costi li {
	padding: 0.75rem 0;
	border-bottom: 1px solid #dfe3e8;
}

.cgt-costi__prezzo {
	float: right;
	font-weight: 700;
}

.cgt-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 0.75rem;
	margin-bottom: 1.5rem;
}

.cgt-gallery img {
	width: 100%;
	height: 150px;
	object-fit: cover;
	border-radius: 4px;
	display: block;
}

.cgt-map {
	height: 320px;
	border-radius: var(--cgt-raggio);
	overflow: hidden;
	z-index: 0;
}

.cgt-empty {
	max-width: 40rem;
}

/* --- FAQ ------------------------------------------------------------ */
.cgt-faq .accordion-button {
	font-weight: 600;
}

/* --- Piè di pagina ---------------------------------------------------- */
.cgt-footer .it-footer-main {
	background: var(--cgt-notte);
}

.cgt-footer .it-footer-small-prints {
	background: #0a1a2c;
}

.cgt-footer a,
.cgt-footer .footer-heading-title,
.cgt-footer .it-brand-title,
.cgt-footer .it-brand-tagline,
.cgt-footer p,
.cgt-footer li {
	color: #fff;
}

.cgt-footer .cgt-footer-stemma {
	width: 72px;
	height: 72px;
	margin-right: 1rem;
}

.cgt-footer .logo-wrapper {
	display: flex;
	align-items: center;
	padding: 2rem 0 1rem;
}

.cgt-footer .cgt-credits {
	font-size: 0.875rem;
	opacity: 0.9;
}

.cgt-cookie-prefs {
	color: #fff;
	text-decoration: underline;
	font-size: inherit;
	vertical-align: baseline;
}

/* --- Ricerca ------------------------------------------------------------ */
.cgt-search-form .input-group .form-control {
	min-width: 0;
}

.modal.cgt-search-modal .modal-dialog .modal-content {
	overflow: visible;
	padding: 0;
	border-radius: 8px;
}

.modal.cgt-search-modal .modal-dialog .modal-content .modal-header {
	align-items: center;
	padding: 1.25rem 1.5rem 0.5rem;
}

.cgt-search-modal .modal-header .btn-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	background: none;
}

/* Selettori lunghi: Bootstrap Italia usa .modal .modal-dialog .modal-content .modal-body */
.modal.cgt-search-modal .modal-dialog .modal-content .modal-body {
	padding: 1rem 1.5rem 1.75rem;
}

.cgt-search-modal .cgt-search-form .form-group {
	margin: 0;
}

/* --- Banner cookie: colori del portale ---------------------------------- */
#cc_div {
	--cc-font-family: "Titillium Web", Geneva, Tahoma, sans-serif;
	--cc-btn-primary-bg: #0066cc;
	--cc-btn-primary-hover-bg: #004c99;
	--cc-btn-secondary-bg: #e8edf3;
	--cc-btn-secondary-text: #10263f;
	--cc-text: #1a1a1a;
	--cc-toggle-bg-on: #0066cc;
}

#cc_div .cc-link {
	color: #0066cc;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}

/* Selettore lingua nella riga sottile: testo bianco leggibile sul blu notte. */
.it-header-slim-wrapper .it-header-slim-right-zone .dropdown-toggle {
	color: #fff;
	background: transparent;
	border: 0;
	box-shadow: none;
	display: flex;
	align-items: center;
	gap: .25rem;
	padding: .25rem .5rem;
	font-weight: 600;
}
.it-header-slim-wrapper .it-header-slim-right-zone .dropdown-toggle:hover,
.it-header-slim-wrapper .it-header-slim-right-zone .dropdown-toggle:focus-visible {
	text-decoration: underline;
}

/* --- Stemma ufficiale (corona e alloro, sfondo trasparente) -------------- */
/* Selettori lunghi: Bootstrap Italia imposta la dimensione di .it-brand-wrapper a .icon. */
.cgt-header .it-header-center-wrapper .it-header-center-content-wrapper .it-brand-wrapper a img.cgt-stemma {
	width: 72px;
	height: 72px;
	max-width: none;
	object-fit: contain;
	margin-right: 14px;
	/* Fondo chiaro: lo scudo blu e l'alloro verde restano leggibili sul blu dell'intestazione. */
	background: #fff;
	border-radius: 12px;
	padding: 4px;
	box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.25 );
}

.cgt-footer .it-footer-main .logo-wrapper img.cgt-footer-stemma {
	width: 72px;
	height: 72px;
	max-width: none;
	object-fit: contain;
	background: #fff;
	border-radius: 12px;
	padding: 4px;
}

@media (max-width: 991.98px) {
	.cgt-header .it-header-center-wrapper .it-header-center-content-wrapper .it-brand-wrapper a img.cgt-stemma {
		width: 52px;
		height: 52px;
		padding: 3px;
		border-radius: 10px;
		margin-right: 10px;
	}

	.cgt-header .navbar .navbar-collapsable .menu-wrapper .logo-hamburger img.cgt-stemma {
		width: 44px;
		height: 44px;
		object-fit: contain;
		background: #fff;
		border-radius: 8px;
		padding: 3px;
	}
}
