/* ============================================================
   TICINO NOTIZIE - CSS PULITO RICOMINCIATO
   ============================================================ */

/* ===== HEADER CENTRATO ===== */
.cm-desktop-row .cm-header-main-row .cm-main-row {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 8px 0 !important;
}
.cm-desktop-row .cm-header-right-col,
.cm-desktop-row .cm-header-center-col { display: none !important; }
.cm-desktop-row .cm-header-left-col {
  margin: 0 auto !important;
  flex: 0 0 auto !important;
  text-align: center !important;
}
.cm-site-branding, #cm-site-info { text-align: center !important; }
.cm-site-title, .cm-site-description { text-align: center !important; width: 100% !important; }
/* Quando c'è il custom logo, nascondi titolo+tagline testuali (il logo li contiene gia) */
body.has-custom-logo .cm-site-title,
body.has-custom-logo .cm-site-description,
body.has-custom-logo #cm-site-info { display: none !important; }
/* Logo immagine: dimensioni header */
.cm-custom-logo,
.cm-custom-logo-link,
.custom-logo-link {
  display: inline-block !important;
  margin: 0 auto !important;
  text-align: center !important;
}
.custom-logo, .cm-custom-logo img, .custom-logo-link img {
  max-height: 80px !important;
  width: auto !important;
  height: auto !important;
  display: block !important;
  margin: 0 auto !important;
}
@media (max-width: 768px) {
  .custom-logo, .cm-custom-logo img { max-height: 50px !important; }
}
/* Fallback per quando NON c'è il logo (mantiene CSS originale) */
body:not(.has-custom-logo) .cm-site-title a {
  color: #cc0000 !important;
  font-family: 'Playfair Display', Georgia, serif !important;
  font-weight: 900 !important;
  font-size: 44px !important;
  letter-spacing: -1px !important;
  text-transform: uppercase !important;
}
body:not(.has-custom-logo) .cm-site-description {
  color: #1a1a1a !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  margin-top: 4px !important;
  opacity: 0.7;
}

/* ===== MENU STICKY 1 RIGA ===== */
.cm-header-bottom-row {
  position: sticky !important; top: 0 !important; z-index: 9999 !important;
  background: #1a1a1a !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.cm-primary-menu ul {
  display: flex !important; flex-wrap: nowrap !important; justify-content: center !important;
  white-space: nowrap !important; margin: 0 !important; padding: 0 !important;
}
.cm-primary-menu ul li { flex: 0 0 auto !important; }
.cm-primary-menu ul li a {
  font-weight: 700 !important; font-size: 12px !important; letter-spacing: 1px !important;
  text-transform: uppercase !important; padding: 12px 12px !important; color: #fff !important;
  white-space: nowrap !important;
}
.cm-primary-menu ul li:hover > a,
.cm-primary-menu ul li.current-menu-item > a { background: #cc0000 !important; }

/* Nascondi titolo "Home" sulla front page */
body.home .cm-page-header,
body.page-template-magazine .cm-page-header,
body.page-template-magazine article.page .cm-entry-header,
body.page-template-magazine article.page .cm-entry-title,
body.page-template-magazine article.type-page,
body.page-template-magazine .cm-posts.cm-layout-2 { display: none !important; }

/* ===== TOP SECTION: slider+beside layout fisso semplice ===== */
.cm-front-page-top-section {
  display: flex !important;
  gap: 12px !important;
  margin-bottom: 28px !important;
  align-items: flex-start !important;
}
.cm-front-page-top-section .widget_slider_area {
  flex: 0 0 65% !important;
  max-width: 65% !important;
}
.cm-front-page-top-section .cm-beside-slider-widget {
  flex: 0 0 calc(35% - 12px) !important;
  max-width: calc(35% - 12px) !important;
}
.cm-slider-area, .cm-slider-area-rotate {
  width: 100% !important;
  margin: 0 !important;
  height: 540px !important;
  min-height: 540px !important;
  max-height: 540px !important;
  overflow: hidden !important;
  position: relative !important;
}
/* 4 card altezza fissa che riempiono lo slider (540 / 4 - gap) */
.cm-beside-slider-widget .cm-post {
  margin: 0 0 8px 0 !important;
  height: 124px !important;
  overflow: hidden !important;
  display: block !important;
}
.cm-beside-slider-widget .cm-post:last-child { margin-bottom: 0 !important; }
.cm-beside-slider-widget .cm-post > a:first-child {
  display: block !important;
  width: 100% !important;
  height: 80px !important;
  overflow: hidden !important;
  position: relative !important;
}
.cm-beside-slider-widget .cm-post img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}
.cm-beside-slider-widget .cm-post-content {
  padding: 6px 10px !important;
  height: 44px !important;
  overflow: hidden !important;
}
.cm-beside-slider-widget .cm-entry-title a {
  font-size: 12px !important;
  line-height: 1.25 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

/* ===== CARD BESIDE SLIDER + ITALPRESS (layout SEMPLICE: display block, foto sopra, titolo sotto) ===== */
.cm-beside-slider-widget .cm-posts,
#colormag_highlighted_posts_widget-50 .cm-posts {
  display: block !important;
}
.cm-beside-slider-widget .cm-post,
#colormag_highlighted_posts_widget-50 .cm-post {
  display: block !important;
  background: #fff !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 4px !important;
  overflow: hidden !important;
  margin: 0 0 10px 0 !important;
  position: relative !important;
  transition: box-shadow 0.2s;
}
.cm-beside-slider-widget .cm-post:hover,
#colormag_highlighted_posts_widget-50 .cm-post:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}
/* L'immagine: full width altezza media */
.cm-beside-slider-widget .cm-post > a:first-child,
#colormag_highlighted_posts_widget-50 .cm-post > a:first-child {
  display: block !important;
  width: 100% !important;
  height: 140px !important;
  overflow: hidden !important;
  position: relative !important;
}
.cm-beside-slider-widget .cm-post img,
#colormag_highlighted_posts_widget-50 .cm-post img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  filter: none !important;
}
/* Badge categoria rosso in alto a sinistra sulla foto */
.cm-beside-slider-widget .cm-entry-header-meta,
#colormag_highlighted_posts_widget-50 .cm-entry-header-meta {
  position: absolute !important;
  top: 8px !important;
  left: 8px !important;
  z-index: 10 !important;
}
.cm-beside-slider-widget .cm-post-categories,
.cm-beside-slider-widget .cm-post-categories a,
#colormag_highlighted_posts_widget-50 .cm-post-categories,
#colormag_highlighted_posts_widget-50 .cm-post-categories a {
  display: inline-block !important;
  background: #cc0000 !important;
  color: #fff !important;
  padding: 3px 8px !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  border-radius: 2px !important;
  white-space: nowrap !important;
  width: auto !important;
}
/* Box bianco sotto: titolo nero */
.cm-beside-slider-widget .cm-post-content,
#colormag_highlighted_posts_widget-50 .cm-post-content {
  display: block !important;
  padding: 10px 12px !important;
  background: #fff !important;
  text-align: center !important;
}
.cm-beside-slider-widget .cm-entry-title,
#colormag_highlighted_posts_widget-50 .cm-entry-title {
  margin: 0 !important;
  padding: 0 !important;
  text-align: center !important;
}
.cm-beside-slider-widget .cm-entry-title a,
#colormag_highlighted_posts_widget-50 .cm-entry-title a {
  color: #1a1a1a !important;
  font-family: Georgia, serif !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  display: block !important;
}
.cm-beside-slider-widget .cm-entry-title a:hover,
#colormag_highlighted_posts_widget-50 .cm-entry-title a:hover { color: #cc0000 !important; }
/* Nascondo meta data e author */
.cm-beside-slider-widget .cm-below-entry-meta,
.cm-beside-slider-widget .cm-author,
.cm-beside-slider-widget .cm-vcard,
#colormag_highlighted_posts_widget-50 .cm-below-entry-meta,
#colormag_highlighted_posts_widget-50 .cm-author,
#colormag_highlighted_posts_widget-50 .cm-vcard { display: none !important; }
/* Nascondo widget title beside slider (no servono) */
.cm-beside-slider-widget > .widget > .cm-widget-title { display: none !important; }

/* ===== TITOLI WIDGET (per le sezioni magazine in main) ===== */
.cm-widget-title, .widget-title {
  background: #cc0000 !important; color: #fff !important;
  padding: 6px 14px !important; border: none !important;
  font-family: Georgia, serif !important; font-size: 13px !important;
  font-weight: 700 !important; text-transform: uppercase !important;
  letter-spacing: 1.5px !important; margin: 0 0 12px 0 !important;
  display: inline-block !important;
}
.cm-widget-title:after, .widget-title:after { display: none !important; }
/* Italpress sidebar title visibile */
#colormag_highlighted_posts_widget-50 .cm-widget-title {
  display: inline-block !important;
  background: #888 !important;
}

.cm-featured-posts, .cm-highlighted-posts, .widget.cm-featured-posts {
  border-top: 2px solid #1a1a1a !important;
  border-bottom: none !important;
  padding-top: 8px !important;
  margin-bottom: 20px !important;
}

/* ===== VERTICAL WIDGET (Style 2) per ULTIME LOCALI/SPETTACOLI: thumb laterale ===== */
.cm-featured-posts--style-2 .cm-post,
.cm-featured-posts--style-2 article {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  gap: 12px !important;
  padding: 10px !important;
  margin: 0 0 8px 0 !important;
  border: 1px solid #ececec !important;
  border-radius: 4px !important;
  background: #fff !important;
  text-align: left !important;
  min-height: 90px !important;
  box-sizing: border-box;
}
.cm-featured-posts--style-2 .cm-featured-image,
.cm-featured-posts--style-2 figure,
.cm-featured-posts--style-2 .cm-post > a:first-child {
  flex: 0 0 90px !important;
  width: 90px !important;
  height: 70px !important;
  margin: 0 !important;
  overflow: hidden !important;
  border-radius: 3px !important;
  align-self: center !important;
}
.cm-featured-posts--style-2 .cm-featured-image img,
.cm-featured-posts--style-2 figure img,
.cm-featured-posts--style-2 .cm-post img {
  width: 90px !important; height: 70px !important;
  object-fit: cover !important; display: block !important; margin: 0 !important;
}
.cm-featured-posts--style-2 .cm-post-content {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
  text-align: left !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}
.cm-featured-posts--style-2 .cm-entry-title,
.cm-featured-posts--style-2 .cm-entry-title a {
  font-family: Georgia, serif !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
  font-weight: 700 !important;
  color: #1a1a1a !important;
  text-decoration: none !important;
  margin: 0 0 4px 0 !important;
  text-align: left !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}
.cm-featured-posts--style-2 .cm-entry-title a:hover { color: #cc0000 !important; }
.cm-featured-posts--style-2 .cm-author, .cm-featured-posts--style-2 .cm-vcard { display: none !important; }
.cm-featured-posts--style-2 .cm-below-entry-meta {
  font-size: 10px !important; color: #999 !important;
}

/* Nascondo estratti ed elementi inutili */
.cm-highlighted-posts .cm-entry-summary,
.cm-highlighted-posts p:not(.cm-below-entry-meta),
.cm-featured-posts .cm-entry-summary,
.cm-featured-posts p:not(.cm-below-entry-meta),
.cm-author, .cm-vcard, .byline { display: none !important; }

/* ===== Widget Malpensa24TV ===== */
#custom_html-70 { background: transparent !important; padding: 0 !important; border: 0 !important; }
#custom_html-70 .tn-mtv-block {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  padding: 18px; color: #fff; border-radius: 4px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
#custom_html-70 .tn-mtv-block h3 {
  color: #fff !important;
  border-bottom: 3px solid #cc0000 !important;
  padding-bottom: 8px !important;
  display: inline-block !important;
  font-family: Georgia, serif !important;
  font-size: 18px !important;
  margin: 6px 0 0 0 !important;
  background: transparent !important;
}
#custom_html-70 .tn-mtv-label {
  font-size: 10px; letter-spacing: 3px; color: #cc0000;
  text-transform: uppercase; font-weight: 700; margin-bottom: 6px;
}
#custom_html-70 .tn-mtv-video {
  position: relative; padding-bottom: 56.25%; height: 0;
  margin-top: 12px; background: #000; border-radius: 3px; overflow: hidden;
}
#custom_html-70 .tn-mtv-video iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}

/* Sidebar generale */
#secondary a, aside .widget a {
  color: #1a1a1a !important;
  text-decoration: none !important;
}
#secondary a:hover, aside .widget a:hover { color: #cc0000 !important; }
#secondary .widget { margin-bottom: 24px !important; }

/* Search */
.widget_search input[type="search"] {
  border: 2px solid #1a1a1a !important; padding: 10px 12px !important; width: calc(100% - 60px);
}
.widget_search input[type="submit"], .widget_search button {
  background: #1a1a1a !important; color: #fff !important; border: 0 !important; padding: 0 16px !important;
}
.widget_search input[type="submit"]:hover { background: #cc0000 !important; }

/* Categorie dropdown */
.widget_categories select {
  width: 100% !important;
  max-width: 100% !important;
  padding: 10px 14px !important;
  border: 2px solid #1a1a1a !important;
  background: #fff !important;
  color: #1a1a1a !important;
  font-family: Georgia, serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box !important;
}
.widget_categories { max-width: 100% !important; box-sizing: border-box !important; }

/* Articolo card singolo */
.cm-entry-title, .cm-entry-title a {
  font-family: Georgia, serif !important;
  font-weight: 700 !important;
  color: #1a1a1a !important;
  line-height: 1.3 !important;
  text-decoration: none !important;
}
.cm-cat-links a {
  background: #cc0000 !important;
  color: #fff !important;
  padding: 3px 10px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 1.5px !important;
  text-transform: uppercase !important;
  border-radius: 2px;
  text-decoration: none !important;
  display: inline-block;
}

/* ===== FOOTER 4 COLONNE ===== */
#colophon, .cm-footer { background: #1a1a1a !important; color: #ccc !important; padding: 40px 0 20px !important; }
#colophon a { color: #cc0000; }
.cm-footer-sidebar-one, .cm-footer-sidebar-two, .cm-footer-sidebar-three, .cm-footer-sidebar-four,
[class*="cm-footer-col"] {
  padding: 0 15px !important;
}
.cm-footer .widget { margin-bottom: 20px !important; background: transparent !important; }
.cm-footer .widget * { color: #ccc; }
.cm-footer-bottom-row {
  border-top: 1px solid #333 !important;
  padding-top: 20px !important;
  margin-top: 30px !important;
}
.cm-copyright, .copyright {
  font-size: 12px !important;
  color: #888 !important;
}

/* ===== SOTTOPAGINE (singolo articolo + categoria) ===== */
/* Singolo articolo: stile pulito */
.single-post .cm-entry-header,
.single-post .cm-entry-title {
  font-family: Georgia, serif !important;
}
.single-post .cm-entry-title {
  font-size: 32px !important;
  line-height: 1.25 !important;
  color: #1a1a1a !important;
  margin: 0 0 16px 0 !important;
  font-weight: 800 !important;
}
.single-post .cm-entry-content {
  font-family: Georgia, serif !important;
  font-size: 17px !important;
  line-height: 1.7 !important;
  color: #2a2a2a !important;
}
.single-post .cm-entry-content p { margin-bottom: 16px !important; }
.single-post .cm-entry-content h2 {
  font-size: 24px !important;
  margin: 30px 0 14px 0 !important;
  color: #1a1a1a !important;
  border-bottom: 2px solid #cc0000;
  padding-bottom: 8px;
  display: inline-block;
}
.single-post .cm-entry-content a { color: #cc0000 !important; }
.single-post .cm-entry-content blockquote {
  border-left: 4px solid #cc0000 !important;
  padding: 10px 20px !important;
  background: #faf5f5;
  font-style: italic;
  margin: 20px 0 !important;
}
.single-post .cm-entry-content img { max-width: 100% !important; height: auto !important; border-radius: 4px; }
/* Categoria badge nel singolo */
.single-post .cm-cat-links a,
.single-post .above-entry-meta .cat-links a {
  background: #cc0000 !important;
  color: #fff !important;
  padding: 4px 12px !important;
  font-size: 11px !important;
  letter-spacing: 1.5px !important;
  text-transform: uppercase !important;
  border-radius: 2px;
  text-decoration: none !important;
}
/* Featured image singolo */
.single-post .cm-entry-thumbnail,
.single-post .post-thumbnail {
  margin-bottom: 24px !important;
}
.single-post .cm-entry-thumbnail img { width: 100% !important; height: auto !important; border-radius: 4px; }

/* Pagine archivio / categoria */
.archive .cm-page-header,
.category .cm-page-header {
  background: #1a1a1a !important;
  color: #fff !important;
  padding: 30px !important;
  margin-bottom: 24px !important;
  border-radius: 4px;
  border-left: 6px solid #cc0000;
}
.archive .cm-page-title,
.category .cm-page-title {
  color: #fff !important;
  font-family: Georgia, serif !important;
  font-size: 28px !important;
  margin: 0 !important;
}
.archive article, .category article {
  background: #fff;
  padding: 20px !important;
  margin-bottom: 16px !important;
  border-radius: 4px;
  border: 1px solid #ececec;
}

/* Pagine statiche (Chi siamo, Contatti, Privacy ecc.) */
.page .cm-entry-title { font-family: Georgia, serif !important; font-size: 32px !important; color: #1a1a1a !important; }
.page .cm-entry-content {
  font-family: Georgia, serif !important;
  font-size: 16px !important;
  line-height: 1.7 !important;
}
.page .cm-entry-content h2 {
  font-size: 22px !important;
  margin: 28px 0 12px 0 !important;
  border-bottom: 2px solid #cc0000;
  padding-bottom: 6px;
  display: inline-block;
}
.page .cm-entry-content h3 {
  font-size: 18px !important;
  margin: 22px 0 8px 0 !important;
  color: #1a1a1a !important;
}
.page .cm-entry-content h4 {
  font-size: 15px !important;
  margin: 16px 0 6px 0 !important;
  color: #555 !important;
}
.page .cm-entry-content ul li { margin-bottom: 4px; }
.page .cm-entry-content a { color: #cc0000 !important; }

body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important; }
.cm-entry-title, h1, h2, h3, h4 { font-family: Georgia, serif !important; }
::selection { background: #cc0000; color: #fff; }

/* Top + bottom: 2 colonne quando 2 widget affiancati */
#cm-primary > .cm-posts {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 20px !important;
}
#cm-primary > .cm-posts > .widget {
  flex: 1 1 calc(50% - 10px) !important;
  min-width: 280px !important;
}
#cm-primary > .cm-posts > .widget:only-child { flex: 1 1 100% !important; }

/* ===== SEZIONE ITALPRESS DISTINTA (widget 95) =====
   Stile diverso per indicare che sono notizie da agenzia stampa esterna */
#colormag_featured_posts_vertical_widget-95 {
  flex: 1 1 100% !important;
  background: linear-gradient(135deg, #f5f8fc 0%, #eaf0f8 100%) !important;
  padding: 20px 24px !important;
  border-radius: 6px !important;
  border-left: 5px solid #1a5490 !important;
  box-shadow: 0 2px 10px rgba(26,84,144,0.08) !important;
  margin-bottom: 24px !important;
  border-top: none !important;
}
#colormag_featured_posts_vertical_widget-95 .cm-widget-title {
  background: #1a5490 !important;
  color: #fff !important;
  padding: 8px 18px !important;
  border-radius: 3px !important;
  font-family: Georgia, serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 2px !important;
  margin: 0 0 6px 0 !important;
  display: inline-block !important;
  position: relative;
}
#colormag_featured_posts_vertical_widget-95 .cm-widget-title:before {
  content: '🌍';
  margin-right: 8px;
  font-size: 14px;
}
/* Sotto-titolo descrittivo */
#colormag_featured_posts_vertical_widget-95:before {
  content: 'Notizie dal mondo aggiornate da Italpress, agenzia di stampa esterna.';
  display: block;
  font-size: 12px;
  color: #777;
  font-style: italic;
  margin-bottom: 14px;
  font-family: Georgia, serif;
  order: -1;
}
/* GRID 3 colonne UNIFORME (override vertical layout) */
#colormag_featured_posts_vertical_widget-95 .cm-posts {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 14px !important;
}
#colormag_featured_posts_vertical_widget-95 .cm-post,
#colormag_featured_posts_vertical_widget-95 article {
  background: #fff !important;
  border: 1px solid #d8e2ee !important;
  border-radius: 4px !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
  display: block !important;
  flex: none !important;
  width: auto !important;
  max-width: none !important;
  float: none !important;
  min-height: 0 !important;
  height: auto !important;
  transition: box-shadow 0.2s, transform 0.2s;
}
#colormag_featured_posts_vertical_widget-95 .cm-post:hover,
#colormag_featured_posts_vertical_widget-95 article:hover {
  box-shadow: 0 4px 14px rgba(26,84,144,0.15) !important;
  transform: translateY(-2px);
}
#colormag_featured_posts_vertical_widget-95 .cm-post > a:first-child,
#colormag_featured_posts_vertical_widget-95 article > a:first-child,
#colormag_featured_posts_vertical_widget-95 .cm-featured-image,
#colormag_featured_posts_vertical_widget-95 figure {
  display: block !important;
  width: 100% !important;
  height: 140px !important;
  overflow: hidden !important;
  flex: none !important;
  margin: 0 !important;
  align-self: auto !important;
}
#colormag_featured_posts_vertical_widget-95 .cm-post img,
#colormag_featured_posts_vertical_widget-95 article img,
#colormag_featured_posts_vertical_widget-95 .cm-featured-image img,
#colormag_featured_posts_vertical_widget-95 figure img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  margin: 0 !important;
}
#colormag_featured_posts_vertical_widget-95 .cm-post-content,
#colormag_featured_posts_vertical_widget-95 .article-content {
  padding: 10px 12px !important;
  text-align: left !important;
  display: block !important;
  flex: none !important;
}
#colormag_featured_posts_vertical_widget-95 .cm-entry-header-meta,
#colormag_featured_posts_vertical_widget-95 .cm-post-categories,
#colormag_featured_posts_vertical_widget-95 .cm-post-categories a {
  background: transparent !important;
  display: block !important;
  margin-bottom: 6px !important;
  position: static !important;
  width: auto !important;
}
#colormag_featured_posts_vertical_widget-95 .cm-post-categories a {
  background: #1a5490 !important;
  color: #fff !important;
  display: inline-block !important;
  padding: 2px 8px !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
  border-radius: 2px !important;
  text-decoration: none !important;
}
/* Mostra solo PRIMA categoria (no AMBIENTE+TERRITORIO sovrapposte) */
#colormag_featured_posts_vertical_widget-95 .cm-post-categories a:not(:first-child) {
  display: none !important;
}
#colormag_featured_posts_vertical_widget-95 .cm-entry-title,
#colormag_featured_posts_vertical_widget-95 .cm-entry-title a {
  font-family: Georgia, serif !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
  font-weight: 700 !important;
  color: #1a1a1a !important;
  text-decoration: none !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  margin: 0 !important;
  text-align: left !important;
}
#colormag_featured_posts_vertical_widget-95 .cm-entry-title a:hover {
  color: #1a5490 !important;
}
#colormag_featured_posts_vertical_widget-95 .cm-below-entry-meta,
#colormag_featured_posts_vertical_widget-95 .cm-author,
#colormag_featured_posts_vertical_widget-95 .cm-vcard {
  display: none !important;
}

@media (max-width: 768px) {
  #colormag_featured_posts_vertical_widget-95 .cm-posts {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* ===== SLIDER HERO: titolo bianco + overlay scuro ===== */
.cm-slider-area .cm-featured-image,
.cm-slider-area .cm-featured-image img,
.cm-slider-area .wp-post-image {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}
.cm-slider-area .cm-featured-image img,
.cm-slider-area .wp-post-image {
  filter: brightness(0.85) !important;
}
.cm-slider-area .slick-slide,
.cm-slider-area .slick-list,
.cm-slider-area .slick-track,
.cm-slider-area > div { height: 100% !important; }
/* Overlay scuro gradient leggero */
.cm-slider-area:after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.65));
  pointer-events: none;
  z-index: 2;
}
/* Content slider: ancorato in basso, allineato a sinistra */
.cm-slider-area .cm-entry-header,
.cm-slider-area .slide-content,
.cm-slider-area .cm-post-content {
  position: absolute !important;
  z-index: 5 !important;
  bottom: 30px !important;
  left: 0 !important;
  right: 0 !important;
  top: auto !important;
  padding: 0 40px !important;
  text-align: left !important;
  background: transparent !important;
  max-width: 1000px !important;
  margin: 0 auto !important;
}
/* Categoria SOPRA il titolo, ALLINEATA A SINISTRA */
.cm-slider-area .cm-entry-header-meta,
.cm-slider-area .cm-entry-header .cm-entry-header-meta,
.cm-slider-area .cm-post-categories {
  display: block !important;
  margin: 0 0 10px 0 !important;
  padding: 0 !important;
  text-align: left !important;
  position: static !important;
  inset: auto !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  background: transparent !important;
  width: auto !important;
}
.cm-slider-area .cm-entry-title,
.cm-slider-area .cm-entry-title a {
  font-family: Georgia, serif !important;
  font-weight: 800 !important;
  font-size: 26px !important;
  line-height: 1.25 !important;
  color: #fff !important;
  text-shadow: 0 2px 12px rgba(0,0,0,0.85) !important;
  margin: 0 0 8px 0 !important;
  text-decoration: none !important;
  display: block !important;
  text-align: left !important;
}
.cm-slider-area .cm-cat-links,
.cm-slider-area .cm-cat-links a,
.cm-slider-area .cm-post-categories,
.cm-slider-area .cm-post-categories a {
  background: #cc0000 !important;
  color: #fff !important;
  padding: 4px 12px !important;
  font-weight: 700 !important;
  font-size: 10px !important;
  letter-spacing: 1.5px !important;
  text-transform: uppercase !important;
  display: inline-block !important;
  margin: 0 0 10px 0 !important;
  text-decoration: none !important;
  border-radius: 2px;
  position: static !important;
}
.cm-slider-area .cm-entry-meta,
.cm-slider-area .cm-posted-on,
.cm-slider-area .cm-below-entry-meta {
  color: rgba(255,255,255,0.92) !important;
}
.cm-slider-area .cm-author, .cm-slider-area .cm-vcard { display: none !important; }

/* Mobile */
@media (max-width: 768px) {
  .cm-site-title a { font-size: 28px !important; }
  .cm-front-page-top-section {
    flex-direction: column !important;
    height: auto !important;
    gap: 8px !important;
  }
  .cm-front-page-top-section .widget_slider_area,
  .cm-front-page-top-section .cm-beside-slider-widget {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  /* Slider full width senza padding container */
  .cm-slider-area, .cm-slider-area-rotate {
    height: 280px !important;
    min-height: 280px !important;
    max-height: 280px !important;
    width: 100% !important;
    background: #1a1a1a !important;
  }
  .cm-slider-area .cm-featured-image,
  .cm-slider-area .cm-featured-image img,
  .cm-slider-area .wp-post-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
  }
  /* Titolo slider piu' piccolo su mobile + clamp 3 righe */
  .cm-slider-area .cm-entry-title,
  .cm-slider-area .cm-entry-title a {
    font-size: 17px !important;
    line-height: 1.25 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    margin: 0 0 6px 0 !important;
  }
  .cm-slider-area .cm-entry-header,
  .cm-slider-area .cm-post-content {
    padding: 0 16px !important;
    bottom: 16px !important;
  }
  .cm-slider-area .cm-cat-links a,
  .cm-slider-area .cm-post-categories a {
    font-size: 9px !important;
    padding: 3px 8px !important;
  }
  #cm-primary > .cm-posts > .widget { flex: 1 1 100% !important; }
  /* Cards beside slider su mobile: 2 colonne */
  .cm-beside-slider-widget .cm-posts {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .cm-beside-slider-widget .cm-post { height: auto !important; }
}

/* ===== Rimuovi linee/border azzurri default del tema ===== */
.cm-slider-area, .cm-slider-area * {
  outline-color: transparent !important;
}
body, body > * {
  border-color: transparent !important;
}
.cm-header-bottom-row,
.cm-header-main-row,
.cm-main-header,
.cm-mobile-header-row {
  border-bottom-color: transparent !important;
  border-top-color: transparent !important;
}
.cm-mobile-nav-container,
.cm-mobile-menu,
.cm-mobile-row {
  border-color: transparent !important;
  box-shadow: none !important;
}
/* Hover/focus su link non blu ma rosso */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
  outline: 2px solid #cc0000 !important;
  outline-offset: 1px;
}
::selection { background: #cc0000 !important; color: #fff !important; }
