html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

/* Il piè di pagina resta sempre in fondo, anche quando la pagina è corta */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #f6f7f9;
}

.footer {
  margin-top: auto;
  padding: 1rem 0;
  background-color: #fff;
  font-size: 0.9rem;
}

/* Colore principale di AvtoTermin */
.bg-brand {
  background-color: #1f3a5f;
}

.hero {
  background: linear-gradient(135deg, #1f3a5f, #2f5d8a);
  color: #fff;
  border-radius: 1rem;
}

.card {
  border: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.auth-card {
  max-width: 520px;
  margin: 0 auto;
}

.step-done {
  color: #198754;
}

.step-todo {
  color: #b02a37;
}

.hours-table input[type="time"] {
  min-width: 7rem;
}

/* Pagine pubbliche (prenotazione dei clienti) */
.public-container {
  max-width: 720px;
}

.day-picker {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.day-btn {
  min-width: 4.5rem;
  flex: 0 0 auto;
  line-height: 1.2;
}

.slot-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5rem, 1fr));
  gap: 0.5rem;
}

/* Calendario: vista settimana (7 colonne su schermi grandi, una sotto l'altra sul telefono) */
.week-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 992px) {
  .week-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

.week-booking {
  border-left: 4px solid #0d6efd !important;
  background: #f8fbff;
}

.week-booking.status-completed {
  border-left-color: #198754 !important;
  background: #f4fbf6;
}

.week-booking.status-noshow {
  border-left-color: #ffc107 !important;
}

.week-booking.status-cancelled {
  border-left-color: #adb5bd !important;
  opacity: 0.5;
  text-decoration: line-through !important;
}

.workshop-logo {
  height: 48px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  padding: 2px;
}

/* Pagina pubblica dell'officina: copertina, servizi, foto, mappa */
.min-w-0 {
  min-width: 0;
}

.ws-hero {
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  color: #fff;
  background-color: #1f3a5f;
  background-size: cover;
  background-position: center;
  min-height: 300px;
  display: flex;
  align-items: flex-end;
}

/* Sfumatura scura sopra la foto, così il testo si legge sempre */
.ws-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 20, 35, 0.15) 0%, rgba(10, 20, 35, 0.85) 100%);
}

.ws-hero-plain {
  background-image: linear-gradient(135deg, #1f3a5f 0%, #2f5d8a 60%, #3d7ab8 100%);
  min-height: 0;
}

.ws-hero-plain::before {
  display: none;
}

.ws-hero-inner {
  position: relative;
  padding: 1.75rem;
  width: 100%;
}

.ws-hero-logo {
  height: 64px;
  width: 64px;
  object-fit: contain;
  background: #fff;
  border-radius: 0.75rem;
  padding: 4px;
  flex-shrink: 0;
}

.ws-pill {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.45em 0.9em;
}

.ws-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(4.2rem, 1fr));
  gap: 0.5rem;
}

.ws-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem 0.25rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  color: #1f3a5f;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: transform 0.15s, box-shadow 0.15s;
}

.ws-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  color: #1f3a5f;
}

.ws-action-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.ws-chip {
  background: #e8f0fa;
  color: #1f3a5f;
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.9rem;
}

.ws-service {
  border-radius: 1rem;
  transition: box-shadow 0.15s;
}

.ws-service:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.ws-service-other {
  background: #fbfbfd;
  border: 1px dashed #c5cfdb !important;
  box-shadow: none;
}

.ws-service-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.85rem;
  background: #eef3f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.ws-free {
  background: #e9f7ef;
  color: #146c43;
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.85rem;
}

.ws-free:hover {
  background: #d3f0de;
  color: #0f5132;
}

/* Galleria: scorre di lato sul telefono */
.ws-gallery {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem;
}

.ws-gallery-item {
  flex: 0 0 auto;
  width: 240px;
  height: 170px;
  padding: 0;
  border: none;
  border-radius: 1rem;
  overflow: hidden;
  scroll-snap-align: start;
  background: #dde3ea;
}

.ws-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s;
}

.ws-gallery-item:hover img {
  transform: scale(1.05);
}

.ws-modal-img {
  max-height: 80vh;
  object-fit: contain;
}

.ws-hours .ws-today td {
  font-weight: 600;
  background: #f0f6ff;
}

.ws-map {
  width: 100%;
  height: 220px;
  border: 0;
  display: block;
}

/* Barra fissa in basso sul telefono */
.ws-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
  z-index: 1020;
}

@media (max-width: 767.98px) {
  .public-home {
    padding-bottom: 5rem;
  }

  .ws-hero {
    min-height: 260px;
  }

  .ws-hero-plain {
    min-height: 0;
  }

  .ws-hero-inner {
    padding: 1.25rem;
  }
}

/* Pannello: foto dell'officina */
.photo-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.photo-admin-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

/* Pagina di presentazione di AvtoTermin */
.lp-hero {
  position: relative;
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 5rem 0 3rem;
}

.lp-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(14, 30, 52, 0.92) 0%, rgba(14, 30, 52, 0.75) 55%, rgba(14, 30, 52, 0.45) 100%);
}

.lp-hero-inner {
  position: relative;
}

.lp-hero-text {
  max-width: 640px;
  opacity: 0.9;
}

.lp-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 3rem;
  max-width: 760px;
}

.lp-stats div {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 1rem;
  padding: 1rem;
  backdrop-filter: blur(4px);
}

.lp-stats strong {
  display: block;
  font-size: 1.9rem;
  color: #ffc107;
  line-height: 1.1;
}

.lp-stats span {
  font-size: 0.9rem;
  opacity: 0.85;
}

.lp-section {
  padding: 4.5rem 0;
}

.lp-section-alt {
  background: #eaf0f7;
}

.lp-pains {
  list-style: none;
  padding: 0;
  margin: 0;
}

.lp-pains li {
  background: #fff;
  border-radius: 0.85rem;
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.6rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  font-size: 1.05rem;
}

.lp-solution {
  background: linear-gradient(135deg, #1f3a5f, #2f5d8a);
  color: #fff;
  border-radius: 1.25rem;
  padding: 2rem;
  font-size: 1.05rem;
}

.lp-solution li {
  padding: 0.45rem 0;
}

/* Schermate che scorrono di lato */
.lp-screens {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 1rem 0.25rem 1.5rem;
  scrollbar-width: thin;
}

.lp-screen {
  flex: 0 0 auto;
  width: 250px;
  margin: 0;
  scroll-snap-align: center;
  text-align: center;
}

.lp-phone {
  border: 10px solid #111;
  border-radius: 2.2rem;
  overflow: hidden;
  background: #111;
  box-shadow: 0 18px 40px rgba(20, 40, 70, 0.25);
  aspect-ratio: 390 / 844;
}

.lp-phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  border-radius: 1.4rem;
}

.lp-screen figcaption {
  margin-top: 1rem;
}

.lp-screen figcaption strong {
  display: block;
}

.lp-screen figcaption span {
  font-size: 0.9rem;
  color: #6c757d;
}

.lp-arrow {
  width: 2.75rem;
  height: 2.75rem;
}

@media (min-width: 1200px) {
  .lp-screens {
    justify-content: center;
  }

  .lp-arrow {
    display: none;
  }
}

.lp-step {
  background: #fff;
  border-radius: 1.25rem;
  padding: 2rem 1.5rem;
  height: 100%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  text-align: center;
}

.lp-step-num {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: #ffc107;
  color: #1f3a5f;
  font-weight: 800;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Fasce con foto di sfondo */
.lp-band,
.lp-cta {
  position: relative;
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 5rem 0;
}

.lp-band::before,
.lp-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(14, 30, 52, 0.78);
}

.lp-band > .container,
.lp-cta > .container {
  position: relative;
}

.lp-types {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.lp-types span {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 0.6rem 1.1rem;
  font-size: 1.05rem;
}

.lp-feature {
  background: #fff;
  border-radius: 1.25rem;
  padding: 1.75rem;
  height: 100%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.lp-feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(20, 40, 70, 0.12);
}

.lp-feature > span {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.75rem;
}

.lp-feature p {
  color: #6c757d;
  margin-bottom: 0;
}

.lp-footer {
  background: #13253d;
  color: rgba(255, 255, 255, 0.7);
  padding: 2rem 0;
  font-size: 0.95rem;
}

.lp-footer a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.lp-footer a:hover {
  color: #fff;
}

/* Animazione all'apparire (solo se il JavaScript è attivo) */
.lp-js .lp-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.lp-js .lp-reveal.lp-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .lp-js .lp-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 767.98px) {
  .lp-hero {
    padding: 3rem 0 2rem;
  }

  .lp-hero h1 {
    font-size: 2rem;
  }

  .lp-stats {
    grid-template-columns: 1fr;
    gap: 0.6rem;
    margin-top: 2rem;
  }

  .lp-stats div {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.75rem 1rem;
  }

  .lp-stats strong {
    font-size: 1.5rem;
    min-width: 3.5rem;
  }

  .lp-section,
  .lp-band,
  .lp-cta {
    padding: 3rem 0;
  }

  .lp-screen {
    width: 220px;
  }
}

/* Selettore della lingua */
.lang-switch {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  overflow: hidden;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
}

.lang-switch a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  padding: 0.25rem 0.6rem;
}

.lang-switch a:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.lang-switch a.active {
  background: #fff;
  color: #1f3a5f;
}

.lang-switch-dark {
  border-color: #c5cfdb;
  background: #fff;
}

.lang-switch-dark a {
  color: #1f3a5f;
}

.lang-switch-dark a:hover {
  background: #eef3f9;
  color: #1f3a5f;
}

.lang-switch-dark a.active {
  background: #1f3a5f;
  color: #fff;
}

/* Selettore della lingua sopra la copertina dell'officina */
.ws-hero-lang {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
}

.ws-hero-lang .lang-switch {
  background: rgba(10, 20, 35, 0.35);
}

/* Senza foto la copertina è bassa: spazio per il selettore della lingua */
.ws-hero-plain .ws-hero-inner {
  padding-top: 3.75rem;
}

/* Sezione apribile con le traduzioni scritte dall'officina */
.translations-box {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 0.6rem 0.9rem;
  background: #fbfcfe;
}

.translations-box summary {
  cursor: pointer;
  font-weight: 500;
}

.translations-box[open] summary {
  margin-bottom: 0.5rem;
}

/* Ricerca dei servizi (pagina principale e /servisi) */
.dir-search {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.5rem;
  max-width: 820px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  padding: 0.6rem;
  backdrop-filter: blur(4px);
}

.dir-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.dir-quick a {
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 2rem;
  padding: 0.3rem 0.8rem;
  font-size: 0.9rem;
}

.dir-quick a:hover {
  background: rgba(255, 255, 255, 0.25);
}

.dir-owner-link {
  display: inline-block;
  margin-top: 2rem;
  color: #ffc107;
  text-decoration: none;
  font-weight: 500;
}

.dir-owner-link:hover {
  text-decoration: underline;
  color: #ffd54f;
}

.dir-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.25rem;
}

.dir-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dir-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.dir-card-cover {
  position: relative;
  display: block;
  height: 140px;
  background-color: #1f3a5f;
  background-size: cover;
  background-position: center;
}

.dir-card-cover-plain {
  background-image: linear-gradient(135deg, #1f3a5f 0%, #2f5d8a 60%, #3d7ab8 100%);
}

.dir-card-logo {
  position: absolute;
  left: 0.75rem;
  bottom: -1.25rem;
  width: 56px;
  height: 56px;
  object-fit: contain;
  background: #fff;
  border-radius: 0.75rem;
  padding: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.dir-card-initial {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 3rem;
  font-weight: 700;
}

.dir-card-status {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
}

.dir-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.6rem 1rem 1rem;
}

.dir-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.dir-card-tags span {
  font-size: 0.8rem;
  background: #eef2f7;
  border-radius: 1rem;
  padding: 0.15rem 0.55rem;
}

.dir-layout {
  display: grid;
  gap: 1rem;
}

.dir-map {
  height: 300px;
  border-radius: 1rem;
  z-index: 0;
}

.dir-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  align-content: start;
}

/* Su schermi grandi: elenco a sinistra, mappa fissa a destra */
@media (min-width: 992px) {
  .dir-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .dir-map {
    order: 2;
    position: sticky;
    top: 1rem;
    height: calc(100vh - 2rem);
    max-height: 720px;
  }
}

@media (max-width: 767.98px) {
  .dir-search {
    grid-template-columns: 1fr;
  }
}

/* Impostazioni: posizione dell'officina sulla mappa */
.settings-map {
  height: 280px;
  border-radius: 0.5rem;
  z-index: 0;
}

/* Scheda filtrata per tipo di servizio: il tipo scelto e i suoi servizi con il prezzo */
.dir-card-tags .dir-tag-active {
  background: #fff3cd;
  font-weight: 600;
}

.dir-card-services {
  list-style: none;
  padding: 0.5rem 0.75rem;
  margin: 0 0 0.75rem;
  background: #f6f8fb;
  border-radius: 0.6rem;
  font-size: 0.9rem;
}

.dir-card-services li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.dir-card-services strong {
  white-space: nowrap;
}

.dir-card-services li + li {
  margin-top: 0.25rem;
}

/* Avviso: il cliente altre volte non si è presentato */
.noshow-badge {
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f1aeb5;
    font-weight: 600;
}

/* Statistiche: grafico a barre delle visite per giorno */
.stats-chart {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 180px;
}

.stats-bar-col {
    flex: 1;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}

.stats-bar {
    width: 100%;
    min-height: 2px;
    background: #0d6efd;
    border-radius: 3px 3px 0 0;
}

.stats-value,
.stats-label {
    font-size: 0.7rem;
    color: #6c757d;
    white-space: nowrap;
    height: 1.1rem;
}

/* Statistiche: pallino "sul sito adesso" */
.online-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #adb5bd;
}

.online-dot-on {
    background: #198754;
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.25);
}

