/*
 * CMS content (pages + news bodies written in the editor) — QA #12: tables had no borders or style.
 * Site colours come from Site Settings » Colors (--color-primary). Wide tables scroll sideways on phones.
 */
.cms-content table {
    width: 100%;
    max-width: 100%;
    margin: 1rem 0 1.5rem;
    border-collapse: collapse;
    font-size: 0.95rem;
    background: #fff;
}
.cms-content th,
.cms-content td {
    padding: 0.55rem 0.75rem;
    border: 1px solid #d9dbe1;
    text-align: left;
    vertical-align: top;
}
.cms-content thead th,
.cms-content tr:first-child > th {
    background: var(--color-primary, #333);
    color: #fff;
    font-weight: 700;
}
.cms-content tbody tr:nth-child(even) td {
    background: #f6f7f9;
}
.cms-content table p {
    margin: 0;
}
@media (max-width: 767px) {
    .cms-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
}

/*
 * Footer (Glen, 2026-10-12): the CMS footer + dorvaloldpros.ca merged — centered band, same colour as the header
 * band (Site Settings » Colors » header secondary). Overrides the theme's white .footer-secondary.
 * Text colour from that background (2.1.7): --cms-on-footer-rgb = white on dark, dark on light (Storm's light teal
 * footer had white text). Full-strength text: fading it fell under 4.5:1 on mid tones (MRO red, PFDS orange); only
 * the separators and the other language are lighter.
 */
.footer-secondary.cms-footer {
    background-color: var(--header-secondary-bg, #1a1a1a);
    color: rgb(var(--cms-on-footer-rgb, 255, 255, 255));
    padding: 22px 0 18px;
    font-size: 13px;
    line-height: 1.6;
}
.cms-footer p {
    margin: 0 0 6px;
}
.cms-footer a {
    color: rgb(var(--cms-on-footer-rgb, 255, 255, 255));
    text-decoration: none;
}
.cms-footer a:hover,
.cms-footer a:focus {
    color: rgb(var(--cms-on-footer-rgb, 255, 255, 255));
    text-decoration: underline;
}
.cms-footer__copyright {
    color: rgb(var(--cms-on-footer-rgb, 255, 255, 255));
    font-size: 14px;
}
.cms-footer__sep {
    margin: 0 8px;
    opacity: 0.5;
}
.cms-footer__legal,
.cms-footer__credits,
.cms-footer__meta {
    font-size: 12px;
}
.cms-footer__credits {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 14px;
}
.cms-footer__badge {
    height: 28px;
    width: auto;
}
.cms-footer__meta a {
    opacity: 0.9;
    font-weight: 700;
}
.cms-footer__meta a.is-active {
    opacity: 1;
}
.cms-footer__version {
    margin-left: 14px;
}

/*
 * News card styles (Site Settings » Home Page, 2026-10-21) — small fixes on top of the Alchemists classes.
 * Tiles: same frame for every photo, and white titles that stay readable on any photo.
 */
.cms-news--tile .posts__item--tile .posts__thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    margin: 0;
}
.cms-news--tile .posts__item--tile .posts__thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cms-news--tile .posts__item--tile .posts__title,
.cms-news--tile .posts__item--tile .posts__title a,
.cms-news--tile .posts__item--tile .posts__date {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
}
@media (max-width: 767px) {
    .cms-news--tile .posts__item--tile .posts__title {
        font-size: 17px;
        line-height: 1.2;
    }
}
/* Photo on the left: same 4:3 frame for every photo; the theme's round "+" sat on the label (photo + title are links). */
.cms-news--thumb-left .posts__thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    align-self: flex-start;
}
.cms-news--thumb-left .posts__thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cms-news--thumb-left .posts__cta {
    display: none;
}
/* Simple list: small fixed thumbnail on the left, title + date beside it. */
.cms-news--list .posts__thumb {
    position: relative;
    float: left;
    width: 120px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    margin: 0 16px 0 0;
}
.cms-news--list .posts__thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cms-news--list .posts__title {
    font-size: 15px;
    line-height: 1.25;
}
@media (max-width: 575px) {
    .cms-news--list .posts__thumb {
        width: 90px;
        margin-right: 12px;
    }
}
