/**
 * Housing 2026 — page styles
 * Scoped under #content-housing-2026 to avoid leaking into the other
 * 2025/26 pages.
 *
 * Sections: #housing-intro, #housing-timeline, #housing-developments.
 * Brand red: #EC2024 (canonical). Heading ink: #0C171D. Body ink: #231F20.
 *
 * Each timeline row / card gets its colour from the ACF "Block Color"
 * picker, written by the template as an inline custom property:
 *   --accent      badge background, connector line, card divider
 *   --accent-ink  unit-count text — derived from --accent (mixed with a
 *                 little black) so light colours like yellow stay legible
 *                 on the grey band, as the PDF does for orange / yellow.
 */
#content-housing-2026 {

    /* Mobile/tablet: centre all copy. Desktop layout is left-aligned. */
    @media (max-width: 991.98px) {
        text-align: center;
    }

    h1, h2, h3 {
        font-family: 'AksharBold', sans-serif;
        line-height: 1.05;
        color: #0C171D;
    }

    p {
        font-family: 'MontserratRegular', sans-serif;
        line-height: 1.3;
        color: #231F20;
    }

    /* Tighter container at the md breakpoint, matching the other 2025/26 pages. */
    @media (min-width: 768px) and (max-width: 991px) {
        .container-md, .container-sm, .container {
            max-width: 720px;
        }
    }

    /* Default accent (brand red); the template overrides --accent inline
       per row/card from the ACF colour picker. --accent-ink is resolved on
       the same element, so it always follows that element's --accent. */
    .timeline-item,
    .development-item {
        --accent: #EC2024;
        --accent-ink: color-mix(in srgb, var(--accent) 86%, #000);
    }

    /* Section headings that exist for the document outline / screen
       readers only (h1 > h2 > h3). Standard visually-hidden pattern. */
    .visually-hidden {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        margin: -1px !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        white-space: nowrap !important;
        border: 0 !important;
    }

    /* scroll-animations.js sets opacity/transform inline; !important is
       needed to beat that. Reduced-motion users see everything at once. */
    @media (prefers-reduced-motion: reduce) {
        [data-fade-in] {
            opacity: 1 !important;
            transform: none !important;
            transition: none !important;
        }
    }
}


/* ============================================================
 * Intro
 * Page heading and intro paragraph on white.
 * ============================================================ */
#housing-intro {
    padding-top: 50px;
    padding-bottom: 50px;

    @media (min-width: 992px) {
        padding-top: 90px;
        padding-bottom: 80px;

        .container{
            padding-left: 50px;
        }
    }

    h1 {
        font-size: 32px;
        margin-bottom: 12px;

        @media (min-width: 768px) {
            font-size: 40px;
        }
        @media (min-width: 992px) {
            font-size: 48px;
        }
    }

    p {
        font-size: 16px;
        max-width: 1110px;
        margin: 0 auto;

        & + p {
            margin-top: 1em;
        }

        @media (min-width: 768px) {
            font-size: 18px;
        }
        @media (min-width: 992px) {
            font-size: 20px;
            margin: 0;
        }
    }
}


/* ============================================================
 * Timeline
 * Grey band: houses illustration, then one row per development —
 * coloured month/year badge, thin connector line, name + unit count.
 * Mobile stacks badge over text (no connector); ≥768 is a flex row.
 * ============================================================ */
#housing-timeline {
    padding-top: 50px;
    padding-bottom: 60px;

    @media (min-width: 992px) {
        padding-top: 120px;
        padding-bottom: 120px;
    }

    .houses-illustration {
        max-width: 400px;
        margin: 0 auto 40px;

        @media (min-width: 992px) {
            max-width: 505px;
            margin: 0 0 80px;
        }

        img {
            width: 100%;
            height: auto;
            display: block;
        }
    }

    .timeline-list {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 30px;

        @media (min-width: 768px) {
            gap: 22px;
        }

        @media (min-width: 992px) {
            padding-left: 30px;
        }
    }

    .timeline-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 14px;

        @media (min-width: 768px) {
            flex-direction: row;
            gap: 0;
            text-align: left;
        }
    }

    /* Coloured badge: month over a large year, both white. Mobile/tablet
       centres the text in the badge (client feedback 2026-09-29); desktop
       keeps the original left alignment. */
    .timeline-date {
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 190px;
        min-height: 90px;
        padding: 12px 24px 10px;
        background: var(--accent);
        color: #fff;
        line-height: 1;
        text-align: center;

        @media (min-width: 992px) {
            width: 233px;
            min-height: 111px;
            padding: 20px 25px 15px;
            align-items: stretch;
            text-align: left;
        }
    }

    .timeline-month {
        font-family: 'AksharBold', sans-serif;
        font-size: 18px;
        text-transform: uppercase;
        margin-bottom: 0;

        @media (min-width: 992px) {
            font-size: 24px;
        }
    }

    .timeline-year {
        font-family: 'AksharBold', sans-serif;
        font-size: 44px;

        @media (min-width: 992px) {
            font-size: 58px;
        }
    }

    /* Thin line joining the badge to the copy (desktop/tablet only). */
    .timeline-connector {
        display: none;

        @media (min-width: 768px) {
            display: block;
            flex-shrink: 0;
            width: 50px;
            height: 1px;
            background: var(--accent);
        }
        @media (min-width: 992px) {
            width: 100px;
        }
        @media (min-width: 1200px) {
            width: 150px;
        }
    }

    .timeline-body {
        @media (min-width: 768px) {
            padding-left: 20px;
        }
    }

    .timeline-title {
        font-size: 22px;
        text-transform: uppercase;
        margin-bottom: 4px;

        @media (min-width: 992px) {
            font-size: 30px;
        }
    }

    .timeline-units {
        font-family: 'AksharBold', sans-serif;
        font-size: 20px;
        line-height: 1.2;
        color: var(--accent-ink);
        margin: 0;

        @media (min-width: 992px) {
            font-size: 25px;
        }
    }
}


/* ============================================================
 * Developments
 * One card per development: photo, name, description, colour
 * divider, neighbourhood. Mobile/tablet stacks photo over copy;
 * ≥992 is a two-column row with the photo on the left.
 * ============================================================ */
#housing-developments {
    padding-top: 60px;
    padding-bottom: 80px;

    @media (min-width: 992px) {
        padding-top: 160px;
        padding-bottom: 160px;
    }

    .developments-list {
        display: flex;
        flex-direction: column;
        gap: 60px;

        @media (min-width: 992px) {
            gap: 136px;
            padding-left: 50px;
            padding-right: 50px;
        }


    }

    .development-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 24px;

        @media (min-width: 992px) {
            flex-direction: row;
            align-items: flex-start;
            gap: 50px;
            text-align: left;
        }
    }

    .development-image {
        flex-shrink: 0;
        width: 100%;
        max-width: 434px;


        @media (min-width: 992px) {
            width: 45%;
        }

        @media (min-width: 1200px) {
            width: 100%;
        }


        img {
            width: 100%;
            height: auto;
            aspect-ratio: 462 / 402;
            object-fit: cover;
            display: block;
        }
    }

    .development-body {
        max-width: 520px;

        @media (min-width: 992px) {
            padding-top: 4px;
        }
    }

    .development-title {
        font-size: 26px;
        text-transform: uppercase;
        margin-bottom: 8px;

        @media (min-width: 768px) {
            font-size: 30px;
        }
        @media (min-width: 992px) {
            font-size: 35px;
        }
    }

    p {
        font-size: 16px;
        margin-bottom: 0;

        & + p {
            margin-top: 1em;
        }

        @media (min-width: 768px) {
            font-size: 18px;
        }
        @media (min-width: 992px) {
            font-size: 20px;
        }
    }

    /* Thick colour bar between the description and the neighbourhood. */
    .development-divider {
        display: block;
        width: 100%;
        max-width: 484px;
        height: 17px;
        background: var(--accent);
        margin: 26px auto 14px;

        @media (min-width: 992px) {
            margin: 24px 0 12px;
        }
    }

    .development-location {
        font-family: 'AksharBold', sans-serif;
        font-size: 20px;
        line-height: 1.2;
        text-transform: uppercase;
        color: #0C171D;
        margin: 0;

        @media (min-width: 992px) {
            font-size: 24px;
        }
    }
}
