/* Rows of a section page (Views/Shared/_SectionRows.cshtml) and every other horizontal strip that uses .sec-row-body:
   a whole number of cards fills the page column and the rest is reached with the arrows, which look and sit like
   the home page's Web Stories arrows (round, dark, over the column's edges; outside the column where there is room;
   hidden on phones, where the strip is swiped). */

.sec-rows { max-width: 1536px; margin: 0 auto 1rem; }
.sec-row { margin: 0 0 1.5rem; }
.sec-row-head {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    margin: 1.5rem 0 1rem;
}
.sec-row-head .section-home-sub-tableau { margin: 0; }
.sec-row-all {
    font-family: 'Maven Pro', sans-serif; font-size: .95rem; font-weight: 500;
    color: #000a44; text-decoration: none; white-space: nowrap;
}
.sec-row-all:hover { text-decoration: underline; }

.sec-row-body {
    --per-view: 1.35;
    position: relative;
    container-type: inline-size;
}
.sec-row-track {
    display: flex; gap: 1rem;
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-behavior: smooth;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    padding-bottom: .25rem;
}
.sec-row-track::-webkit-scrollbar { display: none; }
.sec-row-card {
    flex: 0 0 calc((100% - (var(--per-view) - 1) * 1rem) / var(--per-view));
    min-width: 0; scroll-snap-align: start;
    display: flex; flex-direction: column;
}
.sec-row-img { position: relative; display: block; border-radius: .5rem; overflow: hidden; background: #e9ebf2; }
.sec-row-img img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .35s ease; }
.sec-row-card:hover .sec-row-img img { transform: scale(1.04); }
.sec-row-play {
    position: absolute; left: .5rem; bottom: .5rem;
    color: #fff; font-size: 2.25rem; text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
}
.sec-row-title {
    font-family: 'Barlow', sans-serif; font-size: 1.1rem; font-weight: 500; line-height: 1.3;
    margin: .6rem 0 .35rem; color: #000a44;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.sec-row-title a { color: inherit; text-decoration: none; }
.sec-row-title a:hover { text-decoration: underline; }
.sec-row-card .timeago { margin-top: auto; }

/* Arrows: the home page's (reels.css), centred on the pictures of the cards. */
.sec-row-body > .arrow { display: none; }
@media (min-width: 768px) {
    .sec-row-body { --per-view: 3; }
    .sec-row-body > .arrow {
        position: absolute; z-index: 2;
        top: calc((100cqw - (var(--per-view) - 1) * 1rem) / var(--per-view) * 9 / 32);
        transform: translateY(-50%);
        width: 3rem; height: 3rem; padding: 0;
        display: flex; align-items: center; justify-content: center;
        border: none; border-radius: 50%;
        background-color: rgba(0, 0, 0, .5); color: #fffceb;
        line-height: 1; cursor: pointer;
        box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
        transition: background-color .2s, opacity .2s;
    }
    .sec-row-body > .left-arrow { left: .5rem; right: auto; }
    .sec-row-body > .right-arrow { right: .5rem; left: auto; }
    .sec-row-body > .arrow:hover { background-color: rgba(0, 0, 0, .75); }
    .sec-row-body > .arrow .material-icons { display: block; font-size: 2rem; line-height: 1; pointer-events: none; }
    /* At an end of the strip (or when everything fits) the arrow of that side goes away. */
    .sec-row-body > .arrow[disabled] { opacity: 0; pointer-events: none; }
}
@media (min-width: 1024px) { .sec-row-body { --per-view: 4; } }
@media (min-width: 1680px) {
    .sec-row-body > .left-arrow { left: -4rem; }
    .sec-row-body > .right-arrow { right: -4rem; }
    .sec-row-body > .arrow { box-shadow: none; }
}
@media (max-width: 767.98px) {
    .sec-rows { padding: 0 10px; }
}
