/*
Theme Name:   Progetto Cernobyl Child
Description:  Child theme for GeneratePress — modern redesign 2025
Author:       Associazione Progetto Cernobyl Carugate ODV
Template:     generatepress
Version:      2.0.0
Text Domain:  progetto-cernobyl-child
*/

/* =============================================
   1. CSS CUSTOM PROPERTIES
   ============================================= */
:root {
	/* Brand Colors */
	--clr-forest:        #2A5E3F;
	--clr-forest-deep:   #1B3D28;
	--clr-forest-mid:    #3C7A56;
	--clr-forest-pale:   #EBF5EF;
	--clr-amber:         #C97D0A;
	--clr-amber-bright:  #E8960C;
	--clr-amber-pale:    #FEF3DC;

	/* Neutrals */
	--clr-bg:            #F7F4EE;
	--clr-white:         #FFFFFF;
	--clr-text:          #1A1A1A;
	--clr-text-body:     #3A3A3A;
	--clr-text-muted:    #707070;
	--clr-border:        #DDE8DE;
	--clr-border-light:  #EEF3EE;

	/* Typography */
	--ff-display:        'Fraunces', Georgia, 'Times New Roman', serif;
	--ff-body:           'DM Sans', system-ui, -apple-system, sans-serif;

	/* Layout */
	--max-w:             1280px;
	--radius-sm:         4px;
	--radius-md:         8px;
	--radius-lg:         12px;

	/* Shadows */
	--shadow-card:       0 1px 4px rgba(42,94,63,0.06), 0 1px 2px rgba(0,0,0,0.04);
	--shadow-hover:      0 8px 28px rgba(42,94,63,0.12), 0 3px 8px rgba(0,0,0,0.06);

	/* Transitions */
	--ease:              200ms cubic-bezier(0.4, 0, 0.2, 1);
	--ease-spring:       350ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* =============================================
   2. BASE
   ============================================= */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	font-family: var(--ff-body);
	font-size: 16px;
	line-height: 1.72;
	color: var(--clr-text-body);
	background-color: var(--clr-bg);
	background-image: none;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

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

/* =============================================
   3. TYPOGRAPHY
   ============================================= */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--ff-display);
	font-weight: 700;
	line-height: 1.22;
	color: var(--clr-text);
	margin-top: 0;
}

p {
	margin-bottom: 1.2rem;
}

a,
a:visited {
	color: var(--clr-forest);
	text-decoration: none;
	transition: color var(--ease);
}

a:hover,
a:focus {
	color: var(--clr-forest-mid);
	text-decoration: underline;
}

/* =============================================
   4. LAYOUT
   ============================================= */
.grid-container {
	max-width: var(--max-w);
}

/* =============================================
   5. HEADER
   ============================================= */
.site-header {
	background-color: var(--clr-white);
	border-bottom: 1px solid var(--clr-border-light);
	padding: 0;
	box-shadow: var(--shadow-card);
	position: sticky;
	top: 0;
	z-index: 1000;
	transition: box-shadow var(--ease);
}

.site-header.is-scrolled {
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
	.site-header.is-scrolled {
		box-shadow: 0 3px 16px rgba(0, 0, 0, 0.18);
	}
}

.admin-bar .site-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}
}

.site-header .inside-header {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 26px;
	padding: 12px 24px;
	min-height: 80px;
}

/* Logo */
.site-header .site-logo {
	flex-shrink: 0;
	margin: 0;
	line-height: 0;
}

.site-header .site-logo img,
.site-header img.custom-logo,
.header-image.is-logo-image {
	max-height: 68px;
	width: auto;
	display: block;
	transition: opacity var(--ease);
}

.site-header .site-logo img:hover,
.site-header img.custom-logo:hover,
.header-image.is-logo-image:hover {
	opacity: 0.84;
}

/* Branding text */
.site-header .site-branding {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 2px;
	min-width: 0;
	flex: 1;
}

/* Forza il wrapping del titolo (classe reale GP: .main-title) */
.main-title {
	white-space: normal !important;
	word-break: break-word !important;
	overflow-wrap: break-word !important;
}

.site-title {
	font-family: var(--ff-body);
	font-size: 1rem;
	font-weight: 700;
	margin: 0;
	line-height: 1.25;
}

.site-title a,
.site-title a:visited {
	color: var(--clr-text);
	text-decoration: none;
}

.site-title a:hover {
	color: var(--clr-forest);
	text-decoration: none;
}

.site-description {
	font-size: 0.6875rem;
	color: var(--clr-text-muted);
	margin: 0;
	line-height: 1.4;
}

/* =============================================
   6. NAVIGATION
   ============================================= */
.nav-primary,
.nav-below-header .site-navigation,
.site-header .main-navigation {
	background-color: var(--clr-forest-deep);
	border-bottom: none;
}

.nav-primary .inside-navigation,
.nav-below-header .inside-navigation {
	max-width: var(--max-w);
	margin: 0 auto;
	padding: 0 20px;
}

/* Nav links */
.main-nav ul li a,
.main-navigation ul li a {
	font-family: var(--ff-body);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.78);
	padding: 13px 17px;
	display: block;
	text-decoration: none;
	transition: background-color var(--ease), color var(--ease);
	position: relative;
}

/* Amber underline indicator */
.main-nav ul li a::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 17px;
	right: 17px;
	height: 2px;
	background-color: var(--clr-amber-bright);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform var(--ease);
}

.main-nav ul li a:hover::after,
.main-nav ul li.current-menu-item > a::after,
.main-nav ul li.current-menu-ancestor > a::after,
.main-navigation ul li.current-menu-item > a::after {
	transform: scaleX(1);
}

.main-nav ul li a:hover,
.main-nav ul li.current-menu-item > a,
.main-nav ul li.current-menu-ancestor > a,
.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item > a {
	background-color: rgba(255, 255, 255, 0.07);
	color: var(--clr-white);
	text-decoration: none;
}

/* Remove old red home item */
.main-nav ul > li:first-child > a,
.main-navigation ul > li:first-child > a {
	background-color: transparent;
}

.main-nav ul > li:first-child > a:hover,
.main-navigation ul > li:first-child > a:hover {
	background-color: rgba(255, 255, 255, 0.07);
}

/* Dropdown menus */
.main-nav ul ul,
.main-navigation ul ul {
	background-color: var(--clr-white);
	border: 1px solid var(--clr-border-light);
	border-top: 3px solid var(--clr-amber-bright);
	box-shadow: var(--shadow-hover);
	border-radius: 0 0 var(--radius-md) var(--radius-md);
	min-width: 220px;
	z-index: 9999;
}

.main-nav ul ul li a,
.main-navigation ul ul li a {
	color: var(--clr-text-body);
	font-size: 0.8125rem;
	padding: 10px 17px;
	text-transform: none;
	letter-spacing: 0;
	font-weight: 500;
}

.main-nav ul ul li a::after,
.main-navigation ul ul li a::after {
	display: none;
}

.main-nav ul ul li a:hover,
.main-navigation ul ul li a:hover {
	color: var(--clr-forest);
	background-color: var(--clr-forest-pale);
	text-decoration: none;
}

/* Mobile toggle */
.menu-toggle {
	background-color: var(--clr-forest);
	color: var(--clr-white);
	border: none;
	border-radius: var(--radius-sm);
}

.menu-toggle:hover {
	background-color: var(--clr-forest-mid);
}

/* =============================================
   7. HERO SECTION (Homepage)
   ============================================= */

.pc-hero {
	padding: 28px 0 36px;
}

/* Section label */
.pc-hero__label {
	font-family: var(--ff-body);
	font-size: 0.625rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--clr-text-muted);
	padding-bottom: 12px;
	padding-left: 14px;
	margin-bottom: 14px;
	border-bottom: 1px solid var(--clr-border);
	border-left: 3px solid var(--clr-amber-bright);
}

/* Bento grid: left | center (wider) | right (2 stacked) */
.pc-hero__grid {
	display: grid;
	grid-template-columns: 1fr 1.4fr 1fr;
	grid-template-rows: 185px 185px;
	gap: 10px;
}

/* Cards 1 and 2 span both row tracks */
.pc-hero__card:nth-child(1),
.pc-hero__card:nth-child(2) {
	grid-row: 1 / 3;
}

/* ── Base card ─────────────────────────────── */
.pc-hero__card {
	display: block;
	border-radius: var(--radius-lg);
	overflow: hidden;
	position: relative;
	text-decoration: none;
	transition: transform var(--ease), box-shadow var(--ease);
	cursor: pointer;
	background-size: cover;
	background-position: center;
}

.pc-hero__card:hover {
	transform: translateY(-3px) scale(1.005);
	box-shadow: var(--shadow-hover);
	text-decoration: none;
}

/*
 * ::after — color overlay per card con immagine di sfondo.
 * Viene mostrato SOLO quando l'immagine è impostata via Customizer
 * (rilevato dall'attributo style inline prodotto da pc_hero_bg_style()).
 * Ogni card ha il proprio tono per mantenere l'identità cromatica.
 */
.pc-hero__card::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	pointer-events: none;
	z-index: 1;
	opacity: 0;
	transition: opacity var(--ease);
}

/* Quando c'è un'immagine: solo un velo scuro in fondo per leggibilità del titolo */
.pc-hero__card[style*="background-image"]::after {
	opacity: 1;
	background: linear-gradient(
		to top,
		rgba(0, 0, 0, 0.52) 0%,
		rgba(0, 0, 0, 0.10) 40%,
		rgba(0, 0, 0, 0) 100%
	);
}

/* ::before — leggero scurimento extra al mouseover */
.pc-hero__card::before {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0);
	transition: background var(--ease);
	border-radius: inherit;
	pointer-events: none;
	z-index: 2;
}

.pc-hero__card:hover::before {
	background: rgba(0, 0, 0, 0.08);
}

/* Inner layout — footer pinned al fondo */
.pc-hero__card-inner {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 14px 18px;
	z-index: 3;
}

/* Footer bar (titolo + freccia) */
.pc-hero__card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.pc-hero__card-title {
	font-family: var(--ff-body);
	font-size: 0.8125rem;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.92);
	line-height: 1.3;
}

/* CTA "Scopri →" — visibile solo all'hover */
.pc-hero__card-cta {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-family: var(--ff-body);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: rgba(255, 255, 255, 0.9);
	opacity: 0;
	transform: translateX(-6px);
	transition: opacity var(--ease), transform var(--ease);
	white-space: nowrap;
}

.pc-hero__card:hover .pc-hero__card-cta {
	opacity: 1;
	transform: translateX(0);
}

.pc-hero__arrow {
	display: inline-block;
	transition: transform var(--ease);
}

.pc-hero__card:hover .pc-hero__arrow {
	transform: translateX(4px);
}

/* ── Card variant backgrounds ──────────────────
 * Uso background-image (non il shorthand background) così non
 * viene azzerato background-size: cover definito in .pc-hero__card.
 * Quando il Customizer imposta un'immagine inline, questa regola
 * viene sovrascritta dall'inline style mantenendo cover/center.
 * ─────────────────────────────────────────── */

.pc-hero__card--chi-siamo {
	background-image: linear-gradient(155deg, #2C6644 0%, #1B3D28 100%);
}

.pc-hero__card--5x1000 {
	background-image: linear-gradient(148deg, #0F7070 0%, #085252 100%);
}

.pc-hero__card--per-ricordare {
	background-image: linear-gradient(155deg, #3A3A3A 0%, #191919 100%);
}

.pc-hero__card--sostieni {
	background-image: linear-gradient(148deg, #3E8260 0%, #2A5E3F 100%);
}

/* ── Hero Responsive ──────────────────────── */

/* Tablet: 2-col grid, 5x1000 spans full width */
@media (max-width: 860px) {
	.pc-hero__grid {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: 190px 190px 160px;
	}

	.pc-hero__card:nth-child(1) { grid-row: auto; }
	.pc-hero__card:nth-child(2) {
		grid-row: auto;
		grid-column: 1 / 3;
	}
	.pc-hero__card:nth-child(3) { grid-row: auto; }
	.pc-hero__card:nth-child(4) { grid-row: auto; }
}

/* Mobile: single column */
@media (max-width: 520px) {
	.pc-hero {
		padding: 20px 0 28px;
	}

	.pc-hero__grid {
		grid-template-columns: 1fr;
		grid-template-rows: auto;
		gap: 8px;
	}

	.pc-hero__card:nth-child(1),
	.pc-hero__card:nth-child(2),
	.pc-hero__card:nth-child(3),
	.pc-hero__card:nth-child(4) {
		grid-column: 1;
		grid-row: auto;
	}

	/* Fixed heights for single-col */
	.pc-hero__card:nth-child(1) { min-height: 170px; }
	.pc-hero__card:nth-child(2) { min-height: 210px; }
	.pc-hero__card:nth-child(3) { min-height: 130px; }
	.pc-hero__card:nth-child(4) { min-height: 130px; }

	.pc-hero__card:hover {
		transform: none;
	}
}

/* =============================================
   8. BLOG / ARCHIVE LISTING
   ============================================= */

/* Article card container */
.blog article,
.archive article {
	background: var(--clr-white);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-card);
	margin-bottom: 20px;
	overflow: hidden;
	border: 1px solid var(--clr-border-light);
	transition: box-shadow var(--ease), transform var(--ease);
}

.blog article:hover,
.archive article:hover {
	box-shadow: var(--shadow-hover);
	transform: translateY(-2px);
}

/* Inner layout */
.blog .inside-article,
.archive .inside-article {
	display: grid;
	grid-template-columns: 260px 1fr;
	column-gap: 28px;
	align-items: start;
	padding: 28px;
}

/* Featured image — left column */
.blog .post-image,
.archive .post-image {
	grid-column: 1;
	grid-row: 1 / span 6;
	border-radius: var(--radius-md);
	overflow: hidden;
	margin: 0;
}

.blog .post-image a,
.archive .post-image a {
	display: block;
	overflow: hidden;
	border-radius: var(--radius-md);
}

.blog .post-image img,
.archive .post-image img {
	width: 100%;
	height: 195px;
	object-fit: cover;
	display: block;
	transition: transform 0.45s ease;
}

.blog .post-image a:hover img,
.archive .post-image a:hover img {
	transform: scale(1.04);
}

/* Content columns */
.blog .entry-header,
.archive .entry-header,
.blog .entry-summary,
.archive .entry-summary,
.blog .entry-content,
.archive .entry-content,
.blog .entry-footer,
.archive .entry-footer {
	grid-column: 2;
}

/* No thumbnail variant */
.blog article:not(.has-post-thumbnail) .inside-article,
.archive article:not(.has-post-thumbnail) .inside-article {
	display: block;
	padding: 28px;
}

/* Category badge */
.entry-header .entry-categories a,
.cat-links a {
	background-color: var(--clr-forest);
	color: var(--clr-white) !important;
	font-size: 0.625rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	padding: 3px 8px;
	border-radius: var(--radius-sm);
	display: inline-block;
	text-decoration: none !important;
	margin-right: 4px;
	margin-bottom: 8px;
	transition: background-color var(--ease);
}

.entry-header .entry-categories a:hover,
.cat-links a:hover {
	background-color: var(--clr-forest-mid);
}

/* Article title */
.entry-title {
	font-family: var(--ff-display);
	font-size: 1.25rem;
	font-weight: 700;
	margin: 2px 0 8px;
	line-height: 1.28;
}

.entry-title a,
.entry-title a:visited {
	color: var(--clr-text);
	text-decoration: none;
	transition: color var(--ease);
}

.entry-title a:hover {
	color: var(--clr-forest);
	text-decoration: none;
}

/* Meta (date, author) */
.entry-meta {
	font-size: 0.8125rem;
	color: var(--clr-text-muted);
	margin-bottom: 12px;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.entry-meta a {
	color: var(--clr-text-muted);
	text-decoration: none;
}

.entry-meta a:hover {
	color: var(--clr-forest);
}

/* Excerpt */
.entry-summary p {
	font-size: 0.9375rem;
	line-height: 1.7;
	color: var(--clr-text-body);
	margin-bottom: 12px;
}

/* Read more */
.entry-summary .more-link,
a.more-link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: var(--clr-forest) !important;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-decoration: none !important;
	text-transform: uppercase;
	transition: color var(--ease);
}

.entry-summary .more-link::after,
a.more-link::after {
	content: '→';
	display: inline-block;
	transition: transform var(--ease);
}

.entry-summary .more-link:hover::after,
a.more-link:hover::after {
	transform: translateX(4px);
}

.entry-summary .more-link:hover,
a.more-link:hover {
	color: var(--clr-forest-mid) !important;
}

/* Archive / page header */
.page-header .page-title,
.archive-title {
	font-family: var(--ff-body);
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.13em;
	color: var(--clr-text-muted);
	border-bottom: 1px solid var(--clr-border);
	padding-bottom: 12px;
	padding-left: 14px;
	margin-bottom: 24px;
	border-left: 3px solid var(--clr-amber-bright);
}

/* =============================================
   8. SINGLE POST
   ============================================= */
.single .entry-header {
	margin-bottom: 28px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--clr-border);
}

.single .entry-title {
	font-family: var(--ff-display);
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--clr-text);
	margin-bottom: 12px;
}

.single .entry-meta {
	color: var(--clr-text-muted);
	font-size: 0.8125rem;
	margin-bottom: 0;
}

.single .entry-content {
	font-size: 1rem;
	line-height: 1.82;
	color: var(--clr-text-body);
}

.single .entry-content a {
	color: var(--clr-forest);
	text-decoration: underline;
	text-decoration-color: rgba(42, 94, 63, 0.3);
	text-underline-offset: 3px;
	transition: text-decoration-color var(--ease);
}

.single .entry-content a:hover {
	text-decoration-color: var(--clr-forest);
}

.single .entry-content h2,
.single .entry-content h3,
.single .entry-content h4,
.page .entry-content h2,
.page .entry-content h3,
.page .entry-content h4 {
	clear: both;
}

.single .entry-content h2 {
	font-family: var(--ff-display);
	font-size: 1.4rem;
	margin-top: 2.5rem;
	margin-bottom: 1rem;
	color: var(--clr-text);
}

.single .entry-content h3 {
	font-family: var(--ff-display);
	font-size: 1.15rem;
	margin-top: 2rem;
	margin-bottom: 0.75rem;
}

/* Featured image nascosta su articoli e pagine singole —
   non serve come banner; la stessa immagine viene usata come
   thumbnail nella lista articoli (blog/archive). */
.single .post-image,
.single .featured-image,
.single .page-header-image,
.single .post-thumbnail,
.single img.wp-post-image {
	display: none !important;
}

/* =============================================
   9. PAGE
   ============================================= */

.page .post-image,
.page .featured-image,
.page .page-header-image,
.page .post-thumbnail,
.page img.wp-post-image {
	display: none !important;
}

.page .entry-title {
	font-family: var(--ff-display);
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--clr-text);
	margin-bottom: 24px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--clr-border);
}

.page .entry-content {
	font-size: 1rem;
	line-height: 1.82;
	color: var(--clr-text-body);
}

.page .entry-content a {
	color: var(--clr-forest);
	text-decoration: underline;
	text-decoration-color: rgba(42, 94, 63, 0.3);
	text-underline-offset: 3px;
	transition: text-decoration-color var(--ease);
}

.page .entry-content a:hover {
	text-decoration-color: var(--clr-forest);
}

.page .entry-content h2 {
	font-family: var(--ff-display);
	font-size: 1.3rem;
	margin-top: 2.5rem;
	margin-bottom: 0.875rem;
}

/* =============================================
   10. BREADCRUMBS
   ============================================= */
.generate-breadcrumbs,
.breadcrumb-trail {
	font-size: 0.8125rem;
	color: var(--clr-text-muted);
	margin-bottom: 22px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--clr-border-light);
}

.generate-breadcrumbs a,
.breadcrumb-trail a {
	color: var(--clr-forest);
	text-decoration: none;
	transition: color var(--ease);
}

.generate-breadcrumbs a:hover,
.breadcrumb-trail a:hover {
	color: var(--clr-forest-mid);
	text-decoration: underline;
}

/* =============================================
   11. PAGINATION
   ============================================= */
.pagination,
.nav-links {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 24px 0;
	flex-wrap: wrap;
}

.pagination .page-numbers,
.nav-links a,
.nav-links span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border-radius: var(--radius-md);
	font-size: 0.875rem;
	font-weight: 600;
	border: 1px solid var(--clr-border);
	background: var(--clr-white);
	color: var(--clr-text-body);
	text-decoration: none;
	transition: all var(--ease);
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
	background: var(--clr-forest);
	color: var(--clr-white);
	border-color: var(--clr-forest);
	text-decoration: none;
}

/* =============================================
   12. SIDEBAR WIDGETS
   ============================================= */
.widget-area {
	padding-left: 22px;
}

.widget {
	background: var(--clr-white);
	border-radius: var(--radius-md);
	padding: 20px 22px;
	margin-bottom: 18px;
	box-shadow: var(--shadow-card);
	border: 1px solid var(--clr-border-light);
}

/* Widget title */
.widget .widget-title,
.widget-area .widgettitle {
	font-family: var(--ff-body);
	font-size: 0.625rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--clr-text-muted);
	padding-bottom: 11px;
	margin-bottom: 14px;
	border-bottom: 1px solid var(--clr-border);
	position: relative;
}

/* Amber accent underline */
.widget .widget-title::after,
.widget-area .widgettitle::after {
	content: '';
	position: absolute;
	bottom: -1px;
	left: 0;
	width: 28px;
	height: 2px;
	background-color: var(--clr-amber-bright);
	border-radius: 2px;
}

/* Search widget */
.widget_search .search-form {
	display: flex;
	border-radius: var(--radius-md);
	overflow: hidden;
	border: 1px solid var(--clr-border);
	transition: border-color var(--ease), box-shadow var(--ease);
}

.widget_search .search-form:focus-within {
	border-color: var(--clr-forest);
	box-shadow: 0 0 0 3px rgba(42, 94, 63, 0.1);
}

.widget_search .search-field {
	flex: 1;
	border: none;
	padding: 9px 12px;
	font-size: 0.875rem;
	font-family: var(--ff-body);
	background: transparent;
	outline: none;
	min-width: 0;
	color: var(--clr-text);
}

.widget_search .search-submit {
	background-color: var(--clr-forest);
	color: var(--clr-white);
	border: none;
	padding: 9px 14px;
	cursor: pointer;
	font-size: 0.875rem;
	transition: background-color var(--ease);
	flex-shrink: 0;
}

.widget_search .search-submit:hover {
	background-color: var(--clr-forest-mid);
}

/* Widget lists */
.widget ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.widget ul li {
	padding: 6px 0;
	font-size: 0.9rem;
	border-bottom: 1px solid var(--clr-border-light);
	line-height: 1.5;
}

.widget ul li:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

/* Custom HTML / text widget links (e.g. "Come contribuire") */
.widget_text ul li a,
.widget_custom_html ul li a {
	color: var(--clr-text);
	font-weight: 700;
	text-decoration: none;
	transition: color var(--ease);
}

.widget_text ul li a:hover,
.widget_custom_html ul li a:hover {
	color: var(--clr-forest);
}

/* Nav / categories / recent entries */
.widget_nav_menu ul li a,
.widget_recent_entries ul li a,
.widget_categories ul li a,
.widget_pages ul li a,
.widget_archive ul li a {
	color: var(--clr-forest);
	font-weight: 400;
	text-decoration: none;
	transition: color var(--ease);
}

.widget ul li a:hover {
	color: var(--clr-forest-mid);
	text-decoration: none;
}

.widget_recent_entries .post-date {
	display: block;
	font-size: 0.6875rem;
	color: var(--clr-text-muted);
	font-weight: 400;
	margin-top: 2px;
	letter-spacing: 0.02em;
}

/* =============================================
   13. COMMENTS
   ============================================= */
.comments-area {
	margin-top: 40px;
	padding-top: 32px;
	border-top: 1px solid var(--clr-border);
}

.comments-title {
	font-family: var(--ff-display);
	font-size: 1.2rem;
	margin-bottom: 24px;
}

/* =============================================
   14. FOOTER
   ============================================= */
.site-footer {
	background-color: var(--clr-forest-deep);
	color: rgba(255, 255, 255, 0.72);
}

.footer-widgets {
	background-color: var(--clr-forest-deep);
	padding: 48px 0 28px;
	border-top: 3px solid var(--clr-amber-bright);
}

.footer-widgets .widget {
	background: transparent;
	box-shadow: none;
	border: none;
	padding: 0;
	margin-bottom: 28px;
}

.footer-widgets .widget-title,
.footer-widgets .widgettitle {
	color: rgba(255, 255, 255, 0.9);
	border-bottom-color: rgba(255, 255, 255, 0.12);
}

.footer-widgets .widget-title::after,
.footer-widgets .widgettitle::after {
	background-color: var(--clr-amber-bright);
}

.footer-widgets p,
.footer-widgets li,
.footer-widgets ul li {
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.58);
	line-height: 1.65;
	border-bottom-color: rgba(255, 255, 255, 0.07) !important;
}

.footer-widgets a,
.footer-widgets a:visited {
	color: rgba(255, 255, 255, 0.65);
	text-decoration: none;
	transition: color var(--ease);
}

.footer-widgets a:hover {
	color: var(--clr-amber-bright);
}

.copyright-bar {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

.pc-footer-row {
	display: block;
	text-align: center;
}

.site-info {
	background-color: rgba(0, 0, 0, 0.28);
	color: rgba(255, 255, 255, 0.38);
	font-size: 0.8125rem;
	text-align: center;
	padding: 14px 0;
	border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.site-info a,
.site-info a:visited {
	color: rgba(255, 255, 255, 0.45);
	text-decoration: none;
	transition: color var(--ease);
}

.site-info a:hover {
	color: var(--clr-amber-bright);
}

/* =============================================
   15. BUTTONS
   ============================================= */
.wp-block-button__link,
input[type="submit"],
button[type="submit"],
.generate-btn {
	background-color: var(--clr-forest);
	color: var(--clr-white) !important;
	border: none;
	padding: 12px 22px;
	border-radius: var(--radius-md);
	font-family: var(--ff-body);
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	cursor: pointer;
	display: inline-block;
	text-decoration: none !important;
	transition: background-color var(--ease), transform var(--ease), box-shadow var(--ease);
}

.wp-block-button__link:hover,
input[type="submit"]:hover,
button[type="submit"]:hover,
.generate-btn:hover {
	background-color: var(--clr-forest-mid);
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(42, 94, 63, 0.28);
	text-decoration: none !important;
}

/* =============================================
   16. CONTENUTO VECCHIO — float e allineamenti classici
   ============================================= */

/* Immagini allineate con l'editor classico */
.entry-content .alignleft,
.entry-content img.alignleft {
	float: left;
	margin: 4px 20px 12px 0;
}

.entry-content .alignright,
.entry-content img.alignright {
	float: right;
	margin: 4px 0 12px 20px;
}

.entry-content .aligncenter,
.entry-content img.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
	float: none;
}

/* Clearfix generico sul contenuto */
.entry-content::after {
	content: '';
	display: table;
	clear: both;
}

/* =============================================
   16b. GALLERY — shortcode [gallery] classico
   (contenuto vecchio con float CSS)
   ============================================= */

/* Clearfix sul container */
.gallery::after {
	content: '';
	display: table;
	clear: both;
}

.gallery {
	margin: 1.5rem 0;
}

/* Ogni elemento galleggia a sinistra */
.gallery-item {
	float: left;
	margin: 0 4px 8px;
	text-align: center;
	vertical-align: top;
	overflow: hidden;
}

/* Larghezze per numero di colonne */
.gallery-columns-1 .gallery-item { width: calc(100% - 8px); }
.gallery-columns-2 .gallery-item { width: calc(50% - 8px); }
.gallery-columns-3 .gallery-item { width: calc(33.33% - 8px); }
.gallery-columns-4 .gallery-item { width: calc(25% - 8px); }
.gallery-columns-5 .gallery-item { width: calc(20% - 8px); }
.gallery-columns-6 .gallery-item { width: calc(16.66% - 8px); }
.gallery-columns-9 .gallery-item { width: calc(11.11% - 8px); }

.gallery-item img {
	border: none;
	display: block;
	height: auto;
	max-width: 100%;
	margin: 0 auto;
}

.gallery-caption {
	font-size: 0.75rem;
	color: var(--clr-text-muted);
	margin-top: 4px;
	line-height: 1.4;
}

/* wp-caption (immagini con didascalia inserite nel contenuto) */
.wp-caption {
	max-width: 100%;
	margin-bottom: 1rem;
}

.wp-caption img {
	display: block;
	height: auto;
	max-width: 100%;
}

.wp-caption-text {
	font-size: 0.75rem;
	color: var(--clr-text-muted);
	text-align: center;
	margin-top: 4px;
	line-height: 1.4;
}

/* Responsive: sotto i 600px tutto a colonna singola */
@media (max-width: 600px) {
	.gallery-item {
		float: none;
		width: 100% !important;
		margin: 0 0 8px;
	}
}

/* =============================================
   17. FORMS
   ============================================= */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
textarea,
select {
	font-family: var(--ff-body);
	font-size: 0.9375rem;
	color: var(--clr-text);
	border: 1px solid var(--clr-border);
	border-radius: var(--radius-md);
	padding: 10px 14px;
	width: 100%;
	transition: border-color var(--ease), box-shadow var(--ease);
	background: var(--clr-white);
	line-height: 1.5;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
	border-color: var(--clr-forest);
	box-shadow: 0 0 0 3px rgba(42, 94, 63, 0.1);
	outline: none;
}

/* =============================================
   17. ACCESSIBILITY
   ============================================= */
:focus-visible {
	outline: 2px solid var(--clr-forest);
	outline-offset: 3px;
	border-radius: var(--radius-sm);
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* =============================================
   18. GENERATEPRESS OVERRIDES
   ============================================= */

/* Remove GP's default link color (often orange/teal) */
a {
	color: var(--clr-forest);
}

/* GP uses `.entry` as article wrapper — ensure no extra padding */
.entry {
	padding: 0;
}

/* GP navigation icon fill */
.gp-icon svg {
	fill: currentColor;
}

/* =============================================
   19. RESPONSIVE
   ============================================= */

@media (max-width: 1024px) {
	.blog .inside-article,
	.archive .inside-article {
		grid-template-columns: 220px 1fr;
		padding: 24px;
		gap: 22px;
	}

	.widget-area {
		padding-left: 14px;
	}
}

@media (max-width: 768px) {
	/* Blog listing: stack vertically */
	.blog .inside-article,
	.archive .inside-article {
		grid-template-columns: 1fr;
		padding: 20px;
		gap: 0;
	}

	.blog .post-image,
	.archive .post-image {
		grid-column: 1;
		grid-row: auto;
		border-radius: var(--radius-md) var(--radius-md) 0 0;
		margin-bottom: 16px;
	}

	.blog .post-image img,
	.archive .post-image img {
		height: 200px;
		border-radius: var(--radius-md) var(--radius-md) 0 0;
	}

	.blog .post-image a,
	.archive .post-image a {
		border-radius: var(--radius-md) var(--radius-md) 0 0;
	}

	.blog .entry-header,
	.archive .entry-header,
	.blog .entry-summary,
	.archive .entry-summary,
	.blog .entry-footer,
	.archive .entry-footer {
		grid-column: 1;
	}

	/* Sidebar below content */
	.widget-area {
		padding-left: 0;
		margin-top: 28px;
	}

	/* Header */
	.site-header .inside-header {
		padding: 12px 16px;
		min-height: auto;
	}

	/* Logo a sx, testo a dx che va a capo */
	.site-branding-container {
		display: flex !important;
		flex-wrap: nowrap !important;
		align-items: center !important;
	}

	.site-header .site-logo {
		flex: 0 0 44px;
		width: 44px;
	}

	.site-header .site-logo img,
	.site-header img.custom-logo,
	.header-image.is-logo-image {
		max-height: 44px;
		width: 44px;
	}

	.site-header .site-branding {
		flex: 1 1 0;
		min-width: 0;
		width: 0;
		padding-left: 12px;
		/* Larghezza massima esplicita: schermo - logo - padding - gap */
		max-width: calc(100vw - 44px - 32px - 12px);
	}

	h1.main-title {
		font-size: 1.05rem;
		line-height: 1.3;
		margin: 0;
		white-space: normal !important;
		overflow: visible !important;
	}

	h1.main-title a {
		display: block;
		white-space: normal !important;
		word-break: break-word !important;
		overflow-wrap: anywhere !important;
		max-width: 100%;
	}

	.site-description {
		display: none;
	}

	/* Single post */
	.single .entry-title {
		font-size: 1.5rem;
	}

	.page .entry-title {
		font-size: 1.375rem;
	}

	/* Footer */
	.footer-widgets {
		padding: 32px 0 20px;
	}
}

@media (max-width: 480px) {
	.main-nav ul li a,
	.main-navigation ul li a {
		padding: 12px 13px;
		font-size: 0.75rem;
		letter-spacing: 0.03em;
	}

	.blog article,
	.archive article {
		border-radius: var(--radius-md);
	}

	.single .entry-title {
		font-size: 1.35rem;
	}
}
