.accordion {
margin: 3rem auto;
width: 65%;
}
.toggle {
display: none;
}
.option {
position: relative;
}
.title, .content {
backface-visibility: hidden;
transform: translateZ(0);
transition: all 0.2s;
}
.title {
font-weight: 600;
padding: 1.5rem .5rem;
display: block;
color: #7a7572;
border-bottom: 1px solid black;
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: center;
}
.option:first-child .title {
border-top: 1px solid black;
}
.content {
max-height: 0;
overflow: hidden;
margin-bottom: 0.25rem;
}
.content p {
padding: 1.2rem 1.5rem;
line-height: 1.5;
font-style: italic;
}
.accordion .title {
transition: color .4s;
}
.accordion .title:hover {
color: var(--main-gold);
}
.toggle + label svg,
.toggle:checked + label svg {
transition: all .4s;
}
.toggle:checked + label svg {
transform: rotate(90deg) !important;
}
.toggle:checked + .title, .toggle:checked + .title + .content {
box-shadow: 3px 3px 6px #ddd, -3px 3px 6px #ddd;
}
.toggle:checked + .title + .content {
max-height: 5000px;
} @media all and (max-width: 900px) {
.toggle+ label svg {
display: none;
}
.toggle:checked + .title:before {
transform: rotate(90deg) !important;
}
.title {
padding-left: 3rem;
}
.title:after, .title:before {
content: '';
position: absolute;
left: 1.25rem;
top: 1.25rem;
width: 2px;
height: 0.75rem;
background-color: #7a7572;
transition: all .4s;
}
.title:after {
transform: rotate(90deg);
}
.accordion .title:after,
.accordion .title:before {
top: 30px;
}
.accordion {
width: 85%;
}
}
@media all and (max-width: 650px) {
.accordion {
width: 95%;
}
}