/* APF_V4_OFFERS_HORIZONTAL_CAROUSEL_20261014
   Caroselli offerte V4 - solo layout, nessun dato nuovo.
*/

html body #feed.apf-v4-vertical-feed {
  width: 100% !important;
  max-width: 1050px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  gap: 20px !important;
}

html body #feed.apf-v4-vertical-feed > .apf-v4-offer-carousel-block {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 1050px !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  padding: 17px 16px 9px !important;
  background: #fff;
  border: 1px solid #dce6f5;
  border-radius: 20px;
}

.apf-v4-offer-carousel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
}

.apf-v4-offer-carousel-heading h3 {
  margin: 0;
  color: #09264a;
  font-size: 19px;
  font-weight: 800;
}

.apf-v4-offer-carousel-navigation {
  display: flex;
  gap: 7px;
}

.apf-v4-offer-carousel-navigation button {
  width: 37px;
  height: 37px;
  flex: 0 0 37px;
  border: 1px solid #dce6f5;
  border-radius: 50%;
  background: #f4f8ff;
  color: #0758c9;
  font-size: 21px;
  cursor: pointer;
}

.apf-v4-offer-carousel-track {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 16px !important;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 12px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

html body #feed.apf-v4-vertical-feed .apf-v4-offer-carousel-track > .deal {
  box-sizing: border-box !important;
  flex: 0 0 calc((100% - 16px) / 2) !important;
  width: calc((100% - 16px) / 2) !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  scroll-snap-align: start;
}

html body #feed.apf-v4-vertical-feed .apf-v4-offer-carousel-track .deal .photo {
  height: 215px !important;
  max-height: 215px !important;
  overflow: hidden !important;
}

html body #feed.apf-v4-vertical-feed .apf-v4-offer-carousel-track .deal .photo img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

html body #feed.apf-v4-vertical-feed > .apf-v4-post-slot {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 760px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

@media(max-width:820px) {
  html body #feed.apf-v4-vertical-feed {
    max-width: 100% !important;
    gap: 14px !important;
  }

  html body #feed.apf-v4-vertical-feed > .apf-v4-offer-carousel-block {
    padding: 12px 9px 6px !important;
    border-radius: 17px;
  }

  .apf-v4-offer-carousel-heading h3 {
    font-size: 16px;
  }

  .apf-v4-offer-carousel-track {
    gap: 12px !important;
  }

  html body #feed.apf-v4-vertical-feed .apf-v4-offer-carousel-track > .deal {
    flex: 0 0 92% !important;
    width: 92% !important;
  }

  html body #feed.apf-v4-vertical-feed .apf-v4-offer-carousel-track .deal .photo {
    height: 210px !important;
    max-height: 210px !important;
  }
}

/* APF_V4_POST_CAROUSEL_20261014 */
html body #feed.apf-v4-vertical-feed > .apf-v4-post-carousel-block {
  box-sizing:border-box!important;
  width:100%!important;
  max-width:1050px!important;
  min-width:0!important;
  padding:17px 16px 12px!important;
  margin:0 auto!important;
  background:#fff;
  border:1px solid #dce6f5;
  border-radius:20px;
}
.apf-v4-post-carousel-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:12px;
}
.apf-v4-post-carousel-heading h3 {
  margin:0;
  font-size:19px;
  font-weight:800;
  color:#09264a;
}
.apf-v4-post-carousel-arrows {
  display:flex;
  gap:7px;
}
.apf-v4-post-carousel-arrows button {
  width:37px;
  height:37px;
  border:1px solid #dce6f5;
  border-radius:50%;
  background:#f4f8ff;
  color:#0758c9;
  font-size:21px;
  cursor:pointer;
}
.apf-v4-post-carousel-track {
  display:flex!important;
  flex-wrap:nowrap!important;
  gap:16px!important;
  min-width:0;
  padding:2px 2px 12px;
  overflow-x:auto;
  overflow-y:hidden;
  scroll-snap-type:x mandatory;
  scroll-behavior:smooth;
  -webkit-overflow-scrolling:touch;
}
html body #feed.apf-v4-vertical-feed .apf-v4-post-tile {
  position:relative;
  flex:0 0 calc((100% - 32px)/3);
  width:calc((100% - 32px)/3);
  min-width:0;
  aspect-ratio:1/1;
  overflow:hidden;
  scroll-snap-align:start;
  background:#fff;
  border:1px solid #dce6f5;
  border-radius:16px;
}
html body #feed.apf-v4-vertical-feed .apf-v4-post-tile .apf-v4-post-slot {
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin:0!important;
}
.apf-v4-post-tile .business-feed-card {
  width:100%!important;
  max-width:100%!important;
  margin:0!important;
  box-shadow:none!important;
}
.apf-v4-post-tile .business-post-copy {
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
  overflow:hidden;
}
.apf-v4-post-tile .business-post-actions {
  display:none!important;
}
.apf-v4-post-tile .business-post-media,
.apf-v4-post-tile .business-post-native-video {
  max-height:160px;
  overflow:hidden;
}
.apf-v4-post-tile .business-post-media img,
.apf-v4-post-tile video {
  max-height:160px;
  object-fit:cover;
}
.apf-v4-post-tile .apf-v4-open-post {
  position:absolute;
  z-index:4;
  left:10px;
  right:10px;
  bottom:10px;
  padding:11px 8px;
  border-radius:10px;
  background:#1769e9;
  color:white!important;
  font-size:13px;
  font-weight:800;
  text-align:center;
  text-decoration:none;
  box-shadow:0 -5px 22px #ffffffeb;
}
@media(max-width:820px) {
  html body #feed.apf-v4-vertical-feed > .apf-v4-post-carousel-block {
    max-width:100%!important;
    padding:12px 9px 9px!important;
  }
  .apf-v4-post-carousel-heading h3 {font-size:16px;}
  html body #feed.apf-v4-vertical-feed .apf-v4-post-tile {
    flex:0 0 85%;
    width:85%;
  }
}

/* APF_FEED_CENTRALE_GEOMETRIA_COMUNE_LAB_V1 */
html body #feed.apf-v4-vertical-feed {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 760px !important;
  min-width: 0;
  gap: 16px !important;
}

html body #feed.apf-v4-vertical-feed > .deal,
html body #feed.apf-v4-vertical-feed > .apf-v4-post-slot,
html body #feed.apf-v4-vertical-feed > .apf-v4-offer-carousel-block,
html body #feed.apf-v4-vertical-feed > .apf-v4-post-carousel-block,
html body #feed.apf-v4-vertical-feed > .apf-v4-discovery,
html body #feed.apf-v4-vertical-feed > .apf-v4-reels {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

main.layout > section #apfStories {
  box-sizing: border-box;
  width: 100%;
  max-width: 760px;
  min-width: 0;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 820px) {
  html body #feed.apf-v4-vertical-feed {
    gap: 14px !important;
  }
}

/* APF_FEED_CENTRALE_ANTEPRIME_LAB_V2
   Adattamento della proposta Claude al markup verificato.
   Conserva la geometria V1. Solo presentazione della home. */

html body main.layout > section {
  box-sizing: border-box;
  width: 100%;
  max-width: 760px;
  min-width: 0;
  margin-inline: auto;
}

html body #feed.apf-v4-vertical-feed > .apf-v4-offer-carousel-block,
html body #feed.apf-v4-vertical-feed > .apf-v4-post-carousel-block,
html body #feed.apf-v4-vertical-feed > .apf-v4-reels,
html body #feed.apf-v4-vertical-feed > .apf-v4-discovery {
  padding: 16px 16px 10px !important;
  background: #fff !important;
  border: 1px solid #dce6f4 !important;
  border-radius: 18px !important;
}

html body #feed .apf-v4-offer-carousel-heading h3,
html body #feed .apf-v4-post-carousel-heading h3,
html body #feed .apf-v4-reels-head h3,
html body #feed .apf-v4-discovery h3 {
  margin: 0;
  color: #09264a;
  font-size: 18px;
  line-height: 1.25;
}

html body #feed.apf-v4-vertical-feed .apf-v4-post-tile {
  box-sizing: border-box;
  flex: 0 0 calc((100% - 16px) / 2);
  width: calc((100% - 16px) / 2);
  aspect-ratio: auto;
  height: auto;
  display: flex;
  flex-direction: column;
}

html body #feed .apf-v4-post-tile > .apf-v4-post-slot {
  flex: 1;
}

html body #feed .apf-v4-post-tile .business-feed-card {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}

html body #feed .apf-v4-post-tile .apf-business-post-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.3;
}

html body #feed .apf-v4-post-tile .business-post-media {
  display: block !important;
  height: 190px !important;
  max-height: 190px !important;
  padding: 0 !important;
  overflow: hidden;
  background: #eef2f7;
}

html body #feed .apf-v4-post-tile .business-post-media button {
  display: block;
  width: 100% !important;
  height: 190px !important;
  min-height: 0 !important;
  max-height: 190px !important;
  aspect-ratio: auto !important;
  padding: 0;
}

html body #feed .apf-v4-post-tile .business-post-media button:not(:first-child) {
  display: none !important;
}

html body #feed .apf-v4-post-tile .business-post-media img,
html body #feed .apf-v4-post-tile .business-post-native-video video {
  display: block;
  width: 100% !important;
  height: 190px !important;
  max-height: 190px !important;
  object-fit: contain !important;
  background: #eef2f7;
}

html body #feed .apf-v4-post-tile .business-post-native-video {
  height: 190px !important;
  max-height: 190px !important;
  aspect-ratio: auto !important;
}

html body #feed .apf-v4-post-tile .apf-v4-open-post {
  position: static;
  display: block;
  margin: 10px 12px 12px;
  box-shadow: none;
}

@media (max-width: 820px) {
  html body #feed.apf-v4-vertical-feed .apf-v4-post-tile {
    flex-basis: 88%;
    width: 88%;
  }

  html body #feed.apf-v4-vertical-feed > .apf-v4-offer-carousel-block,
  html body #feed.apf-v4-vertical-feed > .apf-v4-post-carousel-block,
  html body #feed.apf-v4-vertical-feed > .apf-v4-reels,
  html body #feed.apf-v4-vertical-feed > .apf-v4-discovery {
    padding: 12px 10px 8px !important;
    border-radius: 16px !important;
  }
}

/* APF_FEED_COLONNE_DESKTOP_LAB_V3 */
@media (min-width: 821px) {
  html body main.layout {
    box-sizing: border-box;
    width: 100%;
    max-width: 1044px;
    grid-template-columns: 200px minmax(0, 760px);
    gap: 24px;
  }

  html body main.layout > .left {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  html body main.layout > section {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }
}

@media (max-width: 1439px) {
  html body main.layout > aside.right {
    display: none;
  }
}

@media (min-width: 1440px) {
  html body main.layout {
    max-width: 1368px;
    grid-template-columns: 220px minmax(0, 760px) 280px;
  }

  html body main.layout > aside.right {
    display: flex;
    flex-direction: column;
    grid-column: 3;
    grid-row: 1;
    position: sticky;
    top: 98px;
    align-self: start;
    min-width: 0;
    max-height: calc(100vh - 118px);
    overflow-y: auto;
    gap: 16px;
  }

  html body main.layout > aside.right > * {
    flex-shrink: 0;
  }

  /* Mappa illustrativa con prezzi fissi: non e' la Mappa offerte. */
  html body main.layout > aside.right > .map {
    display: none;
  }
}