﻿
/* =========================================================
   SAINT ANNE'S RUN
   HISTORICAL ARCHIVE HOMEPAGE

   OPTION B — EQUAL-SIZED CROPPED IMAGES

   Two historical cards:
   1. The People Behind the Legacy
   2. The Horses That Shaped the Farm
   ========================================================= */


/* =========================================================
   1. SECTION
   ========================================================= */

#legacy {
    background: var(--paper);
}

    #legacy .legacy-intro,
    #legacy .historical-gallery {
        min-width: 0;
    }


    /* =========================================================
   2. TWO-COLUMN GALLERY
   ========================================================= */

    #legacy .historical-gallery {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
        align-content: start;
        gap: 16px;
        padding: 35px 22px 25px 0;
        min-width: 0;
    }

        #legacy .historical-gallery > figure {
            display: flex;
            flex-direction: column;
            min-width: 0;
            margin: 0;
            align-self: start;
        }


    /* =========================================================
   3. ARCHIVE LINKS
   ========================================================= */

    #legacy .legacy-photo-link {
        display: flex;
        flex-direction: column;
        width: 100%;
        color: var(--ink);
        text-decoration: none;
    }

        #legacy .legacy-photo-link:focus-visible {
            outline: 3px solid var(--salmon);
            outline-offset: 4px;
        }


        /* =========================================================
   4. IMAGE CONTAINERS

   Equal dimensions and compact presentation.
   ========================================================= */

        #legacy .historic-photo,
        #legacy .historic-photo.homepage-image-slot,
        #legacy .legacy-photo-link .historic-photo,
        #legacy .legacy-photo-link .historic-photo.homepage-image-slot {
            display: block;
            position: relative;
            width: 100%;
            height: 260px !important;
            min-height: 0 !important;
            max-height: 260px !important;
            flex: 0 0 260px !important;
            aspect-ratio: auto !important;
            overflow: hidden;
            background: #d6cfc4;
        }


            /* =========================================================
   5. PHOTOGRAPH DISPLAY

   All photographs fill their containers.
   Cropping is intentional.
   ========================================================= */

            #legacy .historic-photo > .assigned-homepage-photo,
            #legacy .legacy-photo-link .historic-photo > .assigned-homepage-photo {
                display: block;
                position: absolute !important;
                inset: 0 !important;
                width: 100% !important;
                height: 100% !important;
                max-width: none;
                object-fit: cover !important;
                object-position: center;
                z-index: 1;
            }


    /* =========================================================
   6. HENRY FITZGIBBON

   Editorial portrait crop emphasizing his face.
   ========================================================= */

    #legacy .legacy-category-photo:first-child
    .historic-photo .assigned-homepage-photo {
        object-fit: cover !important;
        object-position: center 22% !important;
    }


    /* =========================================================
   7. HORSES THAT SHAPED THE FARM

   Edge-to-edge image with central composition.
   ========================================================= */

    #legacy .legacy-category-photo:nth-child(2)
    .historic-photo .assigned-homepage-photo {
        object-fit: cover !important;
        object-position: center 45% !important;
    }


    /* =========================================================
   8. CAPTIONS
   ========================================================= */

    #legacy .historical-gallery figcaption,
    #legacy .historical-gallery
    .legacy-category-photo figcaption {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin: 0;
        padding: 14px 5px 18px;
        min-height: 95px;
        background: transparent;
    }


        /* =========================================================
   9. CATEGORY TITLES
   ========================================================= */

        #legacy .historical-gallery figcaption strong,
        #legacy .legacy-category-photo figcaption strong {
            display: inline-block;
            color: var(--salmon-dark);
            font-family: Arial, Helvetica, sans-serif;
            font-size: 11px;
            font-weight: 700;
            line-height: 1.5;
            letter-spacing: 1px;
            text-transform: uppercase;
            border-bottom: 1px solid transparent;
            transition: border-color .2s ease;
        }

    #legacy .legacy-photo-link:hover figcaption strong {
        border-bottom-color: var(--salmon-dark);
    }


    /* =========================================================
   10. CATEGORY DESCRIPTIONS
   ========================================================= */

    #legacy .historical-gallery
    figcaption > span:not(.legacy-photo-action) {
        color: var(--ink);
        font-family: Georgia, "Times New Roman", serif;
        font-size: 13px;
        font-weight: 400;
        line-height: 1.55;
        max-width: 38ch;
    }


    /* =========================================================
   11. HIDE REDUNDANT ACTION LABELS
   ========================================================= */

    #legacy .legacy-category-photo .legacy-photo-action {
        display: none;
    }


    /* =========================================================
   12. HOVER EFFECT
   ========================================================= */

    #legacy .legacy-photo-link .assigned-homepage-photo {
        transition: transform .3s ease;
    }

    #legacy .legacy-photo-link:hover .assigned-homepage-photo {
        transform: scale(1.025);
    }


/* =========================================================
   13. TABLET
   ========================================================= */

@media (max-width: 1050px) {

    #legacy .historical-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        padding: 15px 5% 30px;
    }

        #legacy .historical-gallery .historic-photo,
        #legacy .historical-gallery
        .historic-photo.homepage-image-slot {
            height: 240px !important;
            max-height: 240px !important;
            flex-basis: 240px !important;
        }
}


/* =========================================================
   14. MOBILE
   ========================================================= */

@media (max-width: 700px) {

    #legacy .historical-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
        padding: 10px 5% 30px;
    }

        #legacy .historical-gallery .historic-photo,
        #legacy .historical-gallery
        .historic-photo.homepage-image-slot {
            height: 190px !important;
            max-height: 190px !important;
            flex-basis: 190px !important;
        }

        #legacy .historical-gallery figcaption {
            min-height: 0;
            padding: 12px 5px 18px;
        }

            #legacy .historical-gallery figcaption strong {
                font-size: 10px;
            }

            #legacy .historical-gallery
            figcaption > span:not(.legacy-photo-action) {
                font-size: 12px;
                line-height: 1.5;
            }
}


/* =========================================================
   15. SMALL MOBILE
   ========================================================= */

@media (max-width: 440px) {

    #legacy .historical-gallery {
        grid-template-columns: 1fr;
        gap: 20px;
    }

        #legacy .historical-gallery .historic-photo,
        #legacy .historical-gallery
        .historic-photo.homepage-image-slot {
            height: 245px !important;
            max-height: 245px !important;
            flex-basis: 245px !important;
        }

        #legacy .historical-gallery figcaption {
            min-height: 0;
            padding: 12px 5px 18px;
        }
}


/* =========================================================
   16. ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    #legacy .legacy-photo-link .assigned-homepage-photo,
    #legacy .historical-gallery figcaption strong {
        transition: none;
    }

    #legacy .legacy-photo-link:hover .assigned-homepage-photo {
        transform: none;
    }
}
