@media (max-width: 820px) {
  html {
    scroll-padding: 92px 0 68px;
    scroll-snap-type: none;
    overscroll-behavior-y: auto;
  }

  html.calendar-card-snap-active {
    scroll-snap-type: y mandatory;
  }

  #event-grid.event-grid {
    display: grid;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    grid-template-columns: calc(100vw - 24px);
    grid-auto-flow: row;
    justify-content: center;
    gap: 18px;
    overflow: visible;
    padding: 4px 0 76px;
    touch-action: pan-y;
  }

  #event-grid .event-card {
    width: calc(100vw - 24px);
    height: auto;
    min-height: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    scroll-margin-top: 0;
  }

  #event-grid .event-photo {
    position: relative;
    display: block;
    flex: none;
    min-height: 0;
    background: #f3eee8;
    isolation: isolate;
  }

  #event-grid .event-photo::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 0;
    background: linear-gradient(100deg, #eee8e1 20%, #f8f4ef 45%, #eee8e1 70%);
    background-size: 240% 100%;
    animation: calendar-image-loading 1.1s linear infinite;
  }

  #event-grid .live-event-card .event-photo img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    opacity: 0;
    transition: opacity 180ms ease;
  }

  #event-grid .event-photo img.is-loaded {
    opacity: 1;
  }

  #event-grid .event-content {
    min-height: 0;
    gap: 4px;
    padding: 9px 14px 10px;
    overflow: visible;
  }

  #event-grid .event-content h3 {
    min-height: 0;
    font-size: 0.96rem;
    line-height: 1.18;
  }

  #event-grid .event-content p {
    min-height: 0;
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.35;
    -webkit-line-clamp: 1;
  }

  #event-grid .event-tags {
    flex-wrap: nowrap;
    min-height: 30px;
    margin-top: 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  #event-grid .event-tags::-webkit-scrollbar {
    display: none;
  }

  #event-grid .event-tag {
    flex: 0 0 auto;
    padding: 5px 9px;
    font-size: 0.75rem;
  }

  #event-grid .event-footer {
    gap: 8px;
    margin-top: 6px;
  }

  #event-grid .event-price {
    min-height: 42px;
    font-size: 0.98rem;
  }

  #event-grid .event-footer .event-actions {
    flex-wrap: nowrap;
    gap: 6px;
  }

  #event-grid .event-footer .event-actions a {
    min-width: 88px;
    padding: 7px 5px;
    font-size: 0.72rem;
    white-space: nowrap;
  }

  header .navbar > .cta {
    flex: 0 0 auto;
    min-width: 108px;
    white-space: nowrap;
  }

  .whatsapp-float {
    display: none;
  }
}

@keyframes calendar-image-loading {
  to { background-position-x: -240%; }
}

@media (prefers-reduced-motion: reduce) {
  #event-grid .event-photo::before {
    animation: none;
  }
}
