/* Amata — header, menu mobile, footer.
   Layout via utility Tailwind (in theme.css); qui solo stati dinamici e colori brand. */

:root {
	--amata-primary: #76a3bb;
	--amata-dark: #1A3A4A;
	--amata-hero: #0a1e2a;
}

/* ===== Header ===== */
.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 50;
	transition: background-color .5s ease, box-shadow .5s ease, border-color .5s ease;
	background: transparent;
	border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
	background: rgba(255, 255, 255, 0.08);
	-webkit-backdrop-filter: blur(40px) saturate(1.8);
	backdrop-filter: blur(40px) saturate(1.8);
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
	box-shadow: 0 1px 0 rgba(255,255,255,0.1), 0 8px 40px rgba(0,0,0,0.08);
}

/* Logo: bianco sopra l'hero scuro, a colori su sfondo chiaro (scrolled) */
.site-header .amata-logo {
	height: 2.75rem;
	width: auto;
	filter: brightness(0) invert(1);
	transition: filter .5s ease;
}
.site-header.is-scrolled .amata-logo {
	filter: none;
}

/* Nav desktop — pill */
.amata-nav {
	display: none;
	align-items: center;
	gap: .25rem;
	padding: .25rem .375rem;
	border-radius: 9999px;
	background: rgba(255,255,255,0.10);
	-webkit-backdrop-filter: blur(16px);
	backdrop-filter: blur(16px);
	border: 1px solid rgba(255,255,255,0.20);
	transition: background-color .5s ease, border-color .5s ease;
}
@media (min-width: 1024px) { .amata-nav { display: flex; } }
.site-header.is-scrolled .amata-nav {
	background: rgba(255,255,255,0.06);
	border-color: rgba(118,163,187,0.18);
}
.amata-nav a {
	padding: .5rem 1rem;
	border-radius: 9999px;
	color: rgba(255,255,255,0.72);
	transition: color .3s ease, background-color .3s ease;
}
.amata-nav a:hover { color: #fff; background: rgba(255,255,255,0.10); }
.amata-nav a.active { color: #fff; background: rgba(255,255,255,0.20); }
.site-header.is-scrolled .amata-nav a { color: rgba(26,58,74,0.6); }
.site-header.is-scrolled .amata-nav a:hover { color: var(--amata-dark); background: rgba(255,255,255,0.55); }
.site-header.is-scrolled .amata-nav a.active { color: var(--amata-dark); background: rgba(118,163,187,0.20); }

/* Toggle mobile */
.amata-burger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: .75rem;
	color: #fff;
	background: transparent;
	border: 0;
	cursor: pointer;
	transition: background-color .3s ease, color .3s ease;
}
.site-header.is-scrolled .amata-burger { color: var(--amata-dark); }
@media (min-width: 1024px) { .amata-burger { display: none; } }

/* Menu mobile */
.amata-mobile {
	display: none;
	background: rgba(10,30,42,0.92);
	-webkit-backdrop-filter: blur(40px) saturate(1.8);
	backdrop-filter: blur(40px) saturate(1.8);
	border-top: 1px solid rgba(255,255,255,0.08);
}
.amata-mobile.open { display: block; }
.amata-mobile a {
	display: block;
	padding: .75rem 1rem;
	margin: .125rem 0;
	border-radius: .75rem;
	color: rgba(255,255,255,0.72);
	font-size: .9rem;
	transition: color .3s ease, background-color .3s ease;
}
.amata-mobile a:hover, .amata-mobile a.active { color: #fff; background: rgba(255,255,255,0.10); }

/* Il footer usa solo utility Tailwind (già in theme.css). */

/* ===== Dropdown "Storia" (desktop) ===== */
.amata-dropdown { position: relative; display: flex; }
.amata-dropdown-toggle {
	display: inline-flex;
	align-items: center;
	gap: .25rem;
	padding: .5rem 1rem;
	border-radius: 9999px;
	background: transparent;
	border: 0;
	cursor: pointer;
	color: rgba(255,255,255,0.72);
	font-family: var(--font-body);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-size: 11px;
	line-height: 1.5;
	transition: color .3s ease, background-color .3s ease;
}
.amata-dropdown-toggle:hover { color: #fff; background: rgba(255,255,255,0.10); }
.amata-dropdown-toggle.active { color: #fff; background: rgba(255,255,255,0.20); }
.site-header.is-scrolled .amata-dropdown-toggle { color: rgba(26,58,74,0.6); }
.site-header.is-scrolled .amata-dropdown-toggle:hover { color: var(--amata-dark); background: rgba(255,255,255,0.55); }
.site-header.is-scrolled .amata-dropdown-toggle.active { color: var(--amata-dark); background: rgba(118,163,187,0.20); }

.amata-caret { width: .7rem; height: .7rem; transition: transform .3s ease; }
.amata-dropdown:hover .amata-caret,
.amata-dropdown:focus-within .amata-caret { transform: rotate(180deg); }

.amata-dropdown-menu {
	position: absolute;
	left: 50%;
	top: 100%;
	transform: translateX(-50%) translateY(.25rem);
	margin-top: .75rem;
	min-width: 210px;
	background: #fff;
	border: 1px solid #f3f4f6;
	border-radius: 1rem;
	box-shadow: 0 16px 48px rgba(0,0,0,0.16);
	padding: .5rem;
	opacity: 0;
	visibility: hidden;
	transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
	z-index: 50;
}
/* ponte invisibile: non perdere l'hover passando dal toggle al pannello */
.amata-dropdown-menu::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -.75rem;
	height: .75rem;
}
.amata-dropdown:hover .amata-dropdown-menu,
.amata-dropdown:focus-within .amata-dropdown-menu {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}
.amata-dropdown-menu a {
	display: block;
	padding: .625rem 1rem;
	border-radius: .75rem;
	color: rgba(26,58,74,0.65);
	font-size: 13px;
	text-transform: none;
	letter-spacing: normal;
	transition: color .2s ease, background-color .2s ease;
}
.amata-dropdown-menu a:hover { color: var(--amata-dark); background: rgba(118,163,187,0.10); }
.amata-dropdown-menu a.active { color: var(--amata-dark); background: rgba(118,163,187,0.15); }

/* ===== Menu mobile: gruppo "Storia" ===== */
.amata-mobile-group {
	display: block;
	padding: .75rem 1rem .25rem;
	font-size: .7rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: rgba(255,255,255,0.4);
}
.amata-mobile-sub { padding-left: .5rem; }

/* ===== Contenuto pagine "normali" (page.php): the_content() ===== */
/* Ripristina una tipografia leggibile (Tailwind preflight azzera h/ul/ol). */
.amata-prose { color: #4a5568; font-size: 1.0625rem; line-height: 1.8; }
.amata-prose > * + * { margin-top: 1.25rem; }
.amata-prose h1, .amata-prose h2, .amata-prose h3, .amata-prose h4 { color: var(--amata-dark); line-height: 1.25; margin-top: 2rem; }
.amata-prose h2 { font-size: 1.875rem; }
.amata-prose h3 { font-size: 1.375rem; }
.amata-prose h4 { font-size: 1.125rem; }
.amata-prose p { margin: 0; }
.amata-prose a { color: var(--amata-primary); text-decoration: underline; text-underline-offset: 2px; }
.amata-prose a:hover { color: var(--amata-dark); }
.amata-prose strong { color: var(--amata-dark); font-weight: 700; }
.amata-prose ul, .amata-prose ol { padding-left: 1.5rem; }
.amata-prose ul { list-style: disc; }
.amata-prose ol { list-style: decimal; }
.amata-prose li { margin-top: .5rem; }
.amata-prose img { border-radius: .75rem; max-width: 100%; height: auto; }
.amata-prose blockquote { border-left: 3px solid var(--amata-primary); padding-left: 1.25rem; font-style: italic; color: var(--amata-dark); }
.amata-prose table { width: 100%; border-collapse: collapse; }
.amata-prose th, .amata-prose td { border: 1px solid #e5e7eb; padding: .5rem .75rem; text-align: left; }
.amata-prose hr { border: 0; border-top: 1px solid #e8edf2; margin: 2rem 0; }

/* ===== Contattaci: selettore "motivo" ===== */
.amata-contact-pill { background: #fff; color: #6b7280; border: 1px solid rgba(0,0,0,0.08); cursor: pointer; }
.amata-contact-pill:hover { color: var(--amata-primary); border-color: rgba(118,163,187,0.35); }
.amata-contact-pill.is-active { background: var(--amata-primary); color: #fff; border-color: var(--amata-primary); box-shadow: 0 4px 16px rgba(118,163,187,0.3); }

/* ===== Paginazione blog (News) ===== */
.amata-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 2.5rem; height: 2.5rem; padding: 0 .75rem; margin: 0 .15rem; border-radius: .75rem; border: 1px solid #e8edf2; color: var(--amata-dark); font-size: .9rem; text-decoration: none; transition: color .2s ease, border-color .2s ease, background-color .2s ease; }
.amata-pagination .page-numbers:hover { border-color: rgba(118,163,187,0.4); color: var(--amata-primary); }
.amata-pagination .page-numbers.current { background: var(--amata-primary); color: #fff; border-color: var(--amata-primary); }
.amata-pagination .page-numbers.dots { border: 0; }
.amata-pagination .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }
