/* Svecchiata grafica per TheProfessional: stessa struttura, look piatto e moderno.
   Caricato prima di responsive.css (che gestisce lo smartphone). */
:root { --blue:#1d3a8a; --blue-dark:#14296a; --accent:#ee5f14; --logo-blue:#005cb8; --ink:#1f2937; --muted:#6b7280; --line:#e5e7eb; --bg:#f3f4f6; --radius:14px; }

body { background: var(--bg) !important; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important; font-size: 15px !important; line-height: 1.7 !important; color: var(--ink) !important; text-shadow: none !important; }
body * { text-shadow: none !important; }
a { color: var(--blue); transition: color .15s, background-color .15s, box-shadow .15s; }
a:hover { color: var(--accent); text-decoration: none; }
h1, h2, h3, h4, h5 { font-family: inherit !important; color: #111827; font-weight: 650; letter-spacing: -.01em; line-height: 1.3; }
.entry h1.title, .entry h2.title { font-size: 28px !important; }
.entry h3 { font-size: 20px; } .entry h4 { font-size: 17px; }
p { margin-bottom: 1em; }

/* Header e logo */
/* Header fisso: barra bianca a tutta larghezza, con monogramma e menu */
html, body { overflow-x: clip; }
#header { position: sticky; top: 0; z-index: 100; height: 64px !important; margin: 0 0 28px !important; padding: 0 !important; background: none !important; }
#header:before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); background: #fff; box-shadow: 0 1px 0 var(--line), 0 6px 18px rgba(17,24,39,.05); }
body.admin-bar #header { top: 32px; }
.logolink { position: absolute; left: 0; top: 50%; transform: translateY(-50%); margin: 0 !important; padding: 0; float: none !important; height: auto !important; width: auto !important; z-index: 2; }
.brand-link { display: block; line-height: 0; text-decoration: none !important; }
.brand-mark { display: block; width: 46px; height: 46px; transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.brand-link:hover .brand-mark { transform: rotate(-10deg) scale(1.08); }

/* Menu */
#menu { background: none !important; height: 64px !important; border-radius: 0; box-shadow: none; margin: 0 !important; position: relative; }
ul.nav { padding: 13px 0 0 68px !important; font-size: 14px !important; }
ul.nav li { margin-right: 2px !important; }
ul.nav li a { color: #374151 !important; font-weight: 500; padding: 8px 14px !important; border-radius: 8px; }
ul.nav > li > a:hover, ul.nav > li.sfHover > a, ul.nav li.selectedLava a { color: var(--blue) !important; background: #eef2fb; }
ul.nav > li.current_page_item > a, ul.nav > li.current-menu-item > a { color: var(--blue) !important; background: #eef2fb; }
ul.nav li.backLava { display: none !important; }
ul.nav li:hover ul, ul.nav li.sfHover ul { top: 44px !important; border: 0 !important; border-radius: 10px !important; background: #fff !important; box-shadow: 0 10px 30px rgba(17,24,39,.15) !important; padding: 8px !important; }
ul.nav ul li { background: none !important; margin: 0 !important; padding: 0 !important; }
ul.nav ul li a { background: none !important; width: auto !important; padding: 8px 12px !important; }

/* Slider home (hero) */
#hero { position: relative; margin: 0 0 30px; border-radius: var(--radius); overflow: hidden; background: #0f172a; box-shadow: 0 10px 30px rgba(17,24,39,.18); }
.hero-track { position: relative; height: 380px; }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility .7s; }
.hero-slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; border-radius: 0 !important; }
.hero-slide:after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,20,50,.94) 0%, rgba(10,20,50,.85) 35%, rgba(10,20,50,.35) 70%, rgba(10,20,50,0) 100%); pointer-events: none; }
.hero-caption { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 0 90px 44px 36px; max-width: 700px; color: #fff; }
.hero-caption h2 { margin: 0 0 8px; font-size: 30px !important; line-height: 1.2; }
.hero-caption h2 a { color: #fff !important; }
.hero-caption p { margin: 0 0 16px; color: #e5e7eb; font-size: 15px; line-height: 1.55; }
a.hero-btn { display: inline-block; background: var(--accent); color: #fff !important; border-radius: 999px; padding: 10px 22px; font-size: 14px; font-weight: 600; line-height: 1.2; }
a.hero-btn:hover { background: var(--blue); color: #fff !important; }
.hero-nav { position: absolute; z-index: 3; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(255,255,255,.92) no-repeat center / 14px; box-shadow: 0 4px 14px rgba(17,24,39,.25); cursor: pointer; opacity: 0; transition: opacity .2s; }
#hero:hover .hero-nav, .hero-nav:focus-visible { opacity: 1; }
.hero-prev { left: 14px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d3a8a' stroke-width='3'%3E%3Cpath d='M15 5l-7 7 7 7'/%3E%3C/svg%3E"); }
.hero-next { right: 14px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d3a8a' stroke-width='3'%3E%3Cpath d='M9 5l7 7-7 7'/%3E%3C/svg%3E"); }
.hero-dots { position: absolute; z-index: 3; right: 20px; bottom: 22px; display: flex; gap: 8px; }
.hero-dot { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 999px; background: rgba(255,255,255,.55); cursor: pointer; transition: width .25s, background .25s; }
.hero-dot.is-active { width: 26px; background: #fff; }
#hero button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Area contenuto */
#content-top, #content-bottom { display: none !important; }
#content { background: #fff !important; border-radius: var(--radius); box-shadow: 0 1px 3px rgba(17,24,39,.08), 0 6px 20px rgba(17,24,39,.06); padding: 8px 0 18px; }
.top-alt, .content-alt, .bottom-alt { background: none !important; }
#content.content-alt { background: #fff !important; }
#breadcrumbs { border-bottom: 1px solid var(--line) !important; font-family: inherit !important; font-style: normal !important; text-transform: none !important; font-size: 13px !important; padding: 14px 15px 14px 42px !important; }
#breadcrumbs span.sep { background: none !important; width: auto; height: auto; margin: 0 6px; }
#breadcrumbs span.sep:after { content: "›"; color: #9ca3af; }
.entry { padding-top: 30px !important; }
p.post-meta { font-family: inherit !important; font-style: normal !important; border-color: var(--line) !important; }
.hr-separator { background: var(--line) !important; }
.entry img, .post img { border-radius: 8px; }
.entry img[style*="border"], .post img[style*="border"] { border-color: var(--line) !important; }
div.thumb span.overlay { display: none; }
.wp-caption { background: #f9fafb; border-color: var(--line); border-radius: 8px; }

/* Servizi in home: tre schede allineate */
body#home #content:not(.content-alt) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding: 28px !important; }
body#home #content:not(.content-alt):after { display: none; }
div.service { float: none !important; width: auto !important; position: relative; box-sizing: border-box; display: flex; flex-direction: column; padding: 26px 24px 24px !important; background: #fff; border: 1px solid var(--line); border-radius: 12px; transition: box-shadow .2s, transform .2s, border-color .2s; }
div.service:hover { background: #fff; border-color: #d5dbe7; box-shadow: 0 12px 28px rgba(17,24,39,.1); transform: translateY(-2px); }
div.service h3.title { font-size: 19px !important; line-height: 1.3; min-height: 2.6em; margin: 0 0 4px; }
div.service h3.title a { color: #111827 !important; }
div.service span.tagline { font-family: inherit !important; font-style: normal !important; color: var(--muted) !important; letter-spacing: .04em; }
div.hr { background: none !important; height: 0 !important; width: 40px !important; margin: 4px 0 18px !important; border-top: 3px solid var(--accent); }
div.service img { float: none !important; display: block; width: 100% !important; max-width: 100%; height: 170px !important; object-fit: cover; margin: 0 0 18px !important; border-radius: 10px; border: 0 !important; }
div.service p { margin: 0 0 10px; color: #4b5563; font-size: 14px; line-height: 1.65; }
div.service p strong, div.service p b { color: #111827; font-size: 15px; line-height: 1.45; }
div.service p em { display: block; color: var(--muted); font-style: normal; font-size: 13px; margin: -4px 0 8px; }
div.service a:not(.readmore) { text-decoration: underline; text-decoration-color: #c7d2fe; text-underline-offset: 2px; }
#content a.readmore, div.service a.readmore { float: none !important; margin-top: auto !important; align-self: flex-start; display: inline-block !important; background: var(--accent) !important; color: #fff !important; border-radius: 999px; height: auto !important; line-height: 1 !important; padding: 10px 20px !important; font-size: 13px !important; font-weight: 600; box-shadow: none !important; text-decoration: none !important; }
#content a.readmore span { background: none !important; padding: 0 !important; height: auto !important; display: inline !important; }
#content a.readmore:after { content: " \2192"; }
#content a.readmore:hover { background: var(--blue) !important; color: #fff !important; }

/* Sidebar e widget */
#sidebar a { color: var(--blue) !important; }
.widget { background: none !important; border-top: 1px solid var(--line); padding: 22px 20px !important; }
.widget h3.widgettitle { background: none !important; color: #111827 !important; font-size: 16px !important; text-transform: uppercase; letter-spacing: .06em; padding: 0 0 10px !important; margin-left: 0 !important; }
.widget ul li { background: none !important; padding-left: 0 !important; }

/* Paginazione, commenti, form */
.wp-pagenavi a, .wp-pagenavi span { border-radius: 8px; }
input[type=text], input[type=email], input[type=url], textarea { border: 1px solid #d1d5db; border-radius: 8px; padding: 8px 10px; font-family: inherit; }
input[type=text]:focus, textarea:focus { outline: 2px solid #c7d2fe; border-color: var(--blue); }
input[type=submit], button[type=submit] { background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 9px 20px; font-weight: 600; cursor: pointer; }
input[type=submit]:hover, button[type=submit]:hover { background: var(--blue); }

/* Footer */
#footer { padding: 22px 0 36px; }
p#copyright { float: none !important; text-align: center; color: #9ca3af !important; font-size: 11px !important; margin: 0 !important; }
p#copyright a { color: #6b7280 !important; }

/* Ricerca nel menu */
#search-form { float: right; background: none !important; width: auto !important; height: auto !important; margin: 9px 12px 0 0 !important; }
#searchform { position: relative; display: block; width: 190px; }
#searchinput { float: none !important; display: block !important; box-sizing: border-box; width: 100% !important; height: 38px; margin: 0 !important; padding: 0 40px 0 16px !important; background: #f3f4f6 !important; border: 1px solid transparent !important; border-radius: 999px !important; font: 14px/1 inherit !important; font-family: inherit !important; font-style: normal !important; color: var(--ink) !important; -webkit-appearance: none; appearance: none; transition: border-color .15s, background .15s; }
#searchinput::placeholder { color: #9ca3af; }
#searchinput:focus { outline: none !important; background: #fff !important; border-color: var(--blue) !important; box-shadow: 0 0 0 3px #dbe4ff; }
#searchsubmit { float: none !important; position: absolute; right: 4px; top: 4px; width: 30px; height: 30px; margin: 0 !important; padding: 0 !important; border: 0; border-radius: 50%; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l4.5 4.5'/%3E%3C/svg%3E") no-repeat center / 16px; cursor: pointer; opacity: 1 !important; }
#searchsubmit:hover { background-color: #e5e7eb; }

/* ===== Pagine interne (senza sidebar) ===== */
div#sidebar { display: none !important; }
.content-alt div#content-area, div#content-area { width: 100% !important; float: none !important; padding: 0 !important; margin: 0 !important; }
#content.content-alt { padding: 0 0 24px; overflow: hidden; }
#breadcrumbs { padding: 18px 48px !important; background: #fafbfc; border-radius: var(--radius) var(--radius) 0 0; }
#breadcrumbs, #breadcrumbs a { color: var(--muted) !important; }
#breadcrumbs a:hover { color: var(--accent) !important; }
.entry, .content-alt .entry { padding: 36px 48px 12px !important; }
.entry h1.title, .entry h1 { font-size: 32px !important; margin-bottom: 18px; padding: 0 0 16px !important; border-bottom: 3px solid var(--accent); display: inline-block; letter-spacing: -.02em; }
.entry h2.title { font-size: 24px !important; border: 0; padding-bottom: 8px !important; }
.entry h2.title a { color: #111827; }
.entry h2.title a:hover { color: var(--blue); }
.post h3, .entry h3 { font-size: 21px; margin: 1.6em 0 .6em; color: var(--blue-dark); }
.post h4, .entry h4 { font-size: 17px; margin: 1.4em 0 .5em; }
.entry p, .entry ul, .entry ol, .entry blockquote { max-width: 78ch; }
.entry ul { list-style: none; margin: 12px 0 16px; padding: 0; }
.entry ul li { position: relative; padding: 4px 0 4px 22px; }
.entry ul li:before { content: ""; position: absolute; left: 4px; top: 15px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.entry ul li ul { margin: 2px 0 2px 6px; }
.entry ol { margin: 12px 0 16px 22px; list-style: decimal; list-style-position: outside; }
.entry ol li { padding: 3px 0 3px 4px; }
.entry blockquote { margin: 20px 0; padding: 14px 22px; border-left: 4px solid var(--accent); background: #fffaf4; border-radius: 0 10px 10px 0; color: #374151; }
.entry hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.entry table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 14px; }
.entry th { background: #f3f4f6; text-align: left; font-weight: 600; }
.entry th, .entry td { padding: 10px 12px; border: 1px solid var(--line); }
.entry tr:nth-child(even) td { background: #fafbfc; }
.entry a:not(.readmore):not(.hero-btn) { text-decoration: underline; text-decoration-color: #c7d2fe; text-underline-offset: 3px; }
.entry a:not(.readmore):hover { text-decoration-color: var(--accent); }
.entry img.alignleft, .entry .alignleft { margin: 4px 24px 12px 0; }
.entry img.alignright, .entry .alignright { margin: 4px 0 12px 24px; }
.entry img { box-shadow: 0 1px 4px rgba(17,24,39,.12); }
.entry img.wp-smiley, .entry img.emoji { box-shadow: none; }
.entry .readmore { margin-top: 6px; }

/* Elenchi di articoli / risultati di ricerca */
#content-area > .entry.clearfix { border-bottom: 1px solid var(--line); }
#content-area > .entry.clearfix:last-of-type { border-bottom: 0; }
p.post-meta { border: 0 !important; padding: 0 !important; margin: 0 0 12px !important; color: var(--muted) !important; font-size: 13px !important; text-transform: none !important; }
p.post-meta a { color: var(--muted) !important; text-decoration: underline; }
.entry.page-nav { padding-top: 12px !important; }
.pagination { padding: 0; display: flex; justify-content: space-between; gap: 12px; }
.pagination a { display: inline-block; padding: 9px 18px; border-radius: 999px; background: var(--accent); color: #fff !important; font-weight: 600; text-decoration: none; }
.pagination a:hover { background: var(--blue); color: #fff !important; }
.pagination .alignleft, .pagination .alignright { float: none; }

/* Nessun risultato */
.entry h1:only-child, .entry > h1 { margin-bottom: 8px; }

/* Commenti */
#comment-wrap, #commentsbox { margin-top: 8px; }
.comment-wrap { border: 1px solid var(--line) !important; border-radius: 10px; background: #fff !important; }
.comment-content, .comment-content p { font-size: 14px; }
#commentform label { font-size: 13px; color: var(--muted); }
#commentform input[type=text], #commentform textarea { width: 100% !important; box-sizing: border-box; max-width: 560px; }

/* Gallerie NextGEN */
.ngg-galleryoverview { overflow: hidden; }
.ngg-gallery-thumbnail-box { margin: 0 !important; padding: 0 12px 12px 0; box-sizing: border-box; }
.ngg-gallery-thumbnail img, .ngg-gallery-thumbnail-box img { border: 0 !important; border-radius: 10px !important; box-shadow: 0 2px 8px rgba(17,24,39,.15) !important; padding: 0 !important; background: #fff !important; transition: transform .2s, box-shadow .2s; }
.ngg-gallery-thumbnail a:hover img { transform: translateY(-3px) scale(1.02); box-shadow: 0 10px 24px rgba(17,24,39,.25) !important; }
.ngg-gallery-thumbnail { box-shadow: none !important; }
.ngg-navigation { margin: 12px 0; }
.ngg-navigation a, .ngg-navigation span { border-radius: 8px !important; }
.ngg-albumoverview .ngg-album { border: 1px solid var(--line) !important; border-radius: 12px; }

/* Mappe */
.mapp-layout, .mapp-canvas { border-radius: 12px; overflow: hidden; }
.entry blockquote { overflow: hidden; font-style: normal; }
.entry blockquote ul { margin: 0; max-width: none; }
.entry blockquote ul li { padding: 0; }
.entry blockquote ul li:before { display: none; }
.entry blockquote img.alignleft { margin: 2px 22px 8px 0; }

/* Pagina Contatti */
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 8px 0 28px; max-width: 860px; }
.contact-card { border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px 12px; background: #fff; }
.contact-card h3 { margin: 0 0 12px !important; font-size: 13px !important; text-transform: uppercase; letter-spacing: .08em; color: var(--muted) !important; }
.contact-card p { margin: 0 0 12px; max-width: none; }
.contact-card .c-name { font-size: 20px; font-weight: 650; color: #111827; }
.contact-card .c-name span { color: var(--accent); font-weight: 600; }
.contact-card a.c-link { font-weight: 600; word-break: break-all; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.entry .mapp-layout { width: 100% !important; max-width: 860px; }
.entry .mapp-canvas { width: 100% !important; }

/* Normalizzazione dei contenuti vecchi (stili inline) */
.entry [style*="font-size"] { font-size: inherit !important; }
.entry [style*="font-family"] { font-family: inherit !important; }
.entry address { font-style: normal; margin: 0 0 1em; }
.entry ul, .entry ol { display: flow-root; }
.entry p, .entry li { color: #374151; }
.entry strong, .entry b { color: #111827; }

/* Titoli dentro ai contenuti: colori e filetti uniformi */
.entry h2 [style*="color"], .entry h3 [style*="color"], .entry h4 [style*="color"], .entry h2[style*="color"], .entry h3[style*="color"], .entry h4[style*="color"] { color: inherit !important; }
.post h2:not(.title), .entry > h2:not(.title) { font-size: 24px !important; margin: 1.8em 0 .7em; padding: 0 0 10px; border-bottom: 2px solid var(--line); color: #111827 !important; }
.post h2:not(.title):first-child { margin-top: 0; }
.entry h4 { color: #111827; }
.entry img[src$=".pdf"], .entry a img[src*="pdf"] { box-shadow: none; }

/* Pagina Download */
.dl-list { display: grid; gap: 16px; margin: 8px 0 24px; max-width: 860px; }
.dl-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; border: 1px solid var(--line); border-radius: 12px; padding: 20px 24px; background: #fff; transition: box-shadow .2s, border-color .2s; }
.dl-card:hover { box-shadow: 0 8px 24px rgba(17,24,39,.08); border-color: #d5dbe7; }
.dl-card h3 { margin: 0 0 6px !important; font-size: 17px !important; color: #111827 !important; }
.dl-card p { margin: 0 0 6px; font-size: 14px; max-width: none; }
.dl-note { color: var(--muted) !important; font-size: 13px !important; }
a.dl-btn { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: #fff !important; text-decoration: none !important; border-radius: 999px; padding: 11px 20px; font-size: 14px; font-weight: 600; }
a.dl-btn:before { content: ""; width: 16px; height: 16px; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M7 11l5 5 5-5M5 20h14'/%3E%3C/svg%3E"); }
a.dl-btn:hover { background: var(--blue); }
@media (max-width: 700px) { .dl-card { flex-direction: column; align-items: flex-start; } }
a.dl-btn { white-space: nowrap; }

/* Tile (sezione Tempo libero) e testo introduttivo */
.entry p.lead { font-size: 18px; line-height: 1.65; color: #374151 !important; max-width: 70ch; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; margin: 12px 0 32px; }
a.tile { display: block; border-radius: 12px; overflow: hidden; background: #fff; border: 1px solid var(--line); box-shadow: 0 1px 3px rgba(17,24,39,.06); transition: transform .2s, box-shadow .2s; text-decoration: none !important; }
a.tile img { display: block; width: 100%; height: auto; margin: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
a.tile:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(17,24,39,.15); }

/* Chi sono */
.profile { display: flex; align-items: center; gap: 32px; margin: 4px 0 8px; padding: 28px 32px; background: #f8fafc; border: 1px solid var(--line); border-radius: 16px; max-width: 860px; }
.entry .profile img.profile-photo { flex: 0 0 auto; width: 150px; height: 150px; object-fit: cover; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 6px 20px rgba(17,24,39,.2); margin: 0; }
.profile-text p { margin: 0 0 10px; max-width: none; }
.profile-text p.lead { font-size: 22px; line-height: 1.35; color: #111827 !important; margin-bottom: 12px; }
.profile-text p:last-child { margin-bottom: 0; }
ul.timeline { max-width: 860px; margin: 18px 0 20px; padding: 0 0 0 4px; border-left: 2px solid var(--line); }
ul.timeline li { display: flex; gap: 18px; align-items: baseline; padding: 8px 0 8px 24px; position: relative; }
ul.timeline li:before { left: -6px; top: 17px; width: 10px; height: 10px; border: 2px solid #fff; background: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
ul.timeline .yr { flex: 0 0 52px; font-weight: 700; color: var(--blue); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); font-size: 13px; }
.contact-grid.cta { margin-top: 28px; }
@media (max-width: 700px) { .profile { flex-direction: column; text-align: center; padding: 22px; } ul.timeline li { gap: 12px; } }
.entry .profile img.profile-photo { width: 190px; height: 190px; border-radius: 20px; object-position: 45% 22%; }
ul.timeline { border-left: 2px solid #d1d5db !important; margin-left: 6px; } ul.timeline li:before { left: -7px; }
ul.timeline li:before { box-sizing: border-box !important; width: 12px !important; height: 12px !important; left: -11px !important; top: 15px !important; border: 2px solid #fff !important; background: var(--accent) !important; box-shadow: 0 0 0 1px var(--accent) !important; border-radius: 50%; }

/* ===== Articolo ===== */
.article { padding-top: 40px !important; }
.article-head { max-width: 820px; margin: 0 auto 8px; }
.article-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.article-cats a { background: #eef2fb; color: var(--blue) !important; border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; text-decoration: none !important; }
.article-cats a:hover { background: var(--blue); color: #fff !important; }
.article .article-head h1.title { display: block; border: 0 !important; font-size: 38px !important; line-height: 1.15; margin: 0 0 14px; padding: 0 !important; letter-spacing: -.025em; }
.article-meta { color: var(--muted); font-size: 14px; margin: 0 0 8px !important; max-width: none !important; }
.article-meta .dot { margin: 0 6px; }
.article-cover { margin: 24px auto 8px; max-width: 980px; }
.article-cover img { width: 100%; height: auto; border-radius: 14px; box-shadow: 0 10px 30px rgba(17,24,39,.15); }
.article-body { max-width: 820px; margin: 24px auto 0; font-size: 17px; line-height: 1.8; }
.article-body p, .article-body ul, .article-body ol, .article-body blockquote { max-width: none; }
.article-body > p:first-child { font-size: 19px; color: #1f2937; }
.article-body h2 { font-size: 26px !important; margin: 1.8em 0 .6em; border: 0; padding: 0; }
.article-body h3 { font-size: 21px; }
.article-body img { max-width: 100%; height: auto; }
.article-tags, .article-share, .author-box, .post-nav { max-width: 820px; margin-left: auto; margin-right: auto; }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.article-tags a { background: #f3f4f6; color: #4b5563 !important; border-radius: 999px; padding: 4px 12px; font-size: 13px; text-decoration: none !important; }
.article-tags a:hover { background: var(--accent); color: #fff !important; }
.article-share { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 24px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; }
.article-share span { color: var(--muted); margin-right: 4px; }
.article-share a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; color: #374151 !important; font-weight: 600; text-decoration: none !important; }
.article-share a:hover { border-color: var(--blue); color: var(--blue) !important; }
.author-box { display: flex; gap: 18px; align-items: flex-start; background: #f8fafc; border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; margin-top: 28px; }
.ab-avatar { flex: 0 0 52px; height: 52px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 700; letter-spacing: .02em; }
.author-box strong { font-size: 16px; }
.author-box p { margin: 4px 0 0; font-size: 14px; color: #4b5563; max-width: none; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.post-nav a { display: block; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; text-decoration: none !important; transition: border-color .2s, box-shadow .2s; }
.post-nav a:hover { border-color: var(--blue); box-shadow: 0 8px 20px rgba(17,24,39,.08); }
.post-nav small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.post-nav span { color: #111827; font-weight: 600; line-height: 1.35; }
.post-nav .pn-next { text-align: right; grid-column: 2; }
.single-post .entry.post ~ * { }

/* Articoli correlati + card */
.related { padding: 8px 48px 36px; border-top: 1px solid var(--line); margin-top: 20px; background: #fafbfc; border-radius: 0 0 var(--radius) var(--radius); }
.related h2 { font-size: 22px !important; margin: 28px 0 18px; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.post-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.post-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(17,24,39,.12); }
.pc-media { display: block; aspect-ratio: 16 / 10; background: #e5e7eb; overflow: hidden; }
.pc-media img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0 !important; box-shadow: none !important; margin: 0 !important; }
.pc-ph { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #dbe4ff, #fde3c8); }
.pc-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pc-cat { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.pc-body h3 { margin: 0 !important; font-size: 17px !important; line-height: 1.3; color: #111827 !important; }
.pc-body h3 a { color: inherit !important; text-decoration: none !important; }
.pc-body h3 a:hover { color: var(--blue) !important; }
.pc-body p { margin: 0; font-size: 14px; color: #4b5563; max-width: none; }
.pc-date { margin-top: auto; padding-top: 6px; color: var(--muted); font-size: 12px; }

/* Elenco articoli (archivi, categorie, ricerca) */
.list-item { display: grid !important; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: start; padding: 28px 48px !important; }
.li-media { display: block; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #e5e7eb; }
.li-media img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0 !important; box-shadow: none !important; }
.li-meta { margin: 0 0 6px !important; font-size: 13px; color: var(--muted); }
.list-item h2.title { margin: 0 0 8px; font-size: 22px !important; padding: 0 !important; }
.list-item p { max-width: none; }
.list-item a.readmore { float: none !important; }
@media (max-width: 900px) {
  .article .article-head h1.title { font-size: 28px !important; }
  .article-body { font-size: 16px; }
  .related { padding: 8px 16px 24px; }
  .card-grid { grid-template-columns: 1fr; }
  .list-item { grid-template-columns: 1fr; gap: 14px; padding: 20px 16px !important; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .pn-next { grid-column: auto; }
  .author-box { padding: 18px; }
}
.archive-head { padding: 32px 48px 4px; }
.archive-head h1 { font-size: 32px !important; margin: 0; letter-spacing: -.02em; }
.archive-desc { color: var(--muted); margin-top: 6px; }
.archive-desc p { margin: 0; }
@media (max-width: 900px) { .archive-head { padding: 22px 16px 0; } .archive-head h1 { font-size: 26px !important; } }

/* Immagini grandi nei contenuti */
.entry img.tp-wide, .article-body img.tp-wide { display: block; float: none !important; width: 100% !important; max-width: min(100%, var(--nw, 100%)) !important; height: auto !important; object-fit: contain; margin: 22px 0 !important; border-radius: 12px; box-shadow: 0 6px 22px rgba(17,24,39,.12); }
.entry a > img.tp-wide { margin: 22px 0 !important; }
.article-head, .article-body, .article-tags, .article-share, .author-box, .post-nav { max-width: 880px; }
.article-cover { max-width: 1000px; }
.entry .wp-caption { max-width: 100% !important; width: auto !important; }
div.service img { height: 190px !important; }
