:root {
    --gutter: max(30px, ((100vw - 17px - 1340px) / 2));

    /* Uncomment if site doesnt have variables */
    /* --primary-color: #000000;
    --secondary-color: #EFEFEF; */

    --border-radius: 0;
}

.design-block-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 0 0 2rem;

    >*+* { 
        margin-block: 0;
    }

    img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        border-radius: var(--border-radius);


    }

    :is(h1, h2, p) {
        text-align: center;
    }

    .design-block-hero-content {
        display: flex;
        justify-content: space-between;
        /* gap: 1rem; */
        width: 100%;
        align-items: stretch;
        flex-wrap: wrap;
        min-height: 400px;

        @media screen and (min-width: 768px) {
            min-height: 600px;
        }

        .hero-left-column {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 400px;

            @media screen and (min-width: 768px) {
                min-height: 600px;
            }
        }

        .hero-top-left-image, .hero-bottom-right-image {
            position: absolute;
        }

        .hero-top-left-image {
            top: -3rem;
            left: -3rem;
            height: 70px;
            width: 70px;
        }

        .hero-bottom-right-image {
            bottom: -3rem;
            right: -3rem;
            height: 40px;
            width: 40px;
        }
    }

    .design-block-hero-text {
        max-width: 768px;
        position: relative;
        
        :is(h1, h2, p) {
            text-align: center;
        }
    }
}

.content-block-page-title-section {
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    flex-direction: column;

    @media screen and (min-width: 768px) {
        flex-direction: row;
    }

    .pt-image {
        flex: 1 1 calc(50% - 1rem);
        order: 1;

        @media screen and (min-width: 768px) {
            order: 2;
        }

        img {
            height: 100%;
            object-fit: cover;
            border-radius: var(--border-radius);
        }
    }

    .pt-text {
        flex: 1 1 calc(50% - 1rem);
        order: 2;

        @media screen and (min-width: 768px) {
            order: 1;
        }

        h2, h3 {
            margin-top: 0;
        }

        hr {
            max-width: 200px;
            margin-left: 0;
            background-color: var(--primary-color);
        }
    }
}

.full-width-content-block {
    /* padding-block: 5rem; */
    /* padding-inline: calc(var(--gutter) + 3rem); */
    text-align: left;
    margin-bottom: 2rem;

    .primary {
        background-color: var(--primary-color);

        h2, p, a:not(.button) {
            color: white;
        }
    }
   
    .secondary {
        background-color: var(--secondary-color);

        h2, p, a:not(.button) {
            color: white;
        }
    }

    p {
        margin-top: 1rem;
    }
}


.design-block-fw-paragraph {
    /* padding-block: 5rem;
    padding-inline: calc(var(--gutter) + 3rem);
    text-align: center; */
    margin-bottom: 3rem;

    img {
        width: 100%;
        object-fit: cover;
    }

    .text-area{

        &.primary {
            background-color: var(--primary-color);

            h2, p, a:not(.button) {
                color: white;
            }
        }
    
        &.secondary {
            background-color: var(--secondary-color);

            h2, p, a:not(.button) {
                color: white;
            }
        }

        p {
            margin-top: 1rem;
        }
    }
}

.design-block-fw-paragraph.home-page {
    text-align: left;
    position: relative;
    padding-block: 6rem;
    padding-inline: calc(var(--gutter) + 3rem);

    .top-left-image, .bottom-right-image {
        position: absolute;
    }

    .top-left-image {
        top: 0;
        left: calc(var(--gutter));
        height: 45px;
        width: 45px;

        @media screen and (min-width: 768px) {
            height: 80px;
            width: 80px;
            top: 1rem;
        }
    }

    .bottom-right-image {
        bottom: 0;
        right: calc(var(--gutter));
        height: 30px;
        width: 30px;

        @media screen and (min-width: 768px) {
            height: 45px;
            width: 45px;
            bottom: 2rem;
        }
    }

}

.design-block-image-content,
.design-block-video-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 3rem;
    
    @media screen and (min-width: 768px) {
        flex-direction: row;
    }

    .corner-accent {
        position: absolute;
        width: 85%;
        height: 30%;
        color: var(--primary-color);
        pointer-events: none;
    }

    .corner-accent.bottom-left {
        bottom: -15px;
        left: -15px;
    }

    .corner-accent.bottom-left::before,
    .corner-accent.bottom-left::after {
        content: '';
        position: absolute;
        background-color: var(--primary-color);
    }

    .corner-accent.bottom-left::before {
        bottom: 0;
        left: 0;
        width: 100%;
        height: 25px;
        border-radius: 0 0 4px 4px;
    }

    .corner-accent.bottom-left::after {
        bottom: 0;
        left: 0;
        width: 25px;
        height: 100%;
        border-radius: 4px 0 0 4px;
    }

    /* Bottom-right corner */
    .corner-accent.bottom-right {
        bottom: -15px;
        right: -15px;
    }

    .corner-accent.bottom-right::before,
    .corner-accent.bottom-right::after {
        content: '';
        position: absolute;
        background-color: var(--tertiary-color);
    }

    .corner-accent.bottom-right::before {
        bottom: 0;
        right: 0;
        width: 100%;
        height: 25px;
        border-radius: 0 0 4px 4px;
    }

    .corner-accent.bottom-right::after {
        bottom: 0;
        right: 0;
        width: 25px;
        height: 100%;
        border-radius: 0 4px 4px 0;
    }

    .content-block {
        flex-basis: 50%;
        display: flex;
        flex-direction: column;
        justify-content: center;

        h2 {
            margin-top: 0;
        }
    }

    .image-block {
        flex-basis: 50%;
        position: relative;

        img {
            height: 100%;
            width: 100%;
            position: relative;
            object-fit: cover;
            box-shadow: 8px 3px 6px #00000029;
            border: 3px solid #EDEDEB;
            border-radius: 4px;
            z-index: 5;
        }
    }

    .video-block {
        flex-basis: 50%;

        iframe {
            aspect-ratio: 16/9;
            width: 100%;
        }
    }
}

.design-block-image-content.home-page {
    .content-block {
        p {
            line-height: 2;
        }
    }
    .image-block {
        img {
            box-shadow: 8px 3px 6px #00000029;
            border: 3px solid #53ACB4;
            border-radius: 4px;
        }
    }
}

.design-block-iframe {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-block: 3rem;

    h2 {
        margin-bottom: 1rem;
        text-align: center;
    }

    iframe {
        aspect-ratio: 16/9;
        width: 100%;
    }
}

.content-block-icon-callouts,
.content-block-icon-column-callouts,
.content-block-image-callouts { 
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.content-block-icon-callouts {
    .content-block-icon-callout {
        flex: 0 1 32ch;

        img {
            height: 50px;
            width: 50px;
        }

        .content-block-icon-callout-title {
            font-weight: 600;
            color: var(--primary-color);
        }
    }
}

.content-block-icon-column-callouts {
    .content-block-icon-column-callout {
        flex: 1 1 min(100%, 250px);
        display: flex;
        gap: 1rem;

        img {
            height: 50px;
            width: 50px;
        }

        .content-block-icon-column-callout-title {
            font-weight: 600;
            color: var(--primary-color);
        }
    }
}

.content-block-image-callouts {
    .content-block-image-callout {
        box-shadow: 0px 8px 6px rgba(0, 0, 0, 0.16);
        flex: 1 1 min(100%, 250px);
        border-radius: 4px;
        min-height: 350px;

        @media screen and (min-width: 768px) {
            min-height: 500px;
        }
        transition: all 0.3s ease;
        background-position: center;
        background-size: cover;

        .green-background {
            background-color: rgba(4, 121, 64, 0.75);
            padding: 3rem;
            display: flex;
            flex-direction: column;
            justify-content: center;
            height: 100%;
            width: 100%;
            position: relative;
            text-decoration: none;
            border-radius: 4px;
        }

        .full-size-link {
            text-indent: -999%;
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }

        .content-block-image-callout-corner-top-left,
        .content-block-image-callout-corner-bottom-right {
            position: absolute;
            width: 40px;
            height: 40px;

            @media screen and (min-width: 768px) {
                width: 60px;
                height: 60px;
            }
        }

        .content-block-image-callout-corner-top-left {
            top: 24px;
            left: 24px;
        }

        .content-block-image-callout-corner-bottom-right {
            bottom: 24px;
            right: 24px;
            transform: rotate(180deg);
        }

        .content-block-image-callout-title {
            font-weight: 600;
            color: white;
            text-transform: uppercase;
        }

        .content-block-image-callout-title,
        .content-block-image-callout-text,
        .content-block-image-callout-button {
            margin-inline: .5rem;
            color: white;
        }

        .content-block-image-callout-button {
            text-decoration: underline;
        }

        .content-block-image-callout-text {
            margin-bottom: 1rem;
        }
    }

    .content-block-image-callout:hover {
        transform: translateY(5px);
        .green-background {
            background-color: var(--primary-color);
        }
    }
}

.content-block-common-questions {
    padding-block: 1rem;
    margin-block: 2rem;

    h2 {
        margin-bottom: 3rem;
        margin-top: 0;
    }
    
    details {
        border-top: 2px solid var(--secondary-color);
        padding: 2rem 1rem;
        color: var(--primary-color)!important;
  
        label {
            padding-right: 4rem;
        }
  
        span {
            font-size: 18px;
        }
    
        summary {
            justify-content: space-between;
    
            .h3 {
                font-size: 25px;
                font-weight: 500;
            }
        }
    }
}

.content-block-contact-callout {
    padding-inline: var(--gutter);
    padding-block: 4rem;
    margin-block: 4rem;
    background-color: #eeeeee;
}

.home-page-quick-links {
    background-color: var(--primary-color);
    color: white;    
}

.quick-links-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    width: 100%;
}

.quick-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    /* 2 columns on mobile */
    flex: 0 1 calc(50% - 1rem);
    max-width: 200px;
    position: relative;

    a {
        position: absolute;
        width: 100%;
        height: 100%;
        text-indent: -9999%;
    }

    .top-left-corner,
    .bottom-right-corner {
        position: absolute;
        opacity: 0;
        width: 40px;
        height: 40px;
        pointer-events: none;
        transition: all 0.3s ease;
    }

    .top-left-corner {
        top: -1.5rem;
        left: -1.5rem;
        transform: translate(0.5rem, 0.5rem);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .bottom-right-corner {
        bottom: -1.5rem;
        right: -1.5rem;
        transform: rotate(180deg) translate(0.5rem, 0.5rem);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
}

.quick-link-card:hover {
    transform: translateY(10px);

    .top-left-corner {
        opacity: 1;
        transform: translate(0, 0);
    }
    
    .bottom-right-corner {
        opacity: 1;
        transform: rotate(180deg) translate(0, 0);
    }
}

/* Image responsive sizing */
.quick-link-card img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.quick-link-card h4 {
    color: white;
    margin: 0;
    /* Ensure consistent height for alignment */
    min-height: 2.6em;
    display: flex;
    align-items: center;
}

/* Tablet styles */
@media (min-width: 768px) {
    .quick-links-container {
        gap: 2.5rem;
        
    }

    .quick-link-card {
        /* 3 columns on tablet */
        flex: 0 1 calc(33.333% - 2rem);
    }

    .quick-link-card img {
        width: 100px;
        height: 100px;
    }
}

/* Desktop styles */
@media (min-width: 1024px) {
    .quick-links-container {
        gap: 3rem;
        justify-content: space-between;
    }

    .quick-link-card {
        /* 5 columns on desktop */
        flex: 0 1 calc(20% - 2.4rem);
        max-width: 180px;
    }

    .quick-link-card img {
        width: 120px;
        height: 120px;
    }
}

/* Large desktop styles */
@media (min-width: 1200px) {
    .quick-link-card {
        max-width: 200px;
    }

    .quick-link-card img {
        width: 140px;
        height: 140px;
    }
}

/* V2 Updates

- CSS Variables
- Remove breakpoints

Questions:
- JS Break Out has to be included (modules scripts??)
*/

/* Fix for design-block-fw-paragraph becoming too narrow on large screens */
@media screen and (min-width: 1440px) {
  .design-block-fw-paragraph.home-page {
    /* Option 1: Fixed padding at large screens */
    padding-inline: 6rem;
  }
  
  /* Fix for image positioning at large screens */
  .design-block-fw-paragraph.home-page .top-left-image {
    left: 1rem;
  }
  
  .design-block-fw-paragraph.home-page .bottom-right-image {
    right: 1rem;
  }
}
