/* =====================================================================
   PELLE MH — CSS di famiglia (grafica di oggi delle testate su MH Newsdesk).
   Base: style.css di MH Newsdesk 1.2.2 (GPL v2+, MH Themes) + CSS del Customizer delle testate
   (parti vive, vedi catalogo sez. B.7), adattati al markup della pelle e al box-sizing del motore.
   Caricato SOLO con la pelle attiva (inc/skins.php); style.css del tema resta sotto: qui lo si sovrascrive.
   Colori per testata: variabili --mh-* (inline da config della pelle) + css/<slug>.css.
   Font self-hosted (OFL): Oswald (variabile 300-700) e PT Serif 400/400i/700, solo latin.
   ===================================================================== */

@font-face { font-family: 'Oswald'; src: url('../fonts/oswald-var.woff2') format('woff2'); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'PT Serif'; src: url('../fonts/pt-serif-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'PT Serif'; src: url('../fonts/pt-serif-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'PT Serif'; src: url('../fonts/pt-serif-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --mh-accent: #005a8c;          /* blu di sistema MH */
  --mh-accent-alt: #ccdee8;      /* fondo barre titolo */
  --mh-nav: #4d4e50;
  --mh-nav-active: #ce071e;
  --mh-nav-active-bg: #000;
  --mh-comuni: #005a8c;
  --mh-red: #cc071e;
  --mh-text: #1f1e1e;
  --mh-bg: #efefef;
  --mh-wrapper-max: 1040px;      /* 1000 di contenuto + 2x20 di padding (gabbia per la skin, Customizer) */
  --mh-top-gap: 16%;             /* spazio sopra la gabbia, desktop: area della skin pubblicitaria */
  --mh-footer-col-h: 655px;
  --mh-head: 'Oswald', Helvetica, Arial, sans-serif;
  --mh-body: 'PT Serif', Georgia, Times, 'Times New Roman', serif;
}

/* ---------- Base / reset (sovrascrive style.css del motore) ---------- */
html { font-size: 100%; -webkit-text-size-adjust: none; text-size-adjust: none; }
body { margin: 0; font-family: var(--mh-body); font-size: 16px; line-height: 1.6; color: #000; background: var(--mh-bg); word-wrap: break-word; }
h1, h2, h3, h4, h5, h6 { margin: 0; line-height: 1.3; font-weight: 400; color: var(--mh-text); font-family: var(--mh-head); }
h1 { font-size: 2.25rem; } h2 { font-size: 1.75rem; } h3 { font-size: 1.5rem; } h4 { font-size: 1.25rem; } h5 { font-size: 1rem; } h6 { font-size: .875rem; }
p, ul, ol, figure, blockquote, dl { margin: 0; padding: 0; }
ul, ol { list-style: none; }
b, strong { font-weight: 700; }
a { color: var(--mh-text); text-decoration: none; transition: color .3s; }
a:hover { color: var(--mh-accent); text-decoration: none; }
img { max-width: 100%; width: auto; height: auto; vertical-align: bottom; }
iframe, embed, object, video { max-width: 100%; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.clearfix:after, .mh-group:after { content: ""; display: table; clear: both; }
.mh-group:before { content: ""; display: table; }
.clear { clear: both; }
.mh-separator { margin: 8px 0 20px; padding-bottom: 10px; border: 0; border-bottom: 1px dotted #cdcdcd; height: 0; }
.breadcrumb, .menu-item, .button, .pagination, .widget-title, .page-title, .entry-title, .post-nav-wrap, .rpwwt-post-title { font-family: var(--mh-head); }

/* ---------- Gabbia ---------- */
#mh-wrapper { position: relative; width: 90%; max-width: var(--mh-wrapper-max); margin: 0 auto; padding: 0 20px 20px; background: #fff; }
@media (min-width: 769px) { #mh-wrapper { margin-top: var(--mh-top-gap); } }
.wrapper-inner { width: 90%; max-width: 1180px; margin: 0 auto; }
.mh-section { clear: both; padding: 0; margin: 0; }
#main-content { display: block; float: left; width: 65.83%; margin-right: 2.5%; overflow: hidden; }
.mh-sidebar, .home-sidebar { display: block; float: left; width: 31.66%; }
.mh-col { display: block; float: left; margin-left: 2.5%; }
.mh-col:first-child { margin-left: 0; }
.mh-1-2 { width: 48.75%; } .mh-2-3 { width: 65.83%; } .mh-1-3 { width: 31.66%; } .mh-1-4 { width: 23.125%; }
.mh-home-row--cols .mh-home-col { width: 48.07%; }
.mh-home-row--cols .mh-home-col-2 { margin-left: 3.86%; }

/* ---------- Testata ---------- */
.mh-header { margin-bottom: 30px; }
.header-wrap { padding: 20px 0; }
.header-wrap:after { content: ""; display: table; clear: both; }
.header-wrap--under { padding: 0; }
.header-logo { width: 31.66%; }
.logo-wrap img { display: block; max-width: 100%; height: auto; }
.logo-title { font-size: 2.625rem; color: var(--mh-accent); font-weight: 700; text-transform: uppercase; }
.header-ad { text-align: right; }
.header-ad .tu-slot { margin: 0 0 0 auto; }
.mh-menu-toggle { display: none; }

.main-nav { background: var(--mh-nav); text-transform: uppercase; }
.main-nav ul.menu { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.main-nav li { position: relative; border-left: 1px solid #424242; transition: background .3s; }
.main-nav li:first-child { border-left: 0; }
.main-nav li:hover { background: var(--mh-accent); }
.main-nav li a { display: block; color: #fff; padding: .625rem .6375rem; }
.main-nav li a:hover { color: #fff; }
.main-nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; z-index: 9999; font-size: .75rem; background: #2a2a2a; }
.main-nav .sub-menu li { width: 13em; border: 0; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: block; }
/* menu Categorie: voce attiva/hover nero + rosso (Customizer della testata) */
#menu-categorie li:hover, #menu-categorie .current-menu-item, #menu-categorie .current-menu-parent { background: var(--mh-nav-active-bg); }
#menu-categorie .current-menu-item > a, #menu-categorie li a:hover { background: var(--mh-nav-active-bg); color: var(--mh-nav-active); }
/* barra Comuni */
ul#menu-comuni { width: 100%; background: var(--mh-comuni); }
#menu-comuni li a { font-size: 13px; padding: 5px 4px; }
#menu-comuni li:hover { background: var(--mh-comuni); }

.header-sub { display: block; padding: 10px; text-transform: uppercase; overflow: hidden; background: #efefef; }
.header-search { float: right; }
.search-form { margin: 0; }
.header-search .search-form { float: right; }
.search-form label { display: block; margin: 0; }
.search-form .search-submit { display: none; }
.search-form .search-field { min-width: 200px; font-family: var(--mh-body); font-size: 11px; line-height: 1; color: var(--mh-text); text-transform: uppercase; background: #fff; border: 1px solid #cdcdcd; margin: 0; padding: 10px; -webkit-appearance: none; border-radius: 0; transition: min-width .5s; }
.search-form .search-field:hover, .search-form .search-field:focus { min-width: 240px; }
.sb-widget .search-form { display: block; padding: 5%; background: #efefef; }
.sb-widget .search-form .search-field { display: block; width: 90%; margin: 0 auto; }

/* ---------- Barre titolo dei widget ---------- */
.sb-widget { margin-bottom: 30px; overflow: hidden; }
.widget-title { font-size: .875rem; font-weight: 400; color: #fff; background: var(--mh-accent-alt); padding: 20px 0; margin-bottom: 20px; text-transform: uppercase; overflow: hidden; }
.widget-title span { padding: 20px; background: var(--mh-accent); }
.widget-title a, .widget-title a:hover { color: #fff; }

/* ---------- Meta, pulsanti ---------- */
.entry-meta { font-size: .75rem; margin-bottom: 5px; text-transform: uppercase; font-family: var(--mh-body); }
.entry-meta a, .entry-meta .entry-meta-author { color: var(--mh-accent); font-weight: 700; }
.entry-meta a:hover { text-decoration: underline; }
.entry-meta-cats { margin-right: 10px; }
.button { display: block; }
.button span { display: inline-block; font-size: .875rem; color: var(--mh-red); background: transparent; padding: 0; margin: 15px 0 10px; text-transform: uppercase; }
.button span:hover { text-decoration: underline; }
.mh-image-placeholder { display: block; width: 100%; aspect-ratio: 16 / 9; background: #e3e3e3; }

/* ---------- Card: lead (MH Posts Large / primo articolo di categoria) ---------- */
.content-thumb { margin-bottom: 5px; }
.content-thumb img { display: block; width: 100%; }
.content-lead-thumb img { aspect-ratio: 777 / 437; object-fit: cover; }
.content-lead .entry-meta-date { display: none; }
.content-lead-title { font-size: 2.375rem; margin-bottom: 10px; }
.home-columns .mh-fp-large-widget, .home-columns .mh-fp-grid-widget { margin-bottom: -20px; }
.home-columns .mh-fp-grid-widget { margin-top: -10px; }

/* ---------- Card: XL e piccola (MH Custom Posts) ---------- */
.cp-thumb-xl { margin-bottom: 5px; }
.cp-thumb-xl img { display: block; width: 100%; aspect-ratio: 373 / 210; object-fit: cover; }
.cp-title-xl { font-size: 2.25rem; }
.cp-excerpt-xl { margin-top: 20px; }
.cp-small { padding-bottom: 4px; }
.cp-thumb-small { float: left; max-width: 120px; margin: 0 20px 0 0; }
.cp-title-small { font-size: 1rem; overflow: hidden; }
.mh-cp-widget .mh-separator:last-child { margin-bottom: 0; }

/* ---------- Card: griglia (MH Posts Grid / archivio) ---------- */
.content-grid { margin-top: 10px; margin-bottom: 10px; }
.content-grid-title { font-size: 1rem; }
.content-grid-separator { display: none; }
.content-grid-thumb img { aspect-ratio: 180 / 101; object-fit: cover; }
@media (min-width: 768px) { .content-grid-thumb a { display: block; max-height: 101px; overflow: hidden; } }
.category .content-grid .entry-meta { display: none; }
.infeed-ad { clear: both; }
.infeed-ad + .content-grid { margin-left: 0; }

/* ---------- Card: lista (archivi, ricerca, autore) ---------- */
.content-list { margin-top: 30px; }
.archive-list .content-list:first-child { margin-top: 10px; }
.content-list-thumb { float: left; max-width: 260px; margin: 0 20px 10px 0; }
.content-list-thumb img { aspect-ratio: 260 / 146; object-fit: cover; }
.content-list-title { font-size: 1.5rem; margin-bottom: 10px; }
.content-list-excerpt { overflow: hidden; }
.content-list-separator { clear: both; }

/* ---------- Liste con miniatura (Recent Posts Widget With Thumbnails) ---------- */
.rpwwt-widget ul { list-style: none; margin: 0; padding: 0; }
.rpwwt-widget ul li { overflow: hidden; margin: 0; }
.rpwwt-widget ul li img { display: inline; float: left; width: 50px; height: 50px; object-fit: cover; margin: .3em 7px 5px 0; }
/* Miniature 75 px (widget RPWWT con thumb 75x75 in produzione): classe di blocco 'mh-thumbs-75' in config */
.mh-thumbs-75 .rpwwt-widget ul li img { width: 75px; height: 75px; }
.rpwwt-widget .rpwwt-post-title { font-family: var(--mh-head); }
.mh-block--posts.mh-necrologi { margin-top: 30px; }

/* ---------- "Ultime notizie" sotto l'articolo: 2 colonne, titolo sovrapposto ---------- */
.ultime-notizie ul li { width: calc(50% - 10px); float: left; overflow: visible; margin: 5px; }
.ultime-notizie ul li:nth-child(odd) { clear: left; }
.ultime-notizie a { position: relative; float: left; padding: 5px; box-shadow: 0 1px 2px rgb(0 0 0 / 40%); border-radius: 7px; }
.ultime-notizie a img { float: none; display: block; width: 100%; height: auto; margin: 0; }
.ultime-notizie .rpwwt-post-title { position: absolute; left: 0; bottom: 0; display: block; box-sizing: border-box; width: 100%; padding: 10px; font-size: .9em; color: #fff !important; text-shadow: .1em .1em .2em #000; background: rgba(0, 0, 0, .5); }

/* ---------- Eventi (blocco della home) ---------- */
.fo-events__list { display: block; }
.fo-event-row { display: grid; grid-template-columns: 72px 130px minmax(0, 1fr); gap: 18px; align-items: center; padding: 18px 0; border-bottom: 1px solid #e5e7eb; }
.fo-event-row__date { text-align: center; color: var(--mh-accent); font-weight: 700; text-transform: uppercase; font-family: var(--mh-head); }
.fo-event-row__date span { display: block; font-size: 2rem; line-height: 1; }
.fo-event-row__image { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #eef0f3; }
.fo-event-row__image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fo-event-row h3 { margin: 0 0 6px; font-size: 1.12rem; line-height: 1.32; }
.fo-event-row h3 a { color: #20242a; }
.fo-event-row h3 a:hover { color: var(--mh-accent); }
.fo-event-row p { margin: 0; color: #6b7280; }

/* ---------- Breadcrumb e titoli di pagina ---------- */
.breadcrumb { font-size: .875rem; margin-bottom: 20px; text-transform: uppercase; }
.breadcrumb a, .breadcrumb .bc-text { display: inline-block; color: var(--mh-text); background: transparent; padding: 0 10px; }
.breadcrumb a:hover { color: var(--mh-text); text-decoration: underline; }
.breadcrumb .bc-home { padding: 0 10px 0 0; color: var(--mh-text); }
.breadcrumb > span:first-child:after { content: '\00bb'; display: inline-block; }
.entry-header .entry-title, .page-title { font-size: 2.375rem; margin-bottom: 20px; }

/* ---------- Articolo ---------- */
.entry-thumbnail { margin-bottom: 20px; }
.entry-thumbnail img { display: block; width: 100%; aspect-ratio: 777 / 437; object-fit: cover; }
.wp-caption-text { display: block; font-size: .875rem; color: #454545; line-height: 1.4; margin: 5px 0 20px; }
.mh-author-box { margin-bottom: 30px; }
.author-box2 { display: inline-block; width: 100%; padding: 10px; background: #efefef; }
.author-box-avatar2 { float: left; width: 50px; height: 50px; margin-right: 20px; }
.author-box-avatar2 img { width: 50px; height: 50px; object-fit: cover; }
.author-box2 .author-box-name { margin-top: 10px; font-family: var(--mh-head); font-size: 1rem; color: var(--mh-text); }
.entry-content { font-size: 18px; line-height: 1.4; }
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5, .entry-content h6,
.entry-content p, .entry-content blockquote, .entry-content table, .entry-content figure, .entry-content .wp-block-embed { margin-bottom: 20px; }
.entry-content h2 { font-size: 24px; }
.entry-content a { font-weight: 600; color: var(--mh-accent); }
.entry-content a:hover { text-decoration: underline; }
.entry-content ul { list-style: square; margin: 0 0 30px 40px; }
.entry-content ol { list-style: decimal; margin: 0 0 30px 40px; }
.entry-content blockquote { display: inline-block; font-size: .9375rem; line-height: 1.6; color: var(--mh-accent); margin: 10px 20px 20px; padding: 20px 20px 0; border-left: 5px solid var(--mh-accent); }
.entry-content .tu-slot { clear: both; }
.alignnone { display: block; margin: 20px 0; }
.aligncenter { display: block; margin: 20px auto; }
.alignleft { display: inline; float: left; margin: 5px 20px 20px 0; }
.alignright { display: inline; float: right; margin: 5px 0 20px 20px; }
.wp-caption { max-width: 100%; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content table th { color: #fff; background: var(--mh-accent); padding: 10px; }
.entry-content table td { font-size: .75rem; border: 1px solid #ebebeb; padding: 10px; text-align: center; vertical-align: middle; }
.entry-content table tr:nth-child(odd) { background: #eae9e8; }

/* bio autore a fine testo (box "ebo-author-bio" della testata) */
.ebo-author-bio { margin: 1.5rem 0 1.25rem; padding: 1rem 0; border-top: 2px solid #0d6594; border-bottom: 1px solid #d8e2e8; color: #222; }
.ebo-author-bio__eyebrow { margin: 0 0 .2rem; color: #111; font: 600 14px/1.3 var(--mh-head); letter-spacing: .02em; text-transform: uppercase; }
.ebo-author-bio__name { margin: 0 0 .35rem; font: 600 20px/1.3 var(--mh-head); }
.ebo-author-bio__name a, .ebo-author-bio__articles a { color: #0d6594; font-weight: 600; }
.ebo-author-bio__description { font-size: 16px; line-height: 1.55; }
.ebo-author-bio__description p { margin: .35rem 0 0; }
.ebo-author-bio__articles { margin: .7rem 0 0; font-size: 14px; font-weight: 600; }

/* tag a fine articolo: .entry-tags è l'ancora xpath dei placement ADV del gruppo */
.entry-tags { display: block; overflow: hidden; font-size: .9375rem; margin-bottom: 20px; }
.entry-tags span { font-weight: 900; margin-right: 15px; }
.entry-tags a { display: inline-block; margin: 0 15px 5px 0; text-transform: capitalize; font-weight: 400; color: var(--mh-text); }
.entry-tags a:hover { text-decoration: underline; color: var(--mh-text); }

/* neutralizza lo stile "pillole" dei tag del motore (style.css .tu-tags) */
.entry-tags.tu-tags { margin-top: 0; font-family: var(--mh-body); }
.entry-tags.tu-tags a { background: none; padding: 0; border-radius: 0; }

/* box dei moduli del motore (Scarica l'app, Abbonati, più letti…) nello stile MH */
.tu-module-box, .tu-module-block { margin: 0 0 30px; }
.tu-module-box { padding: 20px; background: #efefef; }
.tu-module-box-title, .tu-module-title { font-family: var(--mh-head); font-size: 1.25rem; margin-bottom: 10px; }
.tu-module-box-text { margin-bottom: 10px; }
.tu-app-links { display: flex; gap: 10px; flex-wrap: wrap; }
.tu-btn { display: inline-block; padding: 10px 15px; font-family: var(--mh-head); text-transform: uppercase; font-size: .875rem; color: #fff; background: var(--mh-accent); }
.tu-btn:hover { color: #fff; background: var(--mh-text); }
.tu-module-list li { padding: 10px 0; border-bottom: 1px dotted #dcdcdc; font-family: var(--mh-head); }
.tu-module-meta { color: #909090; font-size: .8em; }

/* condivisione (al posto di AddToAny) */
.mh-share { clear: both; margin: 10px 0 20px; }
.addtoany_header { margin: 0 0 .5rem; font-family: var(--mh-head); font-size: 20px; line-height: 1.3; }
.mh-share-list { display: flex; flex-wrap: wrap; gap: 4px; }
.mh-share-list a { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 4px; color: #fff; background: #555; }
.mh-share-list svg { width: 20px; height: 20px; fill: currentColor; }
.mh-share-facebook a { background: #1877f2; }
.mh-share-twitter a { background: #1d1d1b; }
.mh-share-whatsapp a { background: #12af0a; }
.mh-share-telegram a { background: #2ca5e0; }

/* articolo precedente / successivo */
.post-nav-wrap { text-align: center; margin: 20px auto 40px; }
.post-nav-wrap li { display: inline-block; font-weight: 700; margin: 0 20px; }
.post-nav-wrap .mh-chev { margin: 0 10px; }

/* ---------- Autore ---------- */
.author-box { padding: 20px; background: #efefef; }
.author-box-avatar { float: left; width: 150px; height: 150px; margin-right: 20px; }
.author-box-avatar img { width: 150px; height: 150px; object-fit: cover; margin: 0; }
.author-box-desc { font-size: .9375rem; overflow: hidden; }
.author-box-desc .author-box-name { font-size: 1.5rem; margin-bottom: 10px; }
.author-box-position { margin-bottom: 10px; }
.author-box-desc p { margin-bottom: 10px; }
.author-box-desc hr { border: 0; border-top: 1px solid #cdcdcd; margin: 10px 0; }
.author-social { display: flex; gap: 10px; margin-top: 10px; }
.author-social a { color: #0061a5; transition: .25s; }
.author-social a:hover { color: #f9d602; }
.author-social svg { display: block; width: 22px; height: 22px; fill: currentColor; }

/* ---------- Paginazione ---------- */
.pagination { margin-bottom: 20px; overflow: hidden; }
.pagination .page-numbers, .pagination .pagelink { display: inline-block; padding: 10px 20px; background: #efefef; color: #000; }
.pagination .current, .pagination > .pagelink { color: #fff; background: var(--mh-accent); }
.pagination a.page-numbers:hover, .pagination .dots:hover, .pagination a:hover .pagelink { background: var(--mh-accent-alt); }
.mh-no-results { margin-bottom: 20px; }
.mh-category-banner { display: block; margin-bottom: 10px; }

/* ---------- Spazi pubblicitari nella gabbia ---------- */
#mh-wrapper .tu-slot { max-width: 100%; overflow: hidden; }
#mh-wrapper .tu-slot > * { max-width: 100%; }
.mh-block--slot { overflow: visible; }

/* ---------- Footer ---------- */
.mh-footer { max-width: 1040px; margin: 0 auto; color: #fff; background: #1f1e1e; overflow: hidden; }
.mh-footer a { color: #fff; }
.footer-ad-wrap { display: block; overflow: hidden; padding: 40px; text-align: center; background: #fff; color: var(--mh-text); border-top: 2px solid var(--mh-text); }
.footer-ad-wrap a { color: var(--mh-text); }
.footer-ad-wrap p { margin: 0; }
.mh-logos a { display: inline-block; margin: 0 15px 0 0; }
.mh-logos a:last-child { margin-right: 0; }
.footer-widgets { font-size: .9375rem; margin: 30px 0; }
.footer-1, .footer-2, .footer-3 { background: #333; }
.footer-1 { padding-bottom: 15px; }
.footer-widget { margin: 20px; overflow: hidden; }
.footer-widgets .widget-title { font-size: 1rem; padding: 10px; background: #464646; color: #fff; margin-bottom: 20px; text-transform: uppercase; }
.footer-widgets ul.menu > .menu-item { padding: 10px 0; border-bottom: 1px dotted #dcdcdc; }
.footer-widgets .sub-menu { display: none; }
.footer-widgets .textwidget { padding: 0 5px; }
.footer-2 { position: relative; min-height: var(--mh-footer-col-h); max-height: var(--mh-footer-col-h); overflow: hidden; }
.mh-footer [data-mh-collapse] { position: relative; max-height: var(--mh-footer-col-h); overflow: hidden; }
.mh-footer [data-mh-collapse].max-height { max-height: none; }
.mh-footer .show_more { position: absolute; z-index: 5; right: 10px; bottom: 5px; padding: 10px; border: 0; cursor: pointer; font: inherit; color: #fff; background: var(--mh-red); }
.mh-social { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.mh-social a { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 4px; background: #1877f2; color: #fff; }
.mh-social .tu-social-instagram a { background: #e1306c; }
.mh-social .tu-social-twitter a { background: #1d1d1b; }
.mh-social .tu-social-youtube a { background: #f00; }
.mh-social .tu-social-telegram a { background: #2ca5e0; }
.mh-social .tu-social-whatsapp a { background: #12af0a; }
.mh-social svg { width: 20px; height: 20px; fill: currentColor; }
.mh-social .tu-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

/* =====================================================================
   FAMIGLIA v2 (28/10): ticker, box autore MH, correlati, commenti, box partner, ricerca in colonna,
   titolo sopra gli slot, luogo degli eventi. Tutto spento di default: si accende dalla config della testata.
   ===================================================================== */

/* titoli dei blocchi: il livello (h2…h6) viene da config 'titles', l'aspetto resta quello della classe */
h2.widget-title, h3.widget-title, h5.widget-title, h6.widget-title { line-height: 1.3; }
.footer-widgets h2.widget-title, .footer-widgets h3.widget-title, .footer-widgets h4.widget-title, .footer-widgets h6.widget-title { font-size: 1rem; }

/* ticker "Temi Caldi" (content-news-ticker.php + style.css 101-104 di MH) */
.news-ticker { width: 65.83%; height: 33px; margin: 0; font-family: var(--mh-head); font-size: 12px; line-height: 33px; text-transform: uppercase; overflow: hidden; }
.news-ticker .ticker-title { float: left; padding: 0 10px; color: #fff; background: var(--mh-accent); }
.news-ticker .ticker-content { margin: 0; padding: 0; list-style: none; height: 33px; overflow: hidden; }
.news-ticker .ticker-item { display: block; height: 33px; padding: 0 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.news-ticker .ticker-item-separator { margin: 0 3px; }
.header-sub .news-ticker + .header-search { margin-left: 2.5%; }

/* box autore MH ("Note sull'autore": barra titolo + avatar + nome, content-single.php) */
.mh-author-box--mh .author-box { padding: 20px; background: #efefef; }
.mh-author-box--mh .author-box-avatar { margin-right: 20px; }
.mh-author-box--mh .author-box-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mh-author-box--mh .author-box-name { font-size: 1.125rem; margin-bottom: 10px; }
.mh-author-box--mh .author-box-desc { font-size: .9375rem; overflow: hidden; }

/* correlati (content-related.php: barra titolo + lista) */
.related-content-wrap { margin-bottom: 30px; }

/* commenti (comments.php di MH) */
.mh-comments { clear: both; margin-bottom: 30px; }
.comment-section-title { display: block; font-size: .875rem; font-weight: 400; color: #fff; background: var(--mh-accent-alt); padding: 0; margin-bottom: 20px; text-transform: uppercase; overflow: hidden; }
.comment-section-title span { display: inline-block; padding: 20px; }
.comment-section-title .comment-count { float: left; color: #fff; background: var(--mh-accent); }
.comment-section-title .comment-count-more { float: left; color: var(--mh-text); background: transparent; }
.commentlist { padding: 20px 20px 5px; margin: 0 0 20px; list-style: none; background: #efefef; }
.commentlist .depth-1 { padding: 20px 20px 10px; margin-bottom: 20px; border-bottom: 5px solid var(--mh-accent-alt); background: #fff; }
.commentlist .children { list-style: none; margin: 0 0 10px; }
.commentlist .children li { padding: 20px; margin-top: 20px; background: #fafafa; }
.commentlist .comment .vcard { position: relative; margin-bottom: 20px; font-family: var(--mh-head); }
.commentlist .comment .avatar { float: left; width: 70px; height: 70px; margin-right: 20px; }
.commentlist .comment-text { clear: both; }
.commentlist .comment-text p { margin-bottom: 20px; }
.comment-info { color: var(--mh-accent); margin: 20px 0; }
.comment-reply-link, .comment-edit-link { font-size: .8125rem; background: #ccc; color: #fff; padding: 5px 10px; }
.no-comments { padding: 10px; margin-bottom: 20px; background: #efefef; }
#respond { padding: 20px; margin-bottom: 30px; background: #efefef; }
#respond .comment-reply-title { font-size: 1.25rem; line-height: 1; margin-bottom: 20px; }
#commentform p { margin-bottom: 10px; }
#commentform input[type="text"], #commentform input[type="email"], #commentform input[type="url"], #commentform textarea { width: 100%; max-width: 100%; padding: 8px; border: 1px solid #cdcdcd; font: inherit; background: #fff; }
#commentform .form-submit { margin: 20px 0 0; }
#commentform .submit { padding: 10px 20px; border: 0; cursor: pointer; font-family: var(--mh-head); text-transform: uppercase; color: #fff; background: var(--mh-accent); }
#cancel-comment-reply-link { font-size: .75rem; color: #fff; padding: 5px; margin-left: 20px; background: #ccc; }

/* box partner (Vetrina Immobiliare, Annunci…): griglia generica, la testata la ridisegna nel suo CSS */
.mh-block--cpt .widget-title, .mh-block--partner .widget-title { position: relative; }
.mh-partner-logo img { height: 40px; width: auto; }
.mh-cpt-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.mh-cpt-item img, .mh-cpt-item .mh-image-placeholder { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.mh-cpt-title { margin: .5em 0 0; font-size: 14px; }

/* ricerca come blocco della colonna */
.mh-block--search .search-form { display: block; }

/* titolo sopra uno spazio pubblicitario (es. "Sponsor") */
.mh-block--slot-titled .widget-title { text-align: left; }

/* eventi: riga del luogo */
.fo-event-row__location { font-size: .875rem; }

/* =====================================================================
   RESPONSIVE (stesso HTML per tutti: niente rami wp_is_mobile)
   ===================================================================== */

/* Mobile e tablet: le righe della home marcate mobile=end (griglie dei comuni) scendono in fondo,
   come il ramo mobile di template-front.php in produzione. */
@media (max-width: 1024px) {
  #main-content.home-columns { display: flex; flex-direction: column; }
  #main-content.home-columns > .mh-home-row { width: 100%; min-width: 0; }
  .mh-home-row--mobile-end { order: 1; }
}

@media (max-width: 980px) {
  #mh-wrapper { max-width: 777px; }
  .wrapper-inner { max-width: 777px; }
  #main-content, .mh-sidebar, .home-sidebar, .mh-1-2, .mh-2-3, .mh-1-3, .mh-1-4 { float: none; width: 100%; margin: 0; }
  .mh-col { margin: 0; }
  .mh-home-row--cols .mh-home-col { float: left; width: 48.07%; }
  .mh-home-row--cols .mh-home-col-2 { margin-left: 3.86%; }
  .content-grid { float: left; width: 23.125%; margin: 10px 0 10px 2.5%; }
  .content-grid:first-child, .infeed-ad + .content-grid { margin-left: 0; }

  /* testata mobile: barra logo + hamburger, menu a tendina, ricerca sotto */
  .mh-header { margin-bottom: 0; }
  .mh-header > .header-wrap:first-child { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 0; }
  .header-logo { float: none; width: auto; max-width: calc(100% - 60px); }
  .logo-wrap img { height: 50px; width: auto; padding: 5px; }
  .mh-menu-toggle { display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; padding: 0; border: 0; background: #fff; cursor: pointer; }
  .mh-menu-toggle-bars span { display: block; width: 25px; height: 4px; margin: 4px 0; background: var(--mh-nav); }
  .mh-header-ad { flex-basis: 100%; width: 100%; margin: 0 0 10px; }
  .header-ad { text-align: center; }
  .header-ad .tu-slot { margin: 0 auto; }
  .header-menu { display: none; }
  .mh-nav-open .header-menu { display: block; }
  .main-nav ul.menu { flex-direction: column; }
  .main-nav li { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .12); }
  .main-nav li a { padding: 12px 15px; }
  .main-nav .sub-menu { position: static; display: block; background: #666; }
  .main-nav .sub-menu li { width: auto; }
  .main-nav .sub-menu a { padding-left: 30px; }
  ul#menu-comuni { flex-direction: row; }
  #menu-comuni li { border-top: 0; }
  #menu-comuni li a { padding: 8px 6px; }
  .header-sub { padding: 15px 0; background: transparent; }
  .news-ticker { width: 65.83%; float: left; }
  .header-sub .news-ticker + .header-search { float: right; width: 31.66%; }
  .header-search { float: none; width: 100%; }
  .header-search .search-form { float: none; text-align: center; }
  .footer-1, .footer-2 { margin-bottom: 20px; }
}

@media (max-width: 768px) {
  #mh-wrapper { margin-top: 0; }
}

@media (max-width: 767px) {
  .hidden-sm { display: none; }
  .news-ticker { display: none; }
  .header-sub .news-ticker + .header-search { float: none; width: 100%; margin: 0; }
  .mh-cpt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .commentlist .comment .avatar { float: none; display: block; margin: 0 0 10px; }
  .mh-home-row--cols .mh-home-col, .mh-home-row--cols .mh-home-col-2 { float: none; width: 100%; margin: 0; }
  .content-lead-title, .cp-title-xl { font-size: 24px; }
  .entry-header .entry-title, .page-title { font-size: 1.75rem; }
  .cp-thumb-xl { text-align: center; background: #efefef; }
  .category .content-grid .entry-meta { display: block; }
  .content-grid, .content-grid:first-child { float: none; width: 100%; margin: 25px 0 20px; }
  .content-grid-separator { display: block; padding: 0; }
  .content-list-separator { padding: 0; }
  .content-grid-title { font-size: 1.5rem; }
  .content-grid-thumb, .content-list-thumb { text-align: center; background: #efefef; }
  .content-list-thumb { float: none; width: 100%; max-width: 100%; }
  .content-list-thumb img { max-width: 180px; margin: 0 auto; }
  .content-list-excerpt, .content-list-header .entry-meta-date { display: none; }
  .mh-fp-grid-widget .mh-group .content-grid:first-child, .archive-grid .content-grid:first-child { margin: 5px 0 20px; }
  .search-form .search-field { width: 90%; max-width: 300px; }
  .fo-event-row { grid-template-columns: 58px 88px minmax(0, 1fr); gap: 10px; }
}

@media (max-width: 580px) {
  #mh-wrapper, .wrapper-inner { width: 85%; }
  .author-box { text-align: center; }
  .author-box-avatar { float: none; margin: 0 auto 20px; }
  .mh-author-box--mh .author-box-avatar { margin: 0 auto 20px; }
  .author-social { justify-content: center; flex-wrap: wrap; }
}

@media (max-width: 500px) {
  .ultime-notizie ul li { width: calc(100% - 10px); }
}

@media (max-width: 420px) {
  #mh-wrapper, .wrapper-inner { min-width: 160px; }
}

@media print {
  .mh-header .header-menu, .mh-sidebar, .home-sidebar, .mh-footer, .tu-slot, .mh-share { display: none !important; }
  #main-content { width: 100%; float: none; }
}
