/* Shorts feature — landing section + gallery page card grid */

.shorts-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 22px;
}

.shorts-grid.shorts-grid-gallery {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

@media (max-width: 1024px) {
    .shorts-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
    .shorts-grid { grid-template-columns: repeat(2, 1fr); }
}

.shorts-card {
    position: relative;
    display: block;
    min-width: 0;
    border-radius: 14px;
    overflow: hidden;
    background: #111;
    aspect-ratio: 9 / 16;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.shorts-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

/* Scoped under .shorts-card so it outweighs style.css's global
   `img:not([draggable]) { height: auto }` reset (specificity 0,1,1) —
   without this the <img> thumb collapses to its natural 4:3 height and
   fills only the top of the 9:16 card. */
.shorts-card .shorts-card-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #1a1a1a;
}

.shorts-card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 54px;
    height: 54px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.shorts-card-play svg { width: 20px; height: 20px; fill: #111; margin-left: 2px; }

/* Live Facebook embed used as a card's poster when no thumbnail is set —
   never interactive itself, clicks fall through to the card's own link. */
.shorts-card-fb-embed { pointer-events: none; border: 0; }

.shorts-card-thumb-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    text-align: center;
}

.shorts-card-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 30px 12px 12px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.75) 100%);
    color: #fff;
}

.shorts-card-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.shorts-card-author { font-size: 11px; opacity: 0.8; margin: 0; }

.shorts-platform-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
}

.shorts-empty { text-align: center; color: #888; padding: 40px 0; grid-column: 1 / -1; }

/* Applied to the one card a visitor was pointed at from a shared /s/:id
   link, so they can spot it in the grid instead of hunting for it. */
.shorts-card-highlight {
    animation: shortsCardHighlightPulse 1.6s ease-in-out 3;
}

@keyframes shortsCardHighlightPulse {
    0%, 100% { box-shadow: 0 0 0 3px #fff, 0 0 0 7px rgba(255, 140, 0, 0.9), 0 18px 40px rgba(0, 0, 0, 0.22); }
    50% { box-shadow: 0 0 0 3px #fff, 0 0 0 12px rgba(255, 140, 0, 0.3), 0 18px 40px rgba(0, 0, 0, 0.22); }
}

.shorts-explore-more { text-align: center; margin-top: 40px; }
