/* ----------------------------------------------------------------
   News, document and gallery layouts
   ----------------------------------------------------------------

   From mockup-1-institutional, and ONLY for the pages that asked for it.

   Two things keep it there. This file is loaded by index_layout.php for five
   actions and no others, and every selector below is scoped to .media-page,
   which only those five partials render. So nothing here can reach the rest of
   the site even if the file is loaded somewhere it should not be.

   CSS grid rather than Bootstrap columns, because the mockup's layouts are
   grids. Bootstrap 4 here, so no gap-* or ms-* utilities: spacing is written
   out longhand. */

.media-page .news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

.media-page .news-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #E7D9C5;
    border-radius: 14px;
    overflow: hidden;
    transition: .2s ease;
}

.media-page .news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 44px rgba(62, 58, 54, .14);
}

.media-page .news-card-img {
    display: block;
    position: relative;
    height: 178px;
    background-color: #F4E7D6;
    background-size: cover;
    background-position: center;
}

/* The day sits on the picture, so the card reads as dated before it is read. */
.media-page .news-card-date {
    position: absolute;
    left: 16px;
    top: 16px;
    padding: 8px 12px;
    background: #fff;
    color: #3E3A36;
    font-family: 'Montserrat', 'Avenir', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.05;
    text-align: center;
    border-radius: 8px;
}

.media-page .news-card-date small {
    display: block;
    font-size: .8rem;
    letter-spacing: 1px;
    color: #EF7A18;
}

.media-page .news-card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 20px;
}

.media-page .news-card-body h4 {
    margin: 0 0 8px;
    font-size: 1.04rem;
    line-height: 1.35;
}

.media-page .news-card-body h4 a {
    color: #3E3A36;
}

.media-page .news-card-body h4 a:hover {
    color: #EF7A18;
    text-decoration: none;
}

.media-page .news-card-body p {
    margin-bottom: 12px;
    font-size: .85rem;
    color: #7d7367;
}

/* Pushed to the bottom so the link lines up across a row of uneven cards. */
.media-page .news-card-more {
    margin-top: auto;
    color: #D96A10;
    font-family: 'Montserrat', 'Avenir', sans-serif;
    font-weight: 700;
    font-size: .82rem;
}

.media-page .news-card-more:hover {
    color: #EF7A18;
    text-decoration: none;
}

/* A heading with its "see all" on the far right. */
.media-page .section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 36px;
}

.media-page .section-head h3 {
    margin: 0;
}

.media-page .section-head .eyebrow {
    margin-bottom: 10px;
    font-family: 'Montserrat', 'Avenir', sans-serif;
    font-weight: 700;
    font-size: .8rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #EF7A18;
}

.media-page .section-head-link {
    color: #D96A10;
    font-family: 'Montserrat', 'Avenir', sans-serif;
    font-weight: 700;
    font-size: .86rem;
    white-space: nowrap;
}

.media-page .section-head-link:hover {
    color: #EF7A18;
    text-decoration: none;
}

/* A list of things to open: documents, events. One row each, not a card
   grid - these have a name, a line of detail and one action, and a 4:3
   picture frame above each of them was only ever filler. */
.media-page .doc-list {
    display: flex;
    flex-direction: column;
}

.media-page .doc-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid #E7D9C5;
    border-radius: 12px;
    color: inherit;
    transition: .18s ease;
}

.media-page a.doc-row:hover {
    border-color: #EF7A18;
    box-shadow: 0 12px 28px rgba(240, 128, 28, .1);
    color: inherit;
    text-decoration: none;
}

.media-page .doc-icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    margin-right: 16px;
    border-radius: 10px;
    background: #F4E7D6;
    color: #D96A10;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-page .doc-text {
    min-width: 0;
}

.media-page .doc-text h4 {
    margin: 0;
    font-size: .98rem;
}

.media-page .doc-meta {
    margin-top: 2px;
    font-size: .8rem;
    color: #7d7367;
}

.media-page .doc-action {
    margin-left: auto;
    padding-left: 16px;
    color: #D96A10;
    font-family: 'Montserrat', 'Avenir', sans-serif;
    font-weight: 700;
    font-size: .82rem;
    white-space: nowrap;
}

.media-page .gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.media-page .gallery-grid figure {
    position: relative;
    margin: 0;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #F4E7D6;
}

.media-page .gallery-grid img,
.media-page .gallery-grid iframe,
.media-page .gallery-grid video {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
    transition: .3s ease;
}

.media-page .gallery-grid figure:hover img {
    transform: scale(1.06);
}

/* Over the picture, on a wash dark enough to read white against whatever
   the photograph happens to be. */
.media-page .gallery-grid figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .7));
    color: #fff;
    font-family: 'Montserrat', 'Avenir', sans-serif;
    font-weight: 600;
    font-size: .82rem;
}

@media (max-width: 991px) {
    .media-page .news-grid,
    .media-page .gallery-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 575px) {
    .media-page .news-grid,
    .media-page .gallery-grid {
        grid-template-columns: 1fr;
    }

    .media-page .section-head {
        display: block;
    }

    .media-page .section-head-link {
        display: inline-block;
        margin-top: 10px;
    }

    /* The action drops under the name rather than squeezing it. */
    .media-page .doc-row {
        flex-wrap: wrap;
    }

    .media-page .doc-action {
        margin-left: 58px;
        padding-left: 0;
        margin-top: 8px;
    }
}
