section.faq {
    margin: var(--margin-y-mobile) auto;
    padding: 0 var(--margin-x-mobile);
}

/*section.faq.with-background {
    padding: var(--margin-y-mobile) var(--margin-x-mobile);
}*/

section.faq ul {
    list-style-type: none;
    padding: 0;
    margin: 0 auto;
}

section.faq .heading-2 {
    margin-bottom: 40px; /*replace with spacing var?*/
}


section.faq .heading-4 {
    margin-bottom: 44px; /*replace with spacing var?*/
    padding-top: 24px; /*replace with spacing var?*/
}


/* TABS */

section.faq ul.tab {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

section.faq .tab button {
    font-family: VestasSansMedium;
    display: inline;
    padding: 15px 1rem 12px;
    border: 1px solid gray;
    border-radius: 6px; 
    background-color: white;
    color: gray;
    text-decoration: none;
    cursor: pointer;
}

section.faq .tab button:hover {
  background-color: #f0f0f0; 
}

section.faq .tab .selected button {
    background-color: var(--brand-color);
    border-color: var(--brand-color);
    color: white;
}


/* CATEGORIES */

section.faq .category {
    display: none;
    margin-top: 44px;
}

section.faq .category.selected {
    display: block;
}

section.faq > .category > ul > li.question {
    border-bottom: 1px solid black;
    padding-block: 30px 26px;
    padding-inline: 24px;
    flex-direction: column;
}

section.faq > .category > ul > li > button {
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 30px;
    justify-content: space-between;
    margin: 0;
    cursor: pointer;
    width: -moz-available;
    width: -webkit-fill-available;
    width: fill-available;
}

section.faq .category ul > li.question > button > p {
    margin: 0;
    text-align: left;
    color: var(--font-color);
}

section.faq .category ul > li.question > button > object {
    width: 38px;
    height: 38px;
    filter: var(--primary-filter-color);
}

section.faq .category ul > li.question > button > object:target-within > svg {
    color: red;
}

section.faq .category ul > li.question > button > object {
    position: absolute;
    left: -999px;
}

section.faq .category ul > li.question.active > button > object.closed {
    position: absolute;
}

section.faq .category ul > li.question.active > button > object.open {
    position:static;
}

section.faq .category ul > li.question > button > object.open {
    position: absolute;
}

section.faq .category ul > li.question > button > object.closed {
    position:static;
}

section.faq a:link,
section.faq a:visited,
section.faq a:active {
    color: var(--text-link-color);
}


section.faq a:hover {
    color: var(--font-color);
}

section.faq .category ul > li:first-child {
    border-top: 1px solid black;
}

section.faq .category ul > li > :nth-child(2) {
    max-height: 0;
    transition: max-height 0.1s ease-out;
    overflow: hidden;
    margin-top: 24px;
}

section.faq .category ul > li.active > :nth-child(2) {
    max-height: 1000px;
    transition: max-height 0.3s ease-in-out;
}

section.faq .category ul > li.active {
    padding-bottom: 50px;
}




@media screen and (min-width: 700px) {
    
    section.faq {
        margin-top: var(--margin-y-desktop);
        padding: 0 16%;
        max-width: 933px;
    }
    
    section.faq.with-background {
        padding: var(--margin-y-mobile) var(--margin-x-desktop);
    }
    
    section.faq > div > p {
        width: 50%;
    }
    
    section.faq > div > ul {
        flex-direction: column;
    }
    
    section.faq > .category > ul > li.question {
        padding-inline: 10%;
    }
    
    section.faq > div > ul > li.active {
        padding-bottom: 50px;
    }
    
    section.faq > div > ul > li > button > object {
        width: 48px;
    }
    
}

@media screen and (min-width: 1500px ) {
    section.faq > div {
        max-width: var(--max-width);
        
    }
}