/* Text + Images Block Styles */
.text-images-block {
    margin: 2rem 0;
    overflow: hidden;
}

.text-images-content {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.content-row {
    display: flex;
    align-items: stretch;
    gap: 2rem;
}

/* Layout: Image Left/Right */
.text-images-block.layout-image-left .content-row,
.text-images-block.layout-image-right .content-row {
    flex-direction: row;
}

.text-images-block.layout-image-left .image-container {
    order: 1;
}

.text-images-block.layout-image-left .text-container {
    order: 2;
    flex: 1;
}

.text-images-block.layout-image-right .image-container {
    order: 2;
}

.text-images-block.layout-image-right .text-container {
    order: 1;
    flex: 1;
}

/* Layout: Image Top/Bottom */
.text-images-block.layout-image-top .text-images-content {
    flex-direction: column;
}

.text-images-block.layout-image-bottom .text-images-content {
    flex-direction: column-reverse;
}

.text-images-block.layout-image-top .content-row,
.text-images-block.layout-image-bottom .content-row {
    flex-direction: column;
}

/* Image Sizes */
.image-container.size-small {
    width: 200px;
    flex-shrink: 0;
}

.image-container.size-medium {
    width: 300px;
    flex-shrink: 0;
}

.image-container.size-large {
    width: 400px;
    flex-shrink: 0;
}

/* For top/bottom layouts, images should be full width or centered */
.text-images-block.layout-image-top .image-container,
.text-images-block.layout-image-bottom .image-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.image-container img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}

/* Text Content */
.text-container {
    display: flex;
    flex-direction: column;
}

.text-content {
    line-height: 1.6;
    font-size: 1.1rem;
}

.text-content h1,
.text-content h2,
.text-content h3 {
    color: var(--color-dark);
    margin: 0 0 1rem 0;
}

.text-content p {
    margin: 0 0 1rem 0;
}

.text-content ul,
.text-content ol {
    margin: 0 0 1rem 1.5rem;
}

.text-content a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.text-content a:hover {
    color: var(--color-medium);
    text-decoration: underline;
}

/* Vertical Alignment */
.text-images-block.align-top .content-row {
    align-items: flex-start;
}

.text-images-block.align-center .content-row {
    align-items: center;
}

.text-images-block.align-bottom .content-row {
    align-items: flex-end;
}

/* Padding */
.text-images-block.padding-small {
    padding: 1rem;
}

.text-images-block.padding-normal {
    padding: 1.5rem;
}

.text-images-block.padding-large {
    padding: 2.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-row {
        flex-direction: column !important;
        gap: 1.5rem;
    }
    
    .image-container.size-small,
    .image-container.size-medium,
    .image-container.size-large {
        width: 100% !important;
        max-width: none !important;
    }
    
    .text-images-block.layout-image-left .image-container,
    .text-images-block.layout-image-right .image-container {
        order: 1;
    }
    
    .text-images-block.layout-image-left .text-container,
    .text-images-block.layout-image-right .text-container {
        order: 2;
    }
    
    .text-images-block.padding-large {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .text-images-block.padding-normal {
        padding: 1rem;
    }
    
    .text-images-block.padding-large {
        padding: 1rem;
    }
    
    .content-row {
        gap: 1rem;
    }
}