body {
  overflow-x: hidden;
  word-break: keep-all !important;
}

p{
  word-break: keep-all !important;
}

a{
  text-decoration: none;
}

a:hover{
  text-decoration: none !important;
  /*font-weight: 400 !important;*/
}

.barra-ricerca {
  width: 100%;
  position: relative;
  top: 1rem;
  margin-top: 2rem;
  margin-right: 2rem;
}

.wp-block-search__inside-wrapper {
  border-radius: 2rem;
  max-width: 750px;
  margin-left: 2rem;
}

div:has(.immagini-home-blocco) {

  padding: 0;
  margin: 0 !important;
}

.immagini-home-blocco img {}

.wpcf7 {
  max-width: 100%;

}

.contenitore-newsletter {
  overflow: hidden;
  margin: 0 auto;
}



.wp-block-search__button.has-icon {
  /* line-height: 0; */
  color: black;
  background: none;
  /* margin: 0; */
  width: 2rem;
  /* padding: 0; */
  transform: scale(-1, 1);
}

/* Search Toggle Button - DIMENSIONI FISSE */
.search-toggle-btn {
  position: relative;
  display: inline-flex;
}

/* Inside wrapper normale, contiene pulsante e input */
.search-toggle-btn .wp-block-search__inside-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

/* Input di default (chiuso) - nascosto SUBITO senza transizione */
.search-toggle-btn .wp-block-search__input {
  position: absolute;
  right: 50px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  width: 0;
  transition: none !important; /* NO transition quando si chiude */
}

/* Input quando APERTO - appare con transizione smooth */
.search-toggle-btn:not(.wp-block-search__searchfield-hidden) .wp-block-search__input {
  z-index: 998;
  display: block !important;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  width: 300px;
  border: 1px solid #ddd;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  outline: none;
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: opacity 0.2s ease, width 0.2s ease !important;
}

/* Bottone search sempre visibile */
.search-toggle-btn .wp-block-search__button {
  position: relative;
  z-index: 999;
  flex-shrink: 0;
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

/* Rimuovi focus outline anche dagli stati focus/active */
.search-toggle-btn .wp-block-search__button:focus,
.search-toggle-btn .wp-block-search__button:focus-visible,
.search-toggle-btn .wp-block-search__button:active {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

.wp-block-search.aligncenter .wp-block-search__inside-wrapper {
  margin: auto;
  border-radius: 1rem;
}

.wp-block-navigation.items-justified-right {
  --navigation-layout-justification-setting: flex-start;
  --navigation-layout-justify: flex-start;
}

/* Navigation deve essere relative per contenere il search absolute */
.wp-block-navigation {
  position: relative;
}

ul.wp-block-navigation.items-justified-right {
  top: 1rem;
}

.n2-ss-slider-2.n2-ow {
  margin: 0px 2rem;
  border-radius: 1rem !important;
}

header.wp-block-template-part {
  box-shadow: 1px 1px 9px rgba(0, 0, 0, 0.25);
}


.wp-block-site-logo a,
.wp-block-site-logo img {
  width: 220px;
}

/* solo desktop */
@media screen and (min-width: 470px) {
  .has-global-padding {
    padding-left: 2% !important;
    padding-right: 2% !important;
  }

  .wp-block-site-logo a,
  .wp-block-site-logo img {
    width: 320px;
  }

  main {
    /* margin-top: -2rem !important; */
  }

  ul.wp-block-navigation.items-justified-right {
    padding-left: 0;
    top: 1rem;
    margin-bottom: 2rem;
  }

  /* Rimuove bullets dai submenu */
  .wp-block-navigation__submenu-container {
    list-style: none !important;
  }

  .wp-block-navigation__submenu-container li {
    list-style: none !important;
  }

  /* Menu di primo livello (sotto "Prodotti") */
  .wp-block-navigation-item>.wp-block-navigation__submenu-container {
    left: 0rem !important;
    top: 2rem !important;
    border: transparent !important;
    border-radius: 1rem;
    box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.25);
    padding: 0.5rem;
  }

  /* Voci del secondo livello che hanno sotto-sottomenu */
  .wp-block-navigation-submenu .wp-block-navigation__submenu-container .wp-block-navigation-submenu {
    position: relative;
  }

  /* Sotto-sottomenu (terzo livello) - affiancati a destra e allineati in alto */
  .wp-block-navigation-submenu .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container {
    position: absolute !important;
    left: calc(100% + 0.5rem) !important;
    top: -0.5rem !important;
    border-radius: 1rem;
    box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.25);
    padding: 0.5rem;
    background: white;
    min-width: 200px;
  }

  /* Se il sotto-sottomenu esce dallo schermo, spostalo a sinistra */
  @media screen and (min-width: 470px) {

    /* Controlla se siamo vicini al bordo destro e inverti posizione */
    .wp-block-navigation-submenu:last-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container,
    .wp-block-navigation-submenu:nth-last-child(2) .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container {
      left: auto !important;
      right: calc(100% + 0.5rem) !important;
    }
  }

  .logo-sito {
    left: 3rem;
    top: -0.5rem;
    position: relative;
  }
}

/* solo mobile */
@media screen and (max-width: 469px) {
  .servizi-box{
    padding: 1rem;
    flex-direction: column;
  }

  .has-global-padding {
    padding-left: 5% !important;
    padding-right: 5% !important;
  }

  /* Nascondi la ricerca su mobile */
  .search-toggle-btn {
    display: none !important;
  }

  .contenitore-newsletter>div {
    flex-direction: column;
  }

  .contenitore-newsletter {
    width: 100%;
  }

  .link-footer {
    padding: 0;
  }

  .contenitore-newsletter>div {
    flex-direction: column;
  }
}

footer.wp-block-template-part {
  box-shadow: 0px 0px 13px rgba(0, 0, 0, 0.25);
}

footer .wp-block-site-logo {
  /* width: 100%; */
  text-align: center;
  /* margin: 3rem; */
}

.wp-block-navigation-submenu .wp-block-navigation__submenu-icon svg {
  stroke: #009339;
  fill: #009339;
}

.nascosto {
  visibility: hidden;
}

.wp-block-navigation:has(.barra-ricerca) {
  max-width: 68%;
}


.menu-footer {
  width: 10rem;
  margin-left: 0.4rem;
  /*font-weight: 400;*/
  line-height: 1.5rem;
}

/* ========================================
   Stili per Custom Post Type Prodotti
   ======================================== */

/* Griglia Prodotti - Override WordPress Grid */
.prodotti-grid .wp-block-post-template,
.prodotti-grid.wp-block-query .wp-block-post-template,
.wp-block-query.prodotti-grid .wp-block-post-template {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 2.5rem !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 auto !important;
  max-width: 1200px;
  justify-items: stretch;
}

/* Reset eventuali stili inline di WordPress */
.prodotti-grid .wp-block-post-template>li {
  margin: 0 !important;
  width: 100% !important;
}

.prodotti-grid {
  margin: 2rem 0;
  width: 100%;
  margin: 0 auto !important;
}

/* Card Prodotto - Moderno e Professionale */
.prodotto-card,
.prodotto-card.wp-block-group {
  background: #fff !important;
  border-radius: 12px !important;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex !important;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.prodotto-card:hover,
.prodotto-card.wp-block-group:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(79, 174, 64, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08) !important;
  border-color: rgba(79, 174, 64, 0.2);
}

.prodotto-thumbnail,
.prodotto-card .wp-block-post-featured-image,
figure.wp-block-post-featured-image {
  overflow: hidden;
  width: 100% !important;
  margin: 0 !important;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  position: relative;
}

/* Overlay gradient sull'immagine */
.prodotto-card .wp-block-post-featured-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.05) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.prodotto-card:hover .wp-block-post-featured-image::after {
  opacity: 1;
}

.prodotto-thumbnail img,
.prodotto-card .wp-block-post-featured-image img,
figure.wp-block-post-featured-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  display: block !important;
  margin: 0 !important;
}

/* Assicura aspect ratio anche su figure */
.prodotto-card figure.wp-block-post-featured-image {
  display: block !important;
}

.prodotto-card:hover .prodotto-thumbnail img,
.prodotto-card:hover .wp-block-post-featured-image img {
  transform: scale(1.08);
}

.prodotto-content,
.prodotto-card>.wp-block-group:not(.prodotto-thumbnail) {
  padding: 1.5rem !important;
  flex: 1;
  display: flex !important;
  flex-direction: column !important;
  gap: 1rem !important;
  align-items: flex-start !important;
}

/* Forza layout verticale nelle card */
.prodotto-card.wp-block-group,
.prodotto-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
}

.prodotto-card>* {
  width: 100% !important;
}

.prodotto-card .entry-title,
.prodotto-card .wp-block-post-title {
  font-size: 1.125rem !important;
  margin: 0 !important;
  line-height: 1.5 !important;
  min-height: 3rem;
  display: flex;
  align-items: center;
}

.prodotto-card .entry-title a,
.prodotto-card .wp-block-post-title a {
  color: #222 !important;
  text-decoration: none !important;
  transition: color 0.3s ease;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.prodotto-card .entry-title a:hover,
.prodotto-card .wp-block-post-title a:hover {
  color: #009339 !important;
}

/* Categorie Badge - Moderni e Discreti */
.prodotto-categories,
.prodotto-categories-single,
.wp-block-post-terms {
  display: flex !important;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0 !important;
  list-style: none !important;
  padding: 0 !important;
  order: -1;
}

.prodotto-category,
.wp-block-post-terms a,
.wp-block-post-terms span {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  background: rgba(79, 174, 64, 0.1);
  color: #009339 !important;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 6px;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid rgba(79, 174, 64, 0.2);
}

.prodotto-card:hover .wp-block-post-terms a,
.prodotto-card:hover .wp-block-post-terms span {
  background: #009339;
  color: #fff !important;
  border-color: #009339;
  transform: translateY(-2px);
}

/* Excerpt */
.entry-excerpt,
.wp-block-post-excerpt {
  color: #666 !important;
  line-height: 1.65 !important;
  margin: 0 !important;
  flex: 1;
  font-size: 0.9375rem !important;
}

.wp-block-post-excerpt__excerpt {
  margin: 0 !important;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wp-block-post-excerpt__more-text {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #009339 !important;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none !important;
  transition: all 0.3s ease;
  margin-top: 1rem;
  position: relative;
}

.wp-block-post-excerpt__more-text::after {
  content: '→';
  transition: transform 0.3s ease;
}

.prodotto-card:hover .wp-block-post-excerpt__more-text {
  color: #3d8c33 !important;
  gap: 0.75rem;
}

.prodotto-card:hover .wp-block-post-excerpt__more-text::after {
  transform: translateX(4px);
}

/* Read More Link */
.read-more {
  display: inline-block;
  color: #009339;
  font-weight: 600;
  text-decoration: none;
  margin-top: auto;
  transition: color 0.2s ease;
  font-size: 1rem;
}

.read-more:hover {
  color: #3d8c33;
}

/* Page Header */
.page-header,
.page-header.wp-block-group {
  margin-bottom: 2rem !important;
  padding-bottom: 1.5rem !important;
  border-bottom: 2px solid #009339 !important;
}

.page-header .page-title,
.page-header .wp-block-query-title {
  font-size: 2.5rem !important;
  color: #333 !important;
  margin: 0 0 1rem 0 !important;
  font-weight: 700 !important;
}

.archive-description {
  color: #666 !important;
  line-height: 1.6;
  max-width: 800px;
  font-size: 1.1rem !important;
}

/* Paginazione Prodotti */
.wp-block-query-pagination {
  margin-top: 3rem !important;
}

.wp-block-query-pagination a {
  color: #009339 !important;
  text-decoration: none !important;
  padding: 0.5rem 1rem;
  border: 1px solid #009339;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.wp-block-query-pagination a:hover {
  background: #009339 !important;
  color: #fff !important;
}

.wp-block-query-pagination .wp-block-query-pagination-numbers {
  gap: 0.5rem;
}

.wp-block-query-pagination-numbers .page-numbers {
  padding: 0.5rem 1rem;
  color: #333;
  text-decoration: none;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.wp-block-query-pagination-numbers .page-numbers:hover,
.wp-block-query-pagination-numbers .page-numbers.current {
  background: #009339;
  color: #fff;
  border-color: #009339;
}

/* Breadcrumb */
.prodotto-breadcrumb,
.category-breadcrumb {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1.5rem;
  padding: 0.75rem 0;
}

.prodotto-breadcrumb a,
.category-breadcrumb a {
  color: #009339;
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 500;
}

.prodotto-breadcrumb a:hover,
.category-breadcrumb a:hover {
  color: #3d8c33;
  text-decoration: none !important;
}

.prodotto-breadcrumb .current,
.category-breadcrumb .current {
  color: #333;
  font-weight: 600;
}

/* Single Prodotto */
.prodotto-single {
  max-width: 1200px;
  margin: 0 auto !important;
}

.prodotto-content-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin: 2rem 0;
}

.prodotto-featured-image {
  position: sticky;
  top: 2rem;
  height: fit-content;
}

.prodotto-featured-image img {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.entry-content {
  line-height: 1.8;
  color: #333;
}

/* Pulsante Richiedi Preventivo */
.richiedi-preventivo-btn-link,
.richiedi-preventivo-btn .wp-block-button__link {
  background-color: #009339 !important;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 0.75rem 2rem !important;
  border-radius: 8px !important;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 147, 57, 0.2);
  display: inline-block;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.richiedi-preventivo-btn-link:hover,
.richiedi-preventivo-btn .wp-block-button__link:hover {
  background-color: #007a2e !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 147, 57, 0.3);
  text-decoration: none;
}

/* Sezione Form Richiedi Preventivo */
.richiedi-preventivo-section {
  background: linear-gradient(135deg, rgba(0, 147, 57, 0.05) 0%, rgba(0, 122, 46, 0.05) 100%);
  border-top: 2px solid rgba(0, 147, 57, 0.1);
}

.richiedi-preventivo-section h2 {
  color: #009339;
  font-size: 2.5rem;
  font-weight: 700;
}

.richiedi-preventivo-section p {
  color: #666;
  font-size: 1.1rem;
}

/* Smooth scroll per anchor links */
html {
  scroll-behavior: smooth;
}

/* Offset per anchor (compensa header fisso se presente) */
.richiedi-preventivo-section {
  scroll-margin-top: 100px;
}

.entry-content h2,
.entry-content h3 {
  color: #009339;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.entry-content ul,
.entry-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.entry-content li {
  margin: 0.5rem 0;
}

/* Back Link */
.back-to-archive {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.75rem 1.5rem;
  color: #fff;
  text-decoration: none;
  border-radius: 0.25rem;
  font-weight: 600;
  transition: background 0.2s ease;
}

.back-to-archive:hover {}

/* Related Products */
.related-prodotti {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 2px solid #e0e0e0;
  
  margin: 0 !important;
}

.related-prodotti h2 {
  font-size: 1.75rem;
  color: #333;
  margin-bottom: 1.5rem;
}

/* Sottocategorie List */
.sottocategorie-list {
  background: #f9f9f9;
  padding: 1.5rem;
  border-radius: 0.5rem;
  margin: 2rem 0;
}

.sottocategorie-list h2 {
  font-size: 1.25rem;
  color: #333;
  margin: 0 0 1rem 0;
}

.sottocategorie-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.sottocategorie-list li {
  margin: 0;
}

.sottocategorie-list a {
  display: block;
  padding: 0.75rem 1rem;
  background: #fff;
  color: #333;
  text-decoration: none;
  border-radius: 0.25rem;
  border: 1px solid #e0e0e0;
  transition: all 0.2s ease;
}

.sottocategorie-list a:hover {
  background: #009339;
  color: #fff;
  border-color: #009339;
}

.sottocategorie-list .count {
  color: #999;
  font-size: 0.875rem;
  margin-left: 0.5rem;
}

.sottocategorie .count {

  visibility: hidden;
}

.sottocategorie-list a:hover .count {
  color: rgba(255, 255, 255, 0.8);
}
main{
  padding: 0 20px;
}
/* ========================================
   Shortcode Prodotti - Varianti Grid
   ======================================== */

.grid-2-cols {
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)) !important;
}

.grid-4-cols {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
}

.shortcode-prodotti {
  margin: 2rem 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 95%;
}

.shortcode-prodotti.grid-2-cols {
  grid-template-columns: repeat(2, 1fr);
}

.shortcode-prodotti.grid-4-cols {
  grid-template-columns: repeat(4, 1fr);
}

.shortcode-prodotti .prodotto-card {
  display: flex;
  flex-direction: column;
}

.shortcode-prodotti .prodotto-card .entry-title {
  font-size: 1.125rem;
}

/* ========================================
   Shortcode Categorie
   ======================================== */

.categorie-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 2rem;
  margin: 2rem auto;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1rem 2rem;
  scroll-behavior: smooth;
  min-height: 450px;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Nascondi scrollbar */
.categorie-grid::-webkit-scrollbar {
  display: none;
}

/* Wrapper per le frecce */
.categorie-slider-wrapper {
  position: relative;
  width: 100%;
  margin: 2rem 0;
  min-width: 90vw;
}

@media screen and (max-width: 1768px) {
  .categorie-slider-wrapper {
    min-width: 95vw;
  }
}

.wp-block-search__input {}

/* Frecce navigazione categorie */
.categorie-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.categorie-arrow:hover {
  background: #009339;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.categorie-arrow:hover svg {
  color: #fff;
}

.categorie-arrow svg {
  width: 24px;
  height: 24px;
  color: #009339;
  transition: color 0.3s ease;
}

.categorie-arrow-prev {
  left: -25px;
}

.categorie-arrow-next {
  right: -25px;
}

/* Su mobile, frecce più vicine */
@media screen and (max-width: 768px) {
  .categorie-arrow {
    width: 40px;
    height: 40px;
  }

  .categorie-arrow svg {
    width: 20px;
    height: 20px;
  }

  .categorie-arrow-prev {
    left: 5px;
  }

  .categorie-arrow-next {
    right: 5px;
  }
}

.categorie-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem 0;
}

/* Card Categoria - BOX QUADRATO CON DIMENSIONI FISSE */
.categoria-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 450px;
  aspect-ratio: 1;
  min-height: 320px;
  max-height: 450px;
  height: auto;
  flex-shrink: 0;
  min-width: 320px;
}

.categoria-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

:root :where(.is-layout-constrained)> :last-child {
  margin: 0;
}

.prodotto-single.is-layout-constrained> :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.titolo-newsletter {
  font-size: 2rem !important;
  border-bottom: 1px solid #009339;
  padding-bottom: 1rem;
}

.sottotitolo-newsletter {
  font-size: 1.rem;
}

.newsletter-form p {
  display: flex;
  border: 1px solid #009339;
  padding: 0.1rem 1rem;
  border-radius: 3rem;
}

.newsletter-form input[type="submit"] {
  width: 104px;
  margin-right: -89px;
  margin-top: -3px;
  margin-bottom: -2px;
  border-top-right-radius: 22px;
  border-bottom-right-radius: 22px;
  border: none;
  background: #009339 !important;
  color: white;
}

.newsletter-form p span input {
  border: none;
  background: transparent;
  padding: 7px;
  margin-bottom: 5px;
}

/* Immagine - altezza fissa */
.categoria-image-wrapper {
  /* width: 100%; */
  height: 200px;
  overflow: hidden;
  /* background: #f5f5f5; */
  flex-shrink: 0;
  padding: 1rem;
}

.categoria-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Contenuto - prende lo spazio rimanente */
.categoria-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  justify-content: space-between;
  min-height: 120px;
}

.categoria-title {
  font-size: 1.125rem;
  font-weight: 400;
  margin: 0 !important;
  line-height: 1.4;
  color: #009339 !important;
}

.categoria-description {
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0 0 0.75rem 0;
}

/* Link testuale */
.categoria-link-btn {
  display: inline-block;
  text-decoration: none !important;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: color 0.2s ease;
}

.categoria-link-btn:hover {
  color: #4178b8 !important;
}

/* Vecchi stili - mantieni per backward compatibility */
.categoria-item {
  background: #fff;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.categoria-item:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* ========================================
   Prodotto in Evidenza - Banner Layout
   ======================================== */

.prodotto-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  background: #fff;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  margin: 2rem 0;
}

.prodotto-banner .prodotto-thumbnail {
  aspect-ratio: unset;
  height: 100%;
}

.prodotto-banner .prodotto-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.prodotto-banner .entry-title {
  font-size: 2rem;
  margin: 1rem 0;
}

.prodotto-banner .entry-excerpt {
  font-size: 1.125rem;
  margin: 1.5rem 0;
}

.prodotto-banner .read-more {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: #009339;
  color: #fff;
  text-decoration: none;
  border-radius: 0.25rem;
  font-weight: 600;
  transition: background 0.2s ease;
  margin-top: 1.5rem;
}

.prodotto-banner .read-more:hover {
  background: #3d8c33;
}

.prodotto-evidenza {
  margin: 2rem 0;
}

/* ========================================
   Utility Classes
   ======================================== */

.text-center {
  text-align: center;
}

.mb-2 {
  margin-bottom: 2rem;
}

.mt-2 {
  margin-top: 2rem;
}

/* Responsive Tablet */
@media screen and (max-width: 1024px) and (min-width: 769px) {

  .prodotti-grid .wp-block-post-template,
  .prodotti-grid.wp-block-query .wp-block-post-template {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Responsive Mobile */
@media screen and (max-width: 768px) {

  .newsletter-form p span input {
    width: 39%;
  }

  .prodotti-grid .wp-block-post-template,
  .prodotti-grid.wp-block-query .wp-block-post-template {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .grid-2-cols,
  .grid-4-cols,
  .shortcode-prodotti,
  .shortcode-prodotti.grid-2-cols,
  .shortcode-prodotti.grid-4-cols {
    grid-template-columns: 1fr !important;
  }

  .prodotto-content-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .prodotto-featured-image {
    position: relative;
    top: 0;
  }

  .page-header .page-title {
    font-size: 2rem;
  }

  .sottocategorie-list ul {
    grid-template-columns: 1fr;
  }

  .categorie-grid {
    padding: 1rem;
  }

  .categorie-grid .categoria-card {
    min-width: 280px;
    max-width: 320px;
  }

  .prodotto-banner {
    grid-template-columns: 1fr;
  }

  .prodotto-banner .entry-title {
    font-size: 1.5rem;
  }

  .prodotto-banner .entry-excerpt {
    font-size: 1rem;
  }
}

/* ========================================
   Slider Categorie e Prodotti (Stili Comuni)
   ======================================== */

.mgm-categoria-slider,
.mgm-prodotti-slider,
.mgm-news-slider {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 2rem 0;
  overflow: visible;
  /* border-radius: 8px; */
  background: transparent;
  /* box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); */
}

.slider-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 1rem 0;
}

.slider-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  gap: 2rem;
  padding: 0 1rem;
}

.slider-slide {
  flex-shrink: 0;
  width: calc(33.333% - 1.333rem);
}

/* Responsive: 1 slide per volta su mobile */
@media screen and (max-width: 768px) {
  .slider-slide {
    width: calc(100% - 2rem);
    max-width: none;
  }
}

/* Responsive: 2 slide su tablet */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .slider-slide {
    width: calc(50% - 1rem);
  }
}

.slide-image {
  position: relative;
  width: 100%;
  height: 400px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.3));
  border-radius: 1rem;
}

.slide-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding: 2rem;
  max-width: 800px;
}

.slide-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: white !important;
  text-transform: uppercase;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.slide-subtitle {
  font-size: 1.25rem;
  margin: 0 0 1.5rem 0;
  opacity: 0.95;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.slide-category-badge {
  display: inline-block;
  padding: 0.3rem;
  background: #009339;
  line-height: 10px;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.slide-actions {
  margin-top: 2rem;
}

.slide-button {
  display: inline-block;
  padding: .1rem 1.4rem;
  background: #009339;
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: sticky;
  margin: 0 auto;
}

.slide-button:hover {
  background: #3d8c33;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* Frecce di navigazione */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.slider-arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.slider-arrow svg {
  color: #333;
}

.slider-arrow-prev {
  left: 20px;
}

.slider-arrow-next {
  right: 20px;
}

/* Indicatori */
.slider-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 10px;
}

.slider-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.slider-indicator:hover {
  background: rgba(255, 255, 255, 0.5);
}

.slider-indicator.active {
  background: #fff;
  width: 30px;
  border-radius: 6px;
}

/* Responsive */
@media screen and (max-width: 768px) {
  .slide-image {
    height: 300px;
  }

  .slide-title {
    font-size: 1rem;
  }

  .slide-subtitle {
    font-size: 1rem;
  }

  .slide-category-badge {
    padding: 0.5rem 1.5rem;
    font-size: 0.75rem;
  }

  .slider-arrow {
    width: 40px;
    height: 40px;
  }

  .slider-arrow-prev {
    left: 10px;
  }

  .slider-arrow-next {
    right: 10px;
  }
}

/* ========================================
   Progress Bar Lettura
   ======================================== */

.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, #009339, #3d8c33);
  z-index: 9999;
  transition: width 0.1s ease;
}

/* ========================================
   Breadcrumb + Reading Time
   ======================================== */

.article-breadcrumb-enhanced {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 1rem;
}

.article-breadcrumb-enhanced a {
  color: #009339;
  text-decoration: none;
  transition: color 0.2s ease;
}

.article-breadcrumb-enhanced a:hover {
  color: #3d8c33;
}

.article-breadcrumb-enhanced .separator {
  margin: 0 0.5rem;
  color: #999;
}

.article-breadcrumb-enhanced .current {
  color: #333;
  font-weight: 600;
}

.reading-time {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #666;
  margin-top: 0.5rem;
}

.reading-time svg {
  color: #009339;
}

/* ========================================
   Table of Contents
   ======================================== */

.table-of-contents {
  background: #f9f9f9;
  border: 2px solid #009339;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
  max-width: 100%;
}

.toc-title {
  font-size: 1.25rem;
  color: #333;
  margin: 0 0 1rem 0;
  font-weight: 700;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-item,
.toc-item-sub {
  margin: 0.5rem 0;
}

.toc-item-sub {
  margin-left: 1.5rem;
  font-size: 0.95rem;
}

.toc-list a {
  color: #333;
  text-decoration: none;
  display: block;
  padding: 0.5rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.toc-list a:hover,
.toc-list a.active {
  background: #009339;
  color: #fff;
  padding-left: 1rem;
}

/* ========================================
   Social Share Buttons
   ======================================== */

.social-share-buttons {
  position: absolute;
  left: -80px;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.3s ease;
}

.social-share-buttons.sticky {
  position: fixed;
  top: 120px;
}

/* Wrapper per i bottoni */
.social-share-buttons-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Rimuovi margin/padding da eventuali p dentro social share (se WordPress li aggiunge) */
.social-share-buttons p {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Nascondi br dentro social share */
.social-share-buttons br {
  display: none;
}

.social-share-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 0.5rem;
  text-align: center;
}

.share-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.share-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.share-facebook {
  background: #1877f2;
  color: #fff;
}

.share-twitter {
  background: #1da1f2;
  color: #fff;
}

.share-linkedin {
  background: #0077b5;
  color: #fff;
}

.share-whatsapp {
  background: #25d366;
  color: #fff;
}

/* Mobile: social share in basso orizzontale */
@media screen and (max-width: 1024px) {
  .social-share-buttons {
    position: static !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 2rem 0 !important;
    left: auto !important;
    top: auto !important;
  }
  
  .social-share-buttons-wrapper {
    display: flex !important;
    flex-direction: row !important;
    gap: 1rem !important;
  }
  
  /* Se WordPress aggiunge ancora p */
  .social-share-buttons p {
    display: flex !important;
    flex-direction: row !important;
    gap: 1rem !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .social-share-buttons br {
    display: none !important;
  }
  
  .social-share-buttons .share-btn {
    margin: 0 !important;
  }
  
  .social-share-title {
    display: none;
  }
}

/* ========================================
   Sidebar Related Posts
   ======================================== */

.article-sidebar-column {
  position: sticky;
  top: 100px;
  align-self: flex-start;
}

.sidebar-related-posts {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.sidebar-title {
  font-size: 1.25rem;
  color: #333;
  margin: 0 0 1.5rem 0;
  font-weight: 700;
  border-bottom: 2px solid #009339;
  padding-bottom: 0.75rem;
}

.related-posts-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-post-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.related-post-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.related-post-thumb {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
}

.related-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-post-item:hover .related-post-thumb img {
  transform: scale(1.1);
}

.related-post-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.related-post-title {
  color: #333;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4;
  transition: color 0.2s ease;
}

.related-post-title:hover {
  color: #009339;
}

.related-post-date {
  font-size: 0.75rem;
  color: #999;
}

/* Mobile: rimuovi sidebar */
@media screen and (max-width: 768px) {
  .article-with-sidebar .wp-block-columns {
    flex-direction: column;
  }
  
  .article-main-column,
  .article-sidebar-column {
    width: 100% !important;
    flex-basis: 100% !important;
  }
  
  .article-sidebar-column {
    position: static;
  }
  
  /* Mobile: contenuto articolo */
  .article-main-content {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
  
  .article-main-content .wp-block-group {
    max-width: 100%;
  }
  
  .wp-block-post-content {
    font-size: 1rem;
  }
  
  .wp-block-post-content h2 {
    font-size: 1.75rem;
    margin-top: 2.5rem;
  }
  
  .wp-block-post-content h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
  }
  
  .wp-block-post-content img,
  .wp-block-post-content figure {
    margin: 2rem 0;
  }
}

/* ========================================
   Stili Articoli Singoli
   ======================================== */

/* Hero articolo */
.article-hero-categories .wp-block-post-terms__separator {
  display: none;
}

.article-hero-categories a {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: #009339;
  color: #fff !important;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 1rem;
  letter-spacing: 0.5px;
  text-decoration: none;
  margin: 0 0.25rem;
}

/* Contenuto articolo - Allargato */
.article-main-content {
  max-width: 100% !important;
}

.article-main-content .wp-block-group {
  max-width: 1000px;
  margin: 0 auto;
}

.wp-block-post-content {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #333;
  max-width: 100%;
}

/* Drop Cap - Prima lettera grande */
.wp-block-post-content > p:first-of-type:first-letter {
  float: left;
  font-size: 4.5rem;
  line-height: 0.9;
  margin: 0.1rem 0.2rem 0 0;
  font-weight: 700;
  color: #009339;
}

.wp-block-post-content h2 {
  font-size: 2.25rem;
  margin-top: 3.5rem;
  margin-bottom: 1.5rem;
  color: #222;
  font-weight: 700;
  line-height: 1.3;
}

.wp-block-post-content h3 {
  font-size: 1.75rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
  color: #333;
  font-weight: 700;
  line-height: 1.4;
}

.wp-block-post-content p {
  margin-bottom: 1.75rem;
  line-height: 1.8;
  max-width: 100%;
}

/* Blockquote/Citazioni Stilizzate */
.wp-block-post-content blockquote,
.wp-block-quote {
  border-left: 4px solid #009339;
  background: #f9f9f9;
  padding: 2rem 2.5rem;
  margin: 3rem 0;
  font-style: italic;
  border-radius: 0 8px 8px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  max-width: 100%;
}

.wp-block-post-content blockquote p,
.wp-block-quote p {
  font-size: 1.25rem;
  line-height: 1.7;
  color: #555;
  margin: 0;
}

.wp-block-quote cite {
  display: block;
  margin-top: 1rem;
  font-size: 0.95rem;
  color: #999;
  font-style: normal;
  text-align: right;
}

.wp-block-quote cite:before {
  content: "— ";
}

/* Immagini inline con caption - Allargate */
.wp-block-post-content img,
.wp-block-post-content figure img {
  border-radius: 12px;
  margin: 3rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  height: auto;
}

.wp-block-post-content figure {
  margin: 3rem 0;
  max-width: 100%;
}

.wp-block-post-content figure:hover img {
  transform: scale(1.01);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

.wp-block-post-content figcaption {
  text-align: center;
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
  margin-top: 1rem;
  padding: 0 1rem;
}

.wp-block-post-content ul,
.wp-block-post-content ol {
  margin: 2rem 0;
  padding-left: 2.5rem;
  max-width: 100%;
}

.wp-block-post-content li {
  margin: 1rem 0;
  line-height: 1.8;
}

.wp-block-post-content ul li::marker {
  color: #009339;
}

/* Tags articolo */
.article-tags a {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #f0f0f0;
  color: #666 !important;
  font-size: 0.875rem;
  border-radius: 4px;
  text-decoration: none;
  margin: 0.25rem;
  transition: all 0.2s ease;
}

.article-tags a:hover {
  background: #009339;
  color: #fff !important;
}

/* ========================================
   Archive Header Migliorato
   ======================================== */

.archive-header {
  max-width: 100% !important;
}

.archive-header h1,
.archive-header .wp-block-query-title {
  font-size: 3rem !important;
  font-weight: 700 !important;
  color: #222 !important;
  margin-bottom: 1rem !important;
}

.archive-description {
  color: #666 !important;
  line-height: 1.6;
  max-width: 100%;
  font-size: 1.125rem !important;
  margin-bottom: 2rem !important;
}

/* Filtri Categorie - Pillole Moderne */
.archive-category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  max-width: 100%;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  background: #fff;
  color: #333 !important;
  text-decoration: none !important;
  border-radius: 50px;
  font-size: 0.9375rem;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid #e0e0e0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  line-height: 0;
}

.filter-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.filter-btn:hover::before {
  left: 100%;
}

.filter-btn:hover {
  background: linear-gradient(135deg, rgba(0, 147, 57, 0.08), rgba(0, 147, 57, 0.12));
  color: #009339 !important;
  border-color: rgba(0, 147, 57, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 147, 57, 0.15);
}

.filter-btn.active {
  background: linear-gradient(135deg, #009339, #007a2e);
  color: #fff !important;
  border-color: #009339;
  box-shadow: 0 4px 16px rgba(0, 147, 57, 0.3);
  transform: translateY(-2px);
}

.filter-btn.active:hover {
  background: linear-gradient(135deg, #007a2e, #006024);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 147, 57, 0.4);
}

/* Mobile filtri */
@media screen and (max-width: 768px) {
  .archive-category-filters {
    gap: 0.5rem;
  }
  
  .filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
}

/* ========================================
   Featured Articles (Sticky)
   ======================================== */

.featured-articles {
  margin-bottom: 2rem;
}

.featured-articles .wp-block-post-template {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 2rem !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 auto !important;
  max-width: 1400px;
  width: 100%;
}

.featured-article-card {
  position: relative;
  overflow: hidden;
}

.featured-article-card::before {
  content: 'In Evidenza';
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #009339;
  color: #fff;
  padding: 0.375rem 0.875rem;
  border-radius: 6px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 10;
}

.featured-article-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(0, 147, 57, 0.15) !important;
}

/* Nascondi featured se non ci sono sticky */
.featured-articles:has(.wp-block-query-no-results) {
  display: none;
}

/* Nascondi titolo "In Evidenza" se non ci sono featured */
.featured-articles:has(.wp-block-query-no-results) + h2,
.featured-articles:has(.wp-block-query-no-results) ~ h2 {
  display: none;
}

/* Stile titoli sezioni */
.articles-grid ~ h2,
.featured-articles ~ h2 {
  color: #222;
  font-weight: 700;
  margin-bottom: 2rem;
}

/* ========================================
   Griglia Articoli Archive
   ======================================== */

.articles-grid .wp-block-post-template {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 2.5rem !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 auto !important;
  max-width: 1400px;
  width: 100%;
}

.articles-grid .wp-block-post-template > li {
  margin: 0 !important;
  width: 100% !important;
}

.article-content {
  padding: 1.5rem !important;
}

/* Paginazione Migliorata */
.wp-block-query-pagination {
  margin-top: 4rem !important;
  padding-top: 2rem;
  border-top: 1px solid #e0e0e0;
}

.wp-block-query-pagination-numbers {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.wp-block-query-pagination-numbers .page-numbers {
  min-width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.3s ease;
}

/* Responsive Featured */
@media screen and (max-width: 1024px) {
  .featured-articles .wp-block-post-template {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media screen and (max-width: 768px) {
  .featured-articles .wp-block-post-template {
    grid-template-columns: 1fr !important;
  }
}

.article-card {
  border-radius: 12px !important;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(79, 174, 64, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08) !important;
  border-color: rgba(79, 174, 64, 0.2);
}

.article-thumbnail {
  overflow: hidden;
}

.article-thumbnail img {
  transition: transform 0.3s ease;
}

.article-card:hover .article-thumbnail img {
  transform: scale(1.05);
}

.article-categories a,
.article-categories-single a {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  background: rgba(79, 174, 64, 0.1);
  color: #009339 !important;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 6px;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid rgba(79, 174, 64, 0.2);
}

.article-card:hover .article-categories a {
  background: #009339;
  color: #fff !important;
  border-color: #009339;
  transform: translateY(-2px);
}

.article-meta-small {
  color: #999;
  font-size: 0.875rem;
}

/* Responsive articoli */
@media screen and (max-width: 1024px) and (min-width: 769px) {
  .articles-grid .wp-block-post-template {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media screen and (max-width: 768px) {
  .articles-grid .wp-block-post-template {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
}

/* ========================================
   Fix Prodotti Correlati - Grid Layout
   ======================================== */

/* Grid per prodotti correlati - STESSO LAYOUT della griglia principale */
.related-prodotti .wp-block-post-template,
.related-prodotti.wp-block-query .wp-block-post-template {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 2rem !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 auto !important;
  max-width: 1200px;
  justify-items: center;
}

/* Reset eventuali stili inline per i singoli prodotti correlati */
.related-prodotti .wp-block-post-template > li {
  margin: 0 !important;
  width: 100% !important;
  max-width: 400px;
}

/* Responsive prodotti correlati - Tablet */
@media screen and (max-width: 1024px) and (min-width: 769px) {
  .related-prodotti .wp-block-post-template {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Mobile - Scroll orizzontale per prodotti correlati */
@media screen and (max-width: 768px) {
  .related-prodotti {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 !important;
  }
  
  .related-prodotti .wp-block-post-template {
    grid-template-columns: repeat(3, minmax(280px, 1fr)) !important;
    width: max-content;
  }
}

/* ========================================
   News Slider - Layout Moderno
   ======================================== */

.mgm-news-slider-container {
  width: 100%;
  margin: 3rem 0;
}

.news-slider-title {
  text-align: center;
  font-size: 2.5rem;
  color: #333;
  margin-bottom: 2rem;
  font-weight: 700;
}

/* News slider max 4 colonne desktop */
.mgm-news-slider .slider-slide {
  flex-shrink: 0;
  width: calc(25% - 1.5rem); /* 4 colonne */
}

/* Se c'è solo 1 news, centra */
.mgm-news-slider[data-total-slides="1"] .slider-track {
  justify-content: center;
}

.mgm-news-slider[data-total-slides="1"] .slider-slide {
  width: 100%;
  max-width: 500px;
}

/* Nascondi frecce e indicatori se solo 1 slide */
.mgm-news-slider[data-total-slides="1"] .slider-arrow,
.mgm-news-slider[data-total-slides="1"] .slider-indicators {
  display: none;
}

/* Responsive 3 colonne per schermi medi */
@media screen and (min-width: 769px) and (max-width: 1440px) {
  .mgm-news-slider .slider-slide {
    width: calc(33.333% - 1.333rem); /* 3 colonne */
  }
}

/* Responsive 2 colonne per tablet */
@media screen and (min-width: 481px) and (max-width: 768px) {
  .mgm-news-slider .slider-slide {
    width: calc(50% - 1rem); /* 2 colonne */
  }
}

/* Mobile - Stack verticale moderno */
@media screen and (max-width: 480px) {
  .news-slider-title {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
  }
  
  .mgm-news-slider {
    overflow: visible;
  }
  
  .mgm-news-slider .slider-wrapper {
    overflow: visible;
  }
  
  .mgm-news-slider .slider-track {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transform: none !important;
    transition: none !important;
  }
  
  .mgm-news-slider .slider-slide {
    width: 100% !important;
    max-width: 100%;
  }
  
  /* Nascondi frecce e indicatori su mobile */
  .mgm-news-slider .slider-arrow,
  .mgm-news-slider .slider-indicators {
    display: none;
  }
  
  /* Card news moderna su mobile */
  .mgm-news-slider .slide-image {
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
  }
  
  .mgm-news-slider .slide-content {
    padding: 1.5rem;
  }
  
  .mgm-news-slider .slide-title {
    font-size: 1.5rem;
  }
  
  .mgm-news-slider .slide-subtitle {
    font-size: 1rem;
  }
}

/* ========================================
  Sezione come possiamo
   ======================================== */

.come-possiamo{
  max-width: 80%;
}

.team blockquote{
  border: none;
  padding: inherit;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  background: none;
}