/* ----------------------------------
   RESPONSIVE TWEAKS
------------------------------------- */
@media (min-width: 991.5px) {
  .order-2 {
    order: unset !important;
  }
}

@media (max-width: 991.5px) {
  .col-sm-3 {
    width: 100% !important;
  }
}

/* ----------------------------------
   ACCORDION STYLES
------------------------------------- */

/* Accordion Container */
.accordion {
  max-width: 800px;
  margin: 0 auto;
}

/* Accordion Item */
.accordion-item {
  margin-bottom: 0.5rem; /* Tight spacing between items */
  border: 1px solid #ccc;
  overflow: hidden;
}

/* Remove unnecessary <p> tags wrapping headers or content */
.accordion-item > p {
  display: contents; /* Removes unnecessary visual impact of <p> tags */
}

/* Accordion Header */
.accordion-header {
  background: var(--gt-warm-grey-light); /* Light background color */
  padding: 0.5rem;
  font-size: 1rem;
  font-weight: normal; /* Not bold by default */
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  border: none;
  width: 100%;
  outline: none;
  color: var(--gt-black);
  transition: background 0.2s ease-in-out, color 0.2s ease-in-out;
  position: relative;
  display: flex;
  align-items: center; /* Center text and chevron vertically */
}

/* Chevron Icon */
/* Chevron on the Left - GT Style */
.accordion-header::before {
  content: '';
  display: inline-block;
  width: 0.5rem; /* Narrower width */
  height: 1rem; /* Reduced height for thinner appearance */
  margin-right: 10px; /* Space between chevron and text */
  background-image: url('/themes/contrib/gt_theme/templates/block/accordion/images/gt-gold-chevron.svg'); /* Path to chevron image */
  background-size: 100% auto; /* Adjusted to make the chevron less thick */
  background-repeat: no-repeat;
  background-position: center; /* Center the chevron in its container */
  flex-shrink: 0; /* Prevent resizing in flex layouts */
  transition: transform 0.3s ease, background-image 0.3s ease;
}


/* Hover State for Header */
.accordion-header:hover {
  background: var(--gt-gold);
  color: var(--gt-black);
}

/* Hover State for Chevron */
.accordion-header:hover::before {
  background-image: url('/themes/contrib/gt_theme/templates/block/accordion/images/gt-black-chevron.svg');
}

/* Active State (Header Clicked/Open) */
.accordion-header.active {
  background: var(--gt-gold);
  color: var(--gt-black);
}

.accordion-header.active::before {
  transform: rotate(90deg); /* Rotate chevron */
  background-image: url('/themes/contrib/gt_theme/templates/block/accordion/images/gt-black-chevron.svg');
}

/* Accordion Content (Collapsed by Default) */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  background: var(--gt-white);
  line-height: 1.4;
  padding: 0 0.5rem; /* Side padding for consistent spacing */
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

/* When Accordion Content is Open */
.accordion-content.open {
  max-height: none; /* Allow full expansion */
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/* Paragraph Styling within Accordion Content */
.accordion-content p {
  margin: 2px 0; /* Reduced margin between paragraphs */
  font-size: 1rem;
  color: var(--gt-black);
}

/* Last Accordion Container Margin */
.accordion:last-of-type {
  margin-bottom: 2px;
}

/* Accessibility Focus State for Header */
.accordion-header:focus {
  outline: 2px solid var(--gt-gold);
  outline-offset: 2px;
}
