/*
 * TEMA BORGO DEI CILIEGI: grafica comune (font, header, menu a tutto schermo, transizione di pagina, cursore).
 * Misure e colori presi dal tema originale (Tank 4.5.1 + kit Elementor).
 */
:root {
	--bdc-dark: #111111;
	--bdc-light: #ffffff;
	--bdc-font-serif: "Noto Serif JP", serif;
	--bdc-font-sans: "Poppins", sans-serif;
	--bdc-font-body: var(--bdc-font-sans);
	--bdc-font-heading: var(--bdc-font-serif);
	--bdc-color-text: var(--bdc-dark);
	--bdc-color-heading: var(--bdc-dark);
	--bdc-color-primary: var(--bdc-dark);
	--bdc-color-primary-dark: #000;
	--bdc-ease-expo: cubic-bezier(.87, 0, .13, 1);
	--bdc-ease-expo-out: cubic-bezier(.16, 1, .3, 1);
	--e-global-color-primary: #111111;
}

body { font-family: var(--bdc-font-sans); font-size: 19px; line-height: 1.7; color: var(--bdc-dark); background: #fff; }
.bdc-main { position: relative; z-index: 0; }

/* ---------- Header (fisso, trasparente) ---------- */
.bdc-hd { position: fixed; top: 0; left: 0; width: 100%; z-index: 999; color: var(--bdc-light); pointer-events: none; }
.admin-bar .bdc-hd { top: 32px; }
.bdc-hd__inner { display: flex; align-items: center; width: 100%; padding: 40px 3.5% 0; }
.bdc-hd__logo { position: absolute; top: 40px; line-height: 1; pointer-events: auto; z-index: 9; }
.bdc-hd__logo a { display: inline-block; padding-top: 20px; }
.bdc-hd__logo img { display: block; width: 300px; max-width: none; height: auto; max-height: 48px; }
.bdc-logo-dark { display: none !important; }
.bdc-hd__tools { margin-left: auto; display: flex; align-items: center; pointer-events: auto; }

/* Pulsante Menù / Chiudi + tre linee */
.bdc-olm-toggle { position: relative; z-index: 9; display: flex; align-items: center; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }
.bdc-olm-toggle__text { display: block; padding-right: 5px; overflow: hidden; text-align: right; font-family: var(--bdc-font-serif); font-size: 15px; line-height: 1.7; color: var(--bdc-light); }
.bdc-olm-toggle__menu { position: relative; display: inline-block; transition: transform .3s; }
.bdc-olm-toggle__menu::before { position: absolute; top: 100%; right: 0; content: attr(data-hover); }
.bdc-olm-toggle:hover .bdc-olm-toggle__menu { transform: translate3d(0, -100%, 0); }
.bdc-olm-toggle__close { display: none; }
.bdc-olm-toggle__btn { position: relative; display: block; width: 50px; height: 50px; }
.bdc-olm-toggle__btn span { position: absolute; top: 54%; left: 50%; width: 24px; height: 2px; transform: translate(-50%, -50%); transition: .3s ease-in-out; }
.bdc-olm-toggle__btn span::before, .bdc-olm-toggle__btn span::after { position: absolute; display: block; content: ""; height: 2px; width: 24px; background: var(--bdc-light); transition: .3s ease-in-out; }
.bdc-olm-toggle__btn span::before { top: -4px; }
.bdc-olm-toggle__btn span::after { bottom: -4px; width: 18px; }
.bdc-olm-open .bdc-olm-toggle__menu { display: none; }
.bdc-olm-open .bdc-olm-toggle__close { display: block; }
.bdc-olm-open .bdc-olm-toggle__btn span::before { top: 0; width: 20px; transform: rotate(45deg); }
.bdc-olm-open .bdc-olm-toggle__btn span::after { bottom: 0; width: 20px; transform: rotate(-45deg); }

/* Colori scuri sopra immagini chiare (home desktop) */
.bdc-light-bg:not(.bdc-olm-open) .bdc-logo-light { display: none !important; }
.bdc-light-bg:not(.bdc-olm-open) .bdc-logo-dark { display: block !important; }
.bdc-light-bg:not(.bdc-olm-open) .bdc-olm-toggle__text { color: var(--bdc-dark); }
.bdc-light-bg:not(.bdc-olm-open) .bdc-olm-toggle__btn span::before,
.bdc-light-bg:not(.bdc-olm-open) .bdc-olm-toggle__btn span::after { background: var(--bdc-dark); }

/* ---------- Menu a tutto schermo ---------- */
.bdc-olm { position: fixed; inset: 0; z-index: 1; background: #0a0a0a; visibility: hidden; opacity: 0; pointer-events: auto; transition: opacity .4s, visibility 0s linear .4s; }
.bdc-olm-open .bdc-olm { visibility: visible; opacity: 1; transition: opacity .4s, visibility 0s; }
html.bdc-no-scroll, html.bdc-no-scroll body { overflow: hidden; }
.bdc-olm__holder { height: 100%; overflow-y: auto; display: flex; }
.bdc-olm__content { margin: auto; width: 100%; padding: 120px 5%; text-align: center; }
.bdc-olm__list { display: inline-block; margin: 0; padding: 0; list-style: none; counter-reset: bdc-olm; }
.bdc-olm__list > li { position: relative; margin: 20px 0; }
.bdc-olm__list > li:first-child { margin-top: 0; }
.bdc-olm__list > li:last-child { margin-bottom: 0; }
.bdc-olm__list > li > a { position: relative; display: inline-block; font-family: var(--bdc-font-serif); font-size: clamp(34px, 3.2vw, 62px); font-weight: 600; line-height: 1.2; color: #eaeaea; text-decoration: none; transition: opacity .3s ease-in-out; }
.bdc-olm__list:hover > li > a { opacity: .5; }
.bdc-olm__list > li > a:hover, .bdc-olm__list > li.current-menu-item > a { opacity: 1; }
.bdc-olm__list .wpml-ls-flag { display: none; }
.bdc-olm-open .bdc-olm__list > li { animation: bdc-olm-in .4s cubic-bezier(.25, .46, .45, .94) both; }
.bdc-olm-open .bdc-olm__list > li:nth-child(2) { animation-delay: .45s; }
.bdc-olm-open .bdc-olm__list > li:nth-child(3) { animation-delay: .5s; }
.bdc-olm-open .bdc-olm__list > li:nth-child(4) { animation-delay: .55s; }
.bdc-olm-open .bdc-olm__list > li:nth-child(5) { animation-delay: .6s; }
.bdc-olm-open .bdc-olm__list > li:first-child { animation-delay: .4s; }
@keyframes bdc-olm-in { from { opacity: 0; transform: translateY(80px); } to { opacity: 1; transform: none; } }
@media (min-width: 992px) {
	.bdc-olm__list > li > a::before { position: absolute; counter-increment: bdc-olm; content: counter(bdc-olm, decimal-leading-zero); top: 5px; left: -30px; font-size: 14px; font-weight: 400; line-height: 1; color: #fff; opacity: .4; }
}

/* ---------- Transizione di pagina ---------- */
.bdc-ptr { position: fixed; inset: 0; z-index: 99998; pointer-events: none; }
.bdc-ptr__overlay { position: absolute; inset: 0; background: var(--bdc-dark); transform-origin: center top; }
.bdc-ptr__preloader { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); margin-top: 10px; }
.bdc-ptr__preloader img { max-height: 96px; width: auto; opacity: .2; }
html:not(.js) .bdc-ptr { display: none; }
.bdc-loaded .bdc-ptr__preloader { animation: bdc-fade-out 1s var(--bdc-ease-expo) both; }
.bdc-loaded .bdc-ptr__overlay { animation: bdc-ptr-out 1s var(--bdc-ease-expo) .3s both; }
/* backwards e non both: a fine entrata la testata non deve restare con un transform, altrimenti il menu fixed (figlio) si dimensiona sulla testata e le voci non sono cliccabili */
.bdc-loaded .bdc-hd { animation: bdc-up-in 1s var(--bdc-ease-expo) .6s backwards; }
.bdc-leaving .bdc-ptr__overlay { animation: bdc-ptr-in 1s var(--bdc-ease-expo) both; transform-origin: center bottom; }
.bdc-leaving .bdc-ptr__preloader { animation: bdc-fade-in .6s ease .4s both; }
.bdc-leaving .bdc-main { transition: transform 1s var(--bdc-ease-expo), opacity 1s; transform: translateY(-80px); opacity: 0; }
@keyframes bdc-ptr-out { from { transform: scaleY(1); } to { transform: scaleY(0); } }
@keyframes bdc-ptr-in { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes bdc-fade-out { to { opacity: 0; visibility: hidden; } }
@keyframes bdc-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes bdc-up-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes bdc-up80-in { from { opacity: 0; transform: translateY(80px); } to { opacity: 1; transform: none; } }

/* ---------- Cursore (solo desktop con mouse) ---------- */
.bdc-cursor { display: none; }
@media (min-width: 1025px) and (hover: hover) and (pointer: fine) {
	.bdc-cursor { display: block; position: fixed; top: 0; left: 0; z-index: 99999; pointer-events: none; }
	.bdc-cursor__ball { position: fixed; top: 0; left: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; border-radius: 50%; opacity: 0; transition: width .3s, height .3s, margin .3s, background-color .3s, border-width .3s, opacity .3s; }
	.bdc-cursor.is-ready .bdc-cursor__ball { opacity: 1; }
	.bdc-light-bg:not(.bdc-olm-open) .bdc-cursor__ball { border-color: var(--bdc-dark); }
	.bdc-cursor__text { padding: 0 5px; font-size: 14px; font-weight: 500; line-height: 1.3; color: #222; text-align: center; opacity: 0; transform: scale(0); transition: opacity .3s, transform .3s; }
	.bdc-cursor.is-view .bdc-cursor__ball { width: 95px; height: 95px; margin: -71px 0 0 -47px; border-width: 0; background: #fff; }
	.bdc-cursor.is-view .bdc-cursor__text { opacity: 1; transform: scale(1); }
	.bdc-cursor.is-hidden .bdc-cursor__ball { opacity: 0; }
	/* Trascinamento del carosello: pallina 60px con frecce ai lati (come ball-drag di Tank) */
	.bdc-cursor.is-drag .bdc-cursor__ball { width: 60px; height: 60px; margin: -30px 0 0 -30px; transition-duration: .2s; }
	.bdc-cursor.is-drag .bdc-cursor__ball::before, .bdc-cursor.is-drag .bdc-cursor__ball::after { position: absolute; top: 50%; font-size: 19px; line-height: 10px; margin-top: -6px; color: #fff; }
	.bdc-cursor.is-drag .bdc-cursor__ball::before { content: '\2039'; left: -30px; }
	.bdc-cursor.is-drag .bdc-cursor__ball::after { content: '\203A'; right: -30px; }
	.bdc-light-bg .bdc-cursor.is-drag .bdc-cursor__ball::before, .bdc-light-bg .bdc-cursor.is-drag .bdc-cursor__ball::after { color: var(--bdc-dark); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.bdc-hd__inner { padding-top: 20px; }
}
/* Fino a 768px (come Tank): logo piu' piccolo e in alto, niente scritta Menù */
@media (max-width: 768px) {
	.bdc-hd__logo { top: 20px; }
	.bdc-hd__logo a { padding-top: 12px; }
	.bdc-hd__logo img { max-height: 42px; width: 250px; }
	.bdc-olm-toggle__text { display: none; }
}
@media (max-width: 767px) {
	.bdc-olm-toggle__text { display: none; }
	.bdc-hd__logo img { width: 250px; }
	.bdc-olm__list > li { margin: 15px 0; }
	.bdc-olm__content { padding: 25% 15px 35%; }
}

@media (prefers-reduced-motion: reduce) {
	.bdc-ptr { display: none; }
	*, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
