.ECOTest {
    --bg-color: white;
    max-width: 95svw;
    * {
        max-width: 100%;
    }
    background-color: var(--bg-color);

    display: grid;
    grid-template-areas:
        "Header"
        "Overview"
        "Text"
        "End";
    justify-items: center;
}

.ecotest_top {
    grid-area: Header;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    width: 100%;
    margin-bottom: 1rem;
    margin-top: 1rem;
    gap: 1rem;
}

.ecotest_title {
    h3 {
        font-size: 1.5rem;
        margin: 0;
        padding: 0 0 0 .5rem;
    }
    hr {
        width: 100%;
        border: 1px solid black;
        margin: 0;
    }
}

.ecotest_header {
    width: 100%;
    margin: 0;
    padding: 1.5rem 1rem 1rem 1rem;
    background-color: #dae4ee;
    color: black;
    font-size: 1.5rem;

    display: grid;
    grid-template-areas:
        "logo space"
        "types space";
    grid-template-columns: 17.5rem auto;

    .ecotest_header_logo {
        display: flex;
        flex-direction: column;
        grid-area: logo;
    }

    .product-and-testtype {
        display: flex;
        flex-direction: row;
        grid-area: types;
        gap: .5rem;
    }

    p {
        grid-area: upper-left;
        font-size: 3rem;
        align-self: end;
        margin: 0;
        padding: 0;
    }

    .underline {
        grid-area: lower-left;
        font-size: 1.5rem;
        display: grid;
        grid-template-columns: auto auto;
        width: 100%;
        margin-top: .5rem;
    }
    .ecotest_parallelogram {
        width: 5.5rem;
    }

    .testtype {
        color: black;
        font-size: 1rem;
    }
    .producttype {
        color: black;
        font-size: 1rem;
    }
}

.ECOTestText {
    grid-area: Text;
    figure {
        display: grid;
        grid-template-areas: "image image"
                             "caption caption";
        grid-template-columns: auto auto;
        justify-content: center;
        justify-self: center;
        width: 95%;
        img {
            height: 10rem;
            object-fit: cover;
            padding: .2rem;
            
        }
        figcaption {
            grid-area: caption;
            font-size: 0.8rem;
            font-weight: lighter;
            font-style: italic;
        }
    }
}

.ECOTestOverview {
    grid-area: Overview;
    width: 20rem;
    align-items: center;
    display: flex;
    flex-direction: column;
    .ECOTestValueDevelopment {
        text-align: left;
        font-size: 1rem;
        justify-self: center;
        padding: 0.3rem;
    }

    .investment_duration {
        font-size: 1rem;
        justify-self: left;
        padding: 0.3rem;
        justify-self: center;
    }
    .grading_element_border {
        width: 20rem;
        background-color: #0e416f;
    }
    .grading {
        p {
            padding-left: 0.5rem;
            padding-right: 0.5rem;
            font-size: .9rem;
        }
        b {
            font-size: 1.1rem;
        }
        
        border-style: solid;
        border-color: #0e416f;
        border-width: 1px;
        row-gap: 1px;
        width: 20rem;
        display: grid;
        grid-template-areas: 
            "grade_total"
            "conclusion"
            "grade_sustainability"
            "grade_finances";

        * {
            list-style-type: none;
        }
        ul {
            margin: 0.5rem;
            padding: 0;
        }
    
        .partial_grades{
            font-size: 1rem;
            width: 19.5rem;
            padding: 0.5rem;
            .partial_grade {
                display: grid;
                grid-template-columns: 17.5rem 2rem;
                grid-template-areas: "category grade";
    
                .grade_category {
                    grid-area: category;
                    justify-self: start;
                }
                .grade_grade {
                    grid-area: grade;
                    justify-self: "end";
                }
            }
            hr {
                margin: 0;
                border: 0;
                border-top: 1px solid black;
            }
        }
    
        .conclusion {
            grid-area: conclusion;
            background-color: var(--white);
            p {
                font-size: 1.1rem;
            }
        }
        .grade_total {
            background-color: white;
            grid-area: grade_total;
        }
        .grade_sustainability {
            grid-area: grade_sustainability;
            background-color: #e4eed7;
            ul {
                background-color: #e4eed7;
            }
            
        }
        .grade_finances {
            grid-area: grade_finances;
            background-color: #dde3ee;
            ul {
                background-color: #dde3ee;
            }
        }
    
        .scale {
            color: white;
            display: grid;
            justify-items: center;
            grid-template-columns: repeat(6, auto [col-start]);
            background-image: linear-gradient(to right, #096829, #8bbe4f, #d77a52, #bd2c39, #993a31, #340101);
        }
    }
    .grading_pointer_container {
        font-size: 1rem;
        height: 1rem;
        position: relative;
        top: -0.7rem;
        filter: drop-shadow(3px 3px 5px rgb(20, 20, 20));
    }
    .stamp {
        width: 20rem;
        object-fit: contain;
        margin-bottom: 1rem;
    }
    .strengths_weaknesses {
        width: 20rem;
        border-style: solid;
        border-color: #0e416f;
        background-color: #0e416f;
        border-width: 1px;
        margin-bottom: 0.3rem;
    
        .category {
            padding: 0.5rem;
            background-color: white;
            display: grid;
            grid-template-areas:
                "values image";
            grid-template-columns: auto auto;

            border-width: 1px;
            row-gap: 1px;
            .attributes {
                grid-area: values;
                justify-self: start;
                ul {
                    margin: 0;
                    padding: 0 0 0 20px  ;
                }

                li::marker {
                    color: #0e416f;
                }
            }
            img {
                grid-area: image;
                justify-self: end;
                height: 3rem;
                object-fit: contain;
            }
        }
    }
    .fonddata_table {
        width: 20rem;
        border-style: solid;
        border-color: #505050;
        border-width: 1px;
        padding: 0.5rem;
        margin-bottom: 1rem;

        * {
            color: #505050;
            font-size: 0.9rem;
        }
        hr {
            margin: 0;
        }
    
        .partial_data {
            display: grid;
            grid-template-areas: "name value";
    
            .fonddata_name {
                grid-area: name;
                justify-self: start;
            }
            .fonddata_value {
                grid-area: value;
                justify-self: end;
                text-align: end;
            }
        }
    }
}


.ECOTestDisqualifyingCriterion {
    grid-area: Text;
}

@media only screen and (min-width: 440px) {
    .ecotest_header {
        grid-template-areas:
            "logo types";
        grid-template-columns: 17.5rem auto;
    
        .product-and-testtype {
            flex-direction: column;
            gap: 0;
            text-align: right;
        }
    }
}

/* Medium devices (landscape tablets, 768px and up) */
@media only screen and (min-width: 640px) {
    .ecotest_header {
        .producttype {
            font-size: 1.5rem;
        }
        .testtype {
            font-size: 1.5rem;
        }
    }
}

/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) {
    .ECOTest {
        grid-template-areas:
            "Header Header"
            "Text Overview"
            "End End";
        grid-template-columns: 45% 50%;
        justify-content: space-between;
        column-gap: 2rem;
        .ECOTestDisqualifyingCriterion {
            justify-self: left;
        }

        .ecotest_header {
            grid-column: 1/span 2;
            padding: 1.5rem 2.5rem 1rem 2.5rem;
            grid-template-columns: 17.5rem auto;
        }
    }
}

/* Extra large devices (large laptops and desktops, 1200px and up) */
@media only screen and (min-width: 1200px) {
    .ECOTest {
        grid-template-columns: 58% 38%;
    }
}