/* Catalyst section: photograph carousel, thumbnail grids and enlarge modals. */

/* --- Landing page cards --- */

.catalyst-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.75rem 1.5rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid #e6e8eb;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.catalyst-card:hover,
.catalyst-card:focus-visible {
    transform: translateY(-4px);
    border-color: var(--tla-accent);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    color: inherit;
}

.catalyst-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
    border-radius: 0.75rem;
    background: var(--tla-accent);
    color: #1f2330;
    font-size: 1.25rem;
}

.catalyst-card-title {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
    font-weight: 700;
}

.catalyst-card-text {
    margin: 0 0 1.25rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #6c757d;
}

/* Pinned to the bottom so the CTA lines up across cards of differing height. */
.catalyst-card-cta {
    margin-top: auto;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--tla-accent-dark);
}

.catalyst-card-cta i {
    transition: transform 0.2s ease;
}

.catalyst-card:hover .catalyst-card-cta i {
    transform: translateX(4px);
}

/* --- Carousel --- */

.catalyst-carousel {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    background: #000;
}

.catalyst-carousel .carousel-item img {
    height: clamp(240px, 45vw, 520px);
    object-fit: cover;
}

.catalyst-carousel .carousel-caption {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2.5rem 1.5rem 1.25rem;
    text-align: left;
}

.catalyst-carousel .carousel-caption h5 {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.catalyst-carousel .carousel-caption p {
    margin-bottom: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* --- Thumbnail grids --- */

.catalyst-thumb {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    padding: 0;
    border: 0;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #f1f3f5;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.catalyst-thumb:hover,
.catalyst-thumb:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.catalyst-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.catalyst-thumb-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.35rem;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.catalyst-thumb:hover .catalyst-thumb-overlay,
.catalyst-thumb:focus-visible .catalyst-thumb-overlay {
    opacity: 1;
}

/* An uploaded video's own first frame, standing in for a thumbnail. Clicks
   must fall through to the button so the tile still opens the modal. */
.catalyst-video-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    background: #000;
}

/* Only reached when a video has neither a still nor a playable source. */
.catalyst-video-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 2rem;
    color: #adb5bd;
}

.catalyst-video-thumb {
    aspect-ratio: 16 / 9;
}

.catalyst-thumb-title {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.82rem;
    line-height: 1.3;
    color: #495057;
}

/* --- Featured video --- */

.catalyst-featured-video {
    margin-bottom: 0;
}

.catalyst-video-description {
    margin-top: 0.75rem;
    margin-bottom: 0;
    font-size: 0.92rem;
    color: #6c757d;
}

/* --- Modals --- */

#catalystPhotoModal .modal-body img {
    max-height: 78vh;
    border-radius: 0.5rem;
}

@media (prefers-reduced-motion: reduce) {
    .catalyst-thumb,
    .catalyst-thumb-overlay,
    .catalyst-card,
    .catalyst-card-cta i {
        transition: none;
    }

    .catalyst-thumb:hover,
    .catalyst-thumb:focus-visible,
    .catalyst-card:hover,
    .catalyst-card:focus-visible {
        transform: none;
    }
}
