.wp-block-gutenberg-test-image-text {
    padding: var(--wp--custom--spacing--xl) 0;
}

.wp-block-gutenberg-test-image-text.background-gray {
    background-color: var(--wp--preset--color--gray);
}

.wp-block-gutenberg-test-image-text.background-white {
    background-color: var(--wp--preset--color--white);
}

.wp-block-gutenberg-test-image-text .container {
    max-width: var(--wp--style--global--content-size);
    margin: 0 auto;
    padding: 0 var(--wp--style--block-gap);
}

.wp-block-gutenberg-test-image-text .content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--wp--custom--spacing--xl);
    align-items: center;
}

@media (max-width: 992px) {
    .wp-block-gutenberg-test-image-text .content-wrapper {
        grid-template-columns: 1fr;
    }
}

.wp-block-gutenberg-test-image-text .content-wrapper.image-right > .image-wrapper {
    order: 2;
}

.wp-block-gutenberg-test-image-text .content-wrapper.image-right > .content {
    order: 1;
}

.wp-block-gutenberg-test-image-text .image-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.wp-block-gutenberg-test-image-text .image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        rgba(168, 32, 37, 0.2),
        transparent
    );
}

.wp-block-gutenberg-test-image-text .image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--wp--custom--transition--normal);
}

/* Frontend hover effect */
.wp-block-gutenberg-test-image-text:not(.is-selected) .image-wrapper:hover img {
    transform: scale(1.05);
}

.wp-block-gutenberg-test-image-text h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--color-primary);
}

.wp-block-gutenberg-test-image-text .subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    margin-top: -0.5rem;
    margin-bottom: 1.25rem;
    color: var(--color-secondary);
    opacity: 0.85;
}

.wp-block-gutenberg-test-image-text p {
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.wp-block-gutenberg-test-image-text .action-link {
    display: inline-flex;
    align-items: center;
    gap: var(--wp--custom--spacing--sm);
    color: var(--wp--preset--color--primary);
    font-weight: 500;
    margin-top: var(--wp--style--block-gap);
    text-decoration: none;
    transition: gap var(--wp--custom--transition--fast);
    cursor: pointer;
}

/* Frontend hover effect */
.wp-block-gutenberg-test-image-text:not(.is-selected) .action-link:hover {
    gap: var(--wp--custom--spacing--md);
}

/* Editor styles */
.wp-block-gutenberg-test-image-text .placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.5);
    font-size: 1.125rem;
}

.block-editor-block-list__block .wp-block-gutenberg-test-image-text .action-link {
    cursor: text;
}

.wp-block-gutenberg-test-image-text [data-rich-text-placeholder]::after {
    opacity: 0.5;
}