/* ========== 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 IMMAGINE IN EVIDENZA ========== */

.alimento-featured-image {
 margin-top: 4rem;
}

.alimento-featured-image__wrapper {
  margin: 0;
  text-align: center;
}

.alimento-featured-image__img {
  width: 100%;        /* prende il 100% del contenitore */
  max-width: 800px;
  height: auto;
  border-radius: 10px;
  display: block;     /* più pulito di inline-block */
  margin: 0 auto;     /* la centri comunque */
}

/* ========== LAYOUT BASE – VALORI NUTRIZIONALI ========== */

/* Spazio tra HERO e contenuto nel SINGOLO valore nutrizionale */
.single-valore_nutrizionale .page-hero + .generic-content {
  margin-top: 4rem;
}

/* Contenitore contenuto principale della scheda */
.ndc-valore-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem 1rem 0;
}

@media screen and (max-width: 767px) {
  .ndc-valore-content {
    padding-top: 1rem;
  }
}
/* =================================================
   SEARCH BAR – ARCHIVIO VALORI NUTRIZIONALI (FINAL)
================================================= */

.valori-search{
  max-width: 800px;
  margin: 4rem auto 2rem;
  display: flex;
  gap: .75rem;
  align-items: stretch;          /* stessa altezza reale */
}

/* reset totale controlli */
.valori-search input[type="search"],
.valori-search button{
  box-sizing: border-box !important;
  height: 52px !important;
  min-height: 52px !important;
  margin: 0 !important;
  border-radius: 10px !important;
  font-size: 1rem !important;
  appearance: none;
  -webkit-appearance: none;
}

/* INPUT */
.valori-search input[type="search"]{
  flex: 1;
  padding: 0 1rem !important;
  border: 1px solid rgba(0,0,0,.15) !important;
  line-height: normal !important;
  background: #ffffff;
}

/* BUTTON */
.valori-search button{
  padding: 0 1.2rem !important;
  border: 1px solid transparent !important; /* allinea box-model */
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;

  background: #04211A;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
}

.valori-search button:hover{
  background: #c2380c;
}

/* MOBILE: larghezza < 100% */
@media (max-width: 640px){
  .valori-search{
    max-width: 92%;
  }
}


/* ========== GRIGLIA POST: VALORI ========== */

/* GRID – stessa logica degli strumenti */
.valori-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  row-gap: 3rem;
  column-gap: 2rem;
  margin-bottom: 4rem;
  align-items: stretch;
}

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

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

/* ========== ARCHIVIO VALORI NUTRIZIONALI ========== */

.valore-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  overflow: hidden; /* per tenere tutto dentro i bordi arrotondati */
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

/* layout interno: immagine a sinistra, testo a destra */
.valore-card-inline {
  display: flex;
  align-items: stretch; 
}

/* colonna immagine: a tutta altezza card */
.valore-thumb-inline {
  flex: 0 0 80px;     
  display: flex;
}

.valore-thumb-inline img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* colonna testo */
.valore-text-inline {
  flex: 1;
  padding: 20px;
}

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

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

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

.valore-excerpt {
  font-size: 0.95rem;
  color: #444;
  margin: 0 0 6px;
}

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

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

/* Intestazioni alfabetiche */
.valori-letter-heading {
  margin: 40px 0 15px;
  line-height: 1;
  color: #04211A;
  border-left: 4px solid #c2380c;
  padding-left: 12px;
}

/* Paginazione archivio alimenti */
.valori-pagination {
  margin-top: 32px;
  text-align: center;
}

/* ========== CONTENUTO SINGOLO – VALORE NUTRIZIONALE ========== */

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

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

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

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

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

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

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

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

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

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

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

/* Accessibilità: testo solo per screen reader (paginazione, ecc.) */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}


/* ========== 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;
  }
}

