/*
    Styles for the news page (news.php): the card layout of the article list, the side bar and the full article.
    Colours are those of the rest of the site (stylesheets/style.css): olive green #849539 for headings, buttons and labels,
    #bb0000 for links (#d06000 when pointed at), and the pale green #ddeedd panel (#report_content) behind the cards.
    Every class here starts with nw- so that it does not clash with the older styles of the site.
*/

#report_content.nw-wrap{
    box-sizing: border-box;
    padding: 14px;
    border-radius: 8px;
}
#report_content.nw-wrap *{
    box-sizing: border-box;
}

/* ---- filter chips and search ---- */
.nw-filters{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px 0;
}
.nw-chip{
    display: inline-block;
    padding: 6px 15px;
    border: 1px solid #b9c78a;
    border-radius: 20px;
    background: #ffffff;
    color: #555555;
    font-size: 15px;
    line-height: 1.2;
    text-decoration: none;
}
.nw-chip:hover{
    color: #6b7a2e;
    background: #eef3e2;
    border-color: #849539;
    text-decoration: none;
}
.nw-chip.nw-on{
    background: #849539;
    border-color: #849539;
    color: #ffffff;
}
.nw-search{
    margin-left: auto;
    display: flex;
    gap: 6px;
}
.nw-search input[type=search]{
    border: 1px solid #b9c78a;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 15px;
    min-width: 170px;
    background: #ffffff;
    color: #444444;
}
.nw-search button{
    border: 0;
    border-radius: 20px;
    background: #849539;
    color: #ffffff;
    padding: 6px 16px;
    font-size: 15px;
    cursor: pointer;
}
.nw-search button:hover{
    background: #96a94d;
}

/* ---- the page: cards on the left, side bar on the right ---- */
.nw-layout{
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 22px;
    align-items: start;
}
.nw-main{
    min-width: 0;
}
.nw-cards{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

/* ---- cards ---- */
.nw-card{
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #d3e0c0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    transition: box-shadow .15s, transform .15s;
    color: #555555;
    text-align: left;
}
.nw-card:hover{
    box-shadow: 0 6px 16px rgba(0,0,0,.18);
    transform: translateY(-2px);
}
.nw-thumb{
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: #eef3e2;
    overflow: hidden;
}
.nw-thumb img{
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;      /* the whole picture, scaled to fit; the rest of the box is the pale green behind it */
}
.nw-thumb.nw-noimage{
    background: linear-gradient(135deg, #849539, #b9c78a);
}
.nw-tag{
    position: absolute;
    left: 10px;
    top: 10px;
    padding: 3px 9px;
    border-radius: 4px;
    background: rgba(107,122,46,.94);
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.nw-play{
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(0,0,0,0) 50%, rgba(0,0,0,.35));
}
.nw-play span{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(0,0,0,.62);
    border: 2px solid #ffffff;
}
.nw-play span::after{
    content: "";
    margin-left: 5px;
    border-style: solid;
    border-width: 10px 0 10px 17px;
    border-color: transparent transparent transparent #ffffff;
}
.nw-card:hover .nw-play span{
    background: rgba(132,149,57,.92);
}
.nw-body{
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 12px 15px 15px 15px;
}
.nw-meta{
    margin: 0 0 3px 0;
    color: #888888;
    font-size: 13px;
}
#report_content .nw-card h2{
    margin: 0 0 7px 0;
    padding: 0;
    font-family: "Century Gothic", tahoma, arial, verdana;
    font-weight: bold;
    font-size: 19px;
    line-height: 1.2;
}
#report_content .nw-card h2 a{
    color: #849539;
    font-size: 1em;
}
#report_content .nw-card h2 a:hover{
    color: #a3b657;
    text-decoration: none;
}
.nw-card p{
    margin: 0 0 12px 0;
    color: #555555;
    font-size: 15px;
    line-height: 1.45;
}
a.nw-more{
    align-self: flex-start;
    margin-top: auto;
    padding: 7px 18px;
    border-radius: 3px;
    background: #849539;
    color: #ffffff;
    font-size: 14px;
    text-decoration: none;
}
a.nw-more:hover{
    background: #96a94d;
    color: #ffffff;
    text-decoration: none;
}

/* the newest article is wide: its picture on the left, the words on the right */
.nw-card.nw-featured{
    grid-column: 1 / -1;
    flex-direction: row;
}
.nw-card.nw-featured .nw-thumb{
    flex: 0 0 50%;
    aspect-ratio: auto;
    min-height: 240px;
}
#report_content .nw-card.nw-featured h2{
    font-size: 25px;
}
.nw-card.nw-featured p{
    font-size: 16px;
}

/* ---- page numbers under the cards ---- */
.nw-pager{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 24px 0 4px 0;
}
.nw-pager .nw-page{
    min-width: 38px;
    padding: 8px 12px;
    border: 1px solid #b9c78a;
    border-radius: 3px;
    background: #ffffff;
    color: #6b7a2e;
    font-size: 15px;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
}
.nw-pager a.nw-page:hover{
    background: #eef3e2;
    border-color: #849539;
    color: #6b7a2e;
    text-decoration: none;
}
.nw-pager .nw-page.nw-current{
    background: #849539;
    border-color: #849539;
    color: #ffffff;
    font-weight: bold;
}
.nw-pager .nw-page.nw-off{
    background: transparent;
    border-color: #cbd8b0;
    color: #a3ad8a;
}
.nw-pager .nw-gap{
    color: #849539;
    padding: 0 2px;
}
.nw-empty{
    padding: 26px;
    background: #ffffff;
    border-radius: 8px;
    color: #555555;
    font-size: 16px;
}

/* ---- side bar ---- */
.nw-side .nw-box{
    margin: 0 0 18px 0;
    padding: 12px 15px;
    background: #ffffff;
    border: 1px solid #d3e0c0;
    border-radius: 8px;
    color: #555555;
    font-size: 14px;
    text-align: left;
}
#report_content .nw-side h3{
    margin: 0 0 10px 0;
    padding: 0;
    font-size: 19px;
    color: #849539;
}
.nw-side .nw-box.nw-cta{
    background: #849539;
    border-color: #849539;
    color: #ffffff;
    text-align: center;
}
#report_content .nw-side .nw-cta h3{
    color: #ffffff;
}
.nw-side .nw-cta a.nw-btn{
    display: inline-block;
    margin-top: 8px;
    padding: 7px 20px;
    border-radius: 3px;
    background: #ffffff;
    color: #6b7a2e;
    font-weight: bold;
    text-decoration: none;
}
.nw-side .nw-cta a.nw-btn:hover{
    background: #eef3e2;
    color: #6b7a2e;
}
.nw-recent{
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 0 0 12px 0;
}
.nw-recent img,
.nw-recent .nw-recent-none{
    flex: none;
    width: 72px;
    height: 48px;
    object-fit: contain;
    border-radius: 4px;
    background: #eef3e2;
}
.nw-recent a{
    display: block;
    color: #849539;
    font-weight: bold;
    font-size: 14px;
    line-height: 1.2;
}
.nw-recent a:hover{
    color: #a3b657;
}
.nw-recent small{
    color: #888888;
}
.nw-ads{
    text-align: center;
}
.nw-ads > div{
    margin-bottom: 14px;
}

/* ---- a whole article ---- */
.nw-article{
    padding: 18px 22px;
    background: #ffffff;
    border: 1px solid #d3e0c0;
    border-radius: 8px;
    color: #444444;
    font-size: 16px;
    line-height: 1.6;
    text-align: left;
    overflow-wrap: break-word;
}
#report_content .nw-article h1{
    margin: 0 0 4px 0;
    padding: 0;
    font-family: "Century Gothic", tahoma, arial, verdana;
    font-weight: normal;
    font-size: 28px;
    line-height: 1.2;
    color: #849539;
}
.nw-article .nw-meta{
    margin-bottom: 14px;
}
.nw-article img{
    max-width: 100%;
    height: auto;
}
.nw-article iframe,
.nw-article video{
    display: block;
    max-width: 100%;
}
/* a YouTube video fills the width of the article, 16:9, instead of a fixed size that spills over on a phone */
.nw-article iframe[src*="youtube"],
.nw-article iframe[src*="youtu.be"]{
    width: 100%;
    max-width: 720px;
    height: auto;
    aspect-ratio: 16 / 9;
    margin: 14px 0;
    border: 0;
}
.nw-article .nw-pictures{
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}
.nw-article .nw-pictures img{
    border-radius: 4px;
}
.nw-back{
    display: inline-block;
    margin: 0 0 12px 0;
    font-size: 15px;
}

/* ---- tablets and phones ---- */
@media (max-width: 900px){
    .nw-layout{
        grid-template-columns: minmax(0, 1fr);
    }
    .nw-card.nw-featured{
        flex-direction: column;
    }
    .nw-card.nw-featured .nw-thumb{
        flex: none;
        aspect-ratio: 16 / 9;
        min-height: 0;
    }
}
@media (max-width: 600px){
    .nw-cards{
        grid-template-columns: minmax(0, 1fr);
    }
    .nw-search{
        flex: 1 1 100%;
        margin-left: 0;
    }
    .nw-pager .nw-page{
        min-width: 36px;
        padding: 9px 10px;
    }
    .nw-search input[type=search]{
        flex: 1;
        min-width: 0;
    }
    #report_content .nw-card.nw-featured h2{
        font-size: 22px;
    }
    .nw-article{
        padding: 14px;
    }
}
