/* ==========================================================================
   ACD Club Italia — stili del tema
   ========================================================================== */

:root {
	--acd-primary: #7e2625;
	--acd-primary-dark: #5f1c1b;
	--acd-text: #333333;
	--acd-muted: #505050;
	--acd-cream: #f8f4ec;
	--acd-line: #dddddd;
	--acd-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--acd-serif: "Times New Roman", Times, Georgia, serif;
	--acd-width: 1140px;
	--acd-header-top: 0px;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--acd-sans);
	font-size: 16px;
	line-height: 1.6;
	color: var(--acd-text);
	background: #fff;
	-webkit-font-smoothing: antialiased;
}

img, video, iframe { max-width: 100%; height: auto; }
img { vertical-align: middle; border: 0; }

a { color: var(--acd-primary); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 .6em;
	line-height: 1.25;
	font-weight: 500;
	color: var(--acd-text);
}
h1 { font-size: 40px; color: var(--acd-primary); }
h2 { font-size: 32px; }
h3 { font-size: 24px; }
h4 { font-size: 20px; }
h5 { font-size: 17px; }
h6 { font-size: 15px; }

p { margin: 0 0 1em; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto;
	top: 8px; left: 8px; z-index: 100000;
	padding: 12px 18px;
	background: #fff; color: var(--acd-primary);
	box-shadow: 0 0 6px rgba(0,0,0,.3);
}

.acd-icon { width: 1em; height: 1em; fill: currentColor; flex: 0 0 auto; }

/* ---------- Header ---------- */
.site-header {
	position: sticky;
	top: var(--acd-header-top);
	z-index: 95;
	background: #fff;
	box-shadow: 0 0 10px rgba(0,0,0,.12);
}
.admin-bar { --acd-header-top: 32px; }
@media (max-width: 782px) { .admin-bar { --acd-header-top: 46px; } }
@media (max-width: 600px) { .admin-bar { --acd-header-top: 0px; } }

.site-header__inner {
	max-width: var(--acd-width);
	margin: 0 auto;
	padding: 10px 20px 20px;
	min-height: 60px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}
.site-branding { flex: 0 1 auto; min-width: 0; }
.site-branding img,
.custom-logo { display: block; width: auto; max-width: 100%; max-height: 80px; height: auto; }
.site-title { font-family: var(--acd-serif); font-size: 28px; color: var(--acd-primary); }

/* Menu desktop */
.main-navigation .menu,
.main-navigation .sub-menu { list-style: none; margin: 0; padding: 0; }
.main-navigation .menu { display: flex; align-items: center; gap: 4px 24px; }
.main-navigation li { position: relative; }
.main-navigation .menu > li > a {
	display: block;
	padding: 3px 0;
	font-family: var(--acd-serif);
	font-size: 25.6px;
	font-weight: 500;
	line-height: 20px;
	color: var(--acd-muted);
	text-decoration: none;
	text-underline-offset: 6px;
	text-decoration-thickness: 2px;
}
.main-navigation .menu > li > a:hover,
.main-navigation .menu > li > a:focus,
.main-navigation .menu > .current-menu-item > a,
.main-navigation .menu > .current-menu-ancestor > a,
.main-navigation .menu > .current-page-ancestor > a {
	text-decoration-line: underline;
	text-decoration-color: var(--acd-primary);
}

.main-navigation .sub-menu {
	position: absolute;
	top: 100%;
	left: -18px;
	min-width: 230px;
	margin-top: 9px;
	background: #fff;
	box-shadow: 0 6px 18px rgba(0,0,0,.12);
	border-top: 2px solid var(--acd-primary);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .15s ease, transform .15s ease, visibility .15s;
	z-index: 10;
}
.main-navigation .sub-menu::before { /* ponte per il passaggio del mouse */
	content: ""; position: absolute; left: 0; right: 0; top: -11px; height: 11px;
}
.main-navigation li:hover > .sub-menu,
.main-navigation li:focus-within > .sub-menu {
	opacity: 1; visibility: visible; transform: none;
}
.main-navigation .sub-menu .sub-menu { top: -2px; left: 100%; margin: 0; }
.main-navigation .sub-menu a {
	display: block;
	padding: 13px 18px;
	font-size: 16px;
	font-weight: 500;
	line-height: 20px;
	color: var(--acd-muted);
	text-decoration: none;
}
.main-navigation .sub-menu a:hover,
.main-navigation .sub-menu a:focus,
.main-navigation .sub-menu .current-menu-item > a {
	background: var(--acd-cream);
	color: var(--acd-primary);
}
.submenu-toggle { display: none; }

.menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px; height: 44px;
	padding: 0;
	border: 0;
	border-radius: 3px;
	background: transparent;
	color: var(--acd-primary);
	font-size: 30px;
	cursor: pointer;
}
.menu-toggle .acd-icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .acd-icon-menu { display: none; }
.menu-toggle[aria-expanded="true"] .acd-icon-close { display: block; }

@media (max-width: 1024px) {
	.site-header__inner { padding: 10px 20px; flex-wrap: wrap; }
	.site-branding { flex: 1 1 0; }
	.site-branding img, .custom-logo { max-height: 56px; }
	.menu-toggle { display: inline-flex; }

	.main-navigation {
		display: none;
		flex: 0 0 100%;
		max-height: calc(100vh - 100px);
		overflow-y: auto;
		border-top: 1px solid var(--acd-line);
	}
	.main-navigation.is-open { display: block; }
	.main-navigation .menu { display: block; }
	.main-navigation .menu li { border-bottom: 1px solid var(--acd-line); }
	.main-navigation .menu > li > a { padding: 14px 52px 14px 4px; font-size: 22px; line-height: 1.2; }
	.main-navigation .sub-menu,
	.main-navigation .sub-menu .sub-menu {
		position: static;
		display: none;
		min-width: 0;
		margin: 0;
		box-shadow: none;
		border-top: 0;
		opacity: 1; visibility: visible; transform: none;
		background: var(--acd-cream);
	}
	.main-navigation .sub-menu::before { display: none; }
	.main-navigation li.is-open > .sub-menu { display: block; }
	.main-navigation .sub-menu li { border-bottom: 0; border-top: 1px solid #eee5d6; }
	.main-navigation .sub-menu a { padding: 12px 16px 12px 22px; }
	.submenu-toggle {
		display: flex; align-items: center; justify-content: center;
		position: absolute; top: 4px; right: 0;
		width: 44px; height: 44px;
		border: 0; background: transparent; color: var(--acd-primary);
		cursor: pointer;
	}
	.submenu-toggle::before {
		content: ""; width: 10px; height: 10px;
		border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
		transform: rotate(45deg) translate(-2px, -2px);
		transition: transform .15s;
	}
	li.is-open > .submenu-toggle::before { transform: rotate(-135deg) translate(-2px, -2px); }
}

/* ---------- Layout pagine ---------- */
.acd-main { display: block; }

.acd-bg-wrap {
	position: relative;
	isolation: isolate;
}
.acd-bg-wrap::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	max-height: 1400px;
	background-image: linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,.5)), var(--acd-page-bg, none);
	background-position: top center;
	background-repeat: no-repeat;
	background-size: 100% auto;
	-webkit-mask-image: linear-gradient(#000 70%, transparent);
	mask-image: linear-gradient(#000 70%, transparent);
	pointer-events: none;
}

.acd-container {
	max-width: var(--acd-width);
	margin: 0 auto;
	padding: 50px 20px 90px;
}

.acd-breadcrumbs {
	font-size: 13.6px;
	color: var(--acd-text);
	margin-bottom: 20px;
}
.acd-breadcrumbs a { color: var(--acd-primary); }

.acd-entry__title,
.entry-content h1 {
	font-size: 40px;
	font-weight: 500;
	color: var(--acd-primary);
	margin: 0 0 40px;
}

/* ---------- Contenuti (blocchi) ---------- */
.entry-content > * { margin-top: 0; }
.entry-content > * + * { margin-block-start: 1.25rem; }
.entry-content h2, .entry-content h3, .entry-content h4 { margin-top: 1.6em; }
.entry-content > :first-child,
.entry-content .wp-block-column > :first-child,
.entry-content details > summary + * { margin-top: 0; }

.entry-content figure { margin: 0 0 1.25rem; }
.entry-content .wp-block-image img { height: auto; }
.entry-content .wp-block-image a { display: inline-block; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li + li { margin-top: .3em; }
.entry-content table { width: 100%; border-collapse: collapse; margin-bottom: 1.25rem; }
.entry-content th, .entry-content td { border: 1px solid var(--acd-line); padding: 8px 10px; text-align: left; vertical-align: top; }
.entry-content blockquote { margin: 0 0 1.25rem; padding: 4px 0 4px 20px; border-left: 3px solid var(--acd-primary); font-style: italic; }
.entry-content hr, .wp-block-separator { border: 0; border-top: 1px solid var(--acd-line); margin: 2rem 0; }

/* Colonne */
.entry-content .wp-block-columns { gap: 2em 40px; margin-bottom: 30px; }
.entry-content .wp-block-columns:has(> .wp-block-column[style*="flex-basis"]) { align-items: center; }
.entry-content .wp-block-column > figure:last-child,
.entry-content .wp-block-column > p:last-child { margin-bottom: 0; }

/* Pulsanti */
.wp-block-button__link,
.wp-element-button,
.acd-button,
.search-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 24px;
	border: 0;
	border-radius: 3px;
	background: var(--acd-primary);
	color: #fff;
	font-family: var(--acd-sans);
	font-size: 15px;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background .15s ease;
}
.wp-block-button__link:hover,
.wp-block-button__link:focus,
.acd-button:hover,
.search-submit:hover {
	background: var(--acd-primary-dark);
	color: #fff;
	text-decoration: none;
}
.acd-btn-pdf .wp-block-button__link::before {
	content: "";
	width: 13px; height: 16px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath d='M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm76.45 211.36c-12.22-12-47.08-8.69-64.48-6.49-17.2-10.5-28.7-25-36.8-46.3 3.9-16.1 10.1-40.6 5.4-56-4.2-26.2-37.8-23.6-42.6-5.9-4.4 16.1-.4 38.5 7 67.1-10 23.9-24.9 56-35.4 74.4-20 10.3-47 26.2-51 46.2-3.3 15.8 26 55.2 76.1-31.2 22.4-7.4 46.8-16.5 68.4-20.1 18.9 10.2 41 17 55.8 17 25.5 0 28-28.2 17.5-38.7zM377 105L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1c0-6.3-2.5-12.4-7-16.9z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath d='M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm76.45 211.36c-12.22-12-47.08-8.69-64.48-6.49-17.2-10.5-28.7-25-36.8-46.3 3.9-16.1 10.1-40.6 5.4-56-4.2-26.2-37.8-23.6-42.6-5.9-4.4 16.1-.4 38.5 7 67.1-10 23.9-24.9 56-35.4 74.4-20 10.3-47 26.2-51 46.2-3.3 15.8 26 55.2 76.1-31.2 22.4-7.4 46.8-16.5 68.4-20.1 18.9 10.2 41 17 55.8 17 25.5 0 28-28.2 17.5-38.7zM377 105L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1c0-6.3-2.5-12.4-7-16.9z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.entry-content .wp-block-buttons { gap: 12px; }
.entry-content .wp-block-column .wp-block-buttons { flex-direction: column; align-items: stretch; max-width: 250px; }

/* Fisarmonica (ex schede/accordion Elementor) */
.entry-content details.wp-block-details {
	background: rgba(255,255,255,.85);
	border: 1px solid #e3dccf;
	border-radius: 4px;
	padding: 0;
	margin-block-start: 10px;
}
.entry-content details.wp-block-details > summary {
	position: relative;
	padding: 15px 50px 15px 20px;
	font-weight: 500;
	font-size: 17px;
	color: var(--acd-primary);
	cursor: pointer;
	list-style: none;
}
.entry-content details.wp-block-details > summary::-webkit-details-marker { display: none; }
.entry-content details.wp-block-details > summary::after {
	content: "+";
	position: absolute; right: 20px; top: 50%;
	transform: translateY(-50%);
	font-size: 24px; font-weight: 400; line-height: 1;
}
.entry-content details.wp-block-details[open] > summary::after { content: "–"; }
.entry-content details.wp-block-details[open] > summary { border-bottom: 1px solid #e3dccf; }
.entry-content details.wp-block-details > :not(summary) { margin-left: 20px; margin-right: 20px; }
.entry-content details.wp-block-details > summary + * { margin-top: 18px; }
.entry-content details.wp-block-details > :last-child { margin-bottom: 20px; }

/* Schede allevamenti (ex "Link in bio") */
.entry-content .acd-scheda {
	height: 100%;
	padding: 24px 20px;
	text-align: center;
	background: rgba(255,255,255,.9);
	border-radius: 8px;
	box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.entry-content .acd-scheda > * { margin-block: 0 8px; }
.entry-content .acd-scheda figure img { width: 130px; height: 130px; object-fit: cover; border-radius: 50%; }
.entry-content .acd-scheda h3 { font-family: var(--acd-serif); font-size: 24px; color: var(--acd-primary); margin-top: 6px; }
.entry-content .wp-block-columns:has(.acd-scheda) { align-items: stretch; }

/* Gallerie */
.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image img { border-radius: 4px; }

/* ---------- Card (elenchi articoli/pagine) ---------- */
.acd-cards {
	display: grid;
	gap: 22px;
	margin: 0 0 30px;
}
.acd-cards--cols-1 { grid-template-columns: 1fr; max-width: 600px; }
.acd-cards--cols-2 { grid-template-columns: repeat(2, 1fr); }
.acd-cards--cols-3 { grid-template-columns: repeat(3, 1fr); }
.acd-cards--cols-4 { grid-template-columns: repeat(4, 1fr); }
.acd-cards--list { max-width: 760px; }

.acd-card {
	background: #fff;
	box-shadow: 0 0 10px rgba(0,0,0,.15);
	transition: box-shadow .2s ease, transform .2s ease;
}
.acd-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,.2); transform: translateY(-2px); }
.acd-card__link { display: block; height: 100%; color: inherit; text-decoration: none !important; }
.acd-card__thumb { aspect-ratio: 16 / 10; overflow: hidden; }
.acd-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.acd-card__body { padding: 16px 30px; }
.acd-card__title {
	margin: 0;
	font-family: var(--acd-serif);
	font-size: 26px;
	font-weight: 500;
	line-height: 1.3;
	color: var(--acd-muted);
}
.acd-cards--cols-1 .acd-card__title { font-size: 28px; }
.entry-content .acd-card__title { margin: 0; }
.entry-content .acd-cards { margin-block: 0 30px; }
.acd-card:hover .acd-card__title { color: var(--acd-primary); }
.acd-card__excerpt { margin: 8px 0 4px; font-size: 15px; color: var(--acd-muted); }

/* Paginazione, navigazione articoli */
.pagination .nav-links,
.post-navigation .nav-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; margin-top: 30px; }
.pagination .page-numbers { padding: 6px 12px; border: 1px solid var(--acd-line); background: #fff; }
.pagination .current { background: var(--acd-primary); border-color: var(--acd-primary); color: #fff; }
.post-navigation { margin-top: 50px; padding-top: 20px; border-top: 1px solid var(--acd-line); }
.post-navigation .nav-label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--acd-muted); }

/* Ricerca */
.search-form { display: flex; gap: 8px; max-width: 460px; margin: 20px 0; }
.search-form label { flex: 1; }
.search-field { width: 100%; padding: 11px 12px; border: 1px solid #ccc; border-radius: 3px; font: inherit; }

/* ---------- Homepage ---------- */
.acd-front .entry-content > * + * { margin-block-start: 0; }

.acd-hero {
	position: relative;
	isolation: isolate;
	margin: 0;
	padding: 110px 20px 150px;
	background-image: var(--acd-hero-bg);
	background-position: 50% 100%;
	background-size: cover;
	background-attachment: fixed;
	text-align: center;
}
.acd-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(0,0,0,.45);
}
.acd-hero > figure.wp-block-image { margin: 0 auto 30px; }
.acd-hero > figure.wp-block-image img { width: 100px; height: auto; }
.acd-hero > h2 {
	max-width: var(--acd-width);
	margin: 0 auto;
	font-size: 32px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: .6px;
	text-transform: uppercase;
	color: #fff;
}

.acd-hero .acd-box {
	max-width: var(--acd-width);
	min-height: 380px;
	margin: 120px auto 0;
	padding: 40px 20px 110px;
	border-radius: 10px;
	text-align: left;
	background-color: var(--acd-cream);
	background-image: var(--acd-card-bg);
	background-position: 50% 100%;
	background-size: contain;
	background-repeat: no-repeat;
}
.acd-hero .acd-box > * { max-width: 660px; }
.acd-hero .acd-box > h2 {
	margin: 0 0 30px;
	font-family: var(--acd-serif);
	font-size: 32px;
	font-weight: 700;
	color: var(--acd-primary);
}
.acd-box__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 20px;
	margin: 0 0 18px !important;
}
.acd-box__row > p { margin: 0; font-size: 20px; }
.acd-box__row strong { font-weight: 600; }
.acd-box__row .wp-block-buttons { margin: 0; }
.acd-hero .acd-box > p { font-size: 16px; }
.acd-hero .acd-box > p a { color: inherit; }

@media (max-width: 1024px) {
	.acd-hero { background-attachment: scroll; padding: 80px 20px 100px; }
	.acd-hero .acd-box { margin-top: 70px; padding-bottom: 58%; }
	.acd-hero .acd-box > * { max-width: none; }
}

/* ---------- Footer ---------- */
.site-footer {
	border-top: 1px solid var(--acd-primary);
	background: #fff;
}
.site-footer__inner {
	max-width: var(--acd-width);
	margin: 0 auto;
	padding: 50px 20px 30px;
}
.site-footer__cols {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	align-items: start;
}
.site-footer h2 { font-size: 32px; font-weight: 500; color: var(--acd-text); margin: 0 0 18px; }
.acd-contacts { list-style: none; margin: 0; padding: 0; max-width: 550px; }
.acd-contacts li {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 0;
	border-bottom: 1px solid var(--acd-line);
}
.acd-contacts li:last-child { border-bottom: 0; }
.acd-contacts .acd-icon { width: 14px; height: 14px; color: var(--acd-text); }
.site-footer__sponsor { display: flex; justify-content: center; align-items: center; padding-top: 10px; }
.site-footer__sponsor img { width: 264px; height: auto; }
.site-footer__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-top: 40px;
}
.site-footer__copy { margin: 0; font-size: 12.8px; color: #54595f; }
.site-footer__copy a { color: inherit; }
.footer-menu { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0 0; padding: 0; font-size: 12.8px; }
.acd-social {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px; height: 48px;
	flex: 0 0 48px;
	border-radius: 10%;
	background: #44518b;
	color: #fff;
}
.acd-social:hover { background: #36406f; text-decoration: none; }
.acd-social .acd-icon { width: 28px; height: 28px; }

/* ---------- Lightbox ---------- */
.acd-lightbox {
	position: fixed; inset: 0; z-index: 100000;
	display: flex; align-items: center; justify-content: center;
	padding: 30px;
	background: rgba(0,0,0,.88);
	cursor: zoom-out;
}
.acd-lightbox img { max-width: 100%; max-height: 100%; width: auto; height: auto; box-shadow: 0 0 30px rgba(0,0,0,.5); }
.acd-lightbox button {
	position: absolute; top: 14px; right: 18px;
	border: 0; background: none; color: #fff; font-size: 38px; line-height: 1; cursor: pointer;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.acd-cards--cols-3, .acd-cards--cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
	h1, .acd-entry__title, .entry-content h1 { font-size: 30px; margin-bottom: 26px; }
	h2 { font-size: 26px; }
	.acd-container { padding: 30px 16px 60px; }
	.acd-cards--cols-2, .acd-cards--cols-3, .acd-cards--cols-4 { grid-template-columns: 1fr; }
	.acd-card__body { padding: 14px 20px; }
	.acd-card__title, .acd-cards--cols-1 .acd-card__title { font-size: 23px; }
	.acd-hero > h2 { font-size: 22px; }
	.acd-hero .acd-box > h2 { font-size: 27px; }
	.acd-box__row > p { font-size: 17px; }
	.site-footer__cols { grid-template-columns: 1fr; }
	.site-footer__sponsor { justify-content: flex-start; }
	.site-footer h2 { font-size: 26px; }
	.entry-content .wp-block-column .wp-block-buttons { max-width: none; }
	.acd-bg-wrap::before { background-size: 180% auto; background-position: 70% 0; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
	.site-header, .site-footer, .post-navigation { display: none; }
	.acd-bg-wrap::before { display: none !important; }
}
