/* ==========================================================================
   MOBILE & RESPONSIVE ADAPTATION CODE (mobile.css)
   ========================================================================== */

/* --------------------------------------------------------------------------
   TABLET & SMALLER DESKTOPS (max-width: 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  /* Typography Adjustments */
  .hero-title { font-size: 3.5rem !important; }
  .page-title { font-size: 3rem !important; }
  
  /* Grid Gaps */
  .intro-grid, 
  .location-grid, 
  .footer-container {
    gap: 3rem !important;
  }
}

/* --------------------------------------------------------------------------
   TABLET PORTRAIT (max-width: 992px)
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  /* Layout generali */
  .intro-grid, 
  .location-grid, 
  .footer-container {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }
  
  /* Chi Siamo */
  .values-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  
  /* Servizi */
  .service-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  /* Fix alternating layout on mobile */
  .service-block:nth-child(even) .service-grid {
    direction: ltr !important;
  }
  .service-block:nth-child(even) .service-content {
    direction: ltr !important;
  }
  
  /* Galleria Bento Grid Override */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    grid-auto-rows: 300px !important;
  }
  .gallery-item:nth-child(1) { grid-column: span 2 !important; }
  .gallery-item:nth-child(2) { grid-column: span 1 !important; }
  .gallery-item:nth-child(3) { grid-column: span 1 !important; }
  .gallery-item:nth-child(4) { grid-column: span 1 !important; }
  .gallery-item:nth-child(5) { grid-column: span 1 !important; }
  .gallery-item:nth-child(6) { grid-column: span 2 !important; }
  .gallery-item:nth-child(7) { grid-column: span 1 !important; }
  .gallery-item:nth-child(8) { grid-column: span 1 !important; }
}

/* --------------------------------------------------------------------------
   MOBILE (max-width: 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  /* Typography */
  .hero-title { font-size: 2.5rem !important; }
  .hero-subtitle { font-size: 1.1rem !important; }
  .section-title { font-size: 2rem !important; }
  
  /* Spacing */
  .section-padding { padding: 4rem 0 !important; }
  .intro-text, .location-text { padding-right: 0 !important; }
  
  /* Menu Navigazione */
  .nav-links {
    position: fixed !important;
    top: 80px !important;
    left: -100% !important;
    width: 100% !important;
    height: calc(100vh - 80px) !important;
    background: var(--color-bg) !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    transition: left 0.4s ease !important;
    gap: 2rem !important;
    z-index: 999 !important;
  }
  .nav-links.active {
    left: 0 !important;
  }
  .mobile-menu-btn {
    display: flex !important;
  }
  .nav-actions .btn {
    display: none !important; /* Nascondi pulsante WA nell'header per fare spazio */
  }

  /* Carosello Home */
  .carousel-item {
    min-width: 250px !important;
    height: 350px !important;
  }
  
  /* Chi Siamo Timeline */
  .timeline::before {
    left: 0 !important;
  }
  .timeline-item {
    width: 100% !important;
    padding-left: 2rem !important;
    padding-right: 0 !important;
  }
  .timeline-item:nth-child(even) {
    left: 0 !important;
  }
  .timeline-dot {
    left: 0 !important;
    transform: translateX(-50%) !important;
  }
}

/* --------------------------------------------------------------------------
   SMALL MOBILE (max-width: 576px)
   -------------------------------------------------------------------------- */
@media (max-width: 576px) {
  /* Galleria Bento Grid Override */
  .gallery-grid {
    grid-template-columns: 1fr !important;
    grid-auto-rows: 250px !important;
  }
  .gallery-item {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }
}

/* --------------------------------------------------------------------------
   TOUCH DEVICES FIXES (Disabilita custom cursor)
   -------------------------------------------------------------------------- */
@media (hover: none) and (pointer: coarse) {
  .custom-cursor {
    display: none !important;
  }
  body, a, button, .btn, .carousel-item, .gallery-item {
    cursor: auto !important;
  }
}
