.imgcap-container {
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.imgcap-image {
    max-width: 40%;
    height: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.imgcap-caption {
    text-align: center;
    max-width: 60%;
    white-space: pre-line;
    color: var(--blockquote-color);
}

/* Desktop layout - caption on left */
@media (min-width: 768px) {
    .imgcap-container {
        flex-direction: row;
        align-items: flex-center;
    }

    .imgcap-caption {
        text-align: left;
        flex: 1;
        padding-right: 1rem;
    }

    .imgcap-image {
        flex: 2;
    }
}

/* Mobile layout - caption below */
@media (max-width: 767px) {
    .imgcap-container {
        flex-direction: column;
    }

    .imgcap-caption {
        order: 3;
        text-align: center;
        margin-bottom: 2rem;
        max-width: 90%;
    }

    .imgcap-image {
        max-width: 100%;
    }
}
