/* Vertical videos reuse the portfolio cards; all additions stay scoped here. */
#shorts {
  scroll-margin-top: 100px;
}

.shorts-grid .shorts-link,
.shorts-grid .shorts-cover {
  display: block;
  width: 100%;
}

.shorts-grid .shorts-cover {
  /* Match the existing 1204 x 816 portfolio covers. */
  aspect-ratio: 301 / 204;
  height: auto;
  object-fit: cover;
  object-position: center 72%;
}

.shorts-grid img[src$="grapefruit-spritz.webp"] {
  object-position: center 50%;
}

.shorts-grid img[src$="citrus-twist.webp"] {
  object-position: center 82%;
}

.shorts-grid .gallery-hover-actions {
  width: 100%;
  padding: 24px;
}

.shorts-grid .project-title,
.shorts-grid .shorts-description {
  display: block;
}

.shorts-grid .project-details,
.shorts-grid .priyo-icon-arrow {
  display: block;
}

.shorts-grid .project-details {
  margin-bottom: 8px;
}

.shorts-grid .picons-plus {
  top: 24px;
  right: 24px;
  width: 32px;
  height: 32px;
}

.shorts-grid .picons-plus::before,
.shorts-grid .picons-plus:hover::before {
  width: 32px;
}

.shorts-grid .picons-plus::after,
.shorts-grid .picons-plus:hover::after {
  height: 32px;
}

.shorts-grid .shorts-description {
  margin: 12px 0 0;
  font-size: 16px;
  line-height: 1.5;
}

.shorts-grid .shorts-link:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: -3px;
  border-radius: 8px;
}

.shorts-grid .gallery-box:focus-within .gallery-hover-actions-wrapper {
  top: 15px;
  height: calc(100% - 30px);
  transform: translateY(0);
  animation: none;
  transition: none;
}

.shorts-grid .gallery-box:focus-within .gallery-hover-actions,
.shorts-grid .gallery-box:focus-within .gallery-hover-actions li,
.shorts-grid .gallery-box:focus-within .picons-plus {
  opacity: 1;
  transform: none;
  transition: none;
}

.shorts-lightbox .fancybox__content {
  padding: 0;
  background: #000;
}

@media (min-width: 576px) and (max-width: 1199px) {
  .shorts-grid .gallery-hover-actions {
    padding: 16px;
  }

  .shorts-grid .priyo-icon-arrow {
    height: 30px;
  }

  .shorts-grid .project-title {
    font-size: 20px;
  }

  .shorts-grid .shorts-description {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.4;
  }
}

/* Touch screens show the existing caption panel without requiring hover. */
@media (hover: none), (max-width: 575px) {
  .shorts-grid .gallery-box .gallery-hover-actions-wrapper,
  .shorts-grid .gallery-box:hover .gallery-hover-actions-wrapper,
  .shorts-grid .gallery-box:focus-within .gallery-hover-actions-wrapper {
    top: auto;
    bottom: 15px;
    height: auto;
    transform: none;
    animation: none;
  }

  .shorts-grid .gallery-hover-actions {
    position: relative;
    opacity: 1;
    transform: none;
    padding: 20px;
  }

  .shorts-grid .gallery-box .gallery-hover-actions li {
    opacity: 1;
    transform: none;
  }

  .shorts-grid .gallery-hover-actions li:first-child,
  .shorts-grid .picons-plus {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shorts-grid .gallery-box *,
  .shorts-grid .gallery-box *::before,
  .shorts-grid .gallery-box *::after {
    animation: none !important;
    transition: none !important;
  }
}
