/* Featured projects — 3-column card grid + incremental-grid toggles visibility on items */

.featured-project-modal__scroll {
  -webkit-overflow-scrolling: touch;
}

.featured-project-modal__scroll .prose :where(p, ul, ol):first-child {
  margin-top: 0;
}

.featured-project-modal__scroll .prose :where(p, ul, ol):last-child {
  margin-bottom: 0;
}

/* Mobile: content-sized height, capped with inner scroll when tall */
@media (max-width: 767px) {
  .featured-project-modal__dialog {
    --modal-max-height: 90dvh;
    max-height: var(--modal-max-height);
    gap: 1rem;
    padding: 1rem;
    overflow: hidden;
  }

  .featured-project-modal__content {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  .featured-project-modal__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }
}

/* Desktop / laptop: fixed-height side-by-side layout (unchanged) */
@media (min-width: 768px) {
  .featured-project-modal__dialog {
    --modal-height: min(90vh, 33.5rem);
    max-height: var(--modal-height);
    height: var(--modal-height);
    flex-direction: row;
    align-items: stretch;
    gap: 2rem;
    padding: 1.5rem;
  }

  .featured-project-modal__media {
    display: flex;
    height: 100%;
    min-height: 0;
  }

  .featured-project-modal__gallery {
    position: relative;
    flex: 1;
    min-height: 0;
  }

  .featured-project-modal__content {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
}
