/**
 * Override di stile.css — va caricato DOPO stile.css.
 * Platform (Salvini) e template :3003.
 */

/* #main_wrapper = stesso bg del body */
[data-template='sitobasic03'] #main_wrapper,
body[data-template='sitobasic03'] #main_wrapper {
  background-color: #f5f5f5 !important;
  background-image: none !important;
}

/* Elenco immobili: stesso bg del body */
[data-template='sitobasic03'] div#immobili-elenco,
[data-template='sitobasic03'] #immobili-elenco {
  background-color: #f5f5f5 !important;
}

/* Footer: colore da pannello (--color-footer-bg), default bianco */
[data-template='sitobasic03'] #footer {
  background-color: var(--color-footer-bg, #ffffff) !important;
}

/* Logo footer a colori (annulla filter bianco da CSS basic01 nel bundle platform) */
[data-template='sitobasic03'] #footer .footer-logo,
[data-template='sitobasic03'] #footer .footer-logo img {
  filter: none !important;
}

/* Vetrina homepage */
[data-template='sitobasic03'] #vetrina-outdoor.agim-showcase {
  background: #fff !important;
  background-color: #fff !important;
}

/* Spalla: tasti secondary, larghezza piena (non i bottoni icona del dettaglio) */
[data-template='sitobasic03'] #right_column .banner-container {
  width: 100% !important;
  box-sizing: border-box !important;
}

[data-template='sitobasic03'] #right_column .banner-container:not(.dettaglio) .banner {
  width: 100% !important;
  max-width: 100% !important;
  background-color: var(--color-secondary) !important;
}

[data-template='sitobasic03'] #right_column .banner-container:not(.dettaglio) .banner:hover {
  background-color: var(--color-primary) !important;
}

/* Dettaglio immobile: bottoni condivisione/stampa tutti affiancati */
[data-template='sitobasic03'] #right_column .banner-container.dettaglio {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
}

[data-template='sitobasic03'] #right_column .banner-container.dettaglio .banner {
  width: 45px !important;
  max-width: 45px !important;
  min-width: 45px !important;
  height: 45px !important;
  flex: 0 0 45px !important;
  margin: 0 !important;
}

/* Spalla ricerca: niente override aggressivi su #ricerca (rompono Salvini/platform).
   Layout/bg/shadow restano in globals.css (più leggeri). */

/* Pagina servizi — hover primary pieno */
[data-template='sitobasic03'] .servizi-partners__hover {
  background: var(--color-primary) !important;
}

/* Menu mobile — sfondo primary, voci leggibili */
@media (max-width: 999px) {
  [data-template='sitobasic03'] #navigation #menu-responsive .navigation-mobile {
    background-color: var(--color-primary) !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    padding: 8px 0 !important;
  }

  [data-template='sitobasic03'] #navigation #menu-responsive .navigation-mobile > li {
    width: 100% !important;
  }

  [data-template='sitobasic03'] #navigation #menu-responsive .navigation-mobile > li > a {
    padding: 14px 20px !important;
    color: #fff !important;
  }

  [data-template='sitobasic03'] #navigation #menu-responsive .navigation-mobile > li > a span {
    line-height: 1.4 !important;
    color: #fff !important;
  }

  [data-template='sitobasic03'] #navigation #menu-responsive .navigation-mobile > li > a:hover,
  [data-template='sitobasic03'] #navigation #menu-responsive .navigation-mobile > li > a:focus,
  [data-template='sitobasic03'] #navigation #menu-responsive .navigation-mobile > li > a:active {
    background-color: var(--color-secondary, rgba(0, 0, 0, 0.15)) !important;
  }

  [data-template='sitobasic03'] #navigation #menu-responsive button .hamburger-inner,
  [data-template='sitobasic03'] #navigation #menu-responsive button .hamburger-inner:before,
  [data-template='sitobasic03'] #navigation #menu-responsive button .hamburger-inner:after {
    background-color: var(--color-primary) !important;
  }
}

/* Menu sticky — ultimo bottone sempre primary, testo bianco, senza bordo.
   Specificità >= regola basic04 :not(.nav-logo):not(.whatsapp) che altrimenti forza #333. */
@media (min-width: 1000px) {
  [data-template='sitobasic03'] #navigation.fixed #navigation-standard > li:last-child,
  [data-template='sitobasic03'] #navigation.fixed #navigation-standard > li.nav-cta,
  [data-template='sitobasic03'] #navigation.fixed #navigation-standard > li:last-child:hover,
  [data-template='sitobasic03'] #navigation.fixed #navigation-standard > li.nav-cta:hover,
  [data-template='sitobasic03'] #navigation.fixed #navigation-standard > li:last-child:focus-within,
  [data-template='sitobasic03'] #navigation.fixed #navigation-standard > li.nav-cta:focus-within,
  [data-template='sitobasic03'] #navigation.fixed #navigation-standard > li:last-child:active,
  [data-template='sitobasic03'] #navigation.fixed #navigation-standard > li.nav-cta:active {
    background-color: var(--color-primary) !important;
    border: 0 !important;
  }

  [data-template='sitobasic03'] #navigation.fixed #navigation-standard > li.nav-cta:not(.nav-logo):not(.whatsapp) > a,
  [data-template='sitobasic03'] #navigation.fixed #navigation-standard > li.nav-cta:not(.nav-logo):not(.whatsapp) > a span,
  [data-template='sitobasic03'] #navigation.fixed #navigation-standard > li.nav-cta:not(.nav-logo):not(.whatsapp) > a i,
  [data-template='sitobasic03'] #navigation.fixed #navigation-standard > li.nav-cta:not(.nav-logo):not(.whatsapp):hover > a,
  [data-template='sitobasic03'] #navigation.fixed #navigation-standard > li.nav-cta:not(.nav-logo):not(.whatsapp):hover > a span,
  [data-template='sitobasic03'] #navigation.fixed #navigation-standard > li.nav-cta:not(.nav-logo):not(.whatsapp):hover > a i,
  [data-template='sitobasic03'] #navigation.fixed #navigation-standard > li:last-child:not(.nav-logo):not(.whatsapp) > a,
  [data-template='sitobasic03'] #navigation.fixed #navigation-standard > li:last-child:not(.nav-logo):not(.whatsapp) > a span,
  [data-template='sitobasic03'] #navigation.fixed #navigation-standard > li:last-child:not(.nav-logo):not(.whatsapp) > a i,
  [data-template='sitobasic03'] #navigation.fixed #navigation-standard > li:last-child:not(.nav-logo):not(.whatsapp):hover > a,
  [data-template='sitobasic03'] #navigation.fixed #navigation-standard > li:last-child:not(.nav-logo):not(.whatsapp):hover > a span,
  [data-template='sitobasic03'] #navigation.fixed #navigation-standard > li:last-child:not(.nav-logo):not(.whatsapp):hover > a i {
    color: #ffffff !important;
  }
}
