/**
 * AlloDentiste Services Accordion Widget – Stylesheet
 */

/* ============================================================
   Outer wrapper
   ============================================================ */
.allo-services-accordion-widget {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px var(--allo-gutter);
    box-sizing: border-box;
}

/* ============================================================
   Full-width header row
   ============================================================ */
.sa-header-row {
    margin: 0 0 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ============================================================
   Two-column inner layout
   ============================================================ */
.sa-inner {
    display: flex;
    align-items: flex-start;
    gap: 40px;
}

/* Reverse columns when image-right option chosen */
.sa-inner.sa-image-right {
    flex-direction: row-reverse;
}

/* ============================================================
   Left column
   ============================================================ */
.sa-left-col {
    flex: 0 0 40%;
}

.sa-heading {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: #1A1A1A;
    line-height: 1.2;
}

.sa-body {
    margin: 0;
}

.sa-body p {
    margin: 0 0 0.75em;
    font-size: 0.9375rem;
    color: #666666;
    line-height: 1.7;
}

.sa-body p:last-child {
    margin-bottom: 0;
}

.sa-image-wrap {
    flex: 1;
    min-height: 0;
}

.sa-image {
    display: block;
    width: 100%;
    min-height: 460px;
    object-fit: cover;
    border-radius: 12px;
}

/* ============================================================
   Right column – teal panel
   ============================================================ */
.sa-right-col {
    flex: 1 1 0;
    min-width: 0;
    background-color: #DCF0F2;
    border-radius: 16px;
    padding: 32px;
    box-sizing: border-box;
}

/* ============================================================
   Accordion list
   ============================================================ */
.sa-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ============================================================
   Accordion item card
   ============================================================ */
.sa-item {
    background-color: #ffffff;
    border: 1px solid #E0E0E0;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.25s ease;
}

.sa-item:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
}

/* ============================================================
   Item header (button row)
   ============================================================ */
.sa-item-header {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 16px 18px;
    gap: 14px;
    background: transparent !important;
    background-color: transparent !important;
    border: none;
    border-radius: 0;
    box-shadow: none !important;
    cursor: pointer;
    text-align: left;
    -webkit-appearance: none;
    appearance: none;
    color: inherit !important;
    font-family: inherit;
    outline: none;
}

.sa-item-header:hover,
.sa-item-header:focus,
.sa-item-header:active,
.sa-item-header:focus-visible {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    color: inherit !important;
    border-color: transparent !important;
    outline: none;
}

/* ============================================================
   Number badge
   ============================================================ */
.sa-badge {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    background-color: #00A1AD;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ============================================================
   Item title
   ============================================================ */
.sa-item-title {
    flex: 1;
    min-width: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1A1A1A;
    line-height: 1.4;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ============================================================
   Chevron
   ============================================================ */
.sa-chevron {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666666;
    transition: transform 0.3s ease;
}

.sa-item.is-open .sa-chevron {
    transform: rotate(180deg);
}

/* ============================================================
   Accordion body – CSS grid collapse
   ============================================================ */
.sa-item-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s ease;
    border-top: 1px solid transparent;
}

.sa-item.is-open .sa-item-body,
.sa-item-body:not([hidden]) {
    grid-template-rows: 1fr;
    border-top-color: #E0E0E0;
}

.sa-item-body[hidden] {
    display: none !important;
}

.sa-item-body-inner {
    overflow: hidden;
    padding: 16px 18px 18px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

/* ============================================================
   Description text
   ============================================================ */
.sa-description {
    flex: 1;
    min-width: 0;
}

.sa-description p {
    margin: 0 0 0.75em;
    font-size: 0.875rem;
    color: #444444;
    line-height: 1.7;
}

.sa-description p:last-child {
    margin-bottom: 0;
}

/* ============================================================
   Thumbnail
   ============================================================ */
.sa-thumbnail {
    flex: 0 0 130px;
    width: 130px;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    align-self: flex-start;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
    .sa-inner {
        gap: 28px;
    }

    .sa-left-col {
        flex: 0 0 38%;
    }
}

@media (max-width: 768px) {
    .allo-services-accordion-widget {
        padding: 40px var(--allo-gutter);
    }

    .sa-inner,
    .sa-inner.sa-image-right {
        flex-direction: column;
        gap: 32px;
    }

    .sa-left-col {
        flex: unset;
        width: 100%;
    }

    .sa-image {
        min-height: 260px;
    }

    .sa-right-col {
        width: 100%;
        padding: 24px 20px;
    }

    .sa-heading {
        font-size: 1.625rem;
    }

    .sa-item-body-inner {
        flex-direction: column;
    }

    .sa-thumbnail {
        width: 100%;
        flex: unset;
    }
}
