/*
Theme Name:   Lions L'Aquila (Blocksy Child)
Theme URI:    https://www.lionslaquila.it/
Description:  Child theme di Blocksy per il sito del Lions Club L'Aquila.
Author:       Lions Club L'Aquila
Template:     blocksy
Version:      0.2.0
Requires at least: 6.5
Requires PHP: 7.4
License:      GPL-2.0-or-later
Text Domain:  lions-aq
*/

:root {
	--lions-blue: #00338D;
	--lions-blue-dark: #002266;
	--lions-gold: #EBB700;
}

/* Voce di menu "Diventa socio" come pulsante (classe CSS: menu-cta) */
.menu-cta > a.ct-menu-link {
	background: var(--lions-gold);
	color: var(--lions-blue) !important;
	font-weight: 700;
	border-radius: 4px;
	padding-inline: 18px !important;
	height: auto !important;
	line-height: 2.6;
	margin-inline-start: 8px;
}
.menu-cta > a.ct-menu-link:hover { background: #ffcc1a; }

/* Pulsante oro riutilizzabile (stile blocco "is-style-lions-gold" o classe) */
.wp-block-button.lions-btn-gold .wp-block-button__link {
	background: var(--lions-gold);
	color: var(--lions-blue);
	font-weight: 700;
}
.wp-block-button.lions-btn-gold .wp-block-button__link:hover { background: #ffcc1a; }

/* Hero */
.lions-hero .lions-eyebrow {
	text-transform: uppercase;
	letter-spacing: .12em;
	font-size: .85rem;
	font-weight: 700;
	color: var(--lions-gold);
}
.lions-hero h1 { color: #fff; max-width: 16ch; }

/* Numeri d'impatto */
.lions-stats .lions-stat-num {
	font-size: clamp(2rem, 4vw, 2.8rem);
	font-weight: 800;
	line-height: 1.1;
	color: var(--lions-blue);
	margin-bottom: .25rem;
}
.lions-stats .lions-stat-label { font-size: .95rem; margin-top: 0; }

/* Card dei service */
.lions-cards .wp-block-column {
	background: #fff;
	border-top: 4px solid var(--lions-gold);
	border-radius: 6px;
	padding: 1.5rem;
	box-shadow: 0 2px 10px rgba(0, 34, 102, .08);
}
.lions-cards h3 { font-size: 1.2rem; }

/* Fascia sezione */
.lions-kicker {
	text-transform: uppercase;
	letter-spacing: .12em;
	font-size: .8rem;
	font-weight: 700;
	color: var(--lions-blue);
}

/* Fasce a tutta larghezza */
.lions-band { padding-block: clamp(3rem, 6vw, 5rem); }
.lions-band-light { background: #F4F5F7; }
.lions-band-blue { background: var(--lions-blue); color: #fff; }
.lions-band-blue h2, .lions-band-blue a:not(.wp-block-button__link) { color: #fff; }
.lions-band-gold { background: var(--lions-gold); color: var(--lions-blue); }
.lions-band-gold h2 { color: var(--lions-blue); }
.lions-band-gold .wp-block-button__link { background: var(--lions-blue); color: #fff; }
.lions-stats { padding-block: 2.5rem; border-bottom: 1px solid #e1e5eb; }

.lions-hero .is-style-outline .wp-block-button__link { color: #fff; border-color: #fff; }
.lions-hero .is-style-outline .wp-block-button__link:hover { background: rgba(255,255,255,.12); }

.lions-lead { font-size: 1.2rem; line-height: 1.6; color: #0B1F3A; }
.entry-content .lions-cards { margin-bottom: 1.5rem; }

/* Fix: contenuto hero allineato al contenitore del sito */
.lions-hero .wp-block-cover__inner-container {
	width: 100%;
	max-width: var(--theme-normal-container-max-width, 1290px);
	margin-inline: auto;
	padding-inline: var(--theme-content-spacing, 24px);
	box-sizing: border-box;
}
.lions-hero p:not(.lions-eyebrow) { font-size: 1.15rem; max-width: 60ch; color: rgba(255,255,255,.9); }
.lions-hero .wp-block-button.is-style-outline .wp-block-button__link {
	color: #fff !important; border: 2px solid #fff !important; background: transparent !important;
}
.lions-band-gold .wp-block-button.is-style-outline .wp-block-button__link {
	color: var(--lions-blue) !important; border: 2px solid var(--lions-blue) !important; background: transparent !important;
}

/* ===== Titolo delle pagine interne ===== */
.hero-section[data-type="type-1"] .page-title {
	font-size: clamp(2.2rem, 4.5vw, 3.2rem);
	font-weight: 800;
	line-height: 1.15;
	color: var(--lions-blue);
}
.hero-section[data-type="type-1"] .page-title::after {
	content: "";
	display: block;
	width: 64px;
	height: 4px;
	margin-top: .75rem;
	background: var(--lions-gold);
	border-radius: 2px;
}

/* ===== Footer ===== */
.ct-footer { background: var(--lions-blue-dark); color: rgba(255,255,255,.8); }
.ct-footer [data-row] { background: transparent !important; border-color: rgba(255,255,255,.12) !important; }
.ct-footer [data-row="middle"] { padding-block: 3.5rem 2.5rem; }
.ct-footer [data-row="bottom"] { border-top: 1px solid rgba(255,255,255,.12) !important; font-size: .9rem; }
.ct-footer .widget-title, .ct-footer h2, .ct-footer h3 {
	color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem;
}
.ct-footer a { color: #fff; text-decoration: none; }
.ct-footer a:hover { color: var(--lions-gold); }
.ct-footer ul.wp-block-list { list-style: none; padding: 0; margin: 0; }
.ct-footer ul.wp-block-list li { margin-bottom: .5rem; }
.ct-footer .lions-footer-name { color: #fff; font-size: 1.3rem; font-weight: 800; margin-bottom: .5rem; }
.ct-footer .lions-footer-motto { color: var(--lions-gold); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .85rem; }
.ct-footer .ct-footer-copyright, .ct-footer .ct-footer-copyright p { color: rgba(255,255,255,.7); }
.ct-footer .footer-menu-inline .ct-menu-link, .ct-footer #footer-menu a { color: rgba(255,255,255,.85) !important; }

/* Footer: specificità più alta del CSS dinamico di Blocksy + griglia colonne */
footer#footer.ct-footer { background: var(--lions-blue-dark) !important; }
footer#footer [data-row="middle"] > .ct-container {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	gap: 2.5rem;
}
footer#footer [data-row="bottom"] > .ct-container {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 1rem;
	padding-block: 1.25rem;
}
footer#footer [data-row="bottom"] ul.menu { display: flex; gap: 1.5rem; margin: 0; }
footer#footer [data-row="bottom"] ul.menu a { text-transform: none; font-size: .9rem; }
@media (max-width: 768px) {
	footer#footer [data-row="middle"] > .ct-container,
	footer#footer [data-row="bottom"] > .ct-container { grid-template-columns: 1fr; }
}
footer#footer p { color: rgba(255,255,255,.75); }
footer#footer .lions-footer-name { color: #fff; }
footer#footer .lions-footer-motto { color: var(--lions-gold); }

/* ===== Hero: skyline dei 70 anni in trasparenza ===== */
.lions-hero { overflow: hidden; }
.lions-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: url("assets/lions-hero-skyline.webp") center bottom / cover no-repeat;
	opacity: .2;
}
.lions-hero .wp-block-cover__inner-container { position: relative; z-index: 2; }
@media (max-width: 689px) {
	.lions-hero::after { background-size: auto 70%; opacity: .16; }
}

/* ===== Foto nelle card ===== */
.lions-cards .wp-block-column { display: flex; flex-direction: column; overflow: hidden; }
.lions-cards .lions-card-img { margin: -1.5rem -1.5rem 1rem; }
.lions-cards .lions-card-img img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	display: block;
	transition: transform .4s ease;
}
.lions-cards .wp-block-column:hover .lions-card-img img { transform: scale(1.04); }
.lions-cards .wp-block-column > p:last-child { margin-top: auto; }

/* ===== Tabella Past Presidenti ===== */
.lions-presidents table { border-collapse: collapse; width: 100%; }
.lions-presidents th { background: var(--lions-blue); color: #fff; text-align: left; }
.lions-presidents th, .lions-presidents td { padding: .55rem .9rem; border: 0; border-bottom: 1px solid #e1e5eb; }
.lions-presidents tbody tr:nth-child(even) { background: #F4F5F7; }
.lions-presidents tr.is-current td { font-weight: 700; color: var(--lions-blue); }

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

/* Card: meno spazio tra foto e titolo */
.lions-cards .lions-card-img { margin-bottom: .25rem !important; }
.lions-cards .lions-card-img + h3, .lions-cards .lions-card-img + .wp-block-heading { margin-top: .75rem; }

/* Ultime notizie: immagini uniformi e titoli puliti */
.wp-block-latest-posts__featured-image img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	object-position: center top;
	border-radius: 6px;
}
.wp-block-latest-posts.is-grid li { margin-bottom: 2rem; }
.wp-block-latest-posts__post-title {
	display: block;
	margin-top: .75rem;
	font-weight: 700;
	font-size: 1.1rem;
	line-height: 1.35;
	color: #0B1F3A;
	text-decoration: none;
}
.wp-block-latest-posts__post-title:hover { color: var(--lions-blue); }
.wp-block-latest-posts__post-date { font-size: .85rem; color: #6b7280; }
.wp-block-latest-posts__read-more { display: none; }

/* ===== Font Figtree (self-hosted, SIL OFL) ===== */
@font-face {
	font-family: "Figtree";
	font-style: normal;
	font-display: swap;
	font-weight: 300 900;
	src: url("assets/fonts/figtree-latin-wght-normal.woff2") format("woff2-variations");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Figtree";
	font-style: normal;
	font-display: swap;
	font-weight: 300 900;
	src: url("assets/fonts/figtree-latin-ext-wght-normal.woff2") format("woff2-variations");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ===== Header: emblema + nome in linea, stile Lions International ===== */
.site-branding[data-logo] {
	display: flex !important;
	flex-direction: row !important;
	align-items: center;
	gap: 16px;
	--logo-max-height: 64px;
}
.site-branding .site-logo-container img { height: 64px !important; width: auto !important; max-height: none !important; }
.site-branding .site-title {
	font-family: "Figtree", system-ui, sans-serif;
	font-size: 30px;
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1;
	white-space: nowrap;
}
.site-branding .site-title a { text-decoration: none; }
.site-branding .lions-t1 { color: #1a1a1a; }
.site-branding .lions-t2 { color: #0B6B3A; font-weight: 700; }
@media (max-width: 999px) {
	.site-branding { gap: 10px; }
	.site-branding .site-logo-container img { height: 46px !important; }
	.site-branding .site-title { font-size: 21px; }
}

/* ===== Menu: sottomenu blu Lions, voce attiva in oro (sempre leggibile) ===== */
header .sub-menu { background: var(--lions-blue-dark) !important; }
header .sub-menu .ct-menu-link { color: #fff !important; }
header .sub-menu li:hover > .ct-menu-link,
header .sub-menu .current-menu-item > .ct-menu-link,
header .sub-menu .current-menu-ancestor > .ct-menu-link,
header .sub-menu .ct-menu-link:focus-visible { color: var(--lions-gold) !important; }
header [data-id="menu"] > ul > .current-menu-item > .ct-menu-link,
header [data-id="menu"] > ul > .current-menu-ancestor > .ct-menu-link { color: var(--lions-blue) !important; box-shadow: inset 0 -3px 0 var(--lions-gold); }
/* menu mobile (pannello scuro) */
#offcanvas .ct-menu-link { color: #fff !important; }
#offcanvas .current-menu-item > .ct-menu-link, #offcanvas .current-menu-ancestor > .ct-menu-link { color: var(--lions-gold) !important; }
/* footer */
footer#footer .current-menu-item > a, footer#footer a:focus-visible { color: var(--lions-gold) !important; }

/* Nome del club più marcato */
.site-branding .site-title { font-weight: 800 !important; letter-spacing: -0.015em; }
.site-branding .lions-t1 { color: #111 !important; font-weight: 800; }
.site-branding .lions-t2 { color: #0B6B3A !important; font-weight: 800; }

/* Pagine di contenuto: immagini e didascalie */
.entry-content .wp-block-image img { border-radius: 6px; }
.entry-content .wp-block-image figcaption { font-size: .85rem; color: #6b7280; text-align: center; }
.entry-content h2.wp-block-heading { margin-top: 2.2rem; }
.lions-source { font-size: .85rem; color: #6b7280; border-top: 1px solid #e1e5eb; padding-top: 1rem; margin-top: 2rem; }

/* ===== Cause (Unisciti a noi) ===== */
.lions-causes .wp-block-column { padding: 1.25rem 1.25rem 1rem; }
.lions-causes h3 { font-size: 1.05rem; margin: 0 0 .4rem; color: var(--lions-blue); }
.lions-causes p { font-size: .95rem; margin: 0; }

/* ===== Modulo contatti ===== */
.lions-cf { max-width: 760px; }
.lions-cf-form { background: #fff; border-top: 4px solid var(--lions-gold); border-radius: 6px; box-shadow: 0 2px 10px rgba(0,34,102,.08); padding: clamp(1.25rem, 3vw, 2rem); }
.lions-cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
@media (max-width: 689px) { .lions-cf-row { grid-template-columns: 1fr; } }
.lions-cf-field { margin: 0 0 1rem; }
.lions-cf-field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; color: #0B1F3A; }
.lions-cf-field input, .lions-cf-field select, .lions-cf-field textarea { width: 100%; border: 1px solid #cfd6df; border-radius: 4px; padding: .65rem .8rem; font: inherit; background: #fff; }
.lions-cf-field input:focus, .lions-cf-field select:focus, .lions-cf-field textarea:focus { outline: 2px solid var(--lions-gold); outline-offset: 1px; border-color: var(--lions-blue); }
.lions-cf-consent label { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; }
.lions-cf-consent input { margin-top: .3rem; flex: 0 0 auto; }
.lions-cf-note { font-size: .82rem; color: #6b7280; }
.lions-cf-submit button { background: var(--lions-blue); color: #fff; border: 0; border-radius: 4px; padding: .8rem 1.6rem; font-weight: 700; cursor: pointer; }
.lions-cf-submit button:hover { background: var(--lions-blue-dark); }
.lions-cf-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.lions-cf-msg { border-radius: 6px; padding: 1rem 1.25rem; margin-bottom: 1.25rem; }
.lions-cf-msg.is-ok { background: #e7f5ec; border-left: 4px solid #0B6B3A; }
.lions-cf-msg.is-err { background: #fdecec; border-left: 4px solid #b32d2e; }
/* fix consenso e select */
.lions-cf-consent label { display: block !important; position: relative; padding-left: 1.8rem; line-height: 1.5; }
.lions-cf-consent input { position: absolute; left: 0; top: .15rem; margin: 0 !important; width: 1.1rem; height: 1.1rem; }
.lions-cf-field select { height: auto !important; min-height: 2.9rem; line-height: 1.4; padding-top: .55rem; padding-bottom: .55rem; }

/* Fascia "Dona i tuoi occhiali" in Home */
.lions-band-occhiali { background: #FFF6D6; border-top: 4px solid var(--lions-gold); padding-block: clamp(2.5rem, 5vw, 3.5rem); }
.lions-band-occhiali h2 { margin-top: .25rem; }
.lions-band-occhiali .wp-block-buttons { justify-content: flex-end; }
@media (max-width: 781px) { .lions-band-occhiali .wp-block-buttons { justify-content: flex-start; } }
