/* Grid wrapper: 3 across, centered remainder */
.custom-pages-accordion {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1em;
}
.custom-pages-accordion .accordion-item {
  flex: 0 0 calc(33.333% - 1em);
}

/* Container */
/* no border when closed */
.accordion-item {
  border: none;
  border-radius: 12px;
  max-width: 500px;
  margin: 0 auto;
}

/* when its panel is open, wrap the whole item in a border */
.accordion-item:has(.accordion-panel.open) {
  border: 1px solid #ccc;
  border-radius: 12px;
}

.my-accordion:has(.accordion-panel.open) {
  border-radius: 12px 12px 0 0;
}

/* Accordion header as a pill */
.my-accordion .accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid #b3b3b3;
  border-radius: 12px;
  padding: 0 1.5em;
  height: 60px;
  font-size: 1.125rem;
  cursor: pointer;
  transition: background .2s, border-color .2s;
  box-shadow: 0 0 50px rgba(0,0,0,.1);
  margin-bottom: 0;
}

/* Header button */
.accordion-header button {
  background: none;
  border: none;
  font-size: 17px;
  font-weight: 300;
  text-align: left;
  flex: 1;
}

/* Arrow */
.my-accordion .accordion-header .arrow {
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  border-right: 4px solid #000;
  border-bottom: 4px solid #000;
  transform: rotate(45deg);
  transition: transform .3s ease;
  margin-left: 1em;
}
.my-accordion .accordion-header.active .arrow {
  transform: rotate(-135deg);
}

/* Panel */
.my-accordion .accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease, padding .3s ease;
  border-top: none;
  border-radius: 0 0 12px 12px;
  margin-top: -1px;
  padding: 0 1em;
}
.my-accordion .accordion-panel.open {
  max-height: 300px;
  padding: 1em;
}
.my-accordion ul {
    list-style-type: none;
    padding-left: 12px;
}
.my-accordion li {
    padding: 10px 0px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #e9e9e9;
}
.my-accordion a {
    color: #000000;
    font-size: 17px;
}
/* Scroll */
.my-accordion .accordion-panel {
  overflow-y: auto;
}

@media (max-width:767px){
	.custom-pages-accordion {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    flex-direction: column;
	gap: 1em;
}
}