/* ==================================================
   EB - WHERE TO EAT
   Archivio + single template. La galleria PRO è gestita da eb-pro-gallery-unified.css
   ================================================== */

/* Archivio: indirizzo card */
.post-type-archive-where-to-eat .eb-address,
.post-type-archive-where-to-eat .eb-card .eb-address {
  color: #232323 !important;
  opacity: 1 !important;
}

/* Testi contenuto */
body.single-where-to-eat #st-content-wrapper,
body.single-where-to-eat #st-content-wrapper p,
body.single-where-to-eat #st-content-wrapper li,
body.single-where-to-eat #st-content-wrapper span,
body.single-where-to-eat .entry-content,
body.single-where-to-eat .entry-content p,
body.single-where-to-eat .entry-content li,
body.single-where-to-eat .st-content,
body.single-where-to-eat .st-content p,
body.single-where-to-eat .st-content li,
body.single-where-to-eat .eb-two-cols,
body.single-where-to-eat .eb-two-cols p,
body.single-where-to-eat .eb-two-cols li,
body.single-where-to-eat .eb-two-cols label,
body.single-where-to-eat .eb-contact label {
  color: #232323 !important;
  -webkit-text-fill-color: #232323 !important;
}

/* Titoli interni */
body.single-where-to-eat #st-content-wrapper h1,
body.single-where-to-eat #st-content-wrapper h2,
body.single-where-to-eat #st-content-wrapper h3,
body.single-where-to-eat .eb-two-cols h1,
body.single-where-to-eat .eb-two-cols h2,
body.single-where-to-eat .eb-two-cols h3 {
  color: #111 !important;
  -webkit-text-fill-color: #111 !important;
}

/* Link nei testi */
body.single-where-to-eat #st-content-wrapper a,
body.single-where-to-eat .entry-content a,
body.single-where-to-eat .st-content a {
  color: #232323 !important;
  -webkit-text-fill-color: #232323 !important;
}

body.single-where-to-eat #st-content-wrapper a:hover,
body.single-where-to-eat .entry-content a:hover,
body.single-where-to-eat .st-content a:hover {
  color: #8A1726 !important;
  -webkit-text-fill-color: #8A1726 !important;
}

/* Titolo sopra immagine / hero */
body.single-where-to-eat .st-service-header h1,
body.single-where-to-eat .eb-hero h1,
body.single-where-to-eat .eb-hero-title,
body.single-where-to-eat .hero-title,
body.single-where-to-eat .st-slider h1,
body.single-where-to-eat .eb-slider h1,
body.single-where-to-eat [class*="hero"] h1,
body.single-where-to-eat [class*="slider"] h1 {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  text-shadow: 0 3px 14px rgba(0,0,0,.65) !important;
}

/* Bottoni / card */
body.single-where-to-eat .eb-map-btn,
body.single-where-to-eat .eb-submit,
body.single-where-to-eat .eb-village-name {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* Critical hero moved from template */
html{font-family:Roboto,system-ui,-apple-system,"Segoe UI",Arial,sans-serif}
.eb-wte .eb-hero-slider,
.eb-wte .eb-local-hero{aspect-ratio:1600/640;min-height:280px}
@media(min-width:768px){.eb-wte .eb-hero-slider,.eb-wte .eb-local-hero{min-height:400px}}
.eb-wte .eb-hero-slider{background:#000;border-radius:14px;overflow:hidden}
.eb-wte .eb-hero-slide{display:block;flex:0 0 100%;width:100%;height:100%}
.eb-wte picture.eb-hero-img{display:block;width:100%;height:100%}
.eb-wte picture.eb-hero-img>img,
.eb-wte img.eb-hero-img{display:block;width:100%;height:100%;object-fit:cover;object-position:center center}
@media(max-width:767px){.eb-wte .eb-hero-slider{aspect-ratio:3/2}.eb-wte picture.eb-hero-img>img,.eb-wte img.eb-hero-img{object-fit:cover;object-position:center center;background:transparent}}

/* Layout/template moved from single-where-to-eat.php */
/* Scoped layout */
.eb-wte .eb-two-cols{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:24px}
@media(max-width:1024px){.eb-wte .eb-two-cols{grid-template-columns:1fr}.eb-wte .eb-main{order:1}.eb-wte .eb-side{order:2}}
.eb-wte .eb-content{margin-top:10px}.eb-wte .eb-side{margin-top:10px}

/* =========================
   HERO (FIX DEFINITIVO)
   ========================= */

/* contenitore */
.eb-wte .eb-hero-slider{
  position:relative;
  border-radius:14px;
  overflow:hidden;
  background:#000;
  height:auto;
  width:100%;
  max-width:100%;
  padding:0 !important;
  margin:0 !important;
}

/* track */
.eb-wte .eb-hero-slides{
  display:flex;
  width:100%;
  height:100%;
  align-items:stretch;
  transition:transform .4s ease;
  will-change:transform;
  gap:0 !important;              /* IMPORTANTISSIMO: niente gap */
  padding:0 !important;
  margin:0 !important;
}

/* slide: DEVE essere esattamente 100% */
.eb-wte .eb-hero-slide{
  flex:0 0 100% !important;
  width:100% !important;
  max-width:100% !important;
  height:100%;
  display:block;
  padding:0 !important;
  margin:0 !important;
  overflow:hidden;
}

/* il link deve riempire tutta la slide */
.eb-wte a.eb-hero-slide{
  display:block;
  width:100% !important;
  height:100% !important;
}

/* FIX <picture> / <img> (riempiono davvero) */
.eb-wte .eb-hero-slide picture{
  display:block !important;
  width:100% !important;
  height:100% !important;
  margin:0 !important;
}

.eb-wte .eb-hero-slide picture > img,
.eb-wte .eb-hero-slide img.eb-hero-img{
  display:block !important;
  width:100% !important;
  height:100% !important;
  max-width:100% !important;
  object-fit:cover !important;
  object-position:50% 50% !important; /* CENTRO */
  transform:none !important;
  left:auto !important;
  right:auto !important;
}

/* Mobile: niente crop, niente “spostamenti” */
@media(max-width:767px){
  /* Mantieni l'altezza “bella” senza bande nere */
  .eb-wte .eb-hero-slider{
    aspect-ratio:16/9;      /* se vuoi più alta: 4/3 */
    background:transparent; /* niente nero */
  }

  /* su mobile: RIEMPI sempre, niente letterbox */
  .eb-wte .eb-hero-slide picture > img,
  .eb-wte .eb-hero-slide img.eb-hero-img{
    object-fit:cover !important;      /* <-- elimina le bande */
    object-position:50% 50% !important;
    background:transparent !important; /* sicurezza */
  }
}

/* Nav / dots / caption */
.eb-wte .eb-hero-nav{position:absolute;top:50%;transform:translateY(-50%);border:0;background:rgba(0,0,0,.45);color:#fff;width:40px;height:40px;border-radius:999px;cursor:pointer}
.eb-wte .eb-hero-nav.eb-prev{left:10px}.eb-wte .eb-hero-nav.eb-next{right:10px}
.eb-wte .eb-hero-dots{position:absolute;left:0;right:0;bottom:8px;display:flex;gap:6px;justify-content:center}
.eb-wte .eb-hero-dots button{width:8px;height:8px;border-radius:999px;border:0;background:rgba(255,255,255,.5)}
.eb-wte .eb-hero-dots button.is-active{background:#fff}
.eb-wte .eb-hero-caption{position:absolute;left:18px;bottom:18px;padding:10px 14px;border-radius:12px;background:linear-gradient(180deg,rgba(0,0,0,.35),rgba(0,0,0,.55))}
.eb-wte .eb-hero-title{margin:0;color:#fff;font-weight:800;font-size:clamp(22px,3vw,34px);text-shadow:0 2px 12px rgba(0,0,0,.35)}
.eb-wte .eb-local-hero{position:relative;border-radius:14px;overflow:hidden;height:auto}
.eb-wte .eb-local-hero img{width:100%;height:100%;display:block;object-fit:cover}
.eb-wte .eb-hero-fallback{margin:16px 0 8px;font-weight:800;font-size:clamp(22px,3vw,34px)}

/* Sidebar cards */
.eb-wte .eb-side-card{border:1px solid #eee;border-radius:14px;padding:14px;background:#fafafa;margin-bottom:14px}
.eb-wte .eb-side-title{margin:0 0 10px}
.eb-wte .eb-village-card{display:block;position:relative;border-radius:12px;overflow:hidden;text-decoration:none;color:#fff;background:#000}
.eb-wte .eb-side-thumb{width:100%;height:auto;display:block;opacity:.95;aspect-ratio:400/266;object-fit:cover}
.eb-wte .eb-village-name{position:absolute;left:0;right:0;bottom:0;background:#8b1020;padding:12px 14px;text-align:center;font-weight:700;color:#fff}

.eb-wte .eb-cta{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.eb-wte .eb-chip{display:inline-flex;align-items:center;gap:8px;padding:9px 12px;border:1px solid #8b1020;border-radius:999px;color:#8b1020;background:#fff;text-decoration:none}
.eb-wte .eb-chip.eb-solid{background:#8b1020;color:#fff;border-color:#8b1020}

.eb-wte .eb-menu-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px}
.eb-wte .eb-menu{border:1px solid #eee;border-radius:12px;padding:12px;background:#fff}
.eb-wte .eb-menu-title{margin:.4rem 0 .25rem}
.eb-wte .eb-menu-price{font-weight:700;margin-top:.25rem}

.eb-wte .eb-input,.eb-wte .eb-textarea{width:100%;padding:10px;border:1px solid #ddd;border-radius:10px;margin:.25rem 0 .6rem;background:#fff}
.eb-wte .eb-check{display:flex;align-items:center;gap:8px;margin:.2rem 0 .8rem}
.eb-wte .eb-submit{display:inline-block;padding:10px 14px;border:1px solid #8b1020;border-radius:10px;background:#8b1020;color:#fff;cursor:pointer}

/* Mappa click-to-load */
.eb-wte .eb-map-click{position:relative}
.eb-wte .eb-map-ph{
  width:100%; height:320px;
  border-radius:10px;
  background:#111;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
}
.eb-wte .eb-map-ph__inner{ text-align:center; color:#fff; padding:18px; }
.eb-wte .eb-map-pin{font-size:28px; margin-bottom:6px}
.eb-wte .eb-map-btn{
  margin-top:10px;
  padding:10px 12px;
  border:1px solid #fff;
  background:transparent;
  color:#fff;
  border-radius:10px;
  cursor:pointer;
}
.eb-wte .eb-map iframe{width:100%;border:0;border-radius:10px}

/* Template wrapper */
.eb-wte{
  max-width:1200px;
  margin:30px auto;
  padding:0 16px;
}

.eb-wte .eb-menu-section{margin-top:18px}
.eb-wte .eb-menu-img{width:100%;height:auto;display:block;border-radius:10px}
.eb-wte .eb-hp-field{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden}
.eb-wte .eb-msg{display:none;margin:.5rem 0 0}
.eb-wte .poi-map{width:100%;height:320px;border:0;border-radius:10px}


/* ==================================================
   EB WHERE TO EAT - LCP FINALE STABILE
   Nota: non forziamo hero gigante. Su mobile peggiora Speed Index.
   Obiettivo: hero stabile, LCP pulito, niente immagini/iframe inutili above-the-fold.
   ================================================== */

/* Hero stabile e leggera */
.eb-wte .eb-local-hero,
.eb-wte .eb-hero-slider{
  contain: layout paint;
  background:#f4f4f4;
}

.eb-wte .eb-local-hero img,
.eb-wte .eb-hero-slide picture > img,
.eb-wte .eb-hero-slide img.eb-hero-img{
  opacity:1 !important;
  transform:none !important;
  animation:none !important;
  transition:none !important;
  will-change:auto !important;
}

.eb-wte .eb-hero-slides{
  transition:none !important;
  will-change:auto !important;
}

/* Mobile: misura naturale, non 380/420px */
@media(max-width:767px){
  .eb-wte{
    margin-top:18px;
    padding-left:14px;
    padding-right:14px;
  }

  .eb-wte .eb-wte__head{
    margin:0 0 14px 0;
    padding:0;
  }

  .eb-wte .eb-local-hero,
  .eb-wte .eb-hero-slider{
    height:auto !important;
    min-height:0 !important;
    aspect-ratio:16/9 !important;
    border-radius:16px;
    overflow:hidden;
  }

  .eb-wte .eb-local-hero img,
  .eb-wte .eb-hero-slide,
  .eb-wte .eb-hero-slide picture,
  .eb-wte .eb-hero-slide picture > img,
  .eb-wte .eb-hero-slide img.eb-hero-img{
    width:100% !important;
    height:100% !important;
    object-fit:cover !important;
    object-position:center center !important;
  }

  .eb-wte .eb-hero-caption{
    left:14px;
    right:14px;
    bottom:14px;
    display:inline-block;
    max-width:calc(100% - 28px);
    padding:8px 12px;
    border-radius:12px;
    background:rgba(0,0,0,.55);
  }

  .eb-wte .eb-hero-title{
    font-size:clamp(24px,7vw,32px);
    line-height:1.08;
  }

  .eb-wte .eb-content{
    margin-top:8px;
  }

  .eb-wte .eb-content p:first-child{
    margin-top:0;
  }
}

/* Non caricare mappa vera finché non si clicca */
.eb-wte .eb-map-click{
  width:100%;
}
.eb-wte .eb-map-ph{
  width:100%;
  min-height:260px;
  border:0;
  border-radius:10px;
  background:#111;
  color:#fff;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:18px;
}
.eb-wte .eb-map-ph__inner{
  display:flex;
  flex-direction:column;
  gap:6px;
  align-items:center;
}
.eb-wte .eb-map-title{
  font-weight:700;
}
.eb-wte .eb-map-note{
  font-size:13px;
  opacity:.85;
}

/* Logo: aiuta a evitare warning width/height quando il tema non li stampa */
img[src*="logo@2x"]{
  width:auto;
  max-width:190px;
  height:auto;
}


/* ==================================================
   LCP PARAGRAFI - non lasciare un unico <p> gigante sopra la fold
   ================================================== */
body.single-where-to-eat .eb-wte .eb-content p.eb-wte-split-p{
  margin:0 0 14px !important;
}
body.single-where-to-eat .eb-wte .eb-content p.eb-wte-first-text-lcp{
  margin-top:0 !important;
}
@media(max-width:767px){
  body.single-where-to-eat .eb-wte .eb-content{
    margin-top:10px !important;
  }
  body.single-where-to-eat .eb-wte .eb-content p.eb-wte-split-p{
    font-size:16px !important;
    line-height:1.62 !important;
    margin-bottom:12px !important;
  }
}

/* ==================================================
   LIGHTBOX PULITA
   ================================================== */

/* ===== EB WTE v6 - LCP hero: markup stabile ===== */
.eb-wte .eb-local-hero > img.eb-hero-img{
  display:block !important;
  width:100% !important;
  height:100% !important;
  max-width:100% !important;
  object-fit:cover !important;
  object-position:center center !important;
  opacity:1 !important;
  transform:none !important;
  animation:none !important;
  transition:none !important;
}

body.single-where-to-eat .eb-map-toggle {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid #8A1726;
  border-radius: 999px;
  background: #fff;
  color: #8A1726;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s ease;
}

body.single-where-to-eat .eb-map-toggle,
body.single-where-to-eat .eb-map-toggle:link,
body.single-where-to-eat .eb-map-toggle:visited,
body.single-where-to-eat .eb-map-toggle span {
  color: #8A1726 !important;
  -webkit-text-fill-color: #8A1726 !important;
  text-decoration: none !important;
}

body.single-where-to-eat .eb-map-toggle:hover,
body.single-where-to-eat .eb-map-toggle:hover span,
body.single-where-to-eat .eb-map-toggle[aria-expanded="true"],
body.single-where-to-eat .eb-map-toggle[aria-expanded="true"] span {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

body.single-where-to-eat .eb-map-toggle:hover,
body.single-where-to-eat .eb-map-toggle[aria-expanded="true"] {
  background: #8A1726 !important;
  border-color: #8A1726 !important;
}

body.single-where-to-eat .eb-map-collapsible {
  margin-top: 12px;
}

body.single-where-to-eat .eb-map-collapsible iframe,
body.single-where-to-eat .eb-map-collapsible .poi-map {
  width: 100% !important;
  height: 320px !important;
  border: 0 !important;
  border-radius: 14px !important;
  display: block !important;
}

body.single-where-to-eat .eb-directions {
  margin-top: 10px !important;
}

/* NIENTE SOTTOLINEATURE */
body.single-where-to-eat .eb-side a {
  text-decoration: none !important;
}

body.single-where-to-eat .eb-side a:hover {
  text-decoration: none !important;
}

