/*
 * HOME: carosello orizzontale dei vini (desktop > 1024px) e slider a dissolvenza (tablet e telefono).
 * Valori dal widget Tank "portfolio hover carousel" e dagli slider Elementor fd14ebf (tablet) / ed09586 (telefono).
 */

/* ---------- Desktop: carosello con immagine al passaggio ---------- */
.bdc-phc { position: relative; z-index: 0; height: 100vh; overflow: hidden; color: var(--bdc-dark); }
.bdc-phc__viewport { position: relative; height: 100%; cursor: grab; touch-action: pan-y; }
.bdc-phc__viewport.is-dragging { cursor: grabbing; }
.bdc-phc__track { display: flex; height: 100%; will-change: transform; }
.bdc-phc__slide { position: relative; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; min-width: 0; height: 100vh; padding: 0 5.2%; }
.bdc-phc__item { position: relative; display: block; color: inherit; text-decoration: none; pointer-events: none; }
.bdc-phc__slide.is-active .bdc-phc__item { pointer-events: auto; }
.bdc-phc__item::before { position: absolute; content: attr(data-number); top: 0; left: -30px; width: 20px; font-family: var(--bdc-font-serif); font-size: calc(12px + .1vw); font-weight: 300; line-height: 10px; color: var(--bdc-dark); opacity: .5; transition: opacity .3s ease-in-out; }
.bdc-phc__slide.is-active .bdc-phc__item::before { opacity: 1; }
.bdc-phc__title { margin: 0; white-space: nowrap; font-family: var(--bdc-font-serif); font-size: calc(28px + 2.3vw); font-weight: 700; line-height: 1.2; color: transparent; -webkit-text-stroke: 1px var(--bdc-dark); opacity: .8; transition: color .3s ease-in-out; }
.bdc-phc__slide.is-active .bdc-phc__title { color: var(--bdc-dark); opacity: 1; }
.bdc-phc__cat { position: relative; display: block; margin-top: 10px; margin-left: 3px; font-family: var(--bdc-font-sans); font-size: calc(13px + .1vw); line-height: 1.2; color: var(--bdc-dark); opacity: 0; visibility: hidden; transform: translate3d(0, -5px, 0); transition: .3s ease-in-out; }
.bdc-phc__slide.is-active .bdc-phc__cat { opacity: 1; visibility: visible; transform: none; }

.bdc-phc__images { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: #121212; }
.bdc-phc__image { position: absolute; inset: 0; opacity: 0; visibility: hidden; transform: scale(1.03); transition: .4s ease-in-out; }
.bdc-phc__image.is-active { opacity: 1; visibility: visible; transform: scale(1); }
.bdc-phc__image img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 50%; }

.bdc-phc__counter { position: absolute; bottom: 35px; left: 50.3%; z-index: 1; display: flex; align-items: center; justify-content: center; height: 40px; font-family: var(--bdc-font-serif); font-size: 14px; color: var(--bdc-dark); transform: translate3d(-50%, 0, 0); }
.bdc-phc__count { position: relative; top: -4px; height: 40px; line-height: 40px; }
.bdc-phc__sep::before { display: block; content: ""; width: 17px; height: 2px; background: var(--bdc-dark); opacity: .7; transform: rotate(-70deg); }
.bdc-phc__total { position: relative; bottom: -4px; height: 40px; line-height: 40px; }

/* Entrata dopo la transizione di pagina */
.bdc-loaded .bdc-phc__slide.is-visible .bdc-phc__item { animation: bdc-up80-in 2s var(--bdc-ease-expo-out) both; animation-delay: calc(1.4s + var(--bdc-i, 0) * .2s); }
.bdc-loaded .bdc-phc__counter { animation: bdc-counter-in 2s var(--bdc-ease-expo) .4s both; }
@keyframes bdc-counter-in { from { opacity: 0; transform: translate3d(-50%, 20px, 0); } to { opacity: 1; transform: translate3d(-50%, 0, 0); } }

/* ---------- Tablet e telefono: slider a dissolvenza ---------- */
.bdc-hs { display: none; }
@media (max-width: 1024px) {
	.bdc-phc { display: none; }
	.bdc-hs { position: relative; display: block; height: 100vh; overflow: hidden; background: #3a3a3a; color: #fff; }
	.bdc-hs__slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility 0s linear .5s; }
	.bdc-hs__slide.is-active { opacity: 1; visibility: visible; z-index: 1; transition: opacity .5s ease, visibility 0s; }
	.bdc-hs__bg { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 50%; }
	.bdc-hs__slide::after { position: absolute; inset: 0; content: ""; background: rgba(0, 0, 0, .62); }
	.bdc-hs__inner { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center; padding: 50px; text-align: center; }
	.bdc-hs__contents { width: auto; max-width: 95%; }
	.bdc-hs__slide.is-active .bdc-hs__contents { animation: bdc-hs-in 1.25s ease both; }
	.bdc-hs__heading { margin-bottom: 14px; font-family: var(--bdc-font-serif); font-size: 46px; font-weight: 600; line-height: 1; color: #fff; }
	.bdc-hs__desc { margin-bottom: 30px; font-family: var(--bdc-font-sans); font-size: 16px; font-weight: 300; line-height: 1.4; color: #fff; }
	.bdc-hs__btn { display: inline-block; padding: 12px 24px; border: 1px solid #fff; border-radius: 0; font-family: var(--bdc-font-sans); font-size: 18px; font-weight: 400; line-height: 1; text-transform: uppercase; color: #fff; text-decoration: none; background: transparent; transition: all .3s; }
	.bdc-hs__btn:hover, .bdc-hs__btn:focus-visible { background: #fff; color: #000; }
	.bdc-hs__arrow { position: absolute; top: 50%; z-index: 2; display: flex; padding: 0; border: 0; background: none; font-size: 25px; color: #fff; cursor: pointer; transform: translateY(-50%); }
	.bdc-hs__arrow svg { width: 1em; height: 1em; fill: #fff; }
	.bdc-hs__arrow--prev { left: 10px; }
	.bdc-hs__arrow--next { right: 10px; }
	@keyframes bdc-hs-in { from { opacity: 0; transform: translate3d(0, 100%, 0); } to { opacity: 1; transform: none; } }
}
@media (max-width: 767px) {
	.bdc-hs__inner { padding: 30px; }
	.bdc-hs__heading { font-size: 34px; }
	.bdc-hs__desc { font-size: 10px; }
}
@media (min-width: 768px) {
	.bdc-br-sm { display: inline; }
}
@media (max-width: 767px) {
	.bdc-br-sm { display: none; }
}
