/* =========================================================
   LOCAL MARKETING PRO - UTILITIES.CSS
   Classi di supporto riutilizzabili
   Da caricare dopo style.css
   ========================================================= */

/* ------------------------------
   Visibilità
------------------------------ */

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

.hidden-mobile {
  display: block;
}

.visible-mobile {
  display: none;
}

/* ------------------------------
   Container alternativi
------------------------------ */

.container-small {
  width: min(100% - 32px, 900px);
  margin-inline: auto;
}

.container-narrow {
  width: min(100% - 32px, 760px);
  margin-inline: auto;
}

.container-wide {
  width: min(100% - 32px, 1320px);
  margin-inline: auto;
}

/* ------------------------------
   Testi
------------------------------ */

.text-left {
  text-align: left !important;
}

.text-center {
  text-align: center !important;
}

.text-right {
  text-align: right !important;
}

.text-primary {
  color: var(--color-primary) !important;
}

.text-blue {
  color: var(--color-blue) !important;
}

.text-accent {
  color: var(--color-accent) !important;
}

.text-muted {
  color: var(--color-muted) !important;
}

.text-white {
  color: var(--color-white) !important;
}

.text-bold {
  font-weight: 800 !important;
}

.text-uppercase {
  text-transform: uppercase !important;
}

.lead {
  font-size: 20px;
  line-height: 1.6;
  color: var(--color-muted);
}

.small-text {
  font-size: 14px;
}

.max-width-small {
  max-width: 520px;
}

.max-width-medium {
  max-width: 720px;
}

.max-width-large {
  max-width: 920px;
}

.mx-auto {
  margin-left: auto !important;
  margin-right: auto !important;
}

/* ------------------------------
   Background
------------------------------ */

.bg-white {
  background: var(--color-white) !important;
}

.bg-light {
  background: var(--color-light) !important;
}

.bg-primary {
  background: var(--color-primary) !important;
}

.bg-blue-soft {
  background: var(--color-blue-soft) !important;
}

/* ------------------------------
   Spaziature - Margin top
------------------------------ */

.mt-0 {
  margin-top: 0 !important;
}

.mt-xs {
  margin-top: 8px !important;
}

.mt-sm {
  margin-top: 16px !important;
}

.mt-md {
  margin-top: 24px !important;
}

.mt-lg {
  margin-top: 40px !important;
}

.mt-xl {
  margin-top: 64px !important;
}

.mt-xxl {
  margin-top: 90px !important;
}

/* ------------------------------
   Spaziature - Margin bottom
------------------------------ */

.mb-0 {
  margin-bottom: 0 !important;
}

.mb-xs {
  margin-bottom: 8px !important;
}

.mb-sm {
  margin-bottom: 16px !important;
}

.mb-md {
  margin-bottom: 24px !important;
}

.mb-lg {
  margin-bottom: 40px !important;
}

.mb-xl {
  margin-bottom: 64px !important;
}

.mb-xxl {
  margin-bottom: 90px !important;
}

/* ------------------------------
   Spaziature - Padding
------------------------------ */

.p-0 {
  padding: 0 !important;
}

.p-sm {
  padding: 16px !important;
}

.p-md {
  padding: 24px !important;
}

.p-lg {
  padding: 40px !important;
}

.p-xl {
  padding: 64px !important;
}

.pt-0 {
  padding-top: 0 !important;
}

.pt-sm {
  padding-top: 32px !important;
}

.pt-md {
  padding-top: 56px !important;
}

.pt-lg {
  padding-top: 80px !important;
}

.pt-xl {
  padding-top: 110px !important;
}

.pb-0 {
  padding-bottom: 0 !important;
}

.pb-sm {
  padding-bottom: 32px !important;
}

.pb-md {
  padding-bottom: 56px !important;
}

.pb-lg {
  padding-bottom: 80px !important;
}

.pb-xl {
  padding-bottom: 110px !important;
}

/* ------------------------------
   Display e allineamenti
------------------------------ */

.d-block {
  display: block !important;
}

.d-inline-block {
  display: inline-block !important;
}

.d-flex {
  display: flex !important;
}

.d-grid {
  display: grid !important;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-start {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.flex-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.flex-column {
  flex-direction: column !important;
}

.flex-wrap {
  flex-wrap: wrap !important;
}

.align-center {
  align-items: center !important;
}

.align-start {
  align-items: flex-start !important;
}

.align-end {
  align-items: flex-end !important;
}

.justify-center {
  justify-content: center !important;
}

.justify-between {
  justify-content: space-between !important;
}

.justify-start {
  justify-content: flex-start !important;
}

.justify-end {
  justify-content: flex-end !important;
}

/* ------------------------------
   Gap
------------------------------ */

.gap-xs {
  gap: 8px !important;
}

.gap-sm {
  gap: 16px !important;
}

.gap-md {
  gap: 24px !important;
}

.gap-lg {
  gap: 40px !important;
}

.gap-xl {
  gap: 64px !important;
}

/* ------------------------------
   Griglie rapide
------------------------------ */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 34px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 34px;
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 34px;
}

/* ------------------------------
   Box e card di supporto
------------------------------ */

.box {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-card);
}

.box-soft {
  background: var(--color-light);
  border-radius: var(--radius-medium);
}

.shadow-soft {
  box-shadow: var(--shadow-soft) !important;
}

.shadow-card {
  box-shadow: var(--shadow-card) !important;
}

.radius-small {
  border-radius: var(--radius-small) !important;
}

.radius-medium {
  border-radius: var(--radius-medium) !important;
}

.radius-large {
  border-radius: var(--radius-large) !important;
}

.border {
  border: 1px solid var(--color-border) !important;
}

.border-top {
  border-top: 1px solid var(--color-border) !important;
}

.border-bottom {
  border-bottom: 1px solid var(--color-border) !important;
}

/* ------------------------------
   Immagini
------------------------------ */

.img-rounded {
  border-radius: var(--radius-medium);
}

.img-rounded-large {
  border-radius: var(--radius-large);
}

.img-shadow {
  box-shadow: var(--shadow-soft);
}

.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-contain {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.aspect-16-9 {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.aspect-4-3 {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.aspect-1-1 {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

/* ------------------------------
   Liste con spunta
------------------------------ */

.check-list {
  display: grid;
  gap: 14px;
}

.check-list li {
  position: relative;
  padding-left: 32px;
  color: var(--color-text);
  font-weight: 600;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-blue);
  font-weight: 900;
}

/* ------------------------------
   CTA inline
------------------------------ */

.inline-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px;
  background: var(--color-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
}

.inline-cta-content h3 {
  color: var(--color-primary);
  font-size: 24px;
  line-height: 1.2;
  font-weight: 900;
}

.inline-cta-content p {
  margin-top: 8px;
  color: var(--color-muted);
}

/* ------------------------------
   Responsive utilities
------------------------------ */

@media (max-width: 900px) {
  .hidden-tablet {
    display: none !important;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .grid-auto {
    grid-template-columns: 1fr;
  }

  .inline-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .inline-cta .btn {
    width: 100%;
  }

  .text-center-tablet {
    text-align: center !important;
  }
}

@media (max-width: 640px) {
  .hidden-mobile {
    display: none !important;
  }

  .visible-mobile {
    display: block !important;
  }

  .text-center-mobile {
    text-align: center !important;
  }

  .container-small,
  .container-narrow,
  .container-wide {
    width: min(100% - 24px, 100%);
  }

  .lead {
    font-size: 17px;
  }

  .mt-xl {
    margin-top: 44px !important;
  }

  .mt-xxl {
    margin-top: 64px !important;
  }

  .mb-xl {
    margin-bottom: 44px !important;
  }

  .mb-xxl {
    margin-bottom: 64px !important;
  }

  .pt-lg {
    padding-top: 60px !important;
  }

  .pt-xl {
    padding-top: 76px !important;
  }

  .pb-lg {
    padding-bottom: 60px !important;
  }

  .pb-xl {
    padding-bottom: 76px !important;
  }

  .p-lg {
    padding: 28px !important;
  }

  .p-xl {
    padding: 36px !important;
  }
}
