/* ==========================================================
   VIDEOS COLLECTION PAGES (landing, photo albums, videos)
   Loaded only by Views/VideosCollection/*.cshtml via ~/bundles/videos-css.
   Site-wide components stay in style.css / mobile_style.css.
   ========================================================== */

/* ---- Landing: PHOTO / MEDIA tiles ---- */
.videos-hub {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px;
}

.videos-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    color: inherit;
    text-decoration: none;
}

/* Black label drawn after the original title.png (449 x 79, ImageSources/videos/): the right end slants off from
   halfway down and a small tab hangs below on the left. Percentages, so it stretches with the label as the
   original background did; the extra bottom padding keeps the text centred on the bar above the tab. */
.videos-tile__title {
    width: 60%;
    padding: 8px 16px 16px;
    color: #fff;
    font-family: "Sui Generis", Arial, sans-serif;
    font-size: 36px;
    letter-spacing: 1px;
    text-align: center;
    background-color: #000;
    clip-path: polygon(0 0, 100% 0, 100% 48%, 93.3% 88.6%, 14.5% 88.6%, 12.5% 100%, 0 100%);
}

.videos-tile__media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border: 8px solid #dcbc6e;
}

.videos-tile__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.videos-tile__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 32px;
    background-color: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.5s;
}

.videos-tile:hover .videos-tile__img,
.videos-tile:focus-visible .videos-tile__img {
    transform: scale(1.15);
}

.videos-tile:hover .videos-tile__overlay,
.videos-tile:focus-visible .videos-tile__overlay {
    opacity: 1;
}

.videos-tile:focus-visible {
    outline: none;
}

.videos-tile:focus-visible .videos-tile__media {
    outline: 3px solid #ffed00;
    outline-offset: 3px;
}

/* ---- Photo / media lists ---- */
.videos-back {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 5px 15px;
    border: 1px solid #111;
    color: #111;
    text-decoration: none;
}

.videos-back:hover {
    color: #111;
    background-color: #d8d8d8;
}

.videos-heading {
    margin-top: 24px;
    margin-bottom: 32px;
    text-align: center;
}

/* Album: the first photo large, the next four in a 2 x 2 block beside it (all cropped to 3:2 boxes). */
.videos-album + .videos-album {
    margin-top: 56px;
}

.videos-album__title {
    margin: 0 0 16px;
    font-family: "Sui Generis", Arial, sans-serif;
    font-size: 26px;
    font-weight: 400;
}

.videos-album__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.videos-album__photo {
    position: relative;
    display: block;
    aspect-ratio: 3 / 2;
    overflow: hidden;
}

.videos-album__photo--main {
    grid-row: span 2;
    grid-column: span 2;
    aspect-ratio: auto;
}

.videos-album__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.videos-album__photo:hover .videos-album__img {
    transform: scale(1.05);
}

.videos-album__photo:focus-visible {
    outline: 3px solid #ffed00;
    outline-offset: 2px;
}

.videos-album__more {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: "Sui Generis", Arial, sans-serif;
    font-size: 32px;
    background-color: rgba(0, 0, 0, 0.5);
}

/* Videos: cover with a play button, title above. */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px 32px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.videos-card {
    display: flex;
    flex-direction: column;
}

.videos-card__title {
    flex: 1;
    margin: 0 0 12px;
    font-family: "Sui Generis", Arial, sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.3;
}

.videos-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #111;
}

.videos-card__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.videos-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    color: #111;
    font-size: 36px;
    background-color: rgba(255, 237, 0, 0.9);
    transform: translate(-50%, -50%);
    transition: transform 0.2s;
}

.videos-card__media:hover .videos-card__img {
    transform: scale(1.05);
}

.videos-card__media:hover .videos-card__play {
    transform: translate(-50%, -50%) scale(1.1);
}

.videos-card__media:focus-visible {
    outline: 3px solid #ffed00;
    outline-offset: 3px;
}

/* ==========================================================
   Videos Collection: responsive
   ========================================================== */
@media (max-width: 991.98px) {
    .videos-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .videos-hub {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .videos-tile {
        gap: 16px;
    }

    .videos-tile__title {
        font-size: 24px;
    }

    .videos-tile__media {
        border-width: 6px;
    }

    .videos-album__title {
        font-size: 20px;
    }

    /* Large photo across the top, the four small ones 2 x 2 below. */
    .videos-album__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .videos-album__photo--main {
        grid-row: auto;
        aspect-ratio: 3 / 2;
    }

    .videos-album__more {
        font-size: 24px;
    }
}

@media (max-width: 575.98px) {
    .videos-grid {
        grid-template-columns: 1fr;
    }

    .videos-card__title {
        font-size: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .videos-tile__img,
    .videos-tile__overlay,
    .videos-album__img,
    .videos-card__img,
    .videos-card__play {
        transition: none;
    }
}
