/* Utilities locali (ex Bootstrap + animate.css) */

/* --- spacing --- */
.p-3 { padding: 1rem !important; }
.p-5 { padding: 3rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: .25rem !important; }
.mb-5 { margin-bottom: 3rem !important; }
.mt-5 { margin-top: 3rem !important; }

/* --- layout helpers --- */
.d-flex { display: flex !important; }
.justify-content-center { justify-content: center !important; }
.align-items-center { align-items: center !important; }
.w-75 { width: 75% !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.text-end { text-align: right !important; }

/* --- card-like surfaces --- */
.bg-body { background: #fff !important; }
.rounded { border-radius: 12px !important; }
.shadow-lg { box-shadow: var(--shadow-lg, 0 8px 32px rgba(0,0,0,.15)) !important; }

/* --- simple grid (row / col-*) --- */
.row { display: flex; flex-wrap: wrap; }
.col-12 { flex: 0 0 auto; width: 100%; }
.col-10 { flex: 0 0 auto; width: 83.333333%; }
.col-2 { flex: 0 0 auto; width: 16.666667%; }

@media (min-width: 576px){
  .col-sm-6 { flex: 0 0 auto; width: 50%; }
}
@media (min-width: 768px){
  .col-md-6 { flex: 0 0 auto; width: 50%; }
}
@media (min-width: 992px){
  .col-lg-3 { flex: 0 0 auto; width: 25%; }
}
@media (min-width: 1200px){
  .col-xl-3 { flex: 0 0 auto; width: 25%; }
}
@media (min-width: 1400px){
  .col-xxl-3 { flex: 0 0 auto; width: 25%; }
}

.g-2 { gap: .5rem; }
@media (min-width: 768px){
  .g-md-3 { gap: 1rem; }
}

.img-fluid { max-width: 100%; height: auto; }

/* legacy helpers sometimes used */
.container { width: 100%; margin-left: auto; margin-right: auto; padding-left: 16px; padding-right: 16px; }
.text-center { text-align: center !important; }
.mr-2 { margin-right: .5rem !important; }
.ml-2 { margin-left: .5rem !important; }
.p-lg-5 { padding: 3rem !important; }

/* --- buttons --- */
.btn {
  display: inline-block;
  padding: .5rem 1rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
}
.btn-light {
  background: #f7f7f8;
  border-color: #e6e6ea;
  color: #111827;
}
.btn-light:hover { filter: brightness(.98); }
.btn-lg { padding: .75rem 1.25rem; border-radius: 12px; }

/* --- offcanvas (vanilla) --- */
.offcanvas {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(360px, 90vw);
  background: #fff;
  box-shadow: 0 16px 60px rgba(0,0,0,.22);
  transform: translateX(-100%);
  transition: transform .25s ease;
  z-index: 10000;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.offcanvas.is-open { transform: translateX(0); }
.offcanvas-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 9999;
}
.offcanvas-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
.offcanvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid rgba(17,24,39,.08);
}
.offcanvas-title { margin: 0; }
.offcanvas-body { padding: 16px; }
.btn-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(17,24,39,.12);
  background: #fff;
  cursor: pointer;
  position: relative;
}
.btn-close::before,
.btn-close::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 16px;
  height: 2px;
  background: rgba(17,24,39,.75);
  transform-origin: center;
}
.btn-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.btn-close::after  { transform: translate(-50%, -50%) rotate(-45deg); }

/* --- animate.css subset (solo classi usate nel progetto) --- */
.animated { animation-duration: 1s; animation-fill-mode: both; }

@keyframes zoomInDown {
  from { opacity: 0; transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0); }
  60% { opacity: 1; transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0); }
}
.zoomInDown { animation-name: zoomInDown; }

@keyframes slideInUp {
  from { transform: translate3d(0, 100%, 0); visibility: visible; }
  to   { transform: translate3d(0, 0, 0); }
}
.slideInUp { animation-name: slideInUp; }

@keyframes slideInRight {
  from { transform: translate3d(100%, 0, 0); visibility: visible; }
  to   { transform: translate3d(0, 0, 0); }
}
.slideInRight { animation-name: slideInRight; }

