/* ============================================================
   GUIDATA.ASP — MOBILE CAROUSEL + DOT PAGINA
   ============================================================ */

@media (max-width: 991.98px) and (pointer: coarse) {

  /* ----- Nascondi card desktop dentro accordion ----- */
  #guidata .accordion-body .row > [class*="col-"] {
    display: none;
  }

  #guidata  .accordion-button {
    padding: 0.5rem 0.85rem;
  }

  /* ----- Accordion: padding ridotto su mobile ----- */
  #guidata .accordion-body {
    padding-left: 0;
    padding-right: 0;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  #guidata .accordion-button {
    font-size: 14px;
  }

  /* ============================================================
     CAROUSEL CARD — dentro ogni accordion item
     ============================================================ */

  .gd-carousel-wrap {
    width: 100%;
    overflow: hidden;
    margin-top: 4px;
  }

  .gd-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 12px;
    padding: 4px 16px 8px;
  }
  .gd-track::-webkit-scrollbar { display: none; }

  /* Card mobile */
  .gd-card {
    flex: 0 0 calc(100% - 1px);
    scroll-snap-align: start;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    display: flex;
    flex-direction: column;
    height: 360px;       /* da affinare con test device */
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s;
  }
  .gd-card:active {
    box-shadow: 0 4px 16px rgba(0,159,227,0.25);
  }

  .gd-card-heading {
    background-color: #009fe3;
    color: #fff;
    text-align: center;
    vertical-align: middle;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 7px 2px;
    line-height: 1.3;
    flex-shrink: 0;
  }
  .gd-card-heading {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .gd-card-img {
    width: 100%;
    height: 130px;
    object-fit: contain;
    background: #f8f8f8;
    padding: 6px;
    flex-shrink: 0;
  }

  .gd-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 8px 14px 10px;
    overflow: hidden;
  }

  .gd-card-text {
    font-size: 16px;
    line-height: 1.4;
    color: #444;
    flex: 1;
    overflow: hidden;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
  }

  .gd-card-btn {
    display: block;
    margin-top: 8px;
    text-align: center;
    background-color: #009fe3;
    color: #fff !important;
    border-radius: 4px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
    border: none;
    cursor: pointer;
  }
  .gd-card-btn:active { background-color: #007bb5; }

  /* Dot carousel card (interni a ogni sezione accordion) */
  .gd-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 4px 0 8px;
  }
  .gd-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ccc;
    transition: background 0.2s, transform 0.2s;
    flex-shrink: 0;
  }
  .gd-dot.active {
    background: #009fe3;
    transform: scale(1.3);
  }

}
