/*
Theme Name: PN Cultura Italia
Description: Tema per il portale dei progetti del PN Cultura 2021-2027, ispirato al modello AgID per i siti della PA (Bootstrap Italia / ItaliaWP2) usato da pnmetroplus.gov.it. Da usare con il plugin «PN Cultura – Progetti e FNLC».
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: pnc-italia
*/

:root {
	--it-primary: #0066cc;
	--it-primary-dark: #004d99;
	--it-primary-darker: #003366;
	--it-primary-darkest: #00264d;
	--it-primary-tint: #e5f0fa;
	--it-text: #191919;
	--it-muted: #5c6f82;
	--it-line: #e6e9f2;
	--it-bg-soft: #f2f7fc;
	--it-font: "Titillium Web", Geneva, Tahoma, sans-serif;
	--it-container: 1200px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--it-font); font-size: 18px; line-height: 1.55; color: var(--it-text); background: #fff; }
a { color: var(--it-primary); text-underline-offset: 2px; }
a:hover { color: var(--it-primary-dark); }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; color: var(--it-text); }
h1 { font-size: 2.5rem; margin: 0 0 .6rem; }
h2 { font-size: 1.8rem; }
:focus-visible { outline: 2px solid #ff9900; outline-offset: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.it-container { max-width: var(--it-container); margin: 0 auto; padding: 0 24px; }

/* Link di salto */
.it-skiplinks a { position: absolute; left: -9999px; top: 0; background: #fff; color: var(--it-primary); padding: .6rem 1rem; z-index: 1000; font-weight: 600; }
.it-skiplinks a:focus { left: 1rem; top: 1rem; }

/* Header sottile */
.it-header-slim { background: var(--it-primary-darkest); color: #fff; font-size: .875rem; }
.it-header-slim .it-container { display: flex; justify-content: space-between; align-items: center; min-height: 48px; gap: 1rem; }
.it-header-slim a { color: #fff; text-decoration: none; font-weight: 600; }
.it-header-slim a:hover { text-decoration: underline; color: #fff; }
.it-header-slim__right { display: flex; gap: 1.2rem; align-items: center; }
.it-btn-login { display: inline-flex; align-items: center; gap: .5rem; background: var(--it-primary); padding: .35rem 1rem; border-radius: 4px; }
.it-btn-login:hover { background: var(--it-primary-dark); text-decoration: none !important; }
.it-btn-login svg { width: 18px; height: 18px; fill: currentColor; }

/* Header centrale */
.it-header-center { background: var(--it-primary); color: #fff; }
.it-header-center .it-container { display: flex; align-items: center; justify-content: space-between; min-height: 120px; gap: 1.5rem; padding-top: 1rem; padding-bottom: 1rem; }
.it-brand { display: flex; align-items: center; gap: 1rem; color: #fff; text-decoration: none; }
.it-brand:hover { color: #fff; }
.it-brand__logo { width: 64px; height: 64px; flex: none; }
.it-brand__logo img { width: 64px; height: 64px; object-fit: contain; }
.it-brand__title { display: block; font-size: 1.75rem; font-weight: 700; line-height: 1.1; }
.it-brand__tagline { display: block; font-size: .95rem; font-weight: 400; opacity: .92; margin-top: .2rem; }
.it-search { display: flex; align-items: center; gap: .5rem; }
.it-search input { border: 0; border-radius: 4px; padding: .55rem .8rem; font: inherit; font-size: .95rem; width: 230px; }
.it-search button { background: #fff; border: 0; border-radius: 50%; width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; }
.it-search button svg { width: 20px; height: 20px; fill: var(--it-primary); }
.it-logos-ue { display: flex; gap: .8rem; align-items: center; }
@media (max-width: 860px) { .it-search input { width: 140px; } .it-brand__title { font-size: 1.3rem; } }
@media (max-width: 600px) { .it-search { display: none; } }

/* Navigazione */
.it-header-nav { background: var(--it-primary); border-top: 1px solid rgba(255, 255, 255, .2); }
.it-nav { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.it-nav li { position: relative; }
.it-nav a { display: block; color: #fff; text-decoration: none; padding: .9rem 1.1rem; font-weight: 600; font-size: 1rem; border-bottom: 3px solid transparent; }
.it-nav a:hover { background: rgba(0, 0, 0, .1); color: #fff; }
.it-nav .current-menu-item > a, .it-nav .current_page_item > a { border-bottom-color: #fff; }
.it-nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 240px; background: #fff; list-style: none; padding: .5rem 0; margin: 0; box-shadow: 0 6px 18px rgba(0, 0, 0, .15); z-index: 50; }
.it-nav li:hover > .sub-menu, .it-nav li:focus-within > .sub-menu { display: block; }
.it-nav .sub-menu a { color: var(--it-primary); padding: .5rem 1.1rem; border: 0; }
.it-nav-toggle { display: none; background: none; border: 0; color: #fff; font: inherit; font-weight: 600; padding: .8rem 0; cursor: pointer; }
@media (max-width: 860px) {
	.it-nav-toggle { display: inline-flex; gap: .5rem; align-items: center; }
	.it-nav { display: none; flex-direction: column; padding-bottom: .5rem; }
	.it-nav.is-open { display: flex; }
	.it-nav .sub-menu { position: static; display: block; box-shadow: none; background: transparent; }
	.it-nav .sub-menu a { color: #fff; padding-left: 2rem; }
}

/* Intestazione di pagina */
.it-page-head { background: var(--it-bg-soft); padding: 1.6rem 0 1.8rem; border-bottom: 1px solid var(--it-line); }
.it-breadcrumb { font-size: .9rem; margin-bottom: .6rem; color: var(--it-muted); }
.it-breadcrumb a { color: var(--it-primary); text-decoration: none; }
.it-breadcrumb span[aria-hidden] { margin: 0 .4rem; }
.it-page-head h1 { margin: 0; }
.it-page-head .it-lead { font-size: 1.15rem; color: var(--it-muted); margin: .5rem 0 0; max-width: 820px; }
.it-main { padding: 2rem 0 3.5rem; min-height: 50vh; }
.it-content > *:first-child { margin-top: 0; }

/* Hero */
.it-hero { position: relative; color: #fff; background: linear-gradient(120deg, var(--it-primary-darker) 0%, var(--it-primary) 70%); overflow: hidden; }
.it-hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .12) 1.5px, transparent 1.6px); background-size: 22px 22px; mask-image: linear-gradient(90deg, transparent 35%, #000 90%); pointer-events: none; }
.it-hero .it-container { position: relative; z-index: 1; padding-top: 3.5rem; padding-bottom: 3.5rem; }
.it-hero__kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; font-weight: 600; opacity: .9; }
.it-hero h1 { color: #fff; font-size: 2.8rem; max-width: 760px; margin: .4rem 0 .8rem; }
.it-hero p { font-size: 1.2rem; max-width: 680px; margin: 0 0 1.6rem; opacity: .95; }
.it-hero .it-btn { margin-right: .6rem; }
@media (max-width: 700px) { .it-hero h1 { font-size: 2rem; } }

.it-btn { display: inline-block; padding: .7rem 1.4rem; border-radius: 4px; font-weight: 600; text-decoration: none; border: 2px solid #fff; color: var(--it-primary); background: #fff; }
.it-btn:hover { background: var(--it-primary-tint); color: var(--it-primary-dark); }
.it-btn--outline { background: transparent; color: #fff; }
.it-btn--outline:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* Sezioni home */
.it-section { padding: 3rem 0; }
.it-section--soft { background: var(--it-bg-soft); }
.it-section__title { font-size: 1.8rem; margin: 0 0 .3rem; }
.it-section__lead { color: var(--it-muted); margin: 0 0 1.4rem; }
.it-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.4rem; }
.it-card { background: #fff; border-radius: 4px; box-shadow: 0 2px 20px rgba(0, 43, 85, .1); padding: 1.6rem 1.5rem; display: flex; flex-direction: column; gap: .5rem; text-decoration: none; color: var(--it-text); border-bottom: 4px solid transparent; transition: border-color .15s, transform .15s; }
.it-card:hover { border-bottom-color: var(--it-primary); color: var(--it-text); transform: translateY(-2px); }
.it-card__icon { width: 44px; height: 44px; fill: var(--it-primary); }
.it-card__title { font-size: 1.25rem; font-weight: 700; color: var(--it-primary); }
.it-card__text { font-size: .98rem; color: var(--it-muted); flex: 1; }
.it-card__more { font-weight: 600; color: var(--it-primary); font-size: .95rem; }

/* Footer */
.it-footer { background: var(--it-primary-darker); color: #fff; font-size: .95rem; }
.it-footer a { color: #fff; }
.it-footer__main { padding: 3rem 0 2rem; }
.it-footer__brand { display: flex; align-items: center; gap: 1rem; padding-bottom: 1.6rem; border-bottom: 1px solid rgba(255, 255, 255, .25); margin-bottom: 1.6rem; }
.it-footer__brand strong { font-size: 1.4rem; }
.it-footer__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; }
.it-footer h3 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 .8rem; border-bottom: 1px solid rgba(255, 255, 255, .25); padding-bottom: .5rem; }
.it-footer ul { list-style: none; padding: 0; margin: 0; }
.it-footer li { margin-bottom: .4rem; }
.it-footer__small { background: var(--it-primary-darkest); padding: 1rem 0; font-size: .85rem; }
.it-footer__small .it-container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem 1.5rem; }
.it-footer__small ul { display: flex; gap: 1.5rem; flex-wrap: wrap; }

/* Contenuti di WordPress */
.it-content .alignwide { max-width: none; }
.it-content table { border-collapse: collapse; }
.it-postlist { list-style: none; padding: 0; }
.it-postlist li { padding: 1rem 0; border-bottom: 1px solid var(--it-line); }
