/**
 * Fondazione XXV Aprile — stili custom del tema.
 * CSS puro (non richiede compilazione). Carico dopo build/main.css.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap');

/* =========================================================================
   Palette e tipografia — override delle CSS custom properties di Bootstrap.
   ========================================================================= */

:root {
	--fond-primary: #8a1e2e;
	--fond-primary-dark: #6d1724;
	--fond-bg-warm: #faf7f2;
	--fond-bg-warm-2: #f1ece3;
	--fond-border-warm: #ece5d8;

	/* Sovrascrive Bootstrap 5 */
	--bs-primary: var(--fond-primary);
	--bs-primary-rgb: 138, 30, 46;
	--bs-link-color: var(--fond-primary);
	--bs-link-color-rgb: 138, 30, 46;
	--bs-link-hover-color: var(--fond-primary-dark);
	--bs-link-hover-color-rgb: 109, 23, 36;

	--bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--bs-body-color: #2f2a24;
	--bs-body-bg: #ffffff;

	--bs-border-color: var(--fond-border-warm);
	--bs-border-radius: 0.375rem;

	/* Unifica i toni neutri caldi sovrascritti su tutto Bootstrap */
	--bs-secondary-bg: var(--fond-bg-warm-2);
	--bs-tertiary-bg: var(--fond-bg-warm);
	--bs-light: var(--fond-bg-warm);
	--bs-light-rgb: 250, 247, 242;
}

/* Rimuove il gap bianco fra navbar e contenuto (margin-top predefinito dello starter su #main) */
#main {
	margin-top: 0 !important;
}

body {
	font-family: var(--bs-body-font-family);
	color: var(--bs-body-color);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
	font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
	font-weight: 600;
	line-height: 1.2;
	color: #1b1814;
}

a {
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

/* Bottoni primari: ridefinisco ombre/hover per armonizzare col bordeaux */
.btn-primary {
	--bs-btn-bg: var(--fond-primary);
	--bs-btn-border-color: var(--fond-primary);
	--bs-btn-hover-bg: var(--fond-primary-dark);
	--bs-btn-hover-border-color: var(--fond-primary-dark);
	--bs-btn-active-bg: var(--fond-primary-dark);
	--bs-btn-active-border-color: var(--fond-primary-dark);
}

.btn-outline-primary {
	--bs-btn-color: var(--fond-primary);
	--bs-btn-border-color: var(--fond-primary);
	--bs-btn-hover-bg: var(--fond-primary);
	--bs-btn-hover-border-color: var(--fond-primary);
	--bs-btn-active-bg: var(--fond-primary-dark);
	--bs-btn-active-border-color: var(--fond-primary-dark);
}

/* =========================================================================
   Header
   ========================================================================= */

#header {
	background-color: var(--fond-bg-warm) !important;
	padding-block: 0.75rem;
	border-bottom: none;
	box-shadow: 0 4px 12px rgba(27, 24, 20, 0.07);
	position: relative;
	z-index: 10;
}

#header .navbar-brand img {
	height: 80px;
	width: auto;
}

@media (max-width: 767.98px) {
	#header .navbar-brand img {
		height: 56px;
	}
}

#header .nav-link {
	font-weight: 500;
	padding-inline: 1rem !important;
	color: #2f2a24;
}

#header .nav-link:hover {
	color: var(--fond-primary);
}

#header .nav-link[aria-current='page'],
#header .nav-link.active {
	color: var(--fond-primary);
}

/* =========================================================================
   Hero homepage
   ========================================================================= */

.hero {
	position: relative;
	min-height: 480px;
	display: flex;
	align-items: flex-end;
	color: #fff;
	overflow: hidden;
	background-color: #2f2a24;
}

.hero .hero-bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
}

.hero .hero-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(27, 24, 20, 0.75) 100%);
}

.hero .hero-content {
	position: relative;
	padding-block: 6rem;
	z-index: 1;
}

.hero .hero-title {
	color: #fff;
}

.hero .hero-subtitle {
	color: rgba(255, 255, 255, 0.92);
	max-width: 60ch;
}

/* =========================================================================
   Page header (pagine istituzionali, archivio attività)
   ========================================================================= */

.page-header {
	position: relative;
	background-color: var(--fond-bg-warm);
}

/* Page-header esteso (pagine istituzionali + archivio: ha un <h1>) — editorial bianco */
.page-header:has(h1) {
	padding-block: 3rem !important;
	border-bottom: none !important;
	background-color: #fff;
}

.page-header:has(h1) h1 {
	color: #1b1814;
	margin-bottom: 0;
	padding-bottom: 1rem;
	font-family: 'Playfair Display', Georgia, serif;
	font-weight: 600;
	font-size: clamp(2rem, 4vw, 3rem);
	line-height: 1.15;
}

.page-header:has(h1) h1::after {
	content: '';
	display: block;
	width: 64px;
	height: 3px;
	background-color: var(--fond-primary);
	margin-top: 1.25rem;
}

.page-header:has(h1) .lead,
.page-header:has(h1) .text-body-secondary {
	margin-top: 0.5rem;
	color: #685f53 !important;
	font-size: 1.125rem;
}

/* Page-header compatto (single-attivita: solo breadcrumb, senza h1) */
.page-header:not(:has(h1)) {
	padding-block: 0.75rem !important;
	background-color: #fff;
	border-bottom: 1px solid var(--fond-border-warm) !important;
}

/* =========================================================================
   Content (testo libero delle pagine statiche)
   ========================================================================= */

.content {
	font-size: 1.05rem;
	line-height: 1.7;
}

.content h2,
.content h3 {
	margin-top: 2rem;
	margin-bottom: 1rem;
}

.content p,
.content ul,
.content ol {
	margin-bottom: 1.25rem;
}

.content a {
	color: var(--fond-primary);
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

/* =========================================================================
   Archivio e card attività
   ========================================================================= */

.attivita-card {
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.attivita-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 0.5rem 1rem rgba(27, 24, 20, 0.1) !important;
}

.attivita-card .card-img-top {
	height: 280px;
	width: 100%;
	object-fit: cover;
	object-position: center;
}

.attivita-date {
	letter-spacing: 0.05em;
	color: var(--fond-primary) !important;
	font-weight: 600;
}

.year-heading {
	font-family: 'Playfair Display', Georgia, serif;
	color: #4a4239;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--fond-primary);
	display: inline-block;
}

/* =========================================================================
   Home blocks
   ========================================================================= */

.home-block {
	border-left: 4px solid var(--fond-primary);
	transition: transform 0.15s ease;
}

.home-block:hover {
	transform: translateY(-2px);
}

/* =========================================================================
   Organi
   ========================================================================= */

.organo-membro {
	border-left: 3px solid var(--fond-primary);
}

/* =========================================================================
   Bilancio accordion
   ========================================================================= */

.bilancio-accordion .accordion-button:not(.collapsed) {
	background-color: rgba(138, 30, 46, 0.08);
	color: var(--fond-primary);
}

.bilancio-accordion .accordion-button:focus {
	box-shadow: 0 0 0 0.25rem rgba(138, 30, 46, 0.15);
}

/* =========================================================================
   Footer
   ========================================================================= */

#footer {
	background-color: var(--fond-bg-warm);
	border-top: 1px solid var(--fond-border-warm);
}

#footer .footer-logo {
	max-height: 64px;
	width: auto;
}

#footer .partner-logo {
	max-height: 48px;
	width: auto;
	opacity: 0.8;
	transition: opacity 0.15s ease;
}

#footer .partner-logo:hover {
	opacity: 1;
}

#footer .footer-nav .menu li {
	margin-bottom: 0.35rem;
}

#footer .footer-nav .menu a {
	color: #4a4239;
}

#footer .footer-nav .menu a:hover {
	color: var(--fond-primary);
}

/* =========================================================================
   Breadcrumb
   ========================================================================= */

.breadcrumb {
	--bs-breadcrumb-divider: '›';
	margin-bottom: 0;
}

.breadcrumb .breadcrumb-item {
	color: #685f53;
}

.breadcrumb .breadcrumb-item + .breadcrumb-item::before {
	padding: 0 0.5rem;
}

/* =========================================================================
   Paginazione (paginate_links con type=list)
   ========================================================================= */

.page-numbers {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	list-style: none;
	padding: 0;
	justify-content: center;
}

.page-numbers li .page-numbers {
	display: inline-block;
	padding: 0.5rem 0.85rem;
	border: 1px solid #ddd6cb;
	border-radius: var(--bs-border-radius);
	color: var(--fond-primary);
	text-decoration: none;
}

.page-numbers li .page-numbers.current {
	background-color: var(--fond-primary);
	color: #fff;
	border-color: var(--fond-primary);
}

.page-numbers li .page-numbers:hover:not(.current) {
	background-color: var(--fond-bg-warm);
}
