/* ========== HERO (VERSIONE CLEAN – SOLO CENTERED) ========== */

.hero-breadcrumb-wrapper {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  text-align: center;
  z-index: 5;
}

.hero-breadcrumb-wrapper .breadcrumb a,
.hero-breadcrumb-wrapper .breadcrumb span {
  color: #ffffff;
  font-weight: 500;
  font-size: 1.1rem;
}

.hero-breadcrumb-wrapper .breadcrumb a:hover {
  text-decoration: underline;
  color: #c2380c !important;
}

/* Testo bianco dentro la hero */
.page-hero h1,
.page-hero h2,
.page-hero h4,
.page-hero h5,
.page-hero h6,
.page-hero p {
  color: #ffffff;
}

/* Hero base */
.page-hero {
  position: relative;
  background: #04211A;        /* verde scuro NDC */
  padding: 4rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Hero centrata (usata nei calcolatori) */
.page-hero.layout-centered {
  min-height: 400px;
}

/* Icona hero */
.page-hero .hero-icon {
  margin-bottom: 1.5rem;
}

.page-hero .hero-icon svg {
  width: 64px;
  height: 64px;
  fill: #c2380c !important;  /* rosso NDC */
}

/* Titolo */
.page-hero h1.page-title {
  font-size: clamp(2.2rem, 2vw + 1rem, 3rem);
  font-weight: 700;
  color: #fff;
}

/* Sottotitolo */
.page-hero .page-subtitle {
  font-size: clamp(1rem, 1.2vw + .6rem, 1.5rem);
  font-weight: 500;
  margin-top: 0.75rem;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

/* Mobile */
@media (max-width: 768px) {
  .page-hero {
    padding: 2.5rem 1rem;
    flex-direction: column;
  }

  .page-hero.layout-centered {
    min-height: 350px;
  }

  .page-hero .hero-icon svg {
    width: 48px;
    height: 48px;
  }

  .page-hero h1.page-title {
    font-size: 1.8rem;
  }

  .page-hero .page-subtitle {
    font-size: 1.1rem;
  }
}

/* ========== LAYOUT BASE PATOLOGIE ========== */

/* Spazio tra HERO e contenuto nel SINGOLO patologia */
.single-patologia .page-hero + .generic-content {
  margin-top: 4rem;
}
.post-type-archive-patologia .generic-content {
    margin-top: 4rem;
}

.ndc-patologia-page .generic-content .container {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem 1rem 0;
}

@media screen and (max-width: 767px) {
  .ndc-patologia-page .generic-content .container {
    padding-top: 1rem;
  }
}

/* ========== CONTENUTO PATOLOGIE ========== */

.ndc-patologia-content h2 {
  color: #04211A;
  text-align: center;
  font-size: 1.8rem;
  margin: 2.5rem 0 1rem;
}

.ndc-patologia-content h3 {
  font-size: 1.5rem;
  color: #c2380c;
  margin: 2rem 0 0.8rem;
}

.ndc-patologia-content h4 {
  font-size: 1.25rem;
  color: #084537;
  margin: 1.5rem 0 0.6rem;
}

.ndc-patologia-content p {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.6rem;
}

.ndc-patologia-content li {
  margin-bottom: 0.6rem;
  padding-left: 1.5rem;
}

.ndc-patologia-content .wp-block-image.size-large img,
.ndc-patologia-content figure img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  margin: 2rem auto;
  border-radius: 8px;
}

.ndc-patologia-content ul,
.ndc-patologia-content ol {
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: 1.2rem;
}

.ndc-patologia-content a {
  color: #084537;
  text-decoration: none;
}

.ndc-patologia-content a:hover {
  color: #c2380c;
}

.ndc-patologia-content .wp-block-image,
.ndc-patologia-content figure {
  display: flex;
  justify-content: center;
  margin: 2rem auto;
  text-align: center;
}

.ndc-patologia-content img {
  border-radius: 8px;
}

/* ========== POST SHARE ========== */
.post-share {
  margin: 2rem 0;
  padding: 1.5rem 0;
  text-align: center;
}

.post-share h3 {
  font-size: 1.7rem;
  margin-bottom: 1.2rem;
  color: #04211A;
}

.post-share .share-buttons {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: nowrap;

}

.post-share .share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: #04211A;      
  border-radius: 8px;        
  transition: background 0.3s ease, transform 0.2s ease;
}

.post-share .share-btn svg {
  width: 24px;
  height: 24px;
  fill: #faf7f3;
}

.post-share .share-btn:hover {
  background: #c2380c;
  transform: scale(1.05);
}

/* ==========================
   CTA CARD – Ruben Domenighini
========================== */
.cta-card-rd {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 2rem 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  text-align: center;
  max-width: 500px;
  margin-top: 4rem !important;
  margin-right: auto;
  margin-left: auto;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 2px solid #084537;
}
.cta-card-rd:hover {
  transform: translateY(-4px);
}
.cta-card-rd__heading {
  font-size: 1.5rem;
  color: #084537;
  margin-bottom: 2rem;
  font-weight: 600;
}
.cta-card-rd__button {
  display: inline-block;
  background-color: #04211A;
  color: #ffffff !important;
  text-decoration: none;
  padding: 0.9rem 2rem;
  font-size: 1rem;
  border-radius: 8px;
  transition: background-color 0.3s ease;
  font-weight: 600;
}
.cta-card-rd__button:hover,
.cta-card-rd__button:focus {
  background-color: #c2380c;
  color: #ffffff !important;
  outline: none;
}
@media (max-width: 600px) {
  .cta-card-rd {
    padding: 1.5rem 0.7rem;
    width: 90%;
    margin: 0 auto;
  }
  .cta-card-rd__heading {
    font-size: 1.6rem;
  }
  .cta-card-rd__button {
    width: 100%;
    font-size: 1rem;
    padding: 1rem;
  }
}

/* ========== GRIGLIA POST: CALCOLATORI ========== */
.section-calcolatori {
  padding: 4rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-calcolatori h2 {
  text-align: center;
  color: #c2380c;
}

/* GRID */
.strumenti-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);

  /* ✔ Spazio verticale tra card, ora funziona davvero */
  row-gap: 3rem !important;

  /* ✔ Spazio orizzontale invariato */
  column-gap: 2rem;

  margin-bottom: 4rem;
  align-items: stretch;
}

@media (max-width: 1024px) {
  .strumenti-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .strumenti-grid {
    grid-template-columns: 1fr;
  }
}

/* CARD */
.strumenti-box {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.5rem 1rem;
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  /* ATTENZIONE:
     margin-bottom qui NON influenza la distanza verticale nelle grid
     quindi l’ho rimosso per pulizia */
}

.strumenti-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* IMMAGINE (se la userai) */
.strumenti-image img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

/* CONTENUTO INTERNO DELLA CARD */
.strumenti-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  text-align: center;
}

/* TITOLO */
.strumenti-title {
  font-size: 1.2rem;
  color: #04211A;
  margin: 0;
  text-align: center;
}

.strumenti-title a {
  color: inherit;
  text-decoration: none;
}

.strumenti-title a:hover {
  color: #c2380c;
  text-decoration: underline;
}

/* BOTTONE */
.strumenti-button {
  display: block;
  width: max-content;
  margin-top: 1rem;
  background-color: #084537;
  color: #ffffff !important;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.strumenti-button:hover {
  background-color: #c2380c;
  color: #ffffff !important;
}

/* MOBILE: card più strette e centrate */
@media (max-width: 640px) {
  .strumenti-box {
    max-width: 320px;
    margin: 0 auto;
    width: 100%;
  }
}

/* Archivio strumenti: griglia */
.strumenti-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.strumento-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px 20px 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.strumento-title {
  font-size: 1.2rem;
  margin: 0 0 8px;
}

.strumento-title a {
  text-decoration: none;
  color: #04211A;
}

.strumento-title a:hover {
  color: #c2380c;
}

.strumento-excerpt {
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 12px;
}

.strumento-link {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  color: #084537;
}

.strumento-link:hover {
  color: #c2380c;
}

.strumenti-pagination {
  margin-top: 32px;
  text-align: center;
}