/*
 * HOME Bytel Sistemi: misure dell'originale Betheme + Slider Revolution "wallet".
 * Colonne Betheme: margine sotto 40px (20px su mobile), compreso nei padding delle sezioni.
 */

/* ---------- Slider ---------- */
.bs-hslider { position: relative; height: var(--bs-slider-h); overflow: hidden; background: #fff; }
.bs-hslider__track, .bs-hslider__slide { position: absolute; inset: 0; }
.bs-hslider__slide { opacity: 0; visibility: hidden; transition: opacity 1s cubic-bezier(.65, 0, .35, 1), visibility 0s linear 1s; }
.bs-hslider__slide.is-active { opacity: 1; visibility: visible; transition-delay: 0s; z-index: 1; }
.bs-hslider__bg { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center; }
/* Griglia dei layer: 1240px centrata, testi a 43px dal bordo (come SR7) */
.bs-hslider__content { position: relative; z-index: 2; max-width: 1240px; padding: 90px 0 0 43px; }
.bs-hslider__title { margin: 0; font-family: var(--bs-font-slider); font-size: 60px; line-height: 68px; font-weight: 300; color: #003065; text-transform: none; }
.bs-hslider__title strong { font-weight: 700; }
.bs-hslider__sub { margin: 3px 0 0; font-family: var(--bs-font-slider); font-size: 30px; line-height: 35px; font-weight: 300; color: #3168b0; max-width: 14em; }
.bs-hslider__btns { margin-top: 40px; display: flex; flex-direction: column; align-items: flex-start; gap: 30px; margin-left: -3px; }
.bs-hslider__btn { display: inline-block; padding: 12px 35px; border: 1px solid; border-radius: 30px; font-family: var(--bs-font-slider); font-size: 16px; line-height: 17px; text-decoration: none; transition: background-color .3s, color .3s; }
.bs-hslider__btn:hover { text-decoration: none; }
.bs-hslider__btn--light { background: rgba(240, 241, 242, .75); border-color: #d6d8d8; color: #0a0a0a; }
.bs-hslider__btn--light:hover { background: #f0f1f2; color: #0a0a0a; }
.bs-hslider__btn--blue { background: rgba(56, 115, 185, .75); border-color: #2166ba; color: #fff; }
.bs-hslider__btn--blue:hover { background: #3873b9; color: #fff; }
/* Ingresso dei testi a ogni cambio slide */
.js .bs-hslider__slide .bs-hslider__content > * { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s ease; }
.js .bs-hslider__slide.is-active .bs-hslider__content > * { opacity: 1; transform: none; }
.js .bs-hslider__slide.is-active .bs-hslider__sub { transition-delay: .2s; }
.js .bs-hslider__slide.is-active .bs-hslider__btns { transition-delay: .4s; }
/* Frecce e pallini "uranus" */
.bs-hslider__arrow { position: absolute; top: 50%; z-index: 3; width: 50px; height: 50px; margin-top: -25px; padding: 5px; border: 0; background: transparent; color: #fff; }
.bs-hslider__arrow svg { width: 40px; height: 40px; }
.bs-hslider__arrow--prev { left: 20px; }
.bs-hslider__arrow--next { right: 20px; }
.bs-hslider__dots { position: absolute; left: 50%; bottom: 20px; z-index: 3; display: flex; gap: 5px; transform: translateX(-50%); }
.bs-hslider__dot { width: 15px; height: 15px; padding: 0; border: 0; border-radius: 50%; background: transparent; box-shadow: 0 0 0 2px #fff inset; transition: background-color .3s; }
.bs-hslider__dot.is-active, .bs-hslider__dot:hover { background: rgba(255, 255, 255, .9); }

@media (max-width: 1239px) {
	.bs-hslider__content { padding: 122px 0 0 36px; }
	.bs-hslider__title { font-size: 50px; line-height: 56px; }
	.bs-hslider__sub { font-size: 25px; line-height: 29px; }
	.bs-hslider__btns { margin-top: 9px; gap: 6px; }
	.bs-hslider__btn { padding: 10px 29px; }
}
@media (max-width: 959px) {
	.bs-hslider__content { padding: 54px 0 0 27px; }
	.bs-hslider__title { font-size: 37px; line-height: 42px; }
	.bs-hslider__sub { margin-top: 2px; font-size: 19px; line-height: 22px; }
	.bs-hslider__btns { margin-top: 7px; gap: 0; }
	.bs-hslider__btn { padding: 7px 22px; }
}
@media (max-width: 480px) {
	.bs-hslider__content { padding: 90px 0 0 20px; }
	.bs-hslider__title { font-size: 28px; line-height: 31px; }
	.bs-hslider__sub { margin-top: 4px; font-size: 21px; line-height: 28px; }
	.bs-hslider__btns { margin-top: 18px; gap: 11px; margin-left: 1px; }
	.bs-hslider__btn { padding: 10px 28px; }
	.bs-hslider__bg { object-position: 58% center; }
}
/* Touch: pulsanti dello slider alti almeno 44px; pallini con area di tocco estesa */
@media (max-width: 1239px) {
	.bs-hslider__btn { display: inline-flex; align-items: center; min-height: 44px; box-sizing: border-box; }
	.bs-hslider__btns { gap: 10px; }
	/* frecce in basso ai lati dei pallini: non coprono piu' i pulsanti */
	.bs-hslider__arrow { top: auto; bottom: 0; margin-top: 0; }
	.bs-hslider__dot { position: relative; }
	.bs-hslider__dot::after { content: ""; position: absolute; inset: -15px -3px; }
}

/* ---------- Sezioni ---------- */
.bs-hsec { padding: 120px 0 80px; background-size: cover; background-position: center top; }
.bs-hsec__title--center { width: 64.7%; margin: 0 auto 15px; text-align: center; }
.bs-dark { background-color: #292929; }

/* Presentazione */
.bs-hpres { padding-bottom: 120px; text-align: center; }
.bs-hpres__logo { width: 124px; height: auto; margin: 0 auto 45px; }
.bs-hpres__title, .bs-hpres__text, .bs-hpres__text p { margin: 0; font-size: var(--bs-fs-h4); line-height: var(--bs-lh-h4); font-weight: 300; color: #515151; }
.bs-hpres__text { margin-bottom: 15px; }

/* Mission */
.bs-hmission { padding-bottom: 120px; }
.bs-hmission .bs-hsec__title { margin-bottom: 55px; }
.bs-hmission__grid { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 24px; }
.bs-hmission__box { display: flex; align-items: flex-start; }
.bs-hmission__icon { flex: 0 0 112px; }
.bs-hmission__icon img { width: 112px; height: auto; }
.bs-hmission__body { width: 247px; margin-left: 24px; padding: 15px 0 0 12px; }
.bs-hmission__title { margin-bottom: 10px; font-size: var(--bs-fs-h4); line-height: var(--bs-lh-h4); font-weight: 300; color: #fff; }
.bs-hmission__body p { color: #9e9e9e; }

/* Qualita' */
.bs-hqual { padding: 50px 0; background-color: #1f1f1f; }
.bs-hqual__grid { display: flex; justify-content: space-between; align-items: flex-start; }
.bs-hqual__text { flex: 0 0 383px; padding: 40px 25px 0; }
.bs-hqual__title { margin-bottom: 31px; }
.bs-hqual__lead { margin-bottom: 31px; font-size: var(--bs-fs-h4); line-height: var(--bs-lh-h4); font-weight: 300; color: #e1e1e1; }
.bs-hqual__small { color: #878787; }
.bs-hqual__media { flex: 0 0 774px; padding-top: 15px; margin-bottom: 15px; }
.bs-hqual__media img { width: 100%; height: auto; }

/* Servizi */
.bs-hserv { padding-bottom: 80px; }
.bs-hserv__grid { display: grid; grid-template-columns: 32.02% 12.3% 51%; }
.bs-hserv__intro { grid-column: 1; }
.bs-hserv__title { margin-bottom: 36px; }
.bs-hserv__text, .bs-hserv__text p { font-size: var(--bs-fs-h5); line-height: var(--bs-lh-h5); font-weight: 300; color: #1f1f1f; }
.bs-hserv__text { margin-bottom: 36px; }
.bs-hserv__text p { margin: 0; }
.bs-hserv__items { grid-column: 3; display: grid; grid-template-columns: repeat(3, 1fr); row-gap: 0; margin-top: 15px !important; }
.bs-hserv__item { padding: 0 12px; margin-bottom: 141px; text-align: center; }
.bs-hserv__item img { width: 112px; height: auto; margin: 0 auto 34px; }
.bs-hserv__name { margin-bottom: 20px; font-size: var(--bs-fs-h5); line-height: var(--bs-lh-h5); font-weight: 300; color: #1f1f1f; }
.bs-hserv__items .bs-hserv__item:nth-last-child(-n+3) { margin-bottom: 40px; }

/* Perche' sceglierci */
.bs-hperche { padding: 110px 0 80px; }
.bs-hperche .bs-hsec__title { margin-bottom: 55px; }
.bs-hperche__grid { display: grid; grid-template-columns: repeat(4, 1fr); column-gap: 24px; }
.bs-hperche__item { margin-bottom: 40px; text-align: center; }
.bs-chart { position: relative; width: 140px; height: 140px; margin: 0 auto 19px; }
.bs-chart__ring { width: 140px; height: 140px; transform: rotate(-90deg); }
.bs-chart__track { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 4; }
.bs-chart__bar { fill: none; stroke: #3873b9; stroke-width: 4; stroke-dasharray: 415; stroke-dashoffset: 0; }
.js .bs-chart.bs-anim .bs-chart__bar { stroke-dashoffset: 415; transition: stroke-dashoffset 1.5s ease-out; }
.js .bs-chart.bs-anim.is-in .bs-chart__bar { stroke-dashoffset: 0; }
.bs-chart__icon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #444; }
.bs-chart__icon .bs-icon { width: 40px; height: 40px; }
.bs-hperche__label { margin: 0; color: #a8a8a8; }

/* Marchi */
.bs-hmarchi { padding: 90px 0 40px; }
.bs-hmarchi__list { display: flex; flex-wrap: wrap; justify-content: center; width: 66.7%; margin: 0 auto !important; }
.bs-hmarchi__list li { width: 25%; margin-bottom: 40px; }
.bs-hmarchi__list img { width: 84.5%; max-width: 172px; height: auto; margin: 0 auto; }

/* ---------- Animazioni di entrata (Betheme .animate, 1 s) ---------- */
.js .bs-anim:not([data-anim="chart"]) { opacity: 0; }
.js .bs-anim.is-in { animation: 1s ease both; animation-name: var(--bs-anim); }
.bs-anim[data-anim="fadeInUp"] { --bs-anim: bsFadeInUp; }
.bs-anim[data-anim="fadeInLeft"] { --bs-anim: bsFadeInLeft; }
.bs-anim[data-anim="fadeInRight"] { --bs-anim: bsFadeInRight; }
.bs-anim[data-anim="zoomIn"] { --bs-anim: bsZoomIn; }
@keyframes bsFadeInUp { from { opacity: 0; transform: translateY(200px); } to { opacity: 1; transform: none; } }
@keyframes bsFadeInLeft { from { opacity: 0; transform: translateX(-200px); } to { opacity: 1; transform: none; } }
@keyframes bsFadeInRight { from { opacity: 0; transform: translateX(200px); } to { opacity: 1; transform: none; } }
@keyframes bsZoomIn { from { opacity: 0; transform: scale3d(.3, .3, .3); } 50% { opacity: 1; } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
	.js .bs-anim:not([data-anim="chart"]) { opacity: 1; animation: none; }
	.js .bs-chart.bs-anim .bs-chart__bar { stroke-dashoffset: 0; transition: none; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1239px) {
	.bs-hmission__body { width: auto; flex: 1; margin-left: 12px; }
	.bs-hqual__text { flex-basis: 32%; }
	.bs-hqual__media { flex-basis: 63.4%; }
	.bs-hmission__icon { flex-basis: 80px; }
	.bs-hmission__icon img { width: 80px; }
}
@media (max-width: 959px) {
	.bs-hmission__icon { flex-basis: 55px; }
	.bs-hmission__icon img { width: 55px; }
	.bs-hmission__body { margin-left: 18px; padding-left: 12px; }
}

/* ---------- Mobile (sotto 768: colonne impilate, margine colonne 20px) ---------- */
@media (max-width: 767px) {
	.bs-hpres { padding-bottom: 100px; }
	.bs-hpres__logo { margin-bottom: 41px; }
	.bs-hmission .bs-hsec__title { margin-bottom: 20px; }
	.bs-hmission__grid, .bs-hperche__grid { grid-template-columns: 1fr; }
	.bs-hmission__box { display: block; margin-bottom: 20px; }
	.bs-hsec__title--center { width: auto; }
	.bs-hmission__icon { width: 112px; margin: 0 auto; }
	.bs-hmission__icon img { width: 112px; }
	.bs-hmission__body { width: auto; margin: 0; padding: 20px 16px 0; }
	.bs-hqual__grid { display: block; }
	.bs-hqual__text { padding: 40px 25px 0; }
	.bs-hqual__media { padding: 15px; }
	.bs-hserv__grid { display: block; }
	.bs-hserv__items { display: block; margin-top: 74px !important; }
	.bs-hserv__item, .bs-hserv__items .bs-hserv__item:nth-last-child(-n+3) { padding: 0; margin-bottom: 45px; }
	.bs-hserv__item img { margin-bottom: 30px; }
	.bs-hmarchi__list { width: 100%; }
	.bs-hmarchi__list img { width: 172px; }
	.bs-hperche__item { margin-bottom: 20px; }
	.bs-hmarchi__list li { width: 100%; margin-bottom: 20px; }
}
