﻿/* Full-bleed recreation of discoveryinstitute.ca's single landing page.
   Divi "boxed layout": the whole page (logo header + content + footer) sits
   inside a centered WHITE box on top of the repeating blue bokeh background.
   Mirrors the StemCancer.ca recreation for consistency. */

.di-page {
    min-height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    /* Original body.custom-background: this image, center top, fixed. */
    background-color: #1f6fd0;
    background-image: url("../discovery-institute/blue-background.jpg");
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: auto;
    font-family: "Open Sans", "Helvetica Neue", Arial, sans-serif;
    color: #15354a;
    padding: 2.5rem 1rem;
}

/* --- The centered white boxed layout (Divi et_boxed_layout) --- */
.di-box {
    width: 100%;
    max-width: 1080px;
    background: #ffffff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    /* Keep the box exactly as tall as its contents so the footer is the
       bottom edge â€” no white strip below it. */
    display: flex;
    flex-direction: column;
    align-self: flex-start;
    overflow: hidden;
}

/* --- Logo banner, on white --- */
.di-header {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 1.75rem 2.75rem 0;
}

.di-logo-link {
    display: inline-block;
    line-height: 0;
}

.di-logo {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 90px;
}

/* --- Content --- */
.di-main {
    width: 100%;
}

.di-content {
    padding: 1.5rem 2.75rem 3rem;
    text-align: center;
}

.di-title {
    margin: 0 0 0.75rem;
    font-size: 2.4rem;
    font-weight: 700;
    color: #15354a;
}

.di-tagline {
    margin: 0 0 2rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #4fb3ac;
}

/* The body comes from WordPress as markup, so it is styled with ::deep. The question is the
   paragraph the post puts in italics. */
.di-body p {
    margin: 0 0 2rem;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
}

.di-body p:last-child {
    margin-bottom: 0;
}

.di-body a {
    color: #4fb3ac;
    text-decoration: none;
    font-weight: 600;
    word-break: break-all;
}

.di-body a:hover,
.di-body a:focus {
    text-decoration: underline;
    color: #15354a;
}

.di-body em {
    display: inline-block;
    font-size: 1.2rem;
    line-height: 1.6;
    color: #15354a;
}

/* --- Footer bar (Divi #footer-bottom), inside the box, flush --- */
.di-footer {
    width: 100%;
    background: #15354a;
}

.di-footer-info,
.di-footer .site-footer-text {
    padding: 1.25rem 2.75rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

@media (max-width: 600px) {
    .di-header {
        padding: 1.5rem 1.25rem 0;
    }

    .di-content {
        padding: 1.25rem 1.25rem 2rem;
    }

    .di-title {
        font-size: 1.9rem;
    }

    .di-footer-info,
.di-footer .site-footer-text {
        padding: 1.25rem;
    }
}

/* ---- Headings in posts (Heading 2 is the subtitle default) ---- */
.di-tagline h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    color: #4fb3ac;
}

.di-body h2 {
    margin: 1.75rem 0 0.75rem;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.3;
    color: #15354a;
}

.di-tagline h3,
.di-body h3 {
    margin: 1.25rem 0 0.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #4fb3ac;
}

.di-tagline :is(h4, h5, h6),
.di-body :is(h4, h5, h6) {
    margin: 1rem 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #15354a;
}

/* ---- Boxed layout, like Wericle.com (overrides the layout above) ----
   Blue bokeh background; a white box about two-thirds of the window wide (full width under 980px);
   a small logo in the top-left corner of the box's header; content and footer use the same side margins. */
.di-page {
    padding: 0;
    /* One image covering the whole window, as on Wericle. At its natural size it left a band of
       plain blue below it, which looked like a second background. */
    background-size: cover;
}

.di-box {
    width: 64%;
    max-width: 1200px;
    align-self: flex-start;
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, .2);
    display: flex;
    flex-direction: column;
}

.di-header {
    justify-content: flex-start;
    align-items: center;
    padding: 14px 5%;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .1);
}

.di-logo-link {
    width: auto;
}

.di-logo {
    width: auto;
    height: 43px;
    max-height: none;
    max-width: 70vw;
}

.di-content {
    padding: 58px 5% 60px;
}

.di-footer-info,
.di-footer .site-footer-text {
    padding: 15px 5%;
}

@media (max-width: 980px) {
    .di-box {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .di-header {
        padding: 12px 6%;
    }

    .di-logo {
        height: 34px;
        max-width: 80vw;
    }

    .di-content {
        padding: 36px 6% 40px;
    }

    .di-footer-info,
    .di-footer .site-footer-text {
        padding: 15px 6%;
    }
}
