/*
Theme Name: Gaius
Theme URI: https://www.aiutogiuridico.it/
Description: Tema a blocchi editoriale per Aiuto Giuridico: tipografia da rivista giuridica, colonna di lettura ampia, barra laterale per il blog e modelli pronti per pareri, massime e contatti.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gaius
Tags: blog, one-column, two-columns, right-sidebar, block-patterns, full-site-editing, editor-style, wide-blocks
*/

/* ---- Dettagli che theme.json non copre ---- */

html { scroll-padding-top: 6rem; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

a { text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--wp--preset--color--accent); text-decoration-thickness: 2px; }
:where(a, button, input, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent-strong);
	outline-offset: 3px;
}

/* Intestazione — colori dai valori "custom" di theme.json (la variante Notte li ridefinisce) */
.gaius-header {
	background-color: var(--wp--custom--header--background);
	color: var(--wp--custom--header--text);
	border-bottom: 1px solid var(--wp--custom--header--line);
}
.gaius-header__rule { height: 4px; background: var(--wp--preset--color--accent); }

.gaius-topbar {
	background-color: var(--wp--custom--topbar--background);
	color: var(--wp--custom--topbar--text);
	font-size: var(--wp--preset--font-size--x-small);
}
.gaius-topbar .wp-block-site-tagline { color: var(--wp--custom--topbar--text); font-size: var(--wp--preset--font-size--small); margin: 0; }
.gaius-topbar .wp-block-social-links { margin: 0; }
.gaius-topbar .wp-block-social-links.is-style-logos-only .wp-social-link {
	color: var(--wp--custom--topbar--text);
	background: none;
}
.gaius-topbar .wp-block-social-links .wp-block-social-link-anchor {
	display: inline-flex; flex-direction: row-reverse; align-items: center; gap: 0.375rem;
	min-height: 44px; padding: 0;
	color: var(--wp--custom--topbar--text);
}
.gaius-topbar .wp-block-social-links .wp-block-social-link-anchor:hover { color: var(--wp--preset--color--accent); }
.gaius-topbar .wp-block-social-links .wp-block-social-link-label { font-size: var(--wp--preset--font-size--x-small); font-weight: 600; letter-spacing: 0.04em; }
.gaius-topbar .wp-block-social-links .wp-social-link svg { width: 18px; height: 18px; }

.gaius-header .wp-block-site-title a { color: var(--wp--custom--header--text); }
.gaius-header .wp-block-site-title { font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem); }

/* Logo in un cerchio (il PNG resta trasparente; il cerchio lo rende leggibile su qualsiasi fondo) */
.gaius-header .wp-block-site-logo a,
.gaius-header .wp-block-site-logo .custom-logo-link {
	display: inline-flex; align-items: center; justify-content: center;
	width: 96px; height: 96px; border-radius: 50%;
	background-color: var(--wp--custom--logo--background);
	box-shadow: 0 0 0 1px var(--wp--custom--logo--ring), 0 0 0 4px var(--wp--custom--logo--background), 0 0 0 5px var(--wp--preset--color--accent);
	overflow: hidden;
}
.gaius-header .wp-block-site-logo img { width: 72px !important; height: auto !important; }

.gaius-header .wp-block-navigation,
.gaius-header .wp-block-navigation a,
.gaius-header .wp-block-navigation .wp-block-navigation-item__content { color: var(--wp--custom--header--text); }
.gaius-header .wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--custom--header--background) !important;
	color: var(--wp--custom--header--text) !important;
}
.gaius-header .wp-block-navigation__responsive-container-open,
.gaius-header .wp-block-navigation__responsive-container-close { color: var(--wp--custom--header--text); }
.gaius-header .wp-block-navigation .wp-block-navigation-item__content { padding: 0.5rem 0; }
.gaius-header .wp-block-navigation .wp-block-navigation-item__content:hover,
.gaius-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content {
	box-shadow: inset 0 -2px 0 var(--wp--preset--color--accent);
}
.gaius-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
	font-size: var(--wp--preset--font-size--large);
	font-family: var(--wp--preset--font-family--serif);
}

/* Occhiello sopra i titoli */
.gaius-eyebrow a { color: inherit; text-decoration: none; }
.gaius-eyebrow a:hover { text-decoration: underline; }
.gaius-eyebrow {
	margin: 0;
	font-family: var(--wp--preset--font-family--sans);
	line-height: 1.4;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent-strong);
}

/* Elenchi articoli */
.gaius-post-list > li { border-top: 1px solid var(--wp--preset--color--line); padding-top: var(--wp--preset--spacing--40); }
.gaius-post-list > li:first-child { border-top: 0; padding-top: 0; }
.gaius-post-list .wp-block-post-excerpt__excerpt { color: var(--wp--preset--color--muted); margin: 0; }
.gaius-post-list .wp-block-post-excerpt__more-link { font-weight: 600; font-size: var(--wp--preset--font-size--small); }

/* Ultimi articoli e archivi (anche quando i blocchi stanno nel contenuto della pagina) */
.wp-block-latest-posts.wp-block-latest-posts__list,
.wp-block-archives-list { list-style: none; padding-left: 0; }
.wp-block-latest-posts.wp-block-latest-posts__list li,
.wp-block-archives-list li {
	padding: 0.625rem 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
	line-height: 1.45;
}
.wp-block-latest-posts.wp-block-latest-posts__list li a,
.wp-block-archives-list li a { text-decoration: none; }
.wp-block-latest-posts.wp-block-latest-posts__list li a:hover,
.wp-block-archives-list li a:hover { text-decoration: underline; }
.wp-block-latest-posts__post-date { display: block; color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--x-small); margin-top: 0.125rem; }
.gaius-sidebar .wp-block-heading { margin-top: 0; }

/* Ricerca */
.wp-block-search__label { font-weight: 700; font-size: var(--wp--preset--font-size--small); }
.wp-block-search__input {
	border: 1px solid var(--wp--preset--color--muted);
	border-radius: 2px;
	padding: 0.625rem 0.75rem;
	font: inherit;
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--base);
}
.wp-block-search__input:focus { border-color: var(--wp--preset--color--ink); outline: 2px solid var(--wp--preset--color--accent); outline-offset: 0; }
.wp-block-search__button { margin-left: 0.5rem; min-width: 44px; min-height: 44px; }

/* Tabelle */
.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table th { text-align: left; font-weight: 700; background: var(--wp--preset--color--surface); }
.wp-block-table th, .wp-block-table td { border: 0; border-bottom: 1px solid var(--wp--preset--color--line); padding: 0.625rem 0.75rem; }

/* Note a piè di contenuto */
.wp-block-footnotes { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); border-top: 1px solid var(--wp--preset--color--line); padding-top: var(--wp--preset--spacing--30); }

/* Stile di blocco: Scheda (gruppo) */
.wp-block-group.is-style-gaius-scheda {
	background: var(--wp--preset--color--surface);
	border-top: 3px solid var(--wp--preset--color--ink);
	padding: var(--wp--preset--spacing--50);
}
/* Stile di blocco: Norma citata (citazione) */
.wp-block-quote.is-style-gaius-norma {
	border-left: 0;
	padding: var(--wp--preset--spacing--40);
	background: var(--wp--preset--color--surface);
	font-family: var(--wp--preset--font-family--sans);
	font-style: normal;
	font-size: var(--wp--preset--font-size--medium);
	color: var(--wp--preset--color--contrast);
}
.wp-block-quote.is-style-gaius-norma cite { font-weight: 700; color: var(--wp--preset--color--ink); }
/* Stile di blocco: Elenco con trattino */
ul.is-style-gaius-trattino { list-style: none; padding-left: 0; }
ul.is-style-gaius-trattino > li { position: relative; padding-left: 1.5rem; }
ul.is-style-gaius-trattino > li::before { content: "—"; position: absolute; left: 0; color: var(--wp--preset--color--accent-strong); }

/* Piè di pagina — colori dai valori "custom" di theme.json */
.gaius-footer {
	background-color: var(--wp--custom--footer--background);
	color: var(--wp--custom--footer--text);
}
.gaius-footer a,
.gaius-footer .wp-block-site-title a { color: var(--wp--custom--footer--text); }
.gaius-footer a:hover { color: var(--wp--custom--footer--accent); }
.gaius-footer .wp-block-heading { color: var(--wp--custom--footer--accent); }
.gaius-footer .wp-block-site-tagline,
.gaius-footer .gaius-footer__muted { color: var(--wp--custom--footer--muted); }
.gaius-footer ul.is-style-gaius-trattino > li::before { color: var(--wp--custom--footer--accent); }
.gaius-footer .wp-block-separator { border-top-color: var(--wp--custom--footer--line); color: var(--wp--custom--footer--line); background: none; }

/* Banner del plugin cookie: allinea il carattere al tema */
#cookie-notice, #cookie-notice .cn-button { font-family: var(--wp--preset--font-family--sans) !important; }

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