/* Editor overflow fix for what you'll learn block */
.block-editor-block-list__layout .what-youll-learn-block,
.editor-styles-wrapper .what-youll-learn-block,
.wp-block-acf-what-you-ll-learn .what-youll-learn-block {
    max-width: 100%;
    overflow-x: hidden;
}

.what-youll-learn-block {
    background-color: var(--color-surface-muted);
    padding: 0;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.what-youll-learn-content {
    max-width: 100%;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    min-width: 0;
}

/* Left Column - Dark Green Background */
.what-youll-learn-left {
    background-color: var(--color-green-dark);
    /* Dark green background */
    padding: 6.25rem 4rem 6.25rem 9.375rem;
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
    width: 100%;
    color: var(--color-white);
}

/* Align content with 1728px container on large screens */
@media (min-width: 1729px) {
    .what-youll-learn-left {
        padding-left: calc((100vw - 108rem) / 2 + clamp(6rem, 15.046vw, 16.25rem));
    }
}

/* Match hero-text-column left padding logic */
@media (min-width: 1541px) and (max-width: 1728px) {
    .what-youll-learn-left {
        padding-left: clamp(6rem, 15.046vw, 16.25rem);
    }
}

@media (min-width: 1281px) and (max-width: 1540px) {
    .what-youll-learn-left {
        padding-left: 9.375rem;
    }
}

.what-youll-learn-heading {
    font-size: 2rem;
    font-weight: 400;
    color: var(--color-white);
    margin: 0 0 1.5rem 0;
    line-height: 2.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-family: 'Outfit';
}

.what-youll-learn-description {
        font-size: 1rem;
    color: var(--color-white);
    margin: 0 0 2rem 0;
    line-height: 1.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-family: 'Outfit';
    font-weight: 300;
}

.what-youll-learn-separator {
    width: 100%;
    height: 0.0625rem;
    /* background-color: var(--color-white); */
    background-color: var(--color-gray-border);
    margin: 0 0 2rem 0;
}

.what-youll-learn-points {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* gap: 24px; */
    gap: 2rem;
    margin-bottom: 3.75rem;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.what-youll-learn-points-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.what-youll-learn-point {
    font-size: 1rem;
    color: var(--color-white);
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.what-youll-learn-button {
    display: inline-flex;
    align-items: center;
    width: 12.5rem;
    height: 3.5rem;
    gap: 0.5rem;
    background-color: var(--color-white);
    color: var(--color-green-primary);
    border: 0.09375rem solid;
    border-color: currentColor;
    border-radius: 6.25rem;
    padding: 0.875rem 1.5rem 0.875rem 2rem;
    font-size: 1.125rem;
    font-weight: 500;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
    box-sizing: border-box;
    opacity: 1;
}

.what-youll-learn-button:hover {
    background-color: var(--color-surface-muted);
    color: var(--color-green-primary);
}

.what-youll-learn-button:focus-visible {
    outline: 3px solid var(--color-white);
    outline-offset: 4px;
    box-shadow: 0 0 0 0.1875rem rgba(255, 255, 255, 0.3);
}

.what-youll-learn-button i {
    font-size: 0.98125rem;
    line-height: 1;
    display: inline-block;
    padding-left: 0.25rem;
}

/* Right Column - Light Gray Background */
.what-youll-learn-right {
    background-color: var(--color-surface-muted);
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    width: 100%;
    aspect-ratio: 864 / 782;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    min-width: 0;
    min-height: 0;
    position: relative;
    align-self: stretch;
}

.what-youll-learn-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    min-width: 0;
    min-height: 100%;
}

.what-youll-learn-image-placeholder {
    color: var(--color-text-caption);
    font-size: 1.2rem;
    font-weight: 500;
}

/* Block Alignment Support */
.what-youll-learn-block.alignwide {
    max-width: 75rem;
    margin-left: auto;
    margin-right: auto;
}

.what-youll-learn-block.alignfull {
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* Fix for editor - prevent overflow */
.block-editor-block-list__layout .what-youll-learn-block.alignfull,
.editor-styles-wrapper .what-youll-learn-block.alignfull,
.wp-block-acf-what-you-ll-learn .what-youll-learn-block.alignfull {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}


@media (min-width: 1579px) {
    .what-youll-learn-points-column {
        max-width: 96%;
    }
}


/* Responsive Design */
@media (min-width: 1025px) and (max-width: 1280px) {
    .what-youll-learn-left {
        padding: 6.25rem min(3.75rem, 5vw) 6.25rem 5rem;
        max-width: 100%;
        box-sizing: border-box;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .what-youll-learn-content {
        grid-template-columns: 1fr 1fr;
    }

    .what-youll-learn-left {
        padding: 5rem min(3.125rem, 6vw) 5rem 3.125rem;
        max-width: 100%;
        box-sizing: border-box;
    }

    .what-youll-learn-points {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .what-youll-learn-content {
        grid-template-columns: 1fr;
        max-width: 100%;
        overflow-x: hidden;
    }

    .what-youll-learn-left {
        order: 2;
        padding: 4.375rem 2rem 5rem 2rem;
        display: flex;
        flex-direction: column;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    .what-youll-learn-right {
        order: 1;
        display: flex;
        width: 100%;
        aspect-ratio: 408 / 264;
        min-height: 0;
    }

    .what-youll-learn-heading {
        font-size: 2rem;
        line-height: 1.25;
        /* margin-bottom: 1rem; */
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .what-youll-learn-description {
        font-family: 'Outfit', sans-serif;
        font-weight: 300;
        font-style: normal;
        font-size: 1rem;
        line-height: 1.5rem;
        letter-spacing: 0;
        /* margin-bottom: 1.5rem; */
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .what-youll-learn-separator {
        /* margin-bottom: 1.5rem; */
    }

    .what-youll-learn-points {
        grid-template-columns: 1fr;
        gap: 1rem;
        /* margin-bottom: 2rem; */
    }

    .what-youll-learn-button {
        display: block;
        margin: 0 auto 0 0;
        width: 12.5rem;
        height: 3.5rem;
        gap: 0.5rem;
        border-radius: 6.25rem;
        padding-top: 0.875rem;
        padding-right: 1.5rem;
        padding-bottom: 0.875rem;
        padding-left: 2rem;
        box-sizing: border-box;
        text-align: center;
        opacity: 1;
    }
}


/* Editor Preview Styles */
.wp-block-acf-what-you-ll-learn .what-youll-learn-block {
    border: 0.125rem dashed var(--color-border-medium);
    position: relative;
}

.wp-block-acf-what-you-ll-learn .what-youll-learn-block::after {
    content: "📚 What you'll learn - Learning points with image";
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 0.75rem;
    font-size: 0.6875rem;
    border-radius: 0.25rem;
    z-index: 10;
    font-weight: 500;
    max-width: 17.5rem;
    text-align: center;
    line-height: 1.3;
}