/* ========================================
   MOBILE.CSS — stili mobile separati
   Applicato solo su schermi ≤ 768px
   ======================================== */

/* ----------------------------------------
   MENU: drawer slide-in da destra
   Il menu è display:none (Tailwind 'hidden') quando chiuso.
   JS rimuove 'hidden' e aggiunge 'menu-open' per aprirlo.
   Nessun override di display quando chiuso → zero conflitti.
   ---------------------------------------- */
@media (max-width: 768px) {
  #menu.menu-open {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    width: 78vw !important;
    max-width: 300px !important;
    height: 100dvh !important;
    background: #fff !important;
    box-shadow: -6px 0 28px rgba(0, 0, 0, 0.2) !important;
    border-radius: 0 !important;
    z-index: 9000 !important;
    display: flex !important;
    flex-direction: column !important;
    padding-top: 72px !important;
    overflow-y: auto !important;
    animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }

  @keyframes slideInRight {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
  }

  #menu.menu-open li {
    padding: 14px 22px !important;
    border-bottom: 1px solid #f1f5f9;
    width: 100%;
  }

  #menu.menu-open a {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    display: block;
  }

  /* Backdrop scuro dietro il drawer */
  .menu-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 8999;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .menu-backdrop.active {
    display: block;
  }

  /* ----------------------------------------
     BARRA SOCIAL FISSA SOTTO HEADER
     ---------------------------------------- */
  .mobile-social-bar {
    display: flex !important;
    position: fixed;
    top: 96px;
    left: 0;
    right: 0;
    z-index: 49;
    background: #ffffff;
    border-bottom: 2px solid #e2e8f0;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 12px 16px;
  }

  .mobile-social-bar .social-icon {
    width: 40px !important;
    height: 40px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
  }

  /* Nascondi icone social dall'header (ci sono nella barra social) */
  .social-links {
    display: none !important;
  }

  /* Spazio aggiuntivo per il contenuto sotto header + barra social */
  .pt-20 {
    padding-top: calc(5rem + 68px) !important;
  }

  /* ----------------------------------------
     STICKY BOTTOM CTA (Chiama + WhatsApp)
     ---------------------------------------- */
  .mobile-cta-bar {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 8990;
    background: #ffffff;
    border-top: 2px solid #0b9b50;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.14);
    padding: 10px 14px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    gap: 10px;
  }

  .mobile-cta-bar a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 8px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: opacity 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-cta-bar a:active {
    opacity: 0.82;
  }

  .mobile-cta-bar .cta-call {
    background: #0b9b50;
    color: #ffffff;
  }

  .mobile-cta-bar .cta-whatsapp {
    background: #25d366;
    color: #ffffff;
  }

  /* Spazio in fondo al body perché la CTA bar non copra i contenuti */
  body {
    padding-bottom: 80px;
  }

  /* Cookie manage: spostato sopra la CTA bar */
  #cookie-manage {
    bottom: 90px !important;
    right: 12px !important;
  }

  /* ----------------------------------------
     HERO SLIDER
     ---------------------------------------- */
  .slider,
  .slider.box {
    height: clamp(200px, 58vw, 310px);
    margin: 12px auto;
    border-radius: 8px;
  }

  .hero-text {
    width: calc(100% - 24px);
    padding: 0;
  }

  .hero-text h1 {
    font-size: 26px !important;
    letter-spacing: 0.4px;
    margin-bottom: 8px;
    -webkit-text-stroke: 0.8px #000;
  }

  .hero-text p {
    font-size: 16px !important;
    letter-spacing: 0.3px;
    margin-bottom: 10px;
  }

  /* ----------------------------------------
     SERVICE BOXES — full width su mobile
     ---------------------------------------- */
  .box {
    width: 100% !important;
    max-width: 100% !important;
    height: clamp(190px, 58vw, 280px) !important;
    margin: 12px auto !important;
  }

  .info-box {
    padding: 12px !important;
    margin: 12px auto !important;
  }

  /* ----------------------------------------
     RECENSIONI — colonna full-width
     ---------------------------------------- */
  .reviews-container {
    flex-direction: column !important;
    gap: 12px !important;
    margin: 20px auto !important;
    padding: 0 12px !important;
  }

  .review-box {
    max-width: 100% !important;
    width: 100% !important;
    text-align: left !important;
  }
}

/* ----------------------------------------
   Schermi molto piccoli (≤ 480px)
   ---------------------------------------- */
@media (max-width: 480px) {
  #menu.menu-open {
    width: 86vw !important;
  }

  .mobile-social-bar {
    gap: 12px;
    padding: 8px 12px;
  }

  .mobile-social-bar .social-icon {
    width: 30px !important;
    height: 30px !important;
  }

  .mobile-cta-bar {
    padding: 10px 10px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .mobile-cta-bar a {
    font-size: 14px;
    padding: 12px 6px;
    gap: 6px;
  }

  .hero-text h1 {
    font-size: 22px !important;
  }

  .hero-text p {
    font-size: 15px !important;
  }
}
