/* WILA Course Curriculum Accordion
 * Structural CSS lives here; colors/spacing/typography are Elementor-
 * controlled via CSS custom properties and direct selectors set from
 * the widget's Style tab.
 */

.wila-course-curriculum {
    width: 100%;
    --wila-cc-radius: 11px;
    --wila-cc-border-color: #e1e5e9;
    --wila-cc-active-border-color: #ffd3ae;
    --wila-cc-duration: 350ms;
    box-sizing: border-box;
}

.wila-course-curriculum * {
    box-sizing: border-box;
}

.wila-cc-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wila-cc-item {
    width: 100%;
}

/* ---------- Header / card ---------- */
.wila-cc-header {
    position: relative;
    width: 100%;
    min-height: 72px;
    padding: 0 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    border: 1px solid var(--wila-cc-border-color);
    border-radius: var(--wila-cc-radius);
    background: #ffffff;

    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.025),
        0 5px 15px rgba(0, 0, 0, 0.025);

    cursor: pointer;
    font-family: inherit;
    text-align: left;

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}

.wila-cc-header:hover {
    border-color: var(--wila-cc-active-border-color);
    box-shadow:
        0 3px 8px rgba(0, 0, 0, 0.04),
        0 8px 20px rgba(0, 0, 0, 0.035);
}

.wila-cc-header:focus-visible {
    outline: 2px solid var(--wila-cc-active-border-color);
    outline-offset: 2px;
}

.wila-cc-item.active > .wila-cc-header {
    border-color: var(--wila-cc-active-border-color);
}

/* ---------- Title ---------- */
.wila-cc-title {
    display: block;
    color: #071a3d;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    text-align: left;
}

/* ---------- Badge ---------- */
.wila-cc-preview {
    flex-shrink: 0;
    min-width: 81px;
    height: 36px;
    padding: 0 16px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #ffd0a9;
    border-radius: 20px;
    background: #fff8f1;
    color: #ff6815;

    font-size: 12px;
    font-weight: 600;
    line-height: 1;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease;
}

.wila-cc-item.active .wila-cc-preview {
    border-color: #ffab6b;
    background: #ffa15f;
    color: #ffffff;
}

/* ---------- Content (grid-rows expand trick) ---------- */
.wila-cc-content {
    display: grid;
    grid-template-rows: 0fr;
    overflow: hidden;
    opacity: 0;

    transition:
        grid-template-rows var(--wila-cc-duration) ease,
        opacity calc(var(--wila-cc-duration) * 0.7) ease;
}

.wila-cc-item.active .wila-cc-content {
    grid-template-rows: 1fr;
    opacity: 1;
}

.wila-cc-content-inner {
    min-height: 0;
    overflow: hidden;

    padding: 0 22px;

    border-left: 1px solid var(--wila-cc-border-color);
    border-right: 1px solid var(--wila-cc-border-color);
    border-bottom: 1px solid var(--wila-cc-border-color);
    border-radius: 0 0 var(--wila-cc-radius) var(--wila-cc-radius);

    background: #ffffff;
    color: #202b3d;

    font-size: 14px;
    line-height: 1.65;
}

.wila-cc-item.active .wila-cc-content-inner {
    padding-top: 20px;
    padding-bottom: 20px;
}

/* ---------- Content text ---------- */
.wila-cc-content-inner p {
    margin: 0 0 10px;
}

.wila-cc-content-inner p:last-child {
    margin-bottom: 0;
}

.wila-cc-content-inner strong {
    color: #071a3d;
    font-weight: 700;
}

.wila-cc-content-inner ul,
.wila-cc-content-inner ol {
    margin: 0 0 18px;
    padding-left: 20px;
}

.wila-cc-content-inner li {
    margin-bottom: 5px;
}

.wila-cc-content-inner ul:last-child,
.wila-cc-content-inner ol:last-child {
    margin-bottom: 0;
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
    .wila-cc-list {
        gap: 10px;
    }

    .wila-cc-header {
        min-height: 62px;
        padding: 0 14px;
        gap: 12px;
    }

    .wila-cc-title {
        font-size: 13px;
    }

    .wila-cc-preview {
        min-width: 72px;
        height: 32px;
        padding: 0 12px;
        font-size: 11px;
    }

    .wila-cc-content-inner {
        padding-left: 16px;
        padding-right: 16px;
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wila-cc-content,
    .wila-cc-header,
    .wila-cc-preview {
        transition: none;
    }
}
