/*
  KCNSC styles on top of Igloo 17.
  Brand colours live here as variables; most colours/typography should come from the Igloo Design node instead.
*/
:root {
    --kcnsc-navy: #01203c;
    --kcnsc-navy-light: #1c254b;
    --kcnsc-blue: #4379cf;
    --kcnsc-muted: #5b819d;
    --kcnsc-border: rgba(0, 0, 0, .1);
    --kcnsc-footer-text: #dcdcdc;
}

/* Visually hidden text for screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip link: hidden until focused with the keyboard */
.skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 1000;
    padding: .75rem 1.25rem;
    background: var(--kcnsc-navy);
    color: #fff;
    text-decoration: none;
}

.skip-link:focus {
    top: 1rem;
}

/* ---------- Feed (news listing) ---------- */
.kcnsc-feed {
    padding: 3rem 0;
}

.kcnsc-feed__title {
    margin-bottom: 2rem;
}

.kcnsc-feed__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.kcnsc-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--kcnsc-border);
    background: #fff;
    transition: box-shadow .2s ease;
}

.kcnsc-card:hover,
.kcnsc-card:focus-within {
    box-shadow: 0 6px 20px rgba(0, 0, 0, .1);
}

.kcnsc-card__image img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.kcnsc-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.25rem;
}

.kcnsc-card__title {
    font-size: 1.2rem;
    margin: .25rem 0 .75rem;
}

.kcnsc-card__title a {
    color: inherit;
    text-decoration: none;
}

/* Make the whole card clickable via the title link */
.kcnsc-card {
    position: relative;
}

.kcnsc-card__title a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.kcnsc-card__summary {
    margin: 0;
    flex: 1;
}

.kcnsc-meta {
    color: var(--kcnsc-muted);
    font-size: .875rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.kcnsc-pagination {
    display: flex;
    justify-content: center;
    gap: .5rem;
    margin-top: 2.5rem;
    list-style: none;
    padding: 0;
}

.kcnsc-pagination a,
.kcnsc-pagination span {
    display: inline-block;
    min-width: 2.5rem;
    padding: .5rem .75rem;
    border: 1px solid var(--kcnsc-border);
    text-align: center;
    text-decoration: none;
}

.kcnsc-pagination [aria-current="page"] {
    background: var(--kcnsc-navy);
    border-color: var(--kcnsc-navy);
    color: #fff;
}

/* ---------- Post ---------- */
.kcnsc-post {
    padding: 3rem 0;
}

.kcnsc-post__header {
    margin-bottom: 2rem;
}

.kcnsc-post__header h1 {
    margin: .25rem 0 .75rem;
}

.kcnsc-post__intro {
    font-size: 1.15rem;
}

.kcnsc-post__image {
    margin: 0 0 2rem;
}

.kcnsc-post__image img {
    display: block;
    width: 100%;
    height: auto;
}

.kcnsc-post__image figcaption {
    margin-top: .5rem;
    font-size: .875rem;
    color: var(--kcnsc-muted);
}

.kcnsc-post__tags {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 2rem 0 0;
    padding: 0;
    list-style: none;
}

.kcnsc-post__tags li {
    padding: .25rem .75rem;
    border: 1px solid var(--kcnsc-border);
    font-size: .875rem;
}

.kcnsc-post__back {
    display: inline-block;
    margin-top: 2rem;
}

/* ---------- Footer ---------- */
.kcnsc-footer {
    background: var(--kcnsc-navy) url("/images/footer-bg.jpg") center / cover no-repeat;
    color: var(--kcnsc-footer-text);
    padding: 3rem 0 2rem;
}

.kcnsc-footer a {
    color: #fff;
}

.kcnsc-footer__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .kcnsc-footer__inner {
        grid-template-columns: 1fr 3fr;
    }
}

.kcnsc-footer__logo img {
    max-width: 180px;
    height: auto;
}

.kcnsc-footer__address {
    font-style: normal;
    margin: 1.25rem 0;
}

.kcnsc-footer__partner img {
    max-width: 200px;
    height: auto;
}
