.accordion {
margin: 3rem auto;
width: 65%;
}
.toggle {
display: none;
}
.option {
position: relative;
}
.title, .content {
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
-webkit-transform: translateZ(0);
transform: translateZ(0);
-webkit-transition: all 0.2s;
-o-transition: all 0.2s;
transition: all 0.2s;
}
.title {
font-weight: 600;
padding: 1.5rem .5rem;
display: block;
color: #7a7572;
border-bottom: 1px solid black;
cursor: pointer;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
-webkit-box-align: center;
-ms-flex-align: center;
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 {
-webkit-transition: color .4s;
-o-transition: color .4s;
transition: color .4s;
}
.accordion .title:hover {
color: var(--main-gold);
}
.toggle + label svg,
.toggle:checked + label svg {
-webkit-transition: all .4s;
-o-transition: all .4s;
transition: all .4s;
}
.toggle:checked + label svg {
-webkit-transform: rotate(90deg) !important;
-ms-transform: rotate(90deg) !important;
transform: rotate(90deg) !important;
}
.toggle:checked + .title, .toggle:checked + .title + .content {
-webkit-box-shadow: 3px 3px 6px #ddd, -3px 3px 6px #ddd;
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 {
-webkit-transform: rotate(90deg) !important;
-ms-transform: rotate(90deg) !important;
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;
-webkit-transition: all .4s;
-o-transition: all .4s;
transition: all .4s;
}
.title:after {
-webkit-transform: rotate(90deg);
-ms-transform: rotate(90deg);
transform: rotate(90deg);
}
.accordion .title:after,
.accordion .title:before {
top: 30px;
}
.accordion {
width: 85%;
}
}
@media all and (max-width: 650px) {
.accordion {
width: 95%;
}
}