/* News Accordion Styles */

/* Collapse animation - CRITICAL: overflow hidden prevents text overlap during transition */
.MuiCollapse-root {
  overflow: hidden !important;
  transition: height 300ms cubic-bezier(0.4, 0, 0.2, 1), visibility 300ms;
}

.MuiCollapse-wrapper {
  overflow: hidden !important;
  transition: height 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.MuiCollapse-entered .MuiCollapse-wrapper {
  /* Keep overflow hidden during transition */
  overflow: hidden !important;
}

.MuiCollapse-hidden .MuiCollapse-wrapper {
  height: 0 !important;
  overflow: hidden !important;
}

/* Override portal-css classes for expanded state */
.MuiCollapse-entered.portal-css-c4sutr {
  visibility: visible !important;
  height: auto !important;
  overflow: hidden !important;
}

.MuiCollapse-hidden.portal-css-a0y2e3 {
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* Arrow rotation */
.MuiAccordionSummary-expandIconWrapper {
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
  transform: rotate(0deg);
}

.MuiAccordionSummary-expandIconWrapper.Mui-expanded {
  transform: rotate(180deg) !important;
}

/* All cards have white background to prevent text overlap */
.portal-css-g8l6az {
  position: relative;
  background: #ffffff;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 1px;
  transition: box-shadow 300ms ease, z-index 0ms;
  z-index: 1;
}

/* Selected/expanded card has higher z-index and shadow */
.portal-css-g8l6az.selected {
  z-index: 10;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

/* Collapsed items have lower z-index */
.portal-css-g8l6az:not(.selected) {
  z-index: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Reduce gap between cards */
.portal-css-1pfuoht .textCardContent {
  gap: 8px !important;
}

/* Show swiper pagination on mobile */
.portal-css-1pfuoht .swiperContent .swiper-pagination {
  display: flex !important;
  position: relative;
  margin: 12px auto 0px;
  justify-content: center;
  align-items: center;
}

/* Pagination bullet styling for mobile */
.portal-css-1pfuoht .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: #ccc;
  border-radius: 50%;
  margin: 0 4px !important;
  opacity: 0.5;
  transition: opacity 0.3s ease, width 0.3s ease;
  cursor: pointer;
}

.portal-css-1pfuoht .swiper-pagination-bullet-active {
  opacity: 1;
  width: 24px;
  border-radius: 4px;
  background: #00AE42;
}

/* Hide pagination on desktop (768px and above) */
@media (min-width: 768px) {
  .portal-css-1pfuoht .swiperContent .swiper-pagination {
    display: none !important;
  }
}
