/* Pride Latest Posts Grid */

.pride-latest-grid {
    display: grid;
    gap: 18px;
    margin: 28px 0;
}
.pride-latest-grid--cols-1 { grid-template-columns: 1fr; }
.pride-latest-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.pride-latest-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 760px) {
    .pride-latest-grid--cols-2,
    .pride-latest-grid--cols-3 { grid-template-columns: 1fr; }
}

.pride-latest-card {
    position: relative;
    display: block;
    background-size: cover;
    background-position: center;
    background-color: #2b0d38;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none !important;
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.10);
    transition: transform 0.30s ease, box-shadow 0.30s ease;

    /* Graceful entrance — fades up with a small stagger between cards (below) */
    opacity: 0;
    transform: translateY(14px);
    animation: pride-latest-fade-in 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
.pride-latest-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

@keyframes pride-latest-fade-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger each card by ~90ms so the grid resolves in a single satisfying wave
   instead of all cards popping in at once. Covers up to 8 cards (max in UI). */
.pride-latest-card:nth-child(1) { animation-delay: 0.05s; }
.pride-latest-card:nth-child(2) { animation-delay: 0.14s; }
.pride-latest-card:nth-child(3) { animation-delay: 0.23s; }
.pride-latest-card:nth-child(4) { animation-delay: 0.32s; }
.pride-latest-card:nth-child(5) { animation-delay: 0.41s; }
.pride-latest-card:nth-child(6) { animation-delay: 0.50s; }
.pride-latest-card:nth-child(7) { animation-delay: 0.59s; }
.pride-latest-card:nth-child(8) { animation-delay: 0.68s; }

/* Respect accessibility preferences — no motion for users who prefer it off */
@media (prefers-reduced-motion: reduce) {
    .pride-latest-card {
        opacity: 1;
        transform: none;
        animation: none;
    }
    .pride-latest-card:hover {
        transform: none;
    }
}

/* aspect-ratio shim — consistent card heights regardless of image dims */
.pride-latest-card::before {
    content: "";
    display: block;
}
.pride-latest-grid--aspect-16-10 .pride-latest-card::before { padding-top: 62.5%; }
.pride-latest-grid--aspect-4-3   .pride-latest-card::before { padding-top: 75%; }
.pride-latest-grid--aspect-16-9  .pride-latest-card::before { padding-top: 56.25%; }
.pride-latest-grid--aspect-1-1   .pride-latest-card::before { padding-top: 100%; }

.pride-latest-card--no-image {
    background-image: linear-gradient(135deg, #732982 0%, #e40303 100%);
}

.pride-latest-card__overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px 22px 22px;
    background: linear-gradient(
        to top,
        rgba(43, 13, 56, 0.96) 0%,
        rgba(43, 13, 56, 0.82) 45%,
        rgba(43, 13, 56, 0.40) 80%,
        rgba(43, 13, 56, 0) 100%
    );
    color: #fff;
}

.pride-latest-card__date {
    font-size: 11px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    opacity: 0.82;
    margin-bottom: 6px;
    font-weight: 600;
    color: #fff;
}

.pride-latest-card__title {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.28;
    color: #fff !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);

    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Rainbow accent underline on hover */
.pride-latest-card__title::after {
    content: "";
    display: block;
    margin-top: 8px;
    height: 3px;
    width: 0;
    border-radius: 2px;
    background: linear-gradient(90deg,
        #e40303 0%, #ff8c00 16.6%, #ffed00 33.3%, #008026 50%,
        #24408e 66.6%, #732982 83.3%, #e40303 100%);
    transition: width 0.30s ease;
}
.pride-latest-card:hover .pride-latest-card__title::after {
    width: 60px;
}

.pride-latest-empty {
    padding: 24px;
    color: #666;
    font-style: italic;
}
