/* ===========================
   FOOTER
   =========================== */

   footer {
    width: 100%;
    height: fit-content;
    background-color: #fff;
    border-top: 1px solid #ccc;
    margin: 10px 0 0;
  }
  
  .footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 3rem;
    display: flex;
    flex-direction: column;
  }
  
  .footer-group:first-child {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 2rem;
  }
  
  @media screen and (max-width: 750px) {
    .footer-group:first-child {
      flex-direction: column;
    }
  }
  
  .footer-group:first-child .footer-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1.5rem 0;
    flex: 1;
  }
  
  .footer-group:first-child .footer-section ol {
    list-style: none;
    display: flex;
    flex-direction: column !important;
    gap: 1rem;
    margin: 0;
    padding: 0;
  }
  
  .footer-group:first-child .footer-section ol li a {
    text-decoration: none;
    color: #333;
    font-size: 13px;
    letter-spacing: 1px;
  }
  
  .footer-group:first-child .footer-section ol li a:hover {
    text-decoration: underline;
  }
  
  .footer-group:has(.social-container) {
    display: flex;
    justify-content: center;
    padding: 1.5rem 0;
  }
  
  .footer-group:has(.social-container) ion-icon:hover {
    transform: scale(1.1);
  }
  
  .social-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  .social-container ol {
    list-style: none;
    display: flex;
    flex-direction: row !important;
    gap: 1rem;
    margin: 0;
  }
  
  footer hr {
    border: none;
    border-top: 1px solid #ccc;
    width: calc(100% + 6rem);
    margin: 0 -3rem;
  }
  
  .social-container ol li ion-icon {
    font-size: 22px;
    color: #333;
    transition: color 0.3s;
  }
  
  /* PARTE SOTTO */
  .footer-group:last-child {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
  }
  
  .footer-group:last-child .footer-section {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .footer-group:last-child .footer-section ol {
    display: flex;
    flex-direction: row;
    list-style: none;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    font-size: 12px;
    color: #666;
  }
  
  .footer-group:last-child .footer-section ol li {
    display: flex;
    align-items: center;
  }
  
  .footer-group:last-child .footer-section ol li a {
    text-decoration: none;
    color: #666;
    font-size: 12px;
    white-space: nowrap;
  }
  
  .footer-group:last-child .footer-section ol li a:hover {
    text-decoration: underline;
    color: #333;
  }
  
  .footer-group:last-child .footer-section ol li:not(:last-child)::after {
    content: "·";
    margin: 0 0.25rem;
    color: #666;
  }
  
  /* FOOTER LINK RESPONSIVE */
  @media (max-width: 1200px) {
    .footer-group:last-child .footer-section ol {
      flex-wrap: wrap;
      justify-content: center;
      gap: 0.75rem 1rem;
      text-align: center;
    }
  
    .footer-group:last-child .footer-section ol li {
      flex: 0 1 auto;
    }
  
    .footer-group:last-child .footer-section ol li:not(:last-child)::after {
      content: none;
    }
  
    .footer-group:last-child .footer-section ol li a {
      font-size: 13px;
      white-space: normal;
    }
  }
  
  
  /* ===========================
     COOKIE UI (Luna Bags)
     =========================== */
  
  .lb-no-scroll { overflow: hidden; }
  
  .lbcb.hidden,
  .lbcpm.hidden { display: none; }
  
  /* Banner */
  .lbcb {
    position: fixed;
    left: 16px; right: 16px; bottom: 16px;
    z-index: 9998;
    display: flex;
    justify-content: center;
    pointer-events: none; /* cliccabile solo la box */
    font-family: inherit;
  }
  
  .lbcb__box {
    pointer-events: auto;
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: 44px 1fr auto;
    gap: 12px;
    align-items: center;
  
    padding: 14px 16px;
    border-radius: 18px;
  
    background: rgba(255,255,255,.86);
    border: 1px solid rgba(15,23,42,.12);
    box-shadow: 0 18px 60px rgba(0,0,0,.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  
    animation: lbcbIn .18s ease-out both;
  }
  
  .lbcb__icon {
    width: 44px; height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(139,94,60,.10);
    border: 1px solid rgba(139,94,60,.18);
  }
  
  .lbcb__icon ion-icon {
    font-size: 22px;
    color: rgba(25,25,25,.86);
  }
  
  .lbcb__text h3 {
    margin: 0 0 4px;
    font-size: 14px;
    letter-spacing: .2px;
    color: #0f172a;
  }
  
  .lbcb__text p {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.35;
    color: rgba(15,23,42,.74);
  }
  
  .lbcb__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
  }
  
  .lbcb__link {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    font-size: 12px;
    color: rgba(15,23,42,.72);
    text-decoration: none;
    border-bottom: 1px solid rgba(15,23,42,.18);
  }
  
  .lbcb__link:hover {
    color: rgba(15,23,42,.92);
    border-bottom-color: rgba(15,23,42,.35);
  }
  
  .lbcb__link ion-icon { font-size: 15px; }
  
  /* Azioni */
  .lbcb__actions {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  
  /* Bottoni (NO width/flex qui -> stabile) */
  .lbcb .btn {
    appearance: none;
    border: 1px solid transparent; /* sempre 1px, niente “salti” */
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.1;
    cursor: pointer;
  
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  
    transition: transform .08s ease, background .15s ease, border-color .15s ease, color .15s ease;
    user-select: none;
    box-sizing: border-box;
    white-space: nowrap;
  }
  
  .lbcb .btn:active { transform: translateY(1px); }
  
  .lbcb .btn:focus-visible {
    outline: 3px solid rgba(139,94,60,.22);
    outline-offset: 2px;
  }
  
  .lbcb .btn-outline {
    background: rgba(255,255,255,.55);
    border-color: rgba(15,23,42,.16);
    color: rgba(15,23,42,.85);
  }
  
  .lbcb .btn-outline:hover {
    background: rgba(255,255,255,.78);
    border-color: rgba(15,23,42,.22);
  }
  
  .lbcb .btn-ghost {
    background: transparent;
    border-color: transparent;
    color: rgba(15,23,42,.70);
    padding: 10px 10px;
  }
  
  .lbcb .btn-ghost:hover {
    background: rgba(15,23,42,.04);
    color: rgba(15,23,42,.92);
  }
  
  .lbcb .btn-primary {
    background: #111827;
    color: #fff;
  }
  
  .lbcb .btn-primary:hover { background: #0b1220; }
  
  @keyframes lbcbIn {
    from { transform: translateY(10px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
  }
  
  /* Responsive banner */
  @media (max-width: 760px) {
    .lbcb__box {
      grid-template-columns: 44px 1fr;
      grid-template-areas:
        "ic tx"
        "ac ac";
    }
    .lbcb__icon { grid-area: ic; }
    .lbcb__text { grid-area: tx; }
    .lbcb__actions { grid-area: ac; justify-content: flex-start; width: 100%; }
  
    /* Layout bottoni mobile: 50/50 sopra + 100% sotto */
    .lbcb__actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }
  
    .lbcb__actions .btn {
      flex: 1 1 calc(50% - 4px);
      width: auto;
    }
  
    .lbcb__actions .btn-primary {
      flex: 0 0 100%;
      width: 100%;
    }
  }
  
  /* Preferenze modal */
  .lbcpm {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(2,6,23,.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
  
  .lbcpm__card {
    width: min(760px, 100%);
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(15,23,42,.14);
    box-shadow: 0 24px 90px rgba(0,0,0,.30);
  }
  
  .lbcpm__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(15,23,42,.10);
  }
  
  .lbcpm__title {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    color: #0f172a;
  }
  .lbcpm__title ion-icon { font-size: 18px; }
  
  .lbcpm__head h3 {
    margin: 0;
    font-size: 15px;
    letter-spacing: .2px;
  }
  
  .lbcpm__close {
    border: 1px solid rgba(15,23,42,.14);
    background: rgba(255,255,255,.65);
    border-radius: 12px;
    width: 40px; height: 40px;
    display: grid;
    place-items: center;
    cursor: pointer;
  }
  
  .lbcpm__close ion-icon {
    font-size: 20px;
    color: rgba(15,23,42,.8);
  }
  
  .lbcpm__close:hover { background: rgba(15,23,42,.04); }
  
  .lbcpm__content {
    padding: 14px 16px 6px;
    display: grid;
    gap: 10px;
  }
  
  .lbcpm__row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
  
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(15,23,42,.12);
    background: rgba(255,255,255,.70);
  }
  
  .lbcpm__row strong {
    color: #0f172a;
    font-size: 13px;
    display: inline-flex;
    gap: 8px;
    align-items: center;
  }
  .lbcpm__row strong ion-icon {
    font-size: 16px;
    color: rgba(139,94,60,.95);
  }
  
  .lbcpm__row .small {
    margin: 4px 0 0;
    color: rgba(15,23,42,.70);
    font-size: 12.5px;
    line-height: 1.35;
  }
  
  .lbcpm__foot {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    padding: 12px 16px 16px;
    border-top: 1px solid rgba(15,23,42,.10);
  }
  
  .lbcpm .btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
  }
  
  .lbcpm .btn-outline {
    background: rgba(255,255,255,.55);
    border-color: rgba(15,23,42,.16);
    color: rgba(15,23,42,.85);
  }
  
  .lbcpm .btn-outline:hover {
    background: rgba(255,255,255,.78);
    border-color: rgba(15,23,42,.22);
  }
  
  .lbcpm .btn-primary {
    background: #111827;
    color: #fff;
  }
  .lbcpm .btn-primary:hover { background: #0b1220; }
  
  .lbcpm .btn-accent {
    background: rgba(139,94,60,.12);
    border-color: rgba(139,94,60,.20);
    color: #0f172a;
  }
  .lbcpm .btn-accent:hover {
    background: rgba(139,94,60,.18);
    border-color: rgba(139,94,60,.26);
  }
  
  /* Switch */
  .switch {
    position: relative;
    width: 50px;
    height: 30px;
    display: inline-block;
  }
  .switch input { display: none; }
  .switch span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(15,23,42,.14);
    border: 1px solid rgba(15,23,42,.14);
    transition: .15s;
  }
  .switch span:before {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,.14);
    transition: .15s;
  }
  .switch input:checked + span {
    background: rgba(16,185,129,.55);
    border-color: rgba(16,185,129,.55);
  }
  .switch input:checked + span:before { transform: translateX(20px); }
  .switch input:disabled + span { opacity: .55; cursor: not-allowed; }
  
  @media (prefers-reduced-motion: reduce) {
    .lbcb__box { animation: none; }
  }
  
  /* ===========================
     COOKIE BANNER "IN SECONDO PIANO" QUANDO MENU APERTO
     (body.menu-open lo aggiungi dal JS)
     =========================== */
  body.menu-open .lbcb {
    z-index: 900 !important;     /* sotto overlay(999) e menu(1000) */
    opacity: 0.25;
    pointer-events: none;
    filter: blur(1px);
  }
  /* ===========================
   WHATSAPP FLOATING BUTTON
   =========================== */

.wa-fab{
  position: fixed;
  left: 99%;
  bottom: 16px;
  transform: translateX(-99%);
  width: 56px;
  height: 56px;
  border-radius: 999px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #25D366;
  color: #fff;
  text-decoration: none;

  box-shadow: 0 14px 40px rgba(0,0,0,.22);
  z-index: 9999;
  transition: transform .12s ease, filter .12s ease, opacity .12s ease;
}

.wa-fab ion-icon{
  font-size: 28px;
  color: #fff;
}


/* Se il cookie banner è visibile, alza il bottone per non sovrapporlo */
body:has(.lbcb:not(.hidden)) .wa-fab{
  bottom: 110px;
}

/* Se apri il menu (hai già body.menu-open), mettilo "in secondo piano" */
body.menu-open .wa-fab{
  z-index: 900;
  opacity: 0.25;
  pointer-events: none;
  filter: blur(1px);
}
