/*
==========================================================================
    Component: Multi-Level Content
==========================================================================
*/

/* --- Parent Content Styles --- */

.content-segment-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2em;
}

.content-segment-item {
    display: flex;
    flex-direction: column;
}

.content-segment-title-row {
    display: flex;
    align-items: baseline;
}

.content-segment-number {
    width: 2em;
    text-align: right;
    white-space: nowrap;
    flex-shrink: 0;
    margin-right: 0.5em;
}

.content-segment-header {
    margin: 0;
}

.content-segment-summary {
    margin-left: calc(2em + 3.5em);
    margin-top: 1em;
    margin-bottom: 0.5em;
    width: 84%;
}

.content-segment-description {
    margin-left: calc(2em + 4em);
    margin-top: 0em;
    margin-bottom: 0.5em;
    width: 84%;
}

.segment-number {
    /* color inherited from design system classes */
    font-weight: normal;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 0em;
}


/* --- Sub-Segment Accordion Styles --- */

.sub-segment-accordion {
    margin-left: calc(2em + 4em);
}

.sub-segment-accordion .accordion-item {
    border: none;
    padding-top: 1.2em;
    border-bottom: 1px solid #e0e0e0;
}

.sub-segment-accordion .accordion-item:first-child {
    padding-top: 0em;
}

.sub-segment-accordion .accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    cursor: pointer;
    padding-bottom: 0.6em;
    background: none;
    transition: background-color 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-icon {
    font-size: 2.5em;
    line-height: 1;
    transition: transform 0.3s ease, color 0.3s ease;
    color: var(--e-global-color-d461ad2); /* Use design system grey-700 */
    padding-right: 0em;
}

.accordion-item.active .accordion-icon {
    transform: rotate(45deg);
    color: var(--e-global-color-d4bf8da); /* Use design system grey-900 (black) */
}

.accordion-header:hover {
    background: none;
}

.sub-segment-accordion .accordion-header h4,
.sub-segment-accordion .segment-title h4 {
  font-weight: normal;
  margin: 0;
  /* color inherited from design system classes */
}
.accordion-title {
    display: flex;
    align-items: flex-start;
    gap: 0px;
    /* color inherited from design system classes */
    font-weight: normal;
    margin: 0;
    padding-right: 0.7em;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease-out, opacity 0.6s ease-out;
    color: var(--e-global-color-f010e7e); /* Use design system grey-500 */
    padding: 0;
}

.accordion-item.active .accordion-content {
    opacity: 1;
}

.accordion-header .header-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 10px;
}

/* Default State: Lighter grey for inactive state */
.sub-segment-accordion .accordion-header .accordion-title,
.sub-segment-accordion .accordion-header .segment-number,
.sub-segment-accordion .accordion-header .segment-header {
  color: var(--e-global-color-f010e7e) !important; /* Use design system grey-500 (lighter) for default */
}

/* Hover State: Black on hover */
.sub-segment-accordion .accordion-header:hover .accordion-title,
.sub-segment-accordion .accordion-header:hover .segment-number,
.sub-segment-accordion .accordion-header:hover .segment-header,
.sub-segment-accordion .accordion-header:hover .accordion-icon {
  color: var(--e-global-color-d4bf8da) !important; /* Use design system grey-900 (black) */
}

/* Active State: Black when active */
.sub-segment-accordion .accordion-item.active .accordion-header .accordion-title,
.sub-segment-accordion .accordion-item.active .accordion-header .segment-number,
.sub-segment-accordion .accordion-item.active .accordion-header .segment-header {
  color: var(--e-global-color-d4bf8da) !important; /* Use design system grey-900 (black) */
}


/* --- Responsive Styles for Component --- */

@media (max-width: 767px) {
    .content-segment-number {
        width: 1em;
        margin-right: 0.5em;
    }

    .content-segment-summary {
        margin-left: calc(2em + 0.8em);
        width: 84%;
    }

    .content-segment-description {
        margin-left: calc(2em + 1.1em);
        width: 84%;
    }

    .sub-segment-accordion {
        margin-left: calc(2em + 0.8em);
        padding-bottom: 0.2em;
    }

    .segment-number {
        min-width: 2em;
    }

    .accordion-title {
        gap: 17px;
    }

    .accordion-header {
        padding-bottom: 0em;
    }

    .accordion-content {
        width: 100%;
        padding-left: 4.2em;
        padding-top: 0.2em;
        padding-bottom: 0.8em;
    }

    /* .sub-segment-accordion .accordion-header h4.accordion-title styles now inherited from design system classes */
    
}

@media (min-width: 768px) and (max-width: 1141px) {
    .content-segment-number {
        width: 1em;
        margin-right: 0.5em;
    }

    .content-segment-summary {
        margin-left: calc(2em + 1.1em);
        width: 84%;
    }

    .content-segment-description {
        margin-left: calc(2em + 1.1em);
        width: 84%;
    }

    .sub-segment-accordion {
        margin-left: calc(2em + 1.1em);
        padding-right: 1em;
    }

    .segment-number {
        min-width: 2em;
    }

    .accordion-header {
        padding-bottom: 0em;
    }

    .accordion-content {
        width: 88%;
        padding-left: 3.3em;
        padding-top: 0.2em;
        padding-bottom: 0.8em;
    }
    
    .accordion-icon {
        margin-right: 0.4em;
    }

    /* .sub-segment-accordion .accordion-header h4.accordion-title styles now inherited from design system classes */
}

@media (min-width: 1142px) and (max-width: 1600px) {
    .content-segment-summary {
        width: 84%;
    }
    .content-segment-description {
        width: 84%;
    }

    .sub-segment-accordion {
        padding-right: 1em;
    }

    .segment-number {
        min-width: 2em;
    }

    .accordion-header {
        padding-bottom: 0em;
    }

    .accordion-icon {
        margin-right: 0.4em;
    }

    .accordion-content {
        width: 92%;
        padding-left: 3.7em;
        padding-top: 0.2em;
        padding-bottom: 0.8em;
    }

    /* .sub-segment-accordion .accordion-header h4.accordion-title styles now inherited from design system classes */
}

@media (min-width: 1601px) {
    .content-segment-summary {
        width: 84%;
    }
    .content-segment-description {
        width: 84%;
    }

    .sub-segment-accordion {
        padding-right: 1em;
    }

    .segment-number {
        min-width: 2em;
    }

    .accordion-header {
        padding-bottom: 0em;
    }

    .accordion-icon {
        margin-right: 0.4em;
    }

    .accordion-content {
        width: 92%;
        padding-left: 3.8em;
        padding-top: 0.3em;
        padding-bottom: 0.8em;
    }

    /* .sub-segment-accordion .accordion-header h4.accordion-title styles now inherited from design system classes */
}