/* ======================================================
   1. NASCONDI COMMENTI / SHARE / JETPACK / MI PIACE
====================================================== */

#comments,
.comments-area,
.comment-respond,
.wp-block-post-comments,
.wp-block-comments,
.wp-block-comment-template,
.wp-block-post-comments-form {
  display: none !important;
}

.sharedaddy,
.sd-sharing,
.sd-like,
.sd-rating,
.sd-content,
.sd-block,
.share-post,
.jp-relatedposts,
.wp-block-jetpack-sharing-buttons,
.jp-sharing-input-touch .sharedaddy,
div.sharedaddy,
div.sd-block,
div.sd-content,
#jp-post-flair {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}


/* ======================================================
   2. IMMAGINI RESPONSIVE
   Regola leggera: evita immagini più larghe del contenitore.
====================================================== */

.entry-content figure,
.wp-block-image {
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.wp-block-image img,
.entry-content figure img,
.post-content figure img,
.page-content figure img {
  max-width: 100% !important;
  height: auto !important;
}


/* ======================================================
   3. CARD TEATRI / PIAZZE
   Per le card nella pagina I Teatri / Le piazze.
====================================================== */

.rtb-teatro-card {
  position: relative !important;
  display: block !important;
  overflow: hidden !important;
  width: 100% !important;
  height: 380px !important;
  min-height: 380px !important;
  border-radius: 24px !important;
  background: #FBE9DE !important;
  border: 1px solid rgba(239, 121, 88, 0.25) !important;
  text-decoration: none !important;
  color: inherit !important;
  box-sizing: border-box !important;
}

.rtb-teatro-card article {
  position: relative !important;
  overflow: hidden !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 380px !important;
  border-radius: 24px !important;
  box-sizing: border-box !important;
}

.rtb-teatro-card img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  min-height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  transition: transform 0.5s ease !important;
}

.rtb-teatro-card:hover img {
  transform: scale(1.04) !important;
}


/* ======================================================
   4. MAPPA / BLOCCO TERRITORIO
   Da tenere solo se nella pagina I Teatri usi ancora
   il blocco con classe rtb-piazze-mappa.
====================================================== */

.rtb-piazze-mappa {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 1180px;
  margin: 5rem auto 4rem;
  padding: 0 1.5rem;
  align-items: stretch;
}

.rtb-piazze-mappa__testo {
  background: #EF7958;
  color: #13100E;
  border-radius: 28px;
  padding: clamp(2rem, 4vw, 3.5rem);
}

.rtb-piazze-mappa__label {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.45);
  color: #13100E;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.rtb-piazze-mappa__testo h2 {
  margin: 0 0 1.5rem;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 0.95;
  color: #13100E;
}

.rtb-piazze-mappa__testo p {
  margin: 0 0 1.1rem;
  font-size: 1.05rem;
  line-height: 1.65;
}

.rtb-piazze-mappa__button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  background: #13100E;
  color: #fff !important;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.rtb-piazze-mappa__visual {
  position: relative;
  min-height: 520px;
  border-radius: 28px;
  background: #FBE9DE;
  border: 1px solid rgba(239,121,88,0.28);
  overflow: hidden;
}

.rtb-piazze-mappa__visual::before {
  content: "";
  position: absolute;
  inset: 2rem;
  border: 1px solid rgba(239,121,88,0.22);
  border-radius: 24px;
}


/* ======================================================
   5. MOBILE SOLO PER CARD TEATRI E MAPPA
   Non tocca header, menu, cover, contenuto pagina o colonne.
====================================================== */

@media (max-width: 650px) {
  .rtb-teatro-card {
    height: 320px !important;
    min-height: 320px !important;
  }

  .rtb-teatro-card article {
    min-height: 320px !important;
  }

  .rtb-teatro-card h3 {
    font-size: 2rem !important;
  }

  .rtb-piazze-mappa {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 3rem auto;
    padding: 0 1rem;
  }

  .rtb-piazze-mappa__visual {
    min-height: 360px;
  }
}/* ======================================================
   HEADER FISSO / STICKY IN ALTO
====================================================== */

header.wp-block-template-part,
.wp-site-blocks > header {
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
  background: #ffffff !important;
  box-shadow: 0 4px 18px rgba(19, 16, 14, 0.08) !important;
}/* ======================================================
   FIX MOBILE IMMAGINI ARTICOLI IN EVIDENZA
====================================================== */

.wp-block-post-featured-image {
  width: 100% !important;
  overflow: hidden !important;
  border-radius: 20px !important;
}

.wp-block-post-featured-image img {
  width: 100% !important;
  height: 260px !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block !important;
}

@media (max-width: 650px) {
  .wp-block-post-featured-image img {
    height: 220px !important;
  }
}/* ======================================================
   MOBILE - RIPARAZIONE LARGHEZZA ARTICOLI
====================================================== */

@media (max-width: 768px) {

  .single-post .site-main,
  .single-post .entry-content,
  .single-post article,
  .entry-content,
  .post-content {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }

  .ap-full-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    margin: 0 auto !important;
  }

  .wp-block-cover,
  .wp-block-cover-image,
  .entry-header,
  .post-header {
    min-height: unset !important;
    height: auto !important;
    max-height: none !important;
    margin-top: 0 !important;
    margin-bottom: 15px !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .wp-block-cover img,
  .wp-block-cover__image-background {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
  }

  .wp-block-cover__inner-container {
    position: relative !important;
    padding: 0 !important;
  }

  .ap-p,
  .ap-first-phrase,
  .ap-program-notice-text {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .ap-first-phrase {
    margin-top: 15px !important;
  }
}