﻿/**
 * Styles for pages using the 3-Column Content Collection template.
 */

/**
 * Underlines
 */
.page-content-container * {
    text-decoration-thickness: 0 !important;
    text-underline-offset: 2px;
}

/**
 * Headings
 */
h2, h3, h4 {
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.375rem;
}

h3 {
    font-size: 1.125rem;
}

h4 {
    font-size: 1rem;
}

/**
 * Text  
 */
.text-bold,
.page-content h2.text-bold {
    font-weight: 700;
}

/**
 * Lists
 */

/* Checklist */
ul.checklist li {
    font-size: 1rem;
    list-style: none;
    padding-left: .5rem;
    position: relative;
}

ul.checklist li::before {
    background: url(https://cdn.redcross.ca/prodmedia/crc/azure/icons/checkmark-red.png);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 1rem;
    content: '';
    display: block;
    height: 1rem;
    left: -1rem;
    position: absolute;
    top: 4px;
    width: 1rem;
}

ul.checklist:last-child {
    padding-bottom: 0;
}

/**
 * Container Layout
 */

/* 2 columns */
.container-2-columns .page-content-collection-container {
    display: grid;
    gap: 1rem;
}

@media (min-width: 450px) {
    .container-2-columns .page-content-collection-container {
        grid-template-columns: 1fr 1fr;
    }
}

/* 2 columns, but each column has auto resize */
.container-2-columns-auto .page-content-collection-container {
    display: grid;
    gap: 1rem;
} 

@media (min-width: 450px) {
    .container-2-columns-auto .page-content-collection-container {
        grid-template-columns: auto auto;
    }
}

/* 3 columns */
.container-3-columns .page-content-collection-container {
    display: grid;
    gap: 1rem;
}

@media (min-width: 450px) {
    .container-3-columns .page-content-collection-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 768px) {
    .container-3-columns .page-content-collection-container {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/**
 * Borders and Separators
 */
.content-separator-top {
    border-top: 1px solid #ddd;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
}

.content-separator-blank-top {
    margin-top: 3rem;
}

.content-separator-blank-bottom {
    margin-bottom: 3rem;
}

/**
 * Buttons and Links
 */
.page-content .button {
    margin-bottom: 0;
    margin-top: .5rem;
}

.page-content .cta-link {
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
}

.cta-link:not(.job-listing-container .job-listing .cta-link)::after {
    display: inline;
}

.page-content .cta-link .page-content-link-text {
    text-decoration: underline;
}

html[lang|="fr"] .cta-link {
    text-transform: uppercase;
}

/* Right Rail CTA Button */
.right-rail .text-CTA a.button {
    display: inline-block;
}

/* Link with Icon*/
.container-2-columns-auto:has(.link-with-icon) .page-content,
.container-2-columns-auto:has(.link-with-icon) .page-content-link,
.container-2-columns-auto:has(.link-with-icon) .link-with-icon {
    height: 100%;
}

.container-2-columns-auto:has(.link-with-icon) .page-content-collection-container {
    margin-top: 0;
}

a.link-with-icon {
    display: grid;
    grid-template-columns: 50px 1fr;
    outline: none;
    text-decoration: none;
}

a.link-with-icon:hover {
    text-decoration: underline;
}

.page-content-link-icon {
    align-items: center;
    background: #e00;
    display: grid;
    justify-content: center;
    min-height: 50px;
}

.page-content-link-icon img {
    height: 18px;
}

.link-with-icon .page-content-link-text {
    align-items: center;
    border: 1px solid #d8d8d8;
    border-left: 0;
    color: var(--black);
    display: grid;
    font-weight: normal;
    padding: 10px 50px 10px 15px;
    position: relative
}

.link-with-icon .page-content-link-text::after {
    background: url(https://cdn.redcross.ca/prodmedia/crc/azure/icons/arrow-right-red.png);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 20px auto;
    content: "";
    height: 20px;
    position: absolute;
    right: 15px;
    width: 20px;
}

/**
 * Side CTAs
 */
.right-rail {

}

.text-CTA a img {
    max-width: 300px;
    width: 100%;
}

.right-rail .text-CTA {
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

@media only screen and (min-width: 641px) and (max-width: 950px) {
    .large-3 {
        padding-top: 0;
    }
}

/**
 * General Content
 */
.page-content-container {
    margin-bottom: .5rem;
}

.page-content-container p,
.page-content-container ul,
.page-content-container li {
    font-size: 1rem;
}

.page-content-container > .page-content {
    margin-bottom: 1rem;
}

.page-content-container > .page-content.content-separator-blank-bottom {
    margin-bottom: 3rem;
}

.page-content-collection-container {
    display: grid;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/**
 * Default Content 
 */

.page-content-default > figure.basic-image-container {
    aspect-ratio: 2 / 1;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.page-content-default > figure.basic-image-container img.basic-image {
    height: 100%;
    object-fit: cover;
    object-position: center;
    width: 100%;
}

.page-content h2 {
    font-weight: 400;
}

/* Image Left Layout */
@media (min-width: 500px) {
    .page-content-image-left {
        column-gap: 1rem;
        display: grid;
        grid-template-columns: 150px 1fr;
        grid-template-rows: auto auto auto;
    }

    .page-content-image-left > .page-content-title {
        grid-column: 1 / 3;
        grid-row: 1 / 2;
    }

    .page-content-image-left > figure {
        grid-column: 1 / 2;
        grid-row: 2 / 5;
    }

    .page-content-image-left > .page-content-link {
        grid-column: 2 / 3;
    }
}

/* Image Left of Title */
.page-content-image-left-of-title {
    display: grid;
    gap: 1.5em;
}

.page-content-image-left-of-title > figure.basic-image-container {
    aspect-ratio: 2 / 1;
    grid-row: 2 / 3;
    margin-bottom: 0;
    overflow: hidden;
}

.page-content-image-left-of-title > .page-content-title  {
    border-top: 1px solid #d8d8d8;
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #d8d8d8;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.page-content-image-left-of-title > .page-content-title h2 {
    margin-bottom: .5rem;
}

.page-content-image-left-of-title > .page-content-title p {
    font-style: italic;
    margin-bottom: 0;
}

.page-content-image-left-of-title > figure.basic-image-container {
    height: 100%;
    width: 100%;
}

.page-content-image-left-of-title .page-content-description:has(.page-content-photo-credit) {
    margin-top: -1em;
}

p.page-content-photo-credit {
    font-size: .625rem;
}

@media (min-width: 400px) {
    .page-content-image-left-of-title {
        display: grid;
        grid-template-columns: 150px 1fr;
        grid-template-rows: auto 1fr;
        column-gap: 1rem;    
    }

    .page-content-image-left-of-title > figure.basic-image-container  {
        aspect-ratio: unset;
        grid-row: 1 / 2;
        margin: 0;
        min-height: 150px;
    }

    .page-content-image-left-of-title > .page-content-description {
        grid-row: 2 / 3;
        grid-column: 1 / 3;
        margin-top: 0;
    }
}

/* Blockquote */
.page-content blockquote {
    border-left: 3px solid var(--primary-red);
    color: var(--black);
    font-size: 1.375rem;
    padding-top: 0;
}

/* CTA Quote */
.cta-quote {
    margin-bottom: 1rem;
}

.cta-quote h3 {
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
}

.cta-quote blockquote {
    border: 0;
    font-family: "PT Serif";
    font-size: 1.125rem;
    font-style: italic;
    padding: 0;
}

.cta-quote blockquote::before {
    content: "“";
}

.cta-quote blockquote::after {
    content: "”";
}

html[lang|="fr"] .cta-quote blockquote::before {
    content: "«\00a0";
}

html[lang|="fr"] .cta-quote blockquote::after {
    content: "\00a0»";
}

/* Image with Caption and Description on blue */
.page-content-captioned-image-with-description-on-blue {
    display: grid;
}

.page-content-captioned-image-with-description-on-blue .page-content-title {
    grid-row: 1 / 2;
}

.page-content-captioned-image-with-description-on-blue figure.basic-image-container {
    aspect-ratio: 2 / 3;
    max-width: 110px;
    margin: 0 auto 1.5em;
}

.page-content-captioned-image-with-description-on-blue .page-content-description {
    background: #007fa51a;
    margin-top: 2rem;
    padding: 1rem;
}

.page-content-captioned-image-with-description-on-blue .page-content-link {
    grid-row: 4 / 5;
}

.page-content-captioned-image-with-description-on-blue .page-content-description h3 {
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: .5rem;
}

.page-content-captioned-image-with-description-on-blue .page-content-description ul {
    padding-bottom: 0
}

@media (min-width: 430px) {
    .page-content-captioned-image-with-description-on-blue {
        column-gap: 1rem;
        grid-template-columns: 110px 1fr;
    }

    .page-content-captioned-image-with-description-on-blue .page-content-title {
        grid-column: 1 / 3;
    }

    .page-content-captioned-image-with-description-on-blue .page-content-link {
        grid-column: 1 / 3;
        grid-row: 3 / 4;
    }

    .page-content-captioned-image-with-description-on-blue .page-content-description {
        grid-column: 1 / 3;
    }
}

/* Icon List */
.content-icon-list > .page-content-collection-container > .page-content {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: 30px 1fr;
}

.content-icon-list > .page-content-collection-container > .page-content > figure {
    aspect-ratio: 1 / 1;
    margin: 5px 0;
}

.content-icon-list > .page-content-collection-container > .page-content > figure img {
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.content-icon-list > .page-content-collection-container > .page-content p:last-of-type {
    margin-bottom: 0;
}

/* List of Images with Title and Description */
.list-of-images-with-title-and-description > .page-content-collection-container {
    gap: 0;
    margin: 2rem 0;
}

.list-of-images-with-title-and-description > .page-content-collection-container > .page-content:not(:first-of-type) {
    border-top: 1px solid #c3c3c3;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
}

.list-of-images-with-title-and-description > .page-content-collection-container > .page-content > figure {
    aspect-ratio: 1 / 1;
}

.list-of-images-with-title-and-description > .page-content-collection-container > .page-content h3 {
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
}

.list-of-images-with-title-and-description > .page-content-collection-container > .page-content p:last-child {
    margin: 0;
}

.page-content-image-left figure.basic-image-container::after,
.list-of-images-with-title-and-description figure.basic-image-container::after {
    background: none;
}

.page-content-image-left figcaption.basic-image-credit,
.list-of-images-with-title-and-description figcaption.basic-image-credit {
    color: var(--black);
    padding: 5px 0;
    position: relative;
    text-shadow: none;
}

@media (min-width: 450px) {
    .list-of-images-with-title-and-description > .page-content-collection-container > .page-content {
        display: grid;
        grid-template-columns: 180px 1fr;
    }

    .list-of-images-with-title-and-description > .page-content-collection-container > .page-content > figure {
        grid-row: 1 / 3;
        margin-bottom: 0;
        margin-right: 1.5rem;
    }    
}

/**
 * CTA Block 
 */
a.page-content-cta-block {
    border: 1px solid #d8d8d8;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-rows: auto 1fr;
    outline: none;
    text-decoration: none;
    transition: all 300ms ease-out;
}

a.page-content-cta-block:hover,
a.page-content-cta-block:focus {  
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.15);
}

.page-content-cta-block > figure.basic-image-container {
    aspect-ratio: 3 / 2;
}

.page-content-cta-block > figure.basic-image-container img.basic-image {
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.page-content-cta-block > .page-content-cta-content {
    padding: 20px;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

.page-content-cta-block > .page-content-cta-content h2,
.page-content-cta-block > .page-content-cta-content h3,
.page-content-cta-block > .page-content-cta-content h4 {
    font-size: .875rem;;
    font-weight: 400;
}

.page-content-cta-block:hover > .page-content-cta-content h2,
.page-content-cta-block:hover > .page-content-cta-content h3,
.page-content-cta-block:hover > .page-content-cta-content h4,
.page-content-cta-block:focus > .page-content-cta-content h2,
.page-content-cta-block:focus > .page-content-cta-content h3,
.page-content-cta-block:focus > .page-content-cta-content h4{
    text-decoration: underline;
}

.page-content-cta-block > .page-content-cta-content p {
    font-size: .875rem;
}

.page-content-cta-block > .page-content-cta-content .page-content-link {
    font-size: .875rem;
}

.page-content-cta-block:hover > .page-content-cta-content .page-content-link .page-content-link-text,
.page-content-cta-block:focus > .page-content-cta-content .page-content-link .page-content-link-text {
    text-decoration: underline;
}

/* CTA Blue Box */
a.page-content-cta-block.cta-blue-box {
    background-color: #e5f3f7;
    border: 1px solid #e5f3f7;
    font-size: 1rem;
    grid-template-rows: none;
}

.page-content-cta-block.cta-blue-box > .page-content-cta-content h2,
.page-content-cta-block.cta-blue-box > .page-content-cta-content h3,
.page-content-cta-block.cta-blue-box > .page-content-cta-content h4 {
    color: #005670;
    font-weight: 700;
    text-transform: uppercase;
}

.page-content-cta-block.cta-blue-box:hover > .page-content-cta-content .page-content-link span,
.page-content-cta-block.cta-blue-box:focus > .page-content-cta-content .page-content-link span {
    color: #005670;
}

/**
 * Contact Card
 */
.page-content-contact-card {
    background: #f7f7f7;
    box-shadow: 0px 0px 4px 1px #0000001A;
    padding: 20px;    
}

.page-content-contact-card > h3 {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
}

.page-content-contact-label {
    font-weight: 700;
    margin-bottom: .5rem
}

.page-content-contact {
    margin-bottom: 1rem;
}

.page-content-contact-detail {
    background-position: 0 0;
    background-repeat: no-repeat;
    background-size: 1rem;
    margin-bottom: .5rem;
    padding-left: 1.7rem;
}

.page-content-contact-detail:last-of-type {
    margin-bottom: 0;
}

.page-content-contact-address {
    background-image: url(https://cdn.redcross.ca/prodmedia/crc/azure/icons/address-pin-icon-red.png);
}

.page-content-contact-phone {
    background-image: url(https://cdn.redcross.ca/prodmedia/crc/azure/icons/phone-icon-red.png);
    background-position: 0 .2rem;
    background-size: 1.1rem;
}

.page-content-contact-email-address {
    background-image: url(https://cdn.redcross.ca/prodmedia/crc/azure/icons/mail-icon-red.png);
    background-position: 0 .3rem;
    background-size: 1.1rem;
}

.page-content-contact-phone a,
.page-content-contact-email-address a {
    font-weight: 400;
}

/* With image and description */
.page-content-contact-card > .basic-image-container {
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    font-size: 1rem;
    margin: 0 auto 1rem;
    max-width: 200px;
    overflow: hidden;
    width: 100%;
}

.page-content-contact-card > .basic-image-container > .basic-image {
    height: 100%;
    object-fit: cover;
}

.page-content-contact-card:has(.basic-image-container) .page-content-contact,
.page-content-contact-card:has(.basic-image-container) .page-content-title {
    text-align: center;
}

.page-content-contact-card:has(.basic-image-container) .page-content-contact .page-content-contact-name {
    font-weight: 700;
}

.page-content-contact-card > .page-content-description blockquote {
    border: 0;
    font-family: "PT Serif";
    font-size: 1rem;
    font-style: italic;
    padding: 0;
}

.page-content-contact-card > .page-content-description blockquote::before {
    content: "“";
}

.page-content-contact-card > .page-content-description blockquote::after {
    content: "”";
}

html[lang|="fr"] .page-content-contact-card > .page-content-description blockquote::before {
    content: "«\00a0";
}

html[lang|="fr"] .page-content-contact-card > .page-content-description blockquote::after {
    content: "\00a0»";
}

@media (min-width: 500px) {
    .page-content-contact-card:has(.basic-image-container) {
        display: grid;
        grid-template-columns: 90px 1fr;
        align-items: center;
    }

    .page-content-contact-card:has(.basic-image-container) .page-content-contact,
    .page-content-contact-card:has(.basic-image-container) .page-content-title {
        text-align: left;
    }

    .page-content-contact-card:has(.basic-image-container) .page-content-contact {
        margin-left: 1rem;
    }

    .page-content-contact-card:has(.basic-image-container) .page-content-title,
    .page-content-contact-card:has(.basic-image-container) .page-content-description,
    .page-content-contact-card:has(.basic-image-container) .page-content-contact-address, 
    .page-content-contact-card:has(.basic-image-container) .page-content-contact-phone,
    .page-content-contact-card:has(.basic-image-container) .page-content-contact-email-address {
        grid-column: 1 / 3;
    }
}

/**
 * Accordion Card
 */
.card-accordion {
    background: #f7f7f7;
    box-shadow: 0px 0px 4px 1px #0000001a;
    padding: 30px 20px 20px;
    scroll-margin-top: 100px;
}

.card-accordion .card-header {
    align-items: center;
    display: grid;
    gap: 1rem;
    padding-bottom: 30px;
    text-align: center;
}

.card-accordion .card-header figure {
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    margin: 0 auto;
    max-width: 150px;
    overflow: hidden;
}

.card-accordion .card-header figure img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.card-accordion .card-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
}

.card-accordion .card-header .card-member-title {
    text-transform: uppercase;
}

.card-accordion .card-header .card-member-short-description {
    font-style: italic;
    margin-top: .5rem
}

@media (min-width: 500px) {
    .card-accordion .card-header {
        grid-template-columns: 120px 1fr;
        text-align: left;
    }
}

.card-accordion .card-content {
    display: none;
    padding: 0 0 30px;
}

.card-accordion .card-content p:last-child {
    margin: 0;
}

.card-accordion .card-content h4 {
    font-weight: 700;
    margin: 1.5rem 0;
    text-transform: uppercase;
}

.card-accordion .card-content blockquote {
    border: 0;
    font-family: "pt serif";
    font-style: italic;
    line-height: 1.4;
    padding: 0 .6rem;
    position: relative;
}

.card-accordion .card-content blockquote::before {
    content: "“";
    left: 0;
    position: absolute;
}

.card-accordion .card-content blockquote::after {
    content: "”";
}

html[lang|="fr"] .card-accordion .card-content blockquote {
    padding: 0 .8rem;
}

html[lang|="fr"] .card-content blockquote::before {
    content: "«\00a0";
}

html[lang|="fr"] .card-content blockquote::after {
    content: "\00a0»";
}

.card-accordion .card-footer {
    border-top: 1px solid #aaadb1;
    padding-top: .5rem;
}

.card-accordion .card-footer .card-action-button {
    background: none;
    border: 0;
    color: #005670;
    font-weight: 600;
    margin: 0;
    padding: 0;
}

.card-accordion .card-footer .card-action-button:hover,
.card-accordion .card-footer .card-action-button:focus {
    color: var(--black);
}

.card-accordion .card-footer .card-action-button::after {
    content: '\f078';
    display: inline-block;
    font-family: FontAwesome;
    font-size: .75rem;
    font-weight: 400;
    margin-left: 5px;
    transition: rotate .25s ease-out;
    vertical-align: middle;
}

.card-accordion .card-footer .card-action-button[aria-expanded=true]::after {
    rotate: 180deg;
}
