/* ==========================================================================
   Top banner
   ========================================================================== */


.topBanner {
    display: flex;
    width: 100%;
    min-height: 450px;
    background-image: url("./../img/home-banner.jpg");
    background-position: 0;
    background-repeat: no-repeat;
    padding-left: 0;
    margin-top: 20px;
    color: white;
}

.topBanner .bannerContent {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 25px;
    width: 100%;
    min-width: 0;
    background-color: rgb(from var(--color-primary) r g b / 84%);
}

.topBanner .bannerContent .bannerTagline {
    font-family: 'Lato', sans-serif;
    font-size: 48px;
    text-transform: uppercase;
    font-weight: 400;
    letter-spacing: 4px;
    line-height: 50px;
}

.topBanner .bannerContent .bannerTagline span {
    font-weight: 900;
}

.topBanner .bannerContent h1 {
    font-family: 'Lato', sans-serif;
    font-size: 30px;
    text-transform: uppercase;
    font-weight: 400;
    letter-spacing: 4px;
    margin-top: 5px;
}

.topBanner .bannerContent .callToAction {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 50px;
    height: 125px;
}

.topBanner .bannerContent .callToAction .btn-view,
.topBanner .bannerContent .callToAction .btn-download {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 8px;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.1s;
}

.topBanner .bannerContent .callToAction .btn-view {
    background-color: var(--color-callToAction);
    color: white;
}

.topBanner .bannerContent .callToAction .btn-view:hover {
    background-color: color-mix(in oklab, var(--color-callToAction), black 10%);
    transition: background-color 0.2s;
}

.topBanner .bannerContent .callToAction .btn-download {
    background-color: white;
    color: var(--color-primary);
}

.topBanner .bannerContent .callToAction .btn-download:hover {
    background-color: color-mix(in oklab, white, black 10%);
    transition: background-color 0.2s;
}

/* ==========================================================================
   Full blue
   ========================================================================== */

.fullBlue {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 25px;

    width: 100%;
    min-height: 100px;
    margin: 35px 0;

    font-size: 22px;
    color: white;
    font-weight: 700;
    background-color: var(--color-primary);

    padding: 25px 50px;
}

.fullBlue.home p {
    margin: 0;
    text-align: center;
}

.fullBlue.home {
    font-size: 20px;
    line-height: 34px;
    font-weight: 400;

    min-height: 150px;

    margin: 50px 0;
}

.fullBlue.home strong {
    font-weight: 700;
}

/* ==========================================================================
   Introduction panel
   ========================================================================== */

.introPanel {
    display: flex;
    width: 100%;
    min-height: 200px;
    background-color: var(--color-surface-secondary);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 50px;
}

.introPanel .introContent {
    flex: 50%;
    position: relative;
    padding: 25px 35px;
    padding-bottom: 25px;
}

.introPanel .introContent h2 {
    margin: 20px 0;
}

.introPanel .introContent a {
    position: relative;
    display: inline-block;
    bottom: 0;
    left: 0;
    margin-top: 15px;
    text-align: center;
    padding: 7px 15px;
    border-radius: 5px;
    color: white;
    background-color: var(--color-primary);
    transition: background-color 0.2s;
    text-decoration: none;
}

.introPanel .introContent a:hover {
    background-color: color-mix(in oklab, var(--color-primary), black 10%);
    transition: background-color 0.1s;
    cursor: pointer;
}

.introPanel .introImage {
    flex: 50%;
    display: none;
    background-image: url("./../img/home-bib.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}


/* ==========================================================================
   Steps grid
   ========================================================================== */

.stepsContainer {
    margin: 50px 0;
}

.stepsContainer .stepsGrid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    max-width: 525px;
    margin: auto;
}

.stepsContainer .stepsGrid .stepsItem {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 25px;
    min-height: 75px;
}

.stepsContainer .stepsGrid .stepsItem img {
    width: 60px;
    aspect-ratio: 1;
}

.stepsContainer .stepsGrid .stepsItem p {
    line-height: 26px;
    margin: 0;
    max-width: 450px;
}


/* ==========================================================================
   Chapter grid
   ========================================================================== */

.chapterGrid {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin-top: 50px;
    margin-bottom: 50px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 50px;
}

.chapterGrid .chapterGridItem {
    position: relative;
    display: flex;
    flex-direction: column;
    border: solid 1px #BFD4DE;
    border-radius: 10px;
    overflow: hidden;

    text-decoration: none;
}

.chapterGrid .chapterGridItem:hover {
    cursor: pointer;
}

/* .chapterGrid .chapterGridItem .chapterImage {
    background-size: 110%;
    background-position: bottom;
    background-repeat: no-repeat;
    background-color: var(--color-surface-secondary);
    transition: background-size 0.3s;
    min-height: 125px;
} */
.chapterGrid .chapterGridItem .chapterImage {
    width: 100%;
    aspect-ratio: 16 / 9;

    background-size: 110%;
    background-position: bottom;
    background-repeat: no-repeat;
    background-color: var(--color-surface-secondary);

    transition: background-size 0.3s;
}

.chapterGrid .chapterGridItem:hover .chapterImage {
    background-size: 115%;
    transition: background-size 0.4s;
}

.chapterGrid .chapterGridItem .chapterImage.chap1 {
    background-image: url("./../img/chp1.jpg");
}

.chapterGrid .chapterGridItem .chapterImage.chap2 {
    background-image: url("./../img/chp2.jpg");
}

.chapterGrid .chapterGridItem .chapterImage.chap3 {
    background-image: url("./../img/chp3.jpg");
}

.chapterGrid .chapterGridItem .chapterImage.chap4 {
    background-image: url("./../img/chp4.jpg");
}

.chapterGrid .chapterGridItem .chapterImage.chap5 {
    background-image: url("./../img/chp5.jpg");
}

.chapterGrid .chapterGridItem .chapterImage.chap6 {
    background-image: url("./../img/chp6.jpg");
}

.chapterGrid .chapterGridItem .chapterContent {
    flex: 45%;
    padding: 20px 60px 20px 20px;
    transition: background-color 0.2s;
}

.chapterGrid .chapterGridItem .chapterContent .chapterTag {
    font-size: 18px;
    margin: 0;
    text-decoration: none;
    color: #333;
}

.chapterGrid .chapterGridItem .chapterContent .chapterTitle {
    font-size: 20px;
    font-weight: 700;
    line-height: 24px;
    margin: 0;
    color: #333;
    text-decoration: none;
}
.chapterGrid .chapterGridItem:hover .chapterContent {
    background-color: var(--color-surface-secondary);
    transition: background-color 0.4s;
}

.chapterGrid .chapterGridItem .fa-arrow-right {
    position: absolute;
    bottom: 15px;
    right: 20px;
}

.chapterGrid .chapterGridItem .fa-arrow-right::before {
    font-size: 30px;
    color: var(--color-primary);
    opacity: 0;
    transition: opacity 0.2s;
}

.chapterGrid .chapterGridItem:hover .fa-arrow-right::before {
    opacity: 1;
    transition: opacity 0.4s;
}

.chapterGrid .chapterGridToc {
    position: absolute;
    right: 0;
    bottom: 0;
    font-weight: 700;
    text-decoration: none;
    color: #333;
}

.chapterGrid .chapterGridToc:hover {
    text-decoration: underline;
}

.chapterGrid .chapterGridToc i {
    margin-left: 10px;
    transition: transform 0.2s;
}

.chapterGrid .chapterGridToc:hover i {
    transform: translateX(5px);
    transition: transform 0.2s;
}

/* ==========================================================================
   Document grid
   ========================================================================== */

.documentContainer {
    background-color: var(--color-surface-secondary);
}

.documentGrid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding-bottom: 50px;
}

.documentGrid .budgetDocs table {
    width: 100%;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 25px;
}

.documentGrid .budgetDocs table thead {
    color: white;
    background-color: var(--color-primary);
}

.documentGrid .budgetDocs table tr:not(:last-of-type) {
    border-bottom: solid 2px var(--color-surface-secondary);
}

.documentGrid .budgetDocs table th,
.documentGrid .budgetDocs table td {
    padding: 10px 15px;
    height: 75px;
}

.documentGrid .budgetDocs table tr th:nth-of-type(1),
.documentGrid .budgetDocs table tr td:nth-of-type(1) {
    padding-right: 0px;
}

.documentGrid .budgetDocs table tr th:nth-of-type(2),
.documentGrid .budgetDocs table tr td:nth-of-type(2) {
    padding-left: 0px;
}

.documentGrid .budgetDocs table .fa-download::before {
    color: var(--color-primary);
    font-size: 20px;
}

.documentGrid .budgetDocs table tr th:nth-of-type(2),
.documentGrid .budgetDocs table tr td:nth-of-type(2) {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    min-width: 160px;
    text-align: center;
}

/* Mobile-only icon visibility (restored for larger screens below). */
.budgetDocs table .fas {
    display: none;
}

.attribution {
    border-top: solid 1px var(--color-border-subtle);
    border-bottom: solid 1px var(--color-border-subtle);
}

.attribution .row div {
    padding-bottom: 15px;
}

.attribution p {
    font-size: 15px;
    line-height: 20px;
    color: #6b7280;
    margin: 0;
}

/* Screens wider than 480px */
@media (min-width: 480px) {
    /* --- Top banner --- */
    .topBanner .bannerContent {
        width: auto;
        min-width: auto;
        padding: 40px 25px 0 25px;
    }

    .topBanner .bannerContent .callToAction {
        height: auto;
    }

    /* --- Full blue --- */
    .fullBlue.home {
        font-size: 24px;
    }

    /* --- Introduction panel --- */
    .introPanel .introContent {
        padding-bottom: 100px;
    }

    .introPanel .introContent a {
        position: absolute;
        bottom: 35px;
        left: 35px;
        margin-top: 0;
        text-align: start;
    }

    /* --- Document grid --- */
    .documentGrid .budgetDocs table tr th:nth-of-type(2),
    .documentGrid .budgetDocs table tr td:nth-of-type(2) {
        min-width: 275px;
    }

    .budgetDocs table .fas {
        display: inline-block;
    }
}

@media (min-width: 550px) {
    /* --- Chapter grid --- */
    .chapterGrid {
        grid-template-columns: 1fr 1fr;
        max-width: 100%;
    }
}

/* Screens wider than 768px */
@media (min-width: 768px) {
    /* --- Top banner --- */
    .topBanner {
        min-height: 430px;
    }

    .topBanner .bannerContent .bannerTagline {
        font-size: 46px;
    }

    /* --- Full blue --- */
    .fullBlue {
        padding: 25px 100px;
    }

    /* --- Introduction panel --- */
    .introPanel {
        min-height: 375px;
    }

    .introPanel .introImage {
        display: block;
    }

    /* --- Steps grid --- */
    .stepsContainer .stepsGrid {
        grid-template-columns: 1fr 1fr;
        max-width: 100%;
    }

    /* --- Chapter grid --- */
    .chapterGrid {
        grid-template-columns: 1fr 1fr;
        max-width: none;
        margin-left: 0;
        margin-right: 0;
    }

    /* .chapterGrid .chapterGridItem .chapterImage {
        min-height: 175px;
    } */

    .chapterGrid .chapterGridItem .chapterContent .chapterTitle {
        font-size: 24px;
        line-height: 30px;
    }

    .chapterGrid .chapterGridToc {
        right: 0;
    }
}

/* Screens wider than 992px */
@media (min-width: 992px) {
    /* --- Top banner --- */
    .topBanner {
        padding-left: 50px;
    }

    /* --- Chapter grid --- */
    .chapterGrid {
        grid-template-columns: 1fr 1fr 1fr;
    }

    /* --- Document grid --- */
    .documentGrid {
        grid-template-columns: 6fr 4fr;
        gap: 45px;
    }
}

/* Screens wider than 1200px */
@media (width > 1200px) {
    /* --- Chapter grid --- */
    /* .chapterGrid .chapterGridItem .chapterImage {
        min-height: 200px;
    } */
}
