/*
Theme Name: Calcolo Stipendio Netto Esatto
Theme URI: https://calcolostipendionettoesatto.com/
Author: Saira Fernandes
Description: Tema su misura per calcolostipendionettoesatto.com. Calcolatore dello stipendio netto 2026 con addizionali di 7.897 comuni (dati MEF). Design "Energia corallo". WP-Flash v5.23 | SerpZenith.
Version: 1.0.4
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: stipendio-netto-esatto
License: Proprietary
*/

/* ===== 1. Tokens ===== */
@font-face { font-family: "Sora"; src: url("assets/fonts/sora-latin.woff2") format("woff2"); font-weight: 600 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("assets/fonts/inter-latin.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }

:root {
	--color-primary: #CF3A24;
	--color-primary-bright: #E8432F;
	--color-secondary: #B0301D;
	--color-accent: #FFD23F;
	--color-accent-dark: #E6B820;
	--color-background: #FFF8F3;
	--color-surface: #FFFFFF;
	--color-soft: #FFEDE6;
	--color-border: #F1DED5;
	--color-text: #1D1426;
	--color-text-muted: #5E5468;
	--color-success: #0F8A5F;
	--on-primary: #FFFFFF;
	--on-accent: #1D1426;
	--chart-netto: #1D1426;
	--chart-inps: #FFD23F;
	--chart-irpef: #E8432F;
	--chart-add: #B9A8C4;
	--chart-plus: #0F8A5F;
	--font-heading: "Sora", system-ui, sans-serif;
	--font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	--radius: 24px;
	--radius-sm: 12px;
	--radius-pill: 999px;
	--spacing-section: 64px;
	--spacing-unit: 24px;
	--container: 1160px;
	--container-text: 760px;
	--shadow: 0 24px 60px rgba(29, 20, 38, .10);
	--shadow-sm: 0 4px 14px rgba(29, 20, 38, .06);
}

/* ===== 2. Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--color-background); color: var(--color-text); font-family: var(--font-body); font-size: 17px; line-height: 1.7; font-feature-settings: "tnum"; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--color-primary); text-underline-offset: 3px; }
a:hover { color: var(--color-secondary); }
h1, h2, h3, h4 { font-family: var(--font-heading); letter-spacing: -.02em; line-height: 1.18; color: var(--color-text); margin: 0 0 .5em; }
h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; }
h2 { font-size: clamp(25px, 3.4vw, 36px); font-weight: 800; margin-top: 1.6em; }
h3 { font-size: clamp(20px, 2.4vw, 24px); font-weight: 700; margin-top: 1.4em; }
p, ul, ol { margin: 0 0 1em; }
li { margin-bottom: .35em; }
strong { font-weight: 600; }
:focus-visible { outline: 3px solid var(--color-accent-dark); outline-offset: 2px; }
.screen-reader-text, .sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; left: 12px; top: 12px; z-index: 100; background: var(--color-text); color: #fff; padding: 10px 14px; border-radius: 8px; width: auto; height: auto; clip: auto; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.num { font-family: var(--font-heading); font-variant-numeric: tabular-nums; }

/* ===== 3. Header + footer ===== */
.site-header { background: var(--color-surface); border-bottom: 1px solid var(--color-border); position: sticky; top: 0; z-index: 30; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: 66px; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-heading); font-weight: 800; font-size: 18px; color: var(--color-text); text-decoration: none; }
.logo:hover { color: var(--color-text); }
.logo-mark { width: 34px; height: 34px; flex: 0 0 34px; }
.logo b { color: var(--color-primary); font-weight: 800; }
.main-nav ul { list-style: none; display: flex; gap: 24px; margin: 0; padding: 0; }
.main-nav a { color: var(--color-text-muted); text-decoration: none; font-weight: 500; font-size: 15px; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--color-primary); }
.nav-toggle { display: none; background: none; border: 1.5px solid var(--color-border); border-radius: 10px; padding: 8px 10px; cursor: pointer; color: var(--color-text); }
.site-footer { background: var(--color-text); color: #EDE6F2; margin-top: var(--spacing-section); padding: 52px 0 28px; font-size: 15px; }
.site-footer a { color: #EDE6F2; text-decoration: none; opacity: .85; }
.site-footer a:hover { opacity: 1; color: #fff; text-decoration: underline; }
.footer-cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-cols h2 { font-size: 15px; color: #fff; margin: 0 0 12px; }
.footer-cols ul { list-style: none; padding: 0; margin: 0; }
.footer-cols li { margin: 6px 0; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.15); margin-top: 32px; padding-top: 18px; font-size: 13px; opacity: .8; }
.site-footer .logo { color: #fff; }

/* ===== 4. Page shell ===== */
.page-hero { position: relative; overflow: hidden; padding: 40px 0 28px; }
.page-hero::before { content: ""; position: absolute; width: 460px; height: 460px; border-radius: 50%; background: var(--color-accent); opacity: .28; right: -150px; top: -190px; pointer-events: none; }
.page-hero > * { position: relative; }
.container.page-hero { padding-left: 20px; padding-right: 20px; }
.breadcrumbs { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 14px; font-size: 14px; color: var(--color-text-muted); }
.breadcrumbs li { margin: 0; }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; opacity: .6; }
.breadcrumbs a { color: var(--color-text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--color-primary); }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 14px; color: var(--color-text-muted); margin: 6px 0 0; }
.byline a { color: var(--color-text); font-weight: 600; text-decoration: none; }
.verified { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #0B6E4C; background: #E8F6EF; padding: 4px 10px; border-radius: var(--radius-pill); }
.entry { padding-bottom: 20px; }
.entry > :where(p, ul, ol, h2, h3, h4, .table-wrap, .callout, .answer, figure, details, .wp-block-html) { max-width: var(--container-text); margin-left: auto; margin-right: auto; }
.entry > :where(p, ul, ol, h2, h3, h4) { padding-left: 20px; padding-right: 20px; }
.entry > .table-wrap, .entry > .callout, .entry > .answer { width: calc(100% - 40px); }

/* ===== 5. Content components ===== */
.answer { background: var(--color-surface); border: 1px solid var(--color-border); border-left: 5px solid var(--color-primary); border-radius: var(--radius-sm); padding: 18px 22px; font-size: 18px; margin-bottom: 1.4em; }
.answer p:last-child { margin: 0; }
.callout { background: var(--color-soft); border-radius: var(--radius-sm); padding: 18px 22px; margin: 1.4em auto; }
.callout-title { font-family: var(--font-heading); font-weight: 700; margin: 0 0 6px; }
.callout ul { margin: 0; padding-left: 20px; }
.table-wrap { overflow-x: auto; margin: 1.2em auto 1.6em; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--color-border); text-align: left; vertical-align: top; }
th { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--color-text-muted); background: #FFFBF8; }
td.n, th.n { text-align: right; white-space: nowrap; font-family: var(--font-heading); font-weight: 600; }
tr.tot td { background: var(--color-soft); font-weight: 700; font-size: 16px; }
tr.hl td { background: #FFF6D6; }
caption { caption-side: bottom; text-align: left; font-size: 13px; color: var(--color-text-muted); padding: 10px 14px; }
details.faq { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 14px; padding: 16px 20px; margin: 0 auto 10px; }
details.faq summary { font-family: var(--font-heading); font-weight: 700; cursor: pointer; list-style: none; }
details.faq summary::after { content: "+"; float: right; color: var(--color-primary); font-size: 22px; line-height: 1; }
details.faq[open] summary::after { content: "−"; }
details.faq p { margin: 10px 0 0; color: var(--color-text-muted); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; }
.chips a { display: inline-block; text-decoration: none; border: 1.5px solid var(--color-border); background: var(--color-surface); border-radius: var(--radius-pill); padding: 8px 16px; font-weight: 600; color: var(--color-text); font-size: 15px; }
.chips a:hover { border-color: var(--color-primary); color: var(--color-primary); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin: 1.2em 0; }
.card { display: block; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 20px; padding: 20px; text-decoration: none; color: var(--color-text); transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); color: var(--color-text); }
.card-title { display: block; font-family: var(--font-heading); font-weight: 700; font-size: 18px; margin-bottom: 4px; }
.card-text { display: block; font-size: 14px; color: var(--color-text-muted); }
.card-go { display: inline-block; margin-top: 8px; font-weight: 600; font-size: 14px; color: var(--color-primary); }
.author-box { display: flex; gap: 18px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 22px; margin: 2em auto; max-width: var(--container-text); }
.author-box .av { flex: 0 0 58px; height: 58px; border-radius: 50%; background: var(--color-primary); color: #fff; display: grid; place-items: center; font-family: var(--font-heading); font-weight: 800; font-size: 20px; }
.author-box p { font-size: 15px; color: var(--color-text-muted); margin: 0 0 6px; }
.sources { font-size: 14px; color: var(--color-text-muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--radius-pill); padding: 12px 22px; font-weight: 600; text-decoration: none; border: 2px solid var(--color-primary); background: var(--color-primary); color: var(--on-primary); cursor: pointer; font-size: 16px; font-family: var(--font-body); }
.btn:hover { background: var(--color-secondary); border-color: var(--color-secondary); color: #fff; }
.btn-ghost { background: transparent; color: var(--color-primary); }
.btn-ghost:hover { background: var(--color-soft); color: var(--color-secondary); }

/* ===== 6. Ads: reserved space, never above the calculator ===== */
.ad-slot { max-width: var(--container); margin: 28px auto; min-height: 280px; display: flex; align-items: center; justify-content: center; }
.ad-slot ins { display: block; width: 100%; }
.ad-label { display: block; text-align: center; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--color-text-muted); margin-bottom: 4px; }

/* ===== 7. Calculator ===== */
.calc-wrap { position: relative; overflow: hidden; padding: 36px 0 44px; }
.calc-wrap::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: var(--color-accent); opacity: .33; right: -160px; top: -200px; pointer-events: none; }
.calc-wrap::after { content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%; background: #FFB4A6; opacity: .3; left: -130px; bottom: -110px; pointer-events: none; }
.calc-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1.08fr; gap: 44px; align-items: start; }
.calc-intro .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: var(--radius-pill); background: rgba(29,20,38,.07); }
.calc-intro h1 { margin: 16px 0 12px; }
.calc-intro .lead { font-size: 18px; color: var(--color-text-muted); max-width: 480px; }
.ticks { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 8px; font-size: 15px; }
.ticks li { display: flex; gap: 10px; align-items: center; margin: 0; }
.ticks svg { color: var(--color-primary); flex: 0 0 18px; }
.calc { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.calc-tabs { display: flex; background: var(--color-soft); border-radius: var(--radius-pill); padding: 4px; margin: 0 0 16px; }
.calc-tabs button { flex: 1; border: 0; background: transparent; border-radius: var(--radius-pill); padding: 9px 6px; font: 600 14px var(--font-body); color: var(--color-text-muted); cursor: pointer; }
.calc-tabs button[aria-selected="true"] { background: var(--color-primary); color: #fff; }
.calc label, .calc .lbl { display: block; font-size: 13px; font-weight: 600; color: var(--color-text-muted); margin: 14px 0 6px; }
.calc input[type="text"], .calc input[type="number"], .calc select { width: 100%; border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-background); padding: 12px 14px; font: 500 17px var(--font-body); color: var(--color-text); }
.calc input:focus, .calc select:focus { border-color: var(--color-primary); outline: none; box-shadow: 0 0 0 3px rgba(207,58,36,.15); }
.money { position: relative; }
.money span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font: 700 22px var(--font-heading); color: var(--color-text-muted); }
.money input { font: 700 24px var(--font-heading) !important; padding-left: 38px !important; border-color: var(--color-primary) !important; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { display: flex; gap: 8px; }
.seg button { flex: 1; border: 1.5px solid var(--color-border); background: var(--color-surface); border-radius: 10px; padding: 9px 0; font: 600 15px var(--font-body); cursor: pointer; color: var(--color-text); }
.seg button[aria-pressed="true"] { border-color: var(--color-primary); background: var(--color-soft); }
.combo { position: relative; }
.combo-list { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none; background: #fff; border: 1px solid var(--color-border); border-radius: 12px; box-shadow: var(--shadow); max-height: 260px; overflow-y: auto; }
.combo-list li { margin: 0; padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 15px; }
.combo-list li[aria-selected="true"], .combo-list li:hover { background: var(--color-soft); }
.combo-list small { color: var(--color-text-muted); }
.more-toggle { background: none; border: 0; padding: 0; margin-top: 14px; font: 600 14px var(--font-body); color: var(--color-primary); cursor: pointer; }
.more-panel { border-top: 1px dashed var(--color-border); margin-top: 10px; padding-top: 4px; }
.check { display: flex !important; align-items: center; gap: 8px; color: var(--color-text) !important; font-weight: 500 !important; }
.result { margin-top: 18px; border-radius: 18px; background: var(--color-soft); padding: 18px 20px; }
.result small { font-size: 13px; font-weight: 600; color: var(--color-text-muted); }
.result-big { font: 800 44px/1.1 var(--font-heading); letter-spacing: -.02em; margin: 2px 0; }
.result-sub { font-size: 14px; color: var(--color-text-muted); }
.bar { display: flex; height: 12px; border-radius: var(--radius-pill); overflow: hidden; margin: 14px 0 10px; background: #eee; }
.bar i { display: block; height: 100%; transition: width .35s ease; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--color-text-muted); list-style: none; padding: 0; margin: 0; }
.legend li { margin: 0; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.calc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.calc-actions .btn { padding: 9px 16px; font-size: 14px; }
.calc-note { font-size: 13px; color: var(--color-text-muted); margin: 12px 0 0; }
.breakdown { margin-top: 26px; }
.breakdown h2 { margin-top: 0; }
.raise { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; }

/* ===== 8. Hub tables / lists ===== */
.ral-table td a { font-weight: 700; text-decoration: none; }
.toc { max-width: var(--container-text); margin: 0 auto 1.4em; padding: 14px 20px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-size: 15px; }
.toc summary { font-weight: 700; cursor: pointer; font-family: var(--font-heading); }
.toc ol { margin: 10px 0 0; padding-left: 20px; }

/* ===== 9. Responsive ===== */
@media (max-width: 900px) {
	.calc-intro .lead.keep { font-size: 16px; margin-bottom: 4px; }
	.calc-grid { grid-template-columns: 1fr; gap: 20px; }
	.calc-intro .ticks { display: none; }
	.calc-intro .lead { font-size: 16px; }
	.calc-wrap { padding: 18px 0 32px; }
	.footer-cols { grid-template-columns: 1fr 1fr; }
	.nav-toggle { display: inline-flex; }
	.main-nav { display: none; position: absolute; left: 0; right: 0; top: 66px; background: var(--color-surface); border-bottom: 1px solid var(--color-border); padding: 8px 20px 16px; }
	.main-nav.open { display: block; }
	.main-nav ul { flex-direction: column; gap: 4px; }
	.main-nav a { display: block; padding: 10px 0; font-size: 17px; }
}
@media (max-width: 520px) {
	/* calculator pages: the amount field and the result come first on phones */
	.calc-intro .eyebrow, .calc-intro .lead:not(.keep), .calc-intro .byline .verified, .calc-intro .byline a[href*="metodo"] { display: none; }
	.calc-intro h1 { font-size: 30px; margin: 4px 0 6px; }
	.calc-intro .byline { margin: 0; }
	.calc label, .calc .lbl { margin: 10px 0 5px; }
	.calc input[type="text"], .calc input[type="number"], .calc select { padding: 10px 12px; font-size: 16px; }
	.money input { font-size: 22px !important; }
	.seg button { padding: 8px 0; }
	body { font-size: 16px; }
	.calc { padding: 18px; border-radius: 20px; }
	.result-big { font-size: 38px; }
	.row2 { grid-template-columns: 1fr; gap: 0; }
	.calc-tabs button { font-size: 13px; padding: 9px 2px; }
	.footer-cols { grid-template-columns: 1fr; }
	table { font-size: 14px; }
	th, td { padding: 9px 8px; }
	th { font-size: 11px; letter-spacing: .02em; }
	caption { padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ===== 10. One reading column for custom data sections (matches Flash Blocks text sections) ===== */
.entry > section.container { padding-top: 48px; padding-bottom: 8px; }
.entry > section.container > :is(h2, h3, p, ul, ol, .callout, .answer) { max-width: 712px; margin-left: auto; margin-right: auto; }
.entry > section.container > h2:first-child { margin-top: 0; }
.entry > section.container > .table-wrap { max-width: 1000px; margin-left: auto; margin-right: auto; }
.entry > .author-box { margin-top: 48px; }
.entry > section.container > :is(nav, h1, .byline, details.toc) { max-width: 712px; margin-left: auto; margin-right: auto; }
.entry > section.container > figure { max-width: 1000px; margin: 8px auto 24px; }
.entry > section.page-hero { padding-top: 32px; }
